🚀 lora-Kirchner-flux
lora-Kirchner-flux是一个基于black-forest-labs/FLUX.1-dev派生的LoRA模型。该模型可用于生成特定风格的图像,在图像生成领域具有一定的应用价值。
🚀 快速开始
推理示例
以下是使用该模型进行推理的Python代码示例:
import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'davidrd123/lora-Kirchner-flux'
pipeline = DiffusionPipeline.from_pretrained(model_id)
pipeline.load_lora_weights(adapter_id)
prompt = "The image is a black and white illustration of a man with a long beard and a long white beard, sitting on the ground with his arms raised above his head. He appears to be in a meditative pose, with his eyes closed and a peaceful expression on his face. Behind him, there are two other men, one lying on their backs and the other lying down. The background shows a mountain landscape with a cloudy sky. The text above the illustration reads 'Let the day perish where I was born. And they sat down with him upon the ground seven days & seven nights and none spoke a word unto him for they saw that his grief was very great.' The illustration is framed by a decorative border."
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
image = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
width=1024,
height=1024,
guidance_scale=7.5,
).images[0]
image.save("output.png", format="PNG")
✨ 主要特性
- 基于
black-forest-labs/FLUX.1-dev
基础模型派生,可生成特定风格图像。
- 文本编码器未进行训练,可复用基础模型的文本编码器进行推理。
📚 详细文档
验证设置
- CFG:
7.5
- CFG Rescale:
0.0
- 步数:
20
- 采样器:
None
- 种子:
42
- 分辨率:
1024
注意:验证设置不一定与训练设置相同。
训练设置
属性 |
详情 |
训练轮数 |
235 |
训练步数 |
4000 |
学习率 |
0.0001 |
有效批量大小 |
6 |
微批量大小 |
6 |
梯度累积步数 |
1 |
GPU数量 |
1 |
预测类型 |
flow-matching |
重新缩放的β零信噪比 |
False |
优化器 |
AdamW,随机bf16 |
精度 |
纯BF16 |
Xformers |
未使用 |
LoRA秩 |
64 |
LoRA Alpha |
None |
LoRA Dropout |
0.1 |
LoRA初始化风格 |
默认 |
数据集
ErnstLudwigKirchner
属性 |
详情 |
重复次数 |
0 |
图像总数 |
102 |
纵横比桶总数 |
1 |
分辨率 |
1024 px |
裁剪 |
True |
裁剪风格 |
居中 |
裁剪纵横比 |
方形 |
📄 许可证
本项目使用creativeml-openrail-m
许可证。