🚀 纸板v2 - 通量模型
纸板v2 - 通量(Cardboard-v2-Flux)是一款基于文本生成图像的模型,可通过特定提示词生成独特的图像,为图像创作带来更多可能。
🚀 快速开始
环境设置
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/Cardboard-v2-Flux "
trigger_word = "Cardboard v2"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
触发词使用
你需要使用 Cardboard v2
来触发图像生成。
模型下载
该模型的权重以Safetensors格式提供。
点击下载,可在“文件与版本”标签中获取。
✨ 主要特性
- 文本到图像转换:能够根据输入的文本描述生成对应的图像。
- LoRA技术:采用LoRA技术,提升模型训练效率和灵活性。
- 多场景适用:可生成不同风格和场景的图像,满足多样化需求。
📦 安装指南
暂未提供具体安装步骤,可参考上述快速开始中的环境设置部分。
💻 使用示例
基础用法
prompt = "Cardboard v2, a cardboard cutout of a bald mans face is adorned with a black beard and mustache. The mans head is encased in a pair of pink headphones that are attached to his head. The headphones have a thin pink cord running from the bottom to the top of the ears. The background is a vibrant turquoise color, adding a pop of color to the scene."
image = pipe(prompt).images[0]
image.save("output.png")
📚 详细文档
模型描述

图像生成示例
以下是一些文本输入及对应的图像输出示例:
- **输入文本**:'Cardboard v2, a cardboard cutout of a bald mans face is adorned with a black beard and mustache. The mans head is encased in a pair of pink headphones that are attached to his head. The headphones have a thin pink cord running from the bottom to the top of the ears. The background is a vibrant turquoise color, adding a pop of color to the scene.'
**输出图像**:[点击查看](images/111.png)
- **输入文本**:'Cardboard v2, a cardboard cutout of a mans face is displayed against a blue backdrop. The mans head is adorned with a brown fedora hat, a white face, and a yellow mustache. His eyes are a piercing blue, and his eyebrows are a lighter shade of yellow. His mustache is a vibrant yellow, adding a pop of color to the scene. He is wearing a brown shirt, and the shirt is a dark brown.'
**输出图像**:[点击查看](images/222.png)
- **输入文本**:'Cardboard v2, a cardboard cutout of a man with green skin tone and exaggerated white eyebrows shaped like lightning bolts. He is wearing a purple beret tilted to the side and a red monocle over one eye. His lips are painted matte black, and the background is a glowing lime yellow.'
**输出图像**:[点击查看](images/333.png)
- **输入文本**:'Cardboard v2, a cardboard cutout of a mans face painted in grayscale tones is highlighted by a bright neon green mohawk that arcs dramatically to the side. He sports a pair of round, red-tinted sunglasses and a deep purple scarf loosely draped around his neck. The backdrop is a high-saturation magenta, creating a bold visual contrast.'
**输出图像**:[点击查看](images/444.png)
图像参数处理
参数 |
值 |
参数 |
值 |
学习率调度器 |
常数 |
噪声偏移 |
0.03 |
优化器 |
AdamW |
多分辨率噪声折扣 |
0.1 |
网络维度 |
64 |
多分辨率噪声迭代次数 |
10 |
网络阿尔法值 |
32 |
重复次数与步数 |
20 & 2950 |
训练轮数 |
24 |
每N轮保存一次 |
1 |
标注信息
标注使用佛罗伦萨2 - 英语(自然语言与英语)。
训练数据
总共使用了21张图像进行训练。
最佳尺寸与推理
尺寸 |
宽高比 |
推荐情况 |
1280 x 832 |
3:2 |
最佳 |
1024 x 1024 |
1:1 |
默认 |
推理范围
🔧 技术细节
该模型基于 black-forest-labs/FLUX.1-dev
基础模型,采用LoRA技术进行微调。通过特定的图像参数处理和训练数据,使得模型能够根据输入的提示词生成独特的图像。在推理过程中,推荐使用特定的尺寸和推理步数,以获得最佳的图像生成效果。
📄 许可证
本模型使用 flux-1-dev-non-commercial-license
许可证。
查看许可证详情