🚀 2Color-Illustration模型
本模型专注于生成双色插画,可依据文本描述生成对应风格的图像,在图像创作领域有较高的应用价值。
🚀 快速开始
环境设置
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/2Color-Illustration"
trigger_word = "2color illustration"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
触发词使用
你应该使用 2color illustration
来触发图像生成。
模型下载
此模型的权重以Safetensors格式提供。
点击下载,可在“文件与版本”选项卡中获取。
✨ 主要特性
- 能够根据文本描述生成双色插画风格的图像。
- 提供了详细的图像处理参数和最佳尺寸建议,有助于生成高质量的图像。
📦 安装指南
暂未提供具体安装步骤,可参考上述快速开始部分的代码示例进行环境设置。
💻 使用示例
基础用法
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/2Color-Illustration"
trigger_word = "2color illustration"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
text_prompt = '2color illustration, A purple and black drawing of a woman laying on a bed. The bed is covered with a green blanket. There is a black lamp hanging from the ceiling above the bed. To the right of the bed is a table with a basket on top of it. There are books and bottles on the table.'
image = pipe(text_prompt).images[0]
image.show()
📚 详细文档
模型描述

图像处理参数
参数 |
值 |
参数 |
值 |
LR调度器 |
constant |
噪声偏移 |
0.03 |
优化器 |
AdamW |
多分辨率噪声折扣 |
0.1 |
网络维度 |
64 |
多分辨率噪声迭代次数 |
10 |
网络Alpha |
32 |
重复次数与步数 |
24 & 2770 |
训练轮数 |
20 |
每N轮保存一次 |
1 |
标注:florence2 - en(自然语言与英语)
用于训练的总图像数:22
最佳尺寸与推理
尺寸 |
宽高比 |
推荐情况 |
1280 x 832 |
3:2 |
最佳 |
1024 x 1024 |
1:1 |
默认 |
推理范围
🔧 技术细节
本模型基于 black-forest-labs/FLUX.1-dev
基础模型,使用 2color illustration
作为实例提示进行训练。在训练过程中,采用了特定的图像处理参数,如恒定的学习率调度器、AdamW优化器等,以达到较好的图像生成效果。同时,通过设置多分辨率噪声折扣和迭代次数,进一步优化图像的细节和质量。
📄 许可证
本模型使用的许可证为 creativeml-openrail-m
。