QuantFunc/Qwen-Image-Edit-Series
<!-- QF-LICENSE-BLOCK:START -->
License & Attribution
These are quantized derivative weights of `Qwen/Qwen-Image-Edit-2511` (Qwen-Image-Edit-2511).
- Modifications: the original weights were quantized (e.g. W4A4 / FP4 / INT4 / FP8) and repackaged for the QuantFunc inference engine — a "modification" under Apache-2.0 §4(b).
- Upstream license: the base model is licensed under the Apache License 2.0, included here as `LICENSE-APACHE`; the upstream copyright and attribution notices are retained.
- This derivative: the QuantFunc quantization & packaging are additionally provided under the QuantFunc Model License (see `LICENSE`).
- This repository is not affiliated with or endorsed by the upstream model authors.
- Text/vision encoder: the bundled Qwen2.5-VL-7B text/vision encoder is licensed under the Apache License 2.0 (as distributed with `Qwen/Qwen-Image-Edit-2511`). <!-- QF-LICENSE-BLOCK:END -->
QuantFunc
<div align="center" style="margin-top: 50px;"> <img src="assets/logo.webp" width="300" alt="Logo"> </div>
<p align="center"> 🤗 <a href="https://huggingface.co/QuantFunc">Hugging Face</a> | 🤖 <a href="https://www.modelscope.cn/profile/QuantFunc">ModelScope</a> | 💻 <a href="https://github.com/RealJonathanYip/ComfyUI-QuantFunc">GitHub</a> | 💬 <a href="#wechat">WeChat (微信)</a> | 🎮 <a href="https://discord.gg/jCp9TpFWcn">Discord</a> </p>
⚡ Qwen-Image-Edit-2511 — Lighting-backend pre-quantized image editing. Instruction-based edits 2x–11x faster with the QuantFunc plugin.
Pre-quantized Qwen-Image-Edit-2511 for the Lighting engine — edit input images from text instructions (e.g. a 1K edit in ~1s on RTX 4090), for RTX 30-series and above.
Powered by the [QuantFunc ComfyUI plugin](https://github.com/RealJonathanYip/ComfyUI-QuantFunc) — the fastest diffusion inference engine:
- 🚀 2x–11x speedup over standard BF16/FP16 Python pipelines (pre-exported → even faster loading).
- ⚙️ Native C++/CUDA (
libquantfunc.so/quantfunc.dll) with zero Python model dependencies. - 🧩 Dual engine (SVDQ offline + Lighting runtime 4-bit), zero-cost LoRA stacking, reference-image editing & inpainting.
- 🟢 Full GPU coverage — RTX 20/30/40/50 · A100/H100/H200/B100/B200/GB300 · RTX 6000 Ada / PRO Blackwell (CUDA 12 & 13); native FP4 on Blackwell.
👉 Install the plugin: https://github.com/RealJonathanYip/ComfyUI-QuantFunc
Qwen-Image-Edit-Series
Pre-quantized Qwen-Image-Edit-2511 image editing model series by QuantFunc, with both Lighting and SVDQ backend inference support.
Overview
Qwen-Image-Edit-2511 is an image editing diffusion model distilled from Alibaba Qwen team's image editing model. It can edit input images according to text instructions and supports multi-reference image inputs.
With the latest QuantFunc ComfyUI plugin, inference achieves 2x–11x speedup over mainstream frameworks — e.g. Qwen-Image-Edit 1K image inference in ComfyUI reduced from 9.6s to 1.6s (tested on RTX 4090).
Hardware Requirements
- Supports NVIDIA RTX 30 series and above
- RTX 20 series does not support BF16, which causes significant precision loss in Qwen series model quantization scenarios. Therefore, the 20 series currently only supports Z-Image models.
Compatibility
- The base models in this repository are compatible with any version of Qwen-Image-Edit transformer weights
- The QuantFunc code plugin and ComfyUI plugin are 100% compatible with previous versions of Qwen-Image-Edit models
Directory Structure
Qwen-Image-Edit-Series/
├── qwen-image-edit-series-50x-above-base-model/ # Base model, optimized for RTX 50 series and above
│ ├── text_encoder/ # Qwen2.5-VL text encoder (pre-quantized)
│ ├── vision_encoder/ # Qwen2.5-VL vision encoder (pre-quantized)
│ ├── vae/ # VAE encoder + decoder (~242MB)
│ ├── tokenizer/ # Tokenizer
│ ├── processor/ # Image preprocessor
│ ├── scheduler/ # Scheduler config
│ ├── model_index.json
│ └── quantfunc_config.json
├── qwen-image-edit-series-50x-below-base-model/ # Base model, optimized for RTX 50 series and below
│ └── (same structure as above)
├── transformer/
│ ├── config.json
│ ├── qwen-image-2511-50x-above-lighting-4steps.safetensors # RTX 50+ Lighting 4-step
│ ├── qwen-image-2511-50x-above-lighting-4steps-prequant.safetensors # RTX 50+ Lighting pre-quantized
│ ├── qwen-image-2511-50x-above-svdq-4steps.safetensors # RTX 50+ SVDQ 4-step
│ ├── qwen-image-2511-50x-above-svdq.safetensors # RTX 50+ SVDQ full-step
│ ├── qwen-image-2511-50x-below-lighting-4steps.safetensors # RTX 30/40 Lighting 4-step
│ └── qwen-image-2511-50x-below-lighting-4steps-prequant.safetensors # RTX 30/40 Lighting pre-quantized
├── prequant/ # Pre-quantized modulation weights
│ ├── qwen-image-edit-2511-50x-above.safetensors # RTX 50+ mod weights
│ ├── qwen-image-edit-2511-50x-below.safetensors # RTX 30/40 mod weights
│ └── qwen-image-edit-2509-50x-above.safetensors # Legacy 2509 mod weights
└── precision-config/ # Lighting precision config samples
├── 50x-above-fp4-sample.json # FP4 config for RTX 50+
└── 50x-below-int4-sample.json # INT4 config for RTX 30/40Model Variants
By GPU Generation
By Inference Backend
The base-model and transformer must use the same variant (both above or both below).
Quick Start
Download
pip install huggingface_hubfrom huggingface_hub import snapshot_download
model_dir = snapshot_download('QuantFunc/Qwen-Image-Edit-Series')Lighting Backend Inference
quantfunc \
--model-dir Qwen-Image-Edit-Series/qwen-image-edit-series-50x-above-base-model \
--transformer Qwen-Image-Edit-Series/transformer/qwen-image-2511-50x-above-lighting-4steps.safetensors \
--auto-optimize --model-backend lighting \
--ref-image input.png \
--prompt "make the sky more purple and add stars" \
--output output.png --steps 4SVDQ Backend Inference
quantfunc \
--model-dir Qwen-Image-Edit-Series/qwen-image-edit-series-50x-above-base-model \
--transformer Qwen-Image-Edit-Series/transformer/qwen-image-2511-50x-above-svdq-4steps.safetensors \
--auto-optimize --model-backend svdq \
--ref-image input.png \
--prompt "change the background to a beach scene" \
--output output.png --steps 4SVDQ + LoRA
quantfunc \
--model-dir Qwen-Image-Edit-Series/qwen-image-edit-series-50x-above-base-model \
--transformer Qwen-Image-Edit-Series/transformer/qwen-image-2511-50x-above-svdq-4steps.safetensors \
--auto-optimize --model-backend svdq \
--lora /path/to/style_lora.safetensors:0.8 \
--ref-image input.png \
--prompt "apply anime style to the image" \
--output output.png --steps 4SVDQ && Lighting Backend
This repository provides both Lighting and SVDQ backend pre-quantized models:
Pre-quantized Modulation Weights (prequant/)
The prequant/ directory contains pre-quantized modulation (mod) weights extracted from SVDQ models. These are used with the Lighting backend to provide high-quality modulation without runtime quantization overhead.
Usage with Lighting backend:
quantfunc \
--model-dir Qwen-Image-Edit-Series/qwen-image-edit-series-50x-above-base-model \
--model-backend lighting \
--precision-config Qwen-Image-Edit-Series/precision-config/50x-above-fp4-sample.json \
--mod-weights Qwen-Image-Edit-Series/prequant/qwen-image-edit-2511-50x-above.safetensors \
--rotation-block-size 256 \
--ref-image input.png --prompt "edit instruction" \
--steps 4 --auto-optimizeAlternatively, use the pre-quantized Lighting transformer for instant loading (no runtime quantization):
quantfunc \
--model-dir Qwen-Image-Edit-Series/qwen-image-edit-series-50x-above-base-model \
--transformer Qwen-Image-Edit-Series/transformer/qwen-image-2511-50x-above-lighting-4steps-prequant.safetensors \
--model-backend lighting \
--ref-image input.png --prompt "edit instruction" \
--steps 4 --auto-optimizePrecision Config (precision-config/)
Sample per-layer precision configurations for the Lighting backend:
These configs control the quantization precision of each transformer sub-layer. Customize them for your speed/quality trade-off.
Related Repositories
- QuantFunc/Qwen-Image-Series — Qwen-Image text-to-image (60 layers)
- QuantFunc/Z-Image-Series — Z-Image-Turbo text-to-image (lightweight, fast)
License
The pre-quantized model weights in this repository are derived from the original models. Users must comply with the original model's license agreement. The QuantFunc inference engine and its plugins (including the ComfyUI plugin) are licensed separately — see official QuantFunc channels for details.
For models quantized from commercially licensed models, users are responsible for obtaining the necessary commercial licenses from the original model providers.
Community
Join our community for support, updates, and discussions:
- 🎮 Discord server
- 💬 Scan the QR code below to join our WeChat group:
<div align="center" id="wechat"> <img src="https://raw.githubusercontent.com/RealJonathanYip/ComfyUI-QuantFunc/main/assets/WeChat.jpg" alt="WeChat Group" width="300"> </div>
