🚀 lora-Kirchner-flux
このLoRAは、black-forest-labs/FLUX.1-dev から派生したものです。テキストを画像に変換する能力を持ち、特定のスタイルやシーンを生成するのに役立ちます。
🚀 クイックスタート
このLoRAを使用することで、特定のスタイルやシーンの画像を生成できます。以下に、基本的な使用方法を示します。
✨ 主な機能
- 特定のスタイルやシーンの画像生成が可能です。
- 学習時の検証プロンプトを使用して、品質を検証できます。
📦 インストール
このLoRAを使用するには、以下のようにパイプラインをロードします。
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)
💻 使用例
基本的な使用法
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")
📚 ドキュメント
検証設定
- CFG:
7.5
- CFG Rescale:
0.0
- ステップ数:
20
- サンプラー:
None
- シード:
42
- 解像度:
1024
注: 検証設定は 学習設定 と必ずしも同じではありません。
学習設定
属性 |
詳情 |
学習エポック数 |
235 |
学習ステップ数 |
4000 |
学習率 |
0.0001 |
有効バッチサイズ |
6 |
マイクロバッチサイズ |
6 |
勾配累積ステップ数 |
1 |
GPU数 |
1 |
予測タイプ |
flow-matching |
リスケールされたベータゼロSNR |
False |
オプティマイザ |
AdamW, stochastic bf16 |
精度 |
Pure BF16 |
Xformers |
未使用 |
LoRAランク |
64 |
LoRAアルファ |
None |
LoRAドロップアウト |
0.1 |
LoRA初期化スタイル |
default |
データセット
ErnstLudwigKirchner
属性 |
詳情 |
繰り返し数 |
0 |
画像総数 |
102 |
アスペクトバケット総数 |
1 |
解像度 |
1024 px |
クロップ |
True |
クロップスタイル |
中央 |
クロップアスペクト |
正方形 |
推論
上記の 使用例 を参照してください。
📄 ライセンス
このプロジェクトは、creativeml-openrail-m ライセンスの下で提供されています。