Downloads · 30 days
0
wazimondo/qwen-image-edit-2511-int4-comfy
qwen-image-edit-2511-int4-comfy is a machine learning model from wazimondo. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains an INT4 quantized version of Qwen/Qwen-Image-Edit-2511, the powerful 20B-parameter image editing model from Alibaba's Qwen team. The model has been optimized for high-performance inference in…
Downloads · 30 days
0
Access
Public
Updated Jul 10, 2026
Repo size
321 GB
Likes
2
Public
Click a slice to open those files.
.safetensors321 GB · 100%
From the Hugging Face model README
This repository contains an INT4 quantized version of Qwen/Qwen-Image-Edit-2511, the powerful 20B-parameter image editing model from Alibaba's Qwen team. The model has been optimized for high-performance inference in ComfyUI using a custom W4A4 inference backend with direct CUDA kernel acceleration. It can achieve up to 2× inference speedup over baseline INT4 implementations, reaching 1.66–1.68 s/it on RTX 5090, making its performance on par with Nunchaku.
This model uses SVDQuant, a post-training quantization technique that compresses both weights and activations to 4-bit precision (W4A4) while preserving visual fidelity through SVD-based low-rank decomposition and fused kernel execution. Unlike standard INT4 quantizations that often fall back to eager or dequantization paths, this implementation provides a fully native CUDA execution pipeline specifically tuned for ComfyUI environments.
comfy-kitchen custom nodes.Implemented a kitchen-native SVDQuant W4A4 CUDA path that avoids eager mode, dequantization, and Python/torch fallbacks. The TensorCoreSVDQuantW4A4Layout directly routes through quantize + scaled_mm on CUDA backend, ensuring ComfyUI can access native INT4 acceleration even when the global kitchen CUDA backend is restricted.
Preserved the split QKV model structure while eliminating redundant computation. At runtime, multiple split projections sharing the same smooth_factor/proj_down undergo activation INT4 quantization and LoRA-down projection only once, then feed into separate Q/K/V weight paths.
Weights are reorganized from natural layout to a CTA-friendly tile-packed format (N/128, K/64, 32, 128), with matching wscales (N/128, K/64, 128) and LoRA-up (N/128, R, 128) layouts. This enables sequential global memory access patterns that reduce address computation and memory scattering.
The LoRA-up projection is fused directly into the INT4 GEMM kernel epilogue using bf16/fp16 tensor-core MMA, eliminating a separate addmm_ kernel launch and extra matrix read/write. This optimization was a primary contributor to reducing latency from ~3 s/it to the current 1.66–1.68 s/it range.
cp.async 3-stage pipeline for optimal SM utilizationcomfy-kitchen extension installedThe model files are provided in safetensors format compatible with ComfyUI model loaders. Place the model files under ComfyUI/models/ and use a compatible loader node to integrate into your workflow.
COMFY_KITCHEN_SVDQUANT_LORA_ACT_FP32=1: Force FP32 precision for LoRA activations (fallback option if quality issues suspected)This INT4 quantization maintains visual fidelity on par with the original FP16/BF16 model. It follows Qwen-Image-Edit-2511's capabilities:
If you use this model, please cite both the original Qwen model and this optimized INT4 version:
@model{qwen-image-edit-2511-int4-comfy,
title = {Qwen-Image-Edit-2511 INT4 for ComfyUI with Native CUDA W4A4 Backend},
author = {LAXMAYDAY},
year = {2025},
url = {https://huggingface.co/LAXMAYDAY/qwen-image-edit-2511-int4-comfy}
}