🚀 Flux-Super-Paint-LoRA
このモデルは、テキストから画像への変換を行うLoRAモデルで、様々な抽象画や日常の物体を描いた画像を生成することができます。
🚀 クイックスタート
このモデルを使用するには、以下の手順に従ってください。
import torch
from pipelines import DiffusionPipeline
base_model = "black-forest-labs/FLUX.1-dev"
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
lora_repo = "strangerzonehf/Flux-Super-Paint-LoRA"
trigger_word = "Super Paint"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
✨ 主な機能
- 様々なテキストプロンプトに基づいて、抽象画や日常の物体を描いた画像を生成することができます。
- 特定のトリガーワードを使用することで、特定のスタイルの画像を生成することができます。
📦 インストール
このモデルを使用するには、上記のクイックスタートのコードを実行してください。必要なライブラリをインストールする必要があります。
💻 使用例
基本的な使用法
import torch
from pipelines import DiffusionPipeline
base_model = "black-forest-labs/FLUX.1-dev"
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
lora_repo = "strangerzonehf/Flux-Super-Paint-LoRA"
trigger_word = "Super Paint"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
prompt = 'Super Paint, An abstract painting of a red basket filled with yellow french fries. The basket is made of red paper, and the basket is attached to a light blue wall. The yellow fries are arranged in a wavy pattern, and there is a yellow letter M on the red paper. There is a shadow of the basket on the left side of the painting, and on the right side, there are black lines that form the letters V and X.'
image = pipe(prompt).images[0]
image.save("generated_image.png")
高度な使用法
トリガーワードを変更することで、異なるスタイルの画像を生成することができます。
trigger_word = "New Style Paint"
pipe.load_lora_weights(lora_repo, trigger_word=trigger_word)
prompt = f'{trigger_word}, A painting of a glass jar with a green lid. The jar is filled with pickles. The pickles are yellow and green. There is a green stripe on the lid of the jar. There are black letters on the jar that are black. The jars are sitting on a light colored surface. Theres a shadow on the left side of the jars. The wall behind the jar is white.'
image = pipe(prompt).images[0]
image.save("new_style_image.png")
📚 ドキュメント
モデルの説明
このモデルは、black-forest-labs/FLUX.1-dev
をベースモデルとして使用し、LoRA技術を用いて学習された画像生成モデルです。
画像処理パラメータ
パラメータ |
値 |
パラメータ |
値 |
LRスケジューラ |
constant |
ノイズオフセット |
0.03 |
オプティマイザ |
AdamW |
マルチレゾリューションノイズ割引 |
0.1 |
ネットワーク次元 |
64 |
マルチレゾリューションノイズ反復回数 |
10 |
ネットワークアルファ |
32 |
繰り返しとステップ数 |
26 & 3400 |
エポック数 |
25 |
エポックごとの保存間隔 |
1 |
ラベリング
ラベリングには、florence2-en
(自然言語と英語)が使用されています。
トータルの学習画像数
学習に使用された画像の総数は36枚です。
最適な解像度と推論
解像度 |
アスペクト比 |
推奨事項 |
1280 x 832 |
3:2 |
最適 |
1024 x 1024 |
1:1 |
デフォルト |
推論範囲
トリガーワード
画像生成をトリガーするには、Super Paint
を使用する必要があります。
モデルのダウンロード
このモデルの重みは、Safetensors形式で利用可能です。
ダウンロードは、Files & versionsタブから行うことができます。
📄 ライセンス
このモデルは、creativeml-openrail-m
ライセンスの下で提供されています。