🚀 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 |