Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio diffusion: pin Qwen-Image-2.1's reduction-config filter (same seed, same image across processes) (#15455)

Daniel Hanf991be7e0261
diff --git a/studio/backend/core/inference/diffusion_families.py b/studio/backend/core/inference/diffusion_families.py
index 8a3d0e44f12..934ae12139b 100644
--- a/studio/backend/core/inference/diffusion_families.py
+++ b/studio/backend/core/inference/diffusion_families.py
@@ -965,6 +965,8 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# ComfyUI QwenImage21: ModelSamplingFlux fixed mu 0.69, no terminal stretch.
comfy_flow_shift = flux_mu_shift(0.69),
pipeline_class = "QwenImage21Pipeline",
+ # Every arch: near-tied reduction autotune picks made one seed render differently per process.
+ filter_reduction_configs = True,
transformer_class = "QwenImage21Transformer2DModel",
base_repo = "Qwen/Qwen-Image-2.1",
prequant_repos = (
diff --git a/studio/backend/tests/fixtures/diffusion_autoopt_parity.json b/studio/backend/tests/fixtures/diffusion_autoopt_parity.json
index f09fd3ed14d..25243cd5ae6 100644
--- a/studio/backend/tests/fixtures/diffusion_autoopt_parity.json
+++ b/studio/backend/tests/fixtures/diffusion_autoopt_parity.json
@@ -353,13 +353,13 @@
"image|lumina-2|off|float16|offload=0|gguf=1": {"applied":[[]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"flux2_rope":false,"qwenimage21_fast_step":false,"rocm_fused":false}},
"image|lumina-2|off|float16|offload=1|gguf=0": {"applied":[[]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"flux2_rope":false,"qwenimage21_fast_step":false,"rocm_fused":false}},
"image|lumina-2|off|float16|offload=1|gguf=1": {"applied":[[]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"flux2_rope":false,"qwenimage21_fast_step":false,"rocm_fused":false}},
- "image|qwen-image-2.1|default|bfloat16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":true}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|default|bfloat16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":true,"options":"{'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|default|bfloat16|offload=0|gguf=1": {"applied":[["compiled_dequant","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|default|bfloat16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":false}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|default|bfloat16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":false,"options":"{'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|default|bfloat16|offload=1|gguf=1": {"applied":[["compiled_dequant","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|default|float16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":true}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|default|float16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":true,"options":"{'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|default|float16|offload=0|gguf=1": {"applied":[["compiled_dequant","cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|default|float16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":false}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|default|float16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":false,"compile_calls":[{"dynamic":true,"fullgraph":false,"options":"{'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|default|float16|offload=1|gguf=1": {"applied":[["compiled_dequant","cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|eager|bfloat16|offload=0|gguf=0": {"applied":[["cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|eager|bfloat16|offload=0|gguf=1": {"applied":[["cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
@@ -369,14 +369,14 @@
"image|qwen-image-2.1|eager|float16|offload=0|gguf=1": {"applied":[["cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|eager|float16|offload=1|gguf=0": {"applied":[["cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|eager|float16|offload=1|gguf=1": {"applied":[["cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|bfloat16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|bfloat16|offload=0|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|bfloat16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|bfloat16|offload=1|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|float16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|float16|offload=0|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|float16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
- "image|qwen-image-2.1|max|float16|offload=1|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"mode":"max-autotune-no-cudagraphs"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|bfloat16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|bfloat16|offload=0|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|bfloat16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|bfloat16|offload=1|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|float16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|float16|offload=0|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":true,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|float16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
+ "image|qwen-image-2.1|max|float16|offload=1|gguf=1": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"QwenImage21Transformer2DModel forward is not capture-safe (its pipeline passes the prefix KV cache as a Python object on every step; the Unsloth fast step that replays decode steps from tensors is not installed)","keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":true,"compile_calls":[{"dynamic":null,"fullgraph":false,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"int8_gemm":false,"static":false}},"patches":{"arch_fusions":true,"eager_fusions":true,"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|off|bfloat16|offload=0|gguf=0": {"applied":[[]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|off|bfloat16|offload=0|gguf=1": {"applied":[[]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
"image|qwen-image-2.1|off|bfloat16|offload=1|gguf=0": {"applied":[[]],"graph_after_placement":false,"graph_reason":null,"keys":[["channels_last","compiled","compiled_dequant","compiled_vae_decode","cuda_graph","cudnn_benchmark","fp16_accum","fused_qkv","int8_gemm","rocm_query_chunks","tf32","vae_fp16_decode","vae_fused","vae_single_frame"]],"modules":{"transformer":{"auto_dynamic":null,"compile_calls":[],"int8_gemm":false,"static":false}},"patches":{"flux2_rope":false,"qwenimage21_fast_step":true,"rocm_fused":false}},
diff --git a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
index cb62c3bdf81..d93677d6032 100644
--- a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
+++ b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
@@ -476,7 +476,7 @@
},
"qwen-image-2.1": {
"cudnn_benchmark": true,
- "filter_reduction_configs": false,
+ "filter_reduction_configs": true,
"filter_reduction_configs_archs": [],
"vae_fused_encoder": true
},
diff --git a/studio/backend/tests/test_diffusion_reduction_filter_arch.py b/studio/backend/tests/test_diffusion_reduction_filter_arch.py
index 3c7de918047..2aeae30aa78 100644
--- a/studio/backend/tests/test_diffusion_reduction_filter_arch.py
+++ b/studio/backend/tests/test_diffusion_reduction_filter_arch.py
@@ -179,3 +179,30 @@ def test_klein_filter_kill_switch(monkeypatch):
_on(monkeypatch, (7, 5))
monkeypatch.setenv(cc.DYNAMIC_SCALE_RBLOCK_ENV, "1")
assert cc.reduction_config_filter_available() is False
+
+
[email protected]("cap", [(7, 5), (8, 0), (8, 6), (8, 9), (9, 0), (10, 0), (12, 0), None])
+ "repo", ["Qwen/Qwen-Image-2.1", "unsloth/Qwen-Image-2.1", "Qwen/Qwen-Image-2.1-Turbo"]
+)
+def test_qwen_image_21_pins_the_reduction_filter_on_every_arch(monkeypatch, repo, cap):
+ from core.inference.diffusion_families import detect_family
+
+ fam = detect_family(repo)
+ assert fam is not None and fam.name == "qwen-image-2.1"
+ _on(monkeypatch, cap)
+ assert cc.family_filters_reductions(fam) is True
+ assert _filter_reaching_compile(monkeypatch, fam) is True
+
+
+def test_qwen_image_21_filter_kill_switch(monkeypatch):
+ from core.inference.diffusion_families import detect_family
+
+ _on(monkeypatch, (8, 9))
+ monkeypatch.setenv(cc.DYNAMIC_SCALE_RBLOCK_ENV, "1")
+ assert cc.reduction_config_filter_available() is False
+ # The family still asks, but no pinned option reaches torch.compile.
+ assert cc.family_filters_reductions(detect_family("Qwen/Qwen-Image-2.1")) is True
+ kwargs = {"options": {}}
+ assert ds.pin_reduction_configs(kwargs) is False
+ assert ds.REDUCTION_FILTER_OPTION not in kwargs["options"]
diff --git a/studio/backend/tests/test_diffusion_speed.py b/studio/backend/tests/test_diffusion_speed.py
index 5dfcb9ed017..1050b3e6890 100644
--- a/studio/backend/tests/test_diffusion_speed.py
+++ b/studio/backend/tests/test_diffusion_speed.py
@@ -689,6 +689,9 @@ def test_split_vae_families_hold_cudnn_benchmark_off(repo, pipeline_class):
("black-forest-labs/FLUX.1-schnell", (10, 0), True),
("black-forest-labs/FLUX.1-Kontext-dev", (10, 0), True),
("black-forest-labs/FLUX.1-schnell", (9, 0), False),
+ ("Qwen/Qwen-Image-2.1", (10, 0), True),
+ ("Qwen/Qwen-Image-2.1", (8, 9), True),
+ ("Qwen/Qwen-Image-2.1", (9, 0), True),
],
)
def test_reduction_filter_archs(monkeypatch, repo, cap, pinned):