🚀 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
許可證。