Reddy V3
模型简介
这是一个基于FLUX.1-dev的标准PEFT LoRA模型,主要用于文生图和图生图任务,能够生成高质量、细节丰富的图像,特别擅长处理女性形象和时尚摄影风格的场景。
模型特点
高度细节化
能够生成具有丰富细节的图像,特别是在人物形象和服装细节方面表现出色。
艺术风格多样
支持多种艺术风格,从写实摄影到魔幻风格都能胜任。
女性形象优化
特别优化了对女性形象的生成能力,能够准确表现各种体型和服装细节。
LoRA适配
采用PEFT LoRA技术,可以在基础模型上灵活调整,保持高效推理。
模型能力
文生图
图生图
高分辨率图像生成
风格化图像生成
人物形象生成
使用案例
艺术创作
时尚摄影
生成高质量的时尚摄影风格图像,包括内衣、时装等场景。
能够生成具有专业摄影质感的时尚图像
角色设计
为游戏或插画创作角色形象,特别是女性角色设计。
生成细节丰富的角色形象,包括服装、发型等特征
商业应用
广告素材生成
快速生成产品展示或广告宣传所需的图像素材。
生成符合商业要求的专业级图像
🚀 reddy-v3
reddy-v3 是一个基于 black-forest-labs/FLUX.1-dev 的标准 PEFT LoRA 模型。该模型可用于文本到图像的生成任务,通过特定的训练和验证设置,能够生成具有特定风格和质量的图像。
🚀 快速开始
本项目是基于 black-forest-labs/FLUX.1-dev 派生的标准 PEFT LoRA 模型。以下是使用该模型进行推理的基本步骤:
import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'Unmapped2895/reddy-v3'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # 直接以 bf16 格式加载
pipeline.load_lora_weights(adapter_id)
prompt = "Realistic wide shot photo of woman posing in a luxurious satin lingerie set, featuring a plunging bra, delicate thong and a classic garter belt with black stockings. The satin lingerie shimmers softly in the light, and the cut emphasizes both sophistication and a hint of allure. The lingerie is detailed with fine lace edges, highlighting her alluring figure. She elegantly styled hair as if getting ready for a formal event. The photo has a cinematic quality with rays of light and dramatic play of shadow and light"
## 可选:对模型进行量化以节省显存。
## 注意:模型在训练期间已进行量化,因此建议在推理时也进行相同操作。
from optimum.quanto import quantize, freeze, qint8
quantize(pipeline.transformer, weights=qint8)
freeze(pipeline.transformer)
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # 管道已处于目标精度级别
model_output = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
width=832,
height=1216,
guidance_scale=3.5,
).images[0]
model_output.save("output.png", format="PNG")
💡 使用建议
- 文本编码器在训练过程中未进行训练,推理时可复用基础模型的文本编码器。
- 验证设置不一定与训练设置相同,使用时需注意。
✨ 主要特性
- 基于
black-forest-labs/FLUX.1-dev
基础模型派生,具有特定的图像生成能力。 - 提供了详细的训练和验证设置,方便用户了解模型的训练过程。
- 支持推理时的模型量化,可节省显存。
📦 安装指南
文档中未提及具体安装命令,暂不提供安装指南。
💻 使用示例
基础用法
import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'Unmapped2895/reddy-v3'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # 直接以 bf16 格式加载
pipeline.load_lora_weights(adapter_id)
prompt = "Realistic wide shot photo of woman posing in a luxurious satin lingerie set, featuring a plunging bra, delicate thong and a classic garter belt with black stockings. The satin lingerie shimmers softly in the light, and the cut emphasizes both sophistication and a hint of allure. The lingerie is detailed with fine lace edges, highlighting her alluring figure. She elegantly styled hair as if getting ready for a formal event. The photo has a cinematic quality with rays of light and dramatic play of shadow and light"
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # 管道已处于目标精度级别
model_output = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
width=832,
height=1216,
guidance_scale=3.5,
).images[0]
model_output.save("output.png", format="PNG")
高级用法
import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'Unmapped2895/reddy-v3'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # 直接以 bf16 格式加载
pipeline.load_lora_weights(adapter_id)
prompt = "Realistic wide shot photo of woman posing in a luxurious satin lingerie set, featuring a plunging bra, delicate thong and a classic garter belt with black stockings. The satin lingerie shimmers softly in the light, and the cut emphasizes both sophistication and a hint of allure. The lingerie is detailed with fine lace edges, highlighting her alluring figure. She elegantly styled hair as if getting ready for a formal event. The photo has a cinematic quality with rays of light and dramatic play of shadow and light"
## 可选:对模型进行量化以节省显存。
## 注意:模型在训练期间已进行量化,因此建议在推理时也进行相同操作。
from optimum.quanto import quantize, freeze, qint8
quantize(pipeline.transformer, weights=qint8)
freeze(pipeline.transformer)
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # 管道已处于目标精度级别
model_output = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
width=832,
height=1216,
guidance_scale=3.5,
).images[0]
model_output.save("output.png", format="PNG")
📚 详细文档
验证设置
- CFG:
3.5
- CFG Rescale:
0.0
- Steps:
20
- Sampler:
FlowMatchEulerDiscreteScheduler
- Seed:
42
- Resolution:
832x1216
- Skip-layer guidance:无
注意:验证设置不一定与训练设置相同。
你可以在以下图库中找到一些示例图像:
训练设置
属性 | 详情 |
---|---|
训练轮数 | 10 |
训练步数 | 2000 |
学习率 | 0.0001 |
学习率调度 | 常量 |
预热步数 | 500 |
最大梯度值 | 2.0 |
有效批量大小 | 1 |
微批量大小 | 1 |
梯度累积步数 | 1 |
GPU 数量 | 1 |
梯度检查点 | 启用 |
预测类型 | flow-matching (额外参数=['shift=3', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flow_matching_loss=compatible', 'flux_lora_target=all']) |
优化器 | adamw_bf16 |
可训练参数精度 | Pure BF16 |
基础模型精度 | int8-quanto |
字幕丢弃概率 | 1.0% |
LoRA 秩 | 32 |
LoRA Alpha | 无 |
LoRA 丢弃率 | 0.1 |
LoRA 初始化风格 | 默认 |
数据集
reddy-v2-512
属性 | 详情 |
---|---|
重复次数 | 10 |
图像总数 | 13 |
宽高比桶总数 | 1 |
分辨率 | 0.262144 兆像素 |
是否裁剪 | 否 |
裁剪风格 | 无 |
裁剪宽高比 | 无 |
是否用于正则化数据 | 否 |
reddy-v2-1024
属性 | 详情 |
---|---|
重复次数 | 10 |
图像总数 | 5 |
宽高比桶总数 | 1 |
分辨率 | 1.048576 兆像素 |
是否裁剪 | 否 |
裁剪风格 | 无 |
裁剪宽高比 | 无 |
是否用于正则化数据 | 否 |
🔧 技术细节
本模型是基于 black-forest-labs/FLUX.1-dev
基础模型派生的标准 PEFT LoRA 模型。在训练过程中,使用了特定的训练设置和数据集,以达到较好的图像生成效果。推理时,可通过加载基础模型和 LoRA 权重,结合特定的提示信息进行图像生成。同时,支持对模型进行量化以节省显存。
📄 许可证
本项目使用其他许可证。具体许可证信息请参考相关文档。
Stable Diffusion V1 5
Openrail
稳定扩散是一种潜在的文本到图像扩散模型,能够根据任何文本输入生成逼真的图像。
图像生成
S
stable-diffusion-v1-5
3.7M
518
Stable Diffusion Inpainting
Openrail
基于稳定扩散的文本到图像生成模型,具备图像修复能力
图像生成
S
stable-diffusion-v1-5
3.3M
56
Stable Diffusion Xl Base 1.0
SDXL 1.0是基于扩散的文本生成图像模型,采用专家集成的潜在扩散流程,支持高分辨率图像生成
图像生成
S
stabilityai
2.4M
6,545
Stable Diffusion V1 4
Openrail
稳定扩散是一种潜在文本到图像扩散模型,能够根据任意文本输入生成逼真图像。
图像生成
S
CompVis
1.7M
6,778
Stable Diffusion Xl Refiner 1.0
SD-XL 1.0优化器模型是Stability AI开发的图像生成模型,专为提升SDXL基础模型生成的图像质量而设计,特别擅长最终去噪步骤处理。
图像生成
S
stabilityai
1.1M
1,882
Stable Diffusion 2 1
基于扩散的文本生成图像模型,支持通过文本提示生成和修改图像
图像生成
S
stabilityai
948.75k
3,966
Stable Diffusion Xl 1.0 Inpainting 0.1
基于Stable Diffusion XL的潜在文本到图像扩散模型,具备通过遮罩进行图像修复的功能
图像生成
S
diffusers
673.14k
334
Stable Diffusion 2 Base
基于扩散的文生图模型,可根据文本提示生成高质量图像
图像生成
S
stabilityai
613.60k
349
Playground V2.5 1024px Aesthetic
其他
开源文生图模型,能生成1024x1024分辨率及多种纵横比的美学图像,在美学质量上处于开源领域领先地位。
图像生成
P
playgroundai
554.94k
723
Sd Turbo
SD-Turbo是一款高速文本生成图像模型,仅需单次网络推理即可根据文本提示生成逼真图像。该模型作为研究原型发布,旨在探索小型蒸馏文本生成图像模型。
图像生成
S
stabilityai
502.82k
380
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98
智启未来,您的人工智能解决方案智库
简体中文