Qwen Image Edit 2511 Lightning

提供商lightx2v
分类image-to-image
许可证apache-2.0
下载量24.7K
星标72

简介

Qwen Image Edit 2511 Lightning 是一款主打高效图像编辑的 AI 模型,旨在通过简单的指令实现对图片的精准修改。它不同于从零开始生成图片的文生图工具,而是在现有图像基础上进行局部调整或风格迁移,非常适合需要快速出图、对修改细节有具体要求的开发者和设计师。该模型上手门槛极低,无需复杂的 Prompt 工程,能够快速响应编辑请求,是构建自动化图片处理工作流或 AI 图像编辑应用的理想选择。

核心亮点

  • 精准的图生图编辑,支持局部快速修改
  • Lightning 级别响应速度,大幅提升出图效率
  • Apache-2.0 开源协议,企业级部署无压力
  • 无需复杂指令,降低 AI 图像编辑上手难度

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("lightx2v/Qwen-Image-Edit-2511-Lightning")
tokenizer = AutoTokenizer.from_pretrained("lightx2v/Qwen-Image-Edit-2511-Lightning")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download lightx2v/Qwen-Image-Edit-2511-Lightning

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download lightx2v/Qwen-Image-Edit-2511-Lightning config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('lightx2v/Qwen-Image-Edit-2511-Lightning')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('lightx2v/Qwen-Image-Edit-2511-Lightning')
tokenizer = AutoTokenizer.from_pretrained('lightx2v/Qwen-Image-Edit-2511-Lightning')

模型下载

我们推荐使用命令行或者 ModelScope SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 ModelScope:

操作指引
pip install modelscope

命令行下载

下载完整模型库

下载完整模型库
modelscope download --model lightx2v/Qwen-Image-Edit-2511-Lightning

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)
modelscope download --model lightx2v/Qwen-Image-Edit-2511-Lightning README.md --local_dir ./dir

更多更丰富的命令行下载选项,可参见具体文档

SDK 下载

SDK 下载
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('lightx2v/Qwen-Image-Edit-2511-Lightning')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://www.modelscope.cn/lightx2v/Qwen-Image-Edit-2511-Lightning.git

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/lightx2v/Qwen-Image-Edit-2511-Lightning.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook 快速开发

下载并安装 ModelScope library

下载并安装 ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

模型加载和推理

模型加载和推理
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'lightx2v/Qwen-Image-Edit-2511-Lightning')

完整文档

来源: HuggingFace

---
license: apache-2.0
tags:

  • diffusion-single-file

  • comfyui

  • distillation

  • LoRA

  • lora

  • Qwen-Image

  • Qwen-Image-Edit

base_model:
  • Qwen/Qwen-Image-Edit-2511

pipeline_tags:
  • image-to-image

  • text-to-image

library_name: diffusers
pipeline_tag: image-to-image
---

Qwen-Image-Edit-2511-Lightning

Model Overview

Qwen-Image-Edit-2511-Lightning is a collection of optimized models tailored for image editing tasks, leveraging step distillation and quantization techniques to deliver high-efficiency inference performance. This repository hosts three core model files with distinct characteristics:

| Model File Name | Type | Key Features |
|-----------------|------|--------------|
| Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors | 4-step Distilled LoRA | BF16 precision, lightweight, 4-step inference |
| Qwen-Image-Edit-2511-Lightning-4steps-V1.0-fp32.safetensors | 4-step Distilled LoRA | FP32 precision, high accuracy, 4-step inference |
| qwen_image_edit_2511_fp8_e4m3fn_scaled_lightning.safetensors | FP8 Quantized | FP8 (e4m3fn scaled) precision, fused with 4-step distilled LoRA, optimized for low-memory deployment |

Usage Instructions

This model suite supports two mainstream usage frameworks, with detailed guides provided below:

1. Qwen-Image-Lightning Framework

For full documentation on model usage within the Qwen-Image-Lightning ecosystem (including environment setup, inference pipelines, and customization), please refer to: Qwen-Image-Lightning GitHub Repository

2. LightX2V Framework

The models are fully compatible with the LightX2V lightweight video/image generation inference framework. For step-by-step usage examples, configuration templates, and performance optimization tips, see: LightX2V Qwen Image Edit Documentation

Key Optimizations

  • Step Distillation: The LoRA models reduce the original inference steps to just 4 steps, achieving significant speedup (≈10x faster than standard 40-step inference) while preserving image editing quality.
  • FP8 Quantization: The quantized base model balances performance and resource efficiency, reducing GPU memory usage by ~50% compared to FP32 while maintaining editing fidelity.

Support

For technical issues, feature requests, or integration questions:
  • Open an issue in the LightX2V repo (for LightX2V integration questions)