Lightning 4-step for Qwen-Image-2.1 — Diffusers

The full Qwen-Image-2.1 pipeline with lightx2v's 4-step Lightning LoRA fused into the transformer (in fp32, stored as bf16). The 4-step schedule ships with the checkpoint, set up the way the LoRA was trained: sample_sigmas = [1.0, 0.75, 0.5, 0.25] with shift_terminal off. So it runs with no LoRA loading and no scheduler setup. Built with Qwen.

Made by @imdariotoo. I post my B70 and local-model releases on X, so follow there for the next ones.

import torch
from diffusers import QwenImage21Pipeline

pipe = QwenImage21Pipeline.from_pretrained(
    "darioooooo0o/Lightning-4step-Qwen-Image-2.1-Diffusers", torch_dtype=torch.bfloat16
).to("cuda")
image = pipe(prompt="A vintage travel poster of Lisbon with the title \"LISBOA\"", width=1024, height=1024,
             true_cfg_scale=1.0).images[0]

Samples (4 steps, 1024², seed 42)

Q4_K_M, ComfyUI Q4_K_M, ComfyUI bf16, diffusers
edit input edit, Q4_K_M: "red jacket → dark blue, add a silver star brooch" bf16, diffusers

Editing works the same way: pass image=[...] as with the base model.

Memory (measured at 1024², Intel Arc Pro B70): the text encoder alone peaks at about 21 GB, and the transformer plus VAE at about 21.7 GB. On cards with 24 GB or less, call pipe.enable_model_cpu_offload() so the two never sit in VRAM together. For smaller cards, use the GGUF or ComfyUI files; their cards list measured 4–32 GB recipes.

Against the base model with the LoRA loaded unfused, the merge scores LPIPS 0.059 over 19 images. That's inside the unfused-LoRA path's own run-to-run spread (0.076) on the same hardware.

ComfyUI files: safetensors bf16/fp8/int8/nvfp4 · GGUF ladder

Qwen Research License (non-commercial); see LICENSE and NOTICE. Lightning LoRA by lightx2v (its repo states no license; lightx2v's other Lightning releases are Apache-2.0).

Questions or issues: reply to @imdariotoo on X or open a discussion on this repo.

Downloads last month
23
Safetensors
Model size
7B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for darioooooo0o/Lightning-4step-Qwen-Image-2.1-Diffusers