🚀 mert LoRa訓練器 (開發中...)
mert LoRa訓練器是用於特定圖像生成的工具,可基於特定模型進行訓練和圖像生成,藉助相關庫能實現豐富的圖像生成效果。
🚀 快速開始
本項目在Replicate上進行訓練,訓練鏈接如下:
https://replicate.com/ostris/flux-dev-lora-trainer/train
✨ 主要特性
觸發詞
你需要使用 mert
來觸發圖像生成。
💻 使用示例
基礎用法
使用 🧨 diffusers庫 進行圖像生成的示例代碼如下:
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("prithivMLmods/Canopus-LoRA-Flux-UltraRealism-2.0", torch_dtype=torch.bfloat16)
pipe.load_lora_weights('codermert/mert_flux', weight_name='flux_train_replicate.safetensors')
pipe.fuse_lora(lora_scale=0.9)
pipe.to("cuda")
prompt = "close up portrait, Amidst the interplay of light and shadows in a photography studio,a soft spotlight traces the contours of a face,highlighting a figure clad in a sleek black turtleneck. The garment,hugging the skin with subtle luxury,complements the Caucasian model's understated makeup,embodying minimalist elegance. Behind,a pale gray backdrop extends,its fine texture shimmering subtly in the dim light,artfully balancing the composition and focusing attention on the subject. In a palette of black,gray,and skin tones,simplicity intertwines with profundity,as every detail whispers untold stories."
image = pipe(prompt,
num_inference_steps=24,
guidance_scale=3.5,
width=768, height=1024,
).images[0]
image.save(f"example.png")
如需瞭解更多詳細信息,包括LoRAs的加權、合併和融合等內容,請查看 diffusers中加載LoRAs的文檔。
📄 許可證
本項目採用 flux-1-dev-non-commercial-license 許可證。
信息表格
屬性 |
詳情 |
基礎模型 |
black-forest-labs/FLUX.1-dev |
管道標籤 |
文本到圖像 |
實例提示詞 |
mert |
標籤 |
flux、diffusers、lora |
語言 |
en |
許可證名稱 |
flux-1-dev-non-commercial-license |
許可證鏈接 |
https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md |