Qwen-Image 2.1 in 2 Steps: DMD2 LoRA v1.5 Lands

Introduction
Two denoising steps. That's all Qwen-Image 2.1 needs now to draw or edit a picture. Hugging Face researcher Linoy Tsaban has pushed v1.5 of her Qwen-Image-2.1 DMD2 2-step LoRA to Hugging Face. It's an open-weights distillation adapter for image generation and instruction editing that turns the base model's 20-step sampling into just 2 forward passes.
You can run it today in diffusers, or try it for free in the Qwen Image 2.1 Realtime Space on ZeroGPU, where a 512px preview redraws as you type. The v1.5 checkpoint went up on October 30 and promises better prompt adherence and edit fidelity.
What shipped
- Model:
linoyts/Qwen-Image-2.1-DMD2-2steps, new filepytorch_lora_weights_v1_5.safetensors(v1 stays in the repo) - Vendor: Linoy Tsaban (Hugging Face), built on Alibaba Qwen's Qwen-Image 2.1
- Modality: text-to-image plus single- and multi-image editing
- Open vs API: open LoRA weights under the Qwen Research License, which means non-commercial research and evaluation use only
- Where to run it today: diffusers on your own GPU, or the free
linoyts/qwen-image-2-1-realtimeSpace - Concrete fact: rank-32, attention-only LoRA, trained with DMD2 for 2,000 steps on a single H100, sampling at fixed sigmas
[1.0, 0.5]with no CFG
How the 2-step trick works
DMD2 (Distribution Matching Distillation) teaches a student model to land on the teacher's output distribution in a couple of jumps instead of walking there in 20 small steps. Here's how this LoRA does it:
- Guidance is baked in. The teacher's CFG is distilled into the weights, so inference runs with
true_cfg_scale=1.0, one conditional pass per step. - Only attention is adapted. Training only touches
to_q,to_k,to_vandto_out.0, which the card says keeps edits more faithful to the input image than adapting the feed-forward blocks too. - Fixed schedule. The LoRA was trained at sigmas
[1.0, 0.5]with no resolution shifting, so you need to switch off dynamic shifting on the scheduler. - Multi-reference still works. Pass a list of images and call them "Picture 1", "Picture 2" in the prompt, and composition holds up at 2 steps.
The model card's comparison grid puts 2-step edits next to the base model at 20 steps on Qwen's own demo tasks: sketch-to-photo, hairstyle, expression and photo restoration.
Install
Qwen-Image 2.1 support currently lives on a diffusers dev branch:
pip install "git+https://github.com/huggingface/diffusers.git@qwenimage21-lora-training"Run v1.5 in diffusers
import torch
from diffusers import QwenImage21Pipeline, FlowMatchEulerDiscreteScheduler
pipe = QwenImage21Pipeline.from_pretrained("Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16).to("cuda")
pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
pipe.scheduler.config, use_dynamic_shifting=False, shift=1.0, shift_terminal=None
)
pipe.load_lora_weights(
"linoyts/Qwen-Image-2.1-DMD2-2steps",
weight_name="pytorch_lora_weights_v1_5.safetensors",
)
image = pipe(
prompt="a cozy paper-lantern noodle stall on a rainy neon street at dusk, steam curling into violet light, cinematic 35mm photo",
num_inference_steps=2,
sigmas=[1.0, 0.5],
true_cfg_scale=1.0,
generator=torch.Generator("cuda").manual_seed(0),
).images[0]
image.save("two_steps.png")To edit, pass image=your_image (or a list of images) with an instruction like the one below. Everything else stays the same.
Turn this into a claymation character of colorful clay.The Realtime Space
The Qwen Image 2.1 Realtime Space fuses the LoRA into the weights and adds AOTInductor kernels on ZeroGPU. It's already running v1.5:
- Realtime mode: holds the GPU for about 90 seconds and streams a 512px result that updates live as you change the prompt
- Full quality: turn Realtime off and hit Generate for 1024 or 1536px output
- Editing: upload up to 10 images and refer to each one by its numbered image tag (image1 through image10, in angle brackets) in your prompt
- Transparency: Qwen-Image 2.1 decodes RGBA natively, so just ask for a transparent background in your prompt
Why it matters
At 2 steps, an image model stops feeling like a render queue and starts feeling like a brush. You can sketch prompts, nudge edits and compare takes at the speed you think. The non-commercial license means it's a playground and research tool for now, not a production backbone. Still, it's a very generous one, and v1.5 is a nice quality bump without changing a single setting.
Original Source
- Qwen-Image-2.1 DMD2 2-step LoRA on Hugging Face
- Qwen Image 2.1 Realtime Space
- Qwen-Image 2.1 base model
Two steps, endless sketches. Go play!
—Aurelia ♡
