🚀 Flux.1-Dev-Sketch-Card-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 = "prithivMLmods/Flux.1-Dev-Sketch-Card-LoRA"
trigger_word = "sketch card"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
觸發詞使用
你應該使用 sketch card
來觸發圖像生成。
模型下載
此模型的權重以Safetensors格式提供。
點擊下載,可在“Files & versions” 標籤中找到。
✨ 主要特性
- 文本到圖像生成:根據輸入的文本描述生成對應的草圖卡片圖像。
- 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 = "prithivMLmods/Flux.1-Dev-Sketch-Card-LoRA"
trigger_word = "sketch card"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
text = 'sketch card, a close-up of a hand holding a card with a cartoon image of Mario on it. The card has a yellow background with a red cap and a red M on it, and the character is wearing blue overalls with a yellow button on the left side of his chest. The character is waving his left hand and has a big smile on his face. To the right of the card is a small cartoon character with a blue outfit and red hat. They are standing on a table with a white tablecloth. The table is adorned with small lights, adding a pop of color to the scene.'
image = pipe(text).images[0]
image.save("output.png")
📚 詳細文檔
模型描述
prithivMLmods/Flux.1-Dev-Sketch-Card-LoRA
屬性 |
詳情 |
基礎模型 |
black-forest-labs/FLUX.1-dev |
實例提示詞 |
sketch card |
許可證 |
creativeml-openrail-m |
圖像處理參數
參數 |
值 |
參數 |
值 |
學習率調度器 |
constant |
噪聲偏移 |
0.03 |
優化器 |
AdamW |
多分辨率噪聲折扣 |
0.1 |
網絡維度 |
64 |
多分辨率噪聲迭代次數 |
10 |
網絡阿爾法 |
32 |
重複次數與步數 |
14 & 1990 |
訓練輪數 |
16 |
每N輪保存一次 |
1 |
標註信息
標註使用的是florence2-en(自然語言 & 英語)。
訓練使用的總圖像數
13
最佳尺寸
- 768 x 1024(最佳)
- 1024 x 1024(默認)
📄 許可證
本模型使用的許可證為 creativeml-openrail-m。
⚠️ 重要提示
該模型仍處於訓練階段,這不是最終版本,可能會存在偽影,並且在某些情況下表現不佳。