Mani Flux Dress
基于FLUX.1-dev的LyCORIS适配器,专注于高级时装摄影图像生成
下载量 35
发布时间 : 4/16/2025
模型简介
该模型是一个基于FLUX.1-dev的LyCORIS适配器,专门用于生成展示特定礼服设计的高级时装摄影图像。模型经过优化,能够生成具有地中海风格背景的时尚摄影作品。
模型特点
高级时装摄影生成
专门优化用于生成高质量时装摄影图像,特别适合展示特定礼服设计
LyCORIS适配器
采用LyCORIS技术进行微调,保持基础模型能力的同时实现特定风格生成
多分辨率支持
训练时使用了从256x256到1024x1024多种分辨率的图像数据集
精细控制
支持通过详细提示词控制服装细节、场景设置和人物姿态等元素
模型能力
文生图
图生图
高分辨率图像生成
特定风格图像生成
使用案例
时尚设计
礼服设计展示
生成展示特定礼服设计的时尚摄影图像
可生成具有专业摄影质量的礼服展示图像
广告创意
时尚广告素材
快速生成用于时尚广告的高质量图像素材
可生成具有特定风格和场景设置的广告图像
🚀 mani - flux - dress
这是一个基于[black - forest - labs/FLUX.1 - dev](https://huggingface.co/black - forest - labs/FLUX.1 - dev)的LyCORIS适配器。它可用于特定风格的图像生成,在时尚摄影场景图像生成方面具有一定优势。
🚀 快速开始
推理示例
import torch
from diffusers import DiffusionPipeline
from lycoris import create_lycoris_from_weights
def download_adapter(repo_id: str):
import os
from huggingface_hub import hf_hub_download
adapter_filename = "pytorch_lora_weights.safetensors"
cache_dir = os.environ.get('HF_PATH', os.path.expanduser('~/.cache/huggingface/hub/models'))
cleaned_adapter_path = repo_id.replace("/", "_").replace("\\", "_").replace(":", "_")
path_to_adapter = os.path.join(cache_dir, cleaned_adapter_path)
path_to_adapter_file = os.path.join(path_to_adapter, adapter_filename)
os.makedirs(path_to_adapter, exist_ok=True)
hf_hub_download(
repo_id=repo_id, filename=adapter_filename, local_dir=path_to_adapter
)
return path_to_adapter_file
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_repo_id = 'PixelWormhole/mani-flux-dress'
adapter_filename = 'pytorch_lora_weights.safetensors'
adapter_file_path = download_adapter(repo_id=adapter_repo_id)
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
lora_scale = 1.0
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_file_path, pipeline.transformer)
wrapper.merge_to()
prompt = "A film still of a high fashion photoshoot featuring the _8FSL39XP1_ Dress, an elegant off-the-shoulder design in delicate white lace with floral motifs. The dress is form-fitting, mini-length, with long sleeves that flare slightly at the cuffs. The scene is set in a luxurious, modern Mediterranean architectural space with a sea view. A beautiful, young, natural-looking European woman with long hair is captured in a dynamic mid-motion pose, either mid-step or gently turning. She stands against a backdrop of clean white stone and curated designer furniture in neutral tones, with the calm, open sea visible in the distance. Her expression is serene and self-assured, her posture poised and refined. Natural daylight enhances the soft textures and casts gentle shadows across the scene. The color palette blends creamy whites, stone beiges, and hints of ocean blue."
## Optional: quantise the model to save on vram.
## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
#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') # the pipeline is already in its target precision level
model_output = pipeline(
prompt=prompt,
num_inference_steps=28,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
width=1024,
height=1024,
guidance_scale=3.0,
).images[0]
model_output.save("output.png", format="PNG")
✨ 主要特性
- 基于LyCORIS技术,可有效适配基础模型,提升特定场景的图像生成效果。
- 支持多种推理设置,可灵活调整以满足不同需求。
📚 详细文档
验证设置
- CFG:
3.0
- CFG Rescale:
0.0
- 步数:
28
- 采样器:
FlowMatchEulerDiscreteScheduler
- 随机种子:
42
- 分辨率:
1024x1024
- 跳过层引导:无
注意:验证设置不一定与训练设置相同。
你可以在以下图库中找到一些示例图像:
文本编码器未进行训练。你可以在推理时重用基础模型的文本编码器。
训练设置
属性 | 详情 |
---|---|
训练轮数 | 99 |
训练步数 | 4000 |
学习率 | 1e - 05 |
学习率调度 | 多项式 |
热身步数 | 100 |
最大梯度值 | 2.0 |
有效批次大小 | 1 |
微批次大小 | 1 |
梯度累积步数 | 1 |
GPU数量 | 1 |
梯度检查点 | 是 |
预测类型 | flow_matching (额外参数=['shift = 3', 'flux_guidance_mode = constant', 'flux_guidance_value = 1.0']) |
优化器 | adamw_bf16 |
可训练参数精度 | 纯BF16 |
基础模型精度 | no_change |
字幕丢弃概率 | 5.0% |
LyCORIS配置
{
"algo": "lora",
"multiplier": 1.0,
"linear_dim": 64,
"linear_alpha": 32,
"apply_preset": {
"target_module": [
"Attention",
"FeedForward"
],
"module_algo_map": {
"Attention": {
"factor": 16
},
"FeedForward": {
"factor": 8
}
}
}
}
数据集
数据集名称 | 重复次数 | 图像总数 | 宽高比桶总数 | 分辨率 | 是否裁剪 | 裁剪风格 | 裁剪宽高比 | 是否用于正则化数据 |
---|---|---|---|---|---|---|---|---|
hidream - test - dataset - 256 | 0 | 5 | 2 | 0.065536兆像素 | 否 | 无 | 无 | 否 |
hidream - test - dataset - crop - 256 | 0 | 5 | 1 | 0.065536兆像素 | 是 | 居中 | 正方形 | 否 |
hidream - test - dataset - 512 | 0 | 5 | 3 | 0.262144兆像素 | 否 | 无 | 无 | 否 |
hidream - test - dataset - crop - 512 | 0 | 5 | 1 | 0.262144兆像素 | 是 | 居中 | 正方形 | 否 |
hidream - test - dataset - 768 | 0 | 5 | 1 | 0.589824兆像素 | 否 | 无 | 无 | 否 |
hidream - test - dataset - crop - 768 | 0 | 5 | 1 | 0.589824兆像素 | 是 | 居中 | 正方形 | 否 |
hidream - test - dataset - 1024 | 0 | 5 | 3 | 1.048576兆像素 | 否 | 无 | 无 | 否 |
hidream - test - dataset - crop - 1024 | 0 | 5 | 1 | 1.048576兆像素 | 是 | 居中 | 正方形 | 否 |
📄 许可证
许可证类型:other
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