🚀 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许可证。
