🚀 promeai/FLUX.1-controlnet-lineart-promeai
promeai/FLUX.1-controlnet-lineart-promeai
包含了在 black-forest-labs/FLUX.1-dev
基础上,以线稿为条件训练得到的 ControlNet 权重。该模型可用于文本到图像的生成任务,为图像生成带来更多的控制和创意。
🚀 快速开始
示例图片
以下是一些示例图片,展示了模型的生成效果。
提示词:可爱的动漫女孩,有着巨大蓬松的耳廓狐耳朵和一条巨大蓬松的尾巴,金色凌乱的长发,蓝色的眼睛,穿着带有黑色金色树叶图案长裙的女仆装和白色围裙,张着嘴,手里拿着一个上面有蜡烛的精致黑森林蛋糕,置身于一个被烛光点亮的古老黑暗维多利亚式豪宅的厨房中,有一扇明亮的窗户可以看到雾气弥漫的森林,周围到处都是非常昂贵的东西。
输入控制图 |
生成结果图 |
 |
 |
💻 使用示例
基础用法
使用 diffusers
库调用该模型的示例代码如下:
import torch
from diffusers.utils import load_image
from diffusers.pipelines.flux.pipeline_flux_controlnet import FluxControlNetPipeline
from diffusers.models.controlnet_flux import FluxControlNetModel
base_model = 'black-forest-labs/FLUX.1-dev'
controlnet_model = 'promeai/FLUX.1-controlnet-lineart-promeai'
controlnet = FluxControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16)
pipe.to("cuda")
control_image = load_image("./images/example-control.jpg")
prompt = "cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open holding a fancy black forest cake with candles on top in the kitchen of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere"
image = pipe(
prompt,
control_image=control_image,
controlnet_conditioning_scale=0.6,
num_inference_steps=28,
guidance_scale=3.5,
).images[0]
image.save("./image.jpg")
高级用法
如果你使用的是 ComfyUI,我们也提供了一个 示例工作流。
🔧 技术细节
局限性和偏差
- 本模型并非用于提供事实信息,也不具备此能力。
- 作为一个统计模型,该检查点可能会放大现有的社会偏见。
- 模型可能无法生成与提示词匹配的输出。
- 模型对提示词的遵循程度很大程度上受提示风格的影响。
训练详情
此 ControlNet 在一张 A100 - 80G GPU 上进行训练,使用精心挑选的专有真实世界图像数据集。训练过程分为两个阶段:前期图像尺寸为 512,批次大小为 3;512 尺寸训练完成后,图像尺寸调整为 1024,批次大小为 1。在上述配置下,GPU 内存占用约 70G,训练约 3 天得到 14000 步的检查点。
📄 许可证
文档未提及许可证相关信息。
属性 |
详情 |
基础模型 |
black-forest-labs/FLUX.1-dev |
库名称 |
diffusers |
标签 |
flux、flux-diffusers、text-to-image、diffusers、controlnet、diffusers-training |
是否支持推理 |
是 |