为Qwen-Image模型打造的真实感LoRA,提升面部细节、皮肤纹理、色彩还原与光影效果,支持多场景高质量图像生成,提供ComfyUI工作流。【此简介由AI生成】
license: apache-2.0 language:
- en base_model:
- Qwen/Qwen-Image pipeline_tag: text-to-image tags:
- lora
- qwen
- qwen-image
- realism
- realism-lora library_name: diffusers
LORA Qwen-Image 示例
适用于 Qwen-Image 的 Lora
需包含 Realism 一词
📝 更新日志
2025年8月13日 - Realism v1.1 版本发布
- 增强面部细节质量:优化精细面部特征及皮肤纹理渲染效果
- 提升色彩还原度:全场景色彩表现更精准、更鲜明
- 改进风景光影效果:增强户外场景自然光照效果及阴影细节
- 增加不同 ethnicity 多样性:优化各 racial 和 ethnic 特征的呈现效果与质量
🧪 使用方法
🔧 初始化
from diffusers import DiffusionPipeline
import torch
model_name = "Qwen/Qwen-Image"
# Load the pipeline
if torch.cuda.is_available():
torch_dtype = torch.bfloat16
device = "cuda"
else:
torch_dtype = torch.float32
device = "cpu"
pipe = DiffusionPipeline.from_pretrained(model_name, torch_dtype=torch_dtype)
pipe = pipe.to(device)
🔌 加载 LoRA 权重
# Load LoRA weights
pipe.load_lora_weights('flymy_realism.safetensors', adapter_name="lora")
🎨 使用基于人物训练的 lora 生成图像
prompt = '''Super Realism portrait of a teenager woman of African descent, serene calmness, arms crossed, illuminated by dramatic studio lighting, sunlit park in the background, adorned with delicate jewelry, three-quarter view, sun-kissed skin with natural imperfections, loose shoulder-length curls, slightly squinting eyes, environmental street portrait with text "FLYMY AI" on t-shirt.'''
negative_prompt = " "
image = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
num_inference_steps=50,
true_cfg_scale=5,
generator=torch.Generator(device="cuda").manual_seed(346346)
)
# Display the image (in Jupyter or save to file)
image.show()
# or
image.save("output.png")
🖼️ 示例输出

🎛️ 与 ComfyUI 配合使用
我们提供了一个即用型 ComfyUI 工作流,可与我们训练的 LoRA 模型配合使用。按照以下步骤设置和使用该工作流:
设置说明
-
下载最新版 ComfyUI:
- 访问 ComfyUI GitHub 仓库
- 克隆或下载最新版本
-
安装 ComfyUI:
- 按照 ComfyUI 仓库 中的安装说明进行操作
- 确保所有依赖项均已正确安装
-
下载 Qwen-Image 模型权重:
- 前往 Qwen-Image ComfyUI 权重
- 下载所有模型文件
-
将 Qwen-Image 权重放置到 ComfyUI 中:
- 将下载的 Qwen-Image 模型文件复制到
ComfyUI/models/中的相应文件夹 - 按照模型仓库中指定的文件夹结构进行操作
- 将下载的 Qwen-Image 模型文件复制到
-
下载我们的预训练 LoRA 权重:
- 访问 flymy-ai/qwen-image-lora
- 下载 LoRA 的
.safetensors文件
-
将 LoRA 权重放置到 ComfyUI 中:
- 将 LoRA 文件
flymy-ai/qwen-image-lora/pytorch_lora_weights.safetensors复制到ComfyUI/models/loras/
- 将 LoRA 文件
-
加载工作流:
- 在浏览器中打开 ComfyUI
- 加载此仓库中的工作流文件
qwen_image_lora_example.json - 该工作流已预先配置,可与我们的 LoRA 模型配合使用
工作流特点
- ✅ 预先配置用于 Qwen-Image + LoRA 推理
- ✅ 优化设置以获得最佳质量输出
- ✅ 轻松调整提示词和参数
- ✅ 与我们所有训练的 LoRA 模型兼容
ComfyUI 工作流提供了一个用户友好的界面,无需编写 Python 代码即可使用我们训练的 LoRA 模型生成图像。
🖼️ 工作流截图

📊 并排对比
以下是展示我们的 LoRA 模型在不同场景下改进效果的对比图片:
山地景观
提示词:"realism, mountain landscape at golden hour, low sun grazing alpine meadows, crisp ridgelines, thin mist in valley, high dynamic range sky, 24mm f/8, ISO 100, tripod, ultra-sharp foreground grass, micro-contrast on rocks"

雨夜城市场景
提示词:"realism, rainy night city scene with neon reflections, person holding a transparent umbrella, water droplets sharp on umbrella surface, shallow DOF, 55mm f/1.8, ISO 1600, blue and magenta neon, storefront sign reads "OPEN 24/7""

运动动态
提示词:"realism, athlete mid-sprint on track, strong sunlight, backlit dust particles, frozen motion at 1/2000s, 200mm f/2.8, ISO 400, muscle definition and sweat droplets detailed, stadium banner says "FINALS""

企业肖像
提示词:"realism, corporate headshot of a CTO in glass-walled office, city skyline bokeh, balanced key/fill lighting, 85mm f/2, ISO 100, crisp lapel and hair detail, subtle reflection on glasses"

🤝 支持
如有任何问题或建议,欢迎加入我们的社区:
- 🌐 FlyMy.AI
- 💬 Discord 社区
- 🐦 关注我们的 X 账号
- 💼 LinkedIn 联系我们
- 📧 支持邮箱
⭐ 如果您喜欢本项目,请不要忘记给仓库点赞!