WaveCut/Image21-Turbo
Image21 Turbo
Qwen-Image-2.1 with the Viggle turbo v0.2.1 distillation LoRA merged into the transformer and the Texture-Fix VAE in place of the stock decoder. Text-to-image and editing with reference images in 6 steps without guidance, loaded by the stock QwenImage21Pipeline. Built with Qwen.
A 4-bit build with a quantized text encoder is published as WaveCut/Image21-Turbo-OrbitQuant-W4A4.
Run
pip install -U torch "transformers>=5.17,<6" accelerate safetensors pillow
pip install "git+https://github.com/huggingface/diffusers.git@80c7ed262aeffbeb43ef13ae04baeb9b84515a69"import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained("WaveCut/Image21-Turbo", dtype=torch.float16)
pipe.enable_model_cpu_offload()
SIGMAS = [1.0, 0.9375, 0.875, 0.75, 0.5, 0.25]
image = pipe(
prompt="A studio portrait of an old fisherman mending a net, warm rim light, 85mm",
width=1024, height=1024,
num_inference_steps=6, sigmas=SIGMAS,
generator=torch.Generator("cuda").manual_seed(0),
).images[0]
edited = pipe(
prompt="Replace the background of <image1> with a sunset beach; keep the man unchanged.",
image=[image], output_resolution=1024,
num_inference_steps=6, sigmas=SIGMAS,
generator=torch.Generator("cuda").manual_seed(0),
).images[0]Load the pipeline in fp16. The merge keeps 99.7 % of the LoRA update in fp16; loading the same weights in bf16 rounds away about a third of it (64 % kept). The text encoder and the VAE work in fp16 as well: text embeddings match bf16 at cosine 0.998–0.9997, VAE decodes match fp32 at 58–64 dB PSNR.
All weights together are 33 GB, so a 32 GB card needs enable_model_cpu_offload() (≈22 s per 1024² image on an RTX 5090, most of it host transfers). Encoding a batch of prompts first and then running the transformer and the VAE takes 2.69 s per 1024² image hot (6 steps, peak 22.5 GB) and 17.9 s at 2048². The OrbitQuant build keeps every component resident in 13.6 GB and needs 2.25 s.
Keep the VAE untiled in fp16. Tiled decoding in fp16 produces non-finite pixels; for 2048² text-to-image cast it first: pipe.vae.to(torch.bfloat16); pipe.vae.enable_tiling() (54 dB PSNR against fp32).
Sampling recipes
Tested at 1024² on 8 prompts (photo, poster, anime, product, night scene, two Russian-text prompts) with fixed seeds, plus 4 edits. Times are transformer + VAE on an RTX 5090.
Columns: default, 8 steps, 4 steps, static shift 3, CFG 2.
Editing: reference images are <image1>, <image2>, … in the prompt, in the order passed; the canvas follows the last reference unless width/height are given; references are encoded at output_resolution² area.
Merge
Everything outside the 227 projections is the upstream bf16 value stored in fp16.
Files
transformer/, text_encoder/, processor/, vae/, scheduler/, model_index.json — the diffusers pipeline; media/ — example images; LICENSE, NOTICE — license and attribution.
License
Derivative of Qwen-Image-2.1 under the Qwen RESEARCH LICENSE AGREEMENT (LICENSE): non-commercial research and evaluation only. NOTICE lists the modified files and the upstream notices of Viggle and madebyollin.
Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved.
