🚀 Flux-Sketch-Sized-LoRA模型
Flux-Sketch-Sized-LoRA是一款文本到圖像的模型,藉助LoRA和Diffusers技術,能依據特定文本提示生成精美的圖像,適用於多種圖像創作場景。
🚀 快速開始
環境設置
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-Sketch-Sized-LoRA"
trigger_word = "Sketch Sized"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
觸發詞使用
你需要使用 Sketch Sized
來觸發圖像生成。
模型下載
該模型的權重以Safetensors格式提供。
點擊下載 ,可在“Files & versions”標籤中獲取。
✨ 主要特性
- 多樣化圖像生成:能夠根據不同的文本提示,生成如Wall-E、聖誕樹、人物肖像、動物等多種主題的圖像。
- 參數可調節:提供了豐富的圖像處理參數,可根據需求調整圖像生成效果。
📦 安裝指南
暫未提供具體安裝步驟,可參考上述快速開始部分進行環境設置。
💻 使用示例
基礎用法
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-Sketch-Sized-LoRA"
trigger_word = "Sketch Sized"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
prompt = 'Sketch Sized, A medium-sized painting of Wall-E, painted in shades of yellow and black. His eyes, large and round, are painted in a glossy silver, giving a curious and endearing expression. His body is detailed with scratches and rust, hinting at years of service. The small, claw-like hands are slightly raised, as if reaching for something. The background is a soft sandy beige, with faint hints of scattered stars and dust.'
image = pipe(prompt).images[0]
image.save("generated_image.png")
📚 詳細文檔
圖像處理參數
屬性 |
詳情 |
LR Scheduler |
constant |
Optimizer |
AdamW |
Network Dim |
64 |
Network Alpha |
32 |
Epoch |
20 |
Noise Offset |
0.03 |
Multires Noise Discount |
0.1 |
Multires Noise Iterations |
10 |
Repeat & Steps |
27 & 3490 |
Save Every N Epochs |
1 |
標註信息
標註採用florence2 - en(自然語言 & 英語)。
訓練圖像數量
總共使用了30張(14位原始圖像)進行訓練。
最佳尺寸與推理
尺寸 |
寬高比 |
推薦情況 |
1280 x 832 |
3:2 |
最佳 |
1024 x 1024 |
1:1 |
默認 |
推理範圍
📄 許可證
本模型採用creativeml - openrail - m許可證。
