CoolFace
Modelpublic

lite-infer/qwen-image-edit-2509-lightning-4steps-nunchaku-lite-int4_r32-bnb4-text-encoder

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes29downloads
Model Card

Qwen Image Edit 2509 Lightning 4-Step Nunchaku Lite INT4 r32

This directory is a Diffusers-loadable conversion of:

  • —Base Diffusers model: Qwen/Qwen-Image-Edit-2509
  • —Source Nunchaku checkpoint repo: nunchaku-ai/nunchaku-qwen-image-edit-2509
  • —Source safetensors checkpoint: lightning-251115/svdq-int4_r32-qwen-image-edit-2509-lightning-4steps-251115.safetensors
  • —Lightning LoRA fused by source checkpoint: Qwen-Image-Edit-2509-Lightning-4steps-V1.0

The transformer is packaged for the Diffusers Nunchaku Lite loader:

  • —quant_method: nunchaku_lite
  • —SVDQ precision: int4
  • —SVDQ group size: 64
  • —SVDQ rank: 32
  • —SVDQ targets: 720
  • —AWQ targets: 120

The text encoder is saved with BitsAndBytes 4-bit NF4:

  • —quant_method: bitsandbytes
  • —load_in_4bit: true
  • —bnb_4bit_quant_type: nf4
  • —bnb_4bit_compute_dtype: bfloat16

The scheduler config is the lightning scheduler used by the Nunchaku 4/8-step example, with base_shift = max_shift = log(3).

Benchmark

Measured with 4 inference steps on a 1248x832 input image. Latency is the mean of 3 measured runs after 1 warmup. Max VRAM is peak CUDA allocated memory during generation.

CheckpointLatencyMax VRAM
Converted Diffusers Nunchaku Lite INT4 r32 + BNB4 text encoder12.60 s21.21 GiB
Original Nunchaku INT4 r32 safetensors11.27 s35.13 GiB

Original baseline: nunchaku-ai/nunchaku-qwen-image-edit-2509/lightning-251115/svdq-int4_r32-qwen-image-edit-2509-lightning-4steps-251115.safetensors loaded through the native Nunchaku transformer after patching native precision selection to use the checkpoint filename.

Output Comparison

[image]

The comparison uses the same input image, prompt, seed, scheduler, and 4-step settings for this converted checkpoint and its original Nunchaku safetensors baseline.

Run

python
import torch
from PIL import Image
from diffusers import QwenImageEditPlusPipeline

model_path = "lite-infer/qwen-image-edit-2509-lightning-4steps-nunchaku-lite-int4_r32-bnb4-text-encoder"
image_path = "input.png"
output_path = "output.png"

pipe = QwenImageEditPlusPipeline.from_pretrained(model_path, torch_dtype=torch.bfloat16)
pipe.to("cuda")

image = Image.open(image_path).convert("RGB")
prompt = "Change the image to watercolor style."

result = pipe(
    image=image,
    prompt=prompt,
    generator=torch.Generator(device="cuda").manual_seed(1),
    true_cfg_scale=1.0,
    num_inference_steps=4,
    num_images_per_prompt=1,
)

result.images[0].save(output_path)