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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio video: pin MiniMax-H3's reduction-config filter (same seed, same clip across processes) (#15564)
Daniel Han2459c93853f1
diff --git a/studio/backend/core/inference/video_families.py b/studio/backend/core/inference/video_families.pyindex c83dd9416a4..73d862d0e78 100644--- a/studio/backend/core/inference/video_families.py+++ b/studio/backend/core/inference/video_families.py@@ -595,6 +595,8 @@ _FAMILIES: tuple[VideoFamily, ...] = (bf16_components_gb = (66.3, 66.8, 11.1),# Regionally compilable; dynamic=True traces once. Engage only when resident (slower under offload).supports_torch_compile = True,+ # Near-equal inductor norm-reduction configs rendered different clips per fresh process for one seed.+ filter_reduction_configs = True,# CUDA graph declined: no measurable win (GPU-bound) for ~8 GB extra memory and 31 s capture.supports_cuda_graph = False,# Streamed, H3's prequant groups onload through diffusers' stream path, which waits on the host per group: adiff --git a/studio/backend/tests/fixtures/diffusion_autoopt_parity.json b/studio/backend/tests/fixtures/diffusion_autoopt_parity.jsonindex 69fad87484b..f19915b76b1 100644--- a/studio/backend/tests/fixtures/diffusion_autoopt_parity.json+++ b/studio/backend/tests/fixtures/diffusion_autoopt_parity.json@@ -641,16 +641,16 @@"video|ltx-2|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":true}},"patches":{}},"video|ltx-2|off|float16|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":true}},"patches":{}},"video|ltx-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":true}},"patches":{}},- "video|minimax-h3|default|bfloat16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},- "video|minimax-h3|default|bfloat16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},+ "video|minimax-h3|default|bfloat16|offload=0|gguf=0": {"patches":{"wan_fused":false},"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"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"]],"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","graph_after_placement":false,"modules":{"transformer":{"compile_calls":[{"fullgraph":true,"dynamic":true,"options":"{'test_configs.force_filter_reduction_configs': True}"}],"static":false,"auto_dynamic":false,"int8_gemm":false}}},+ "video|minimax-h3|default|bfloat16|offload=1|gguf=0": {"patches":{"wan_fused":false},"applied":[["compiled","cudnn_benchmark","fp16_accum"]],"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"]],"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","graph_after_placement":false,"modules":{"transformer":{"compile_calls":[{"fullgraph":false,"dynamic":true,"options":"{'test_configs.force_filter_reduction_configs': True}"}],"static":false,"auto_dynamic":false,"int8_gemm":false}}},"video|minimax-h3|default|float16|offload=0|gguf=0": {"applied":[["cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},"video|minimax-h3|default|float16|offload=1|gguf=0": {"applied":[["cudnn_benchmark"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},"video|minimax-h3|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":{"wan_fused":false}},"video|minimax-h3|eager|bfloat16|offload=1|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":{"wan_fused":false}},"video|minimax-h3|eager|float16|offload=0|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":{"wan_fused":false}},"video|minimax-h3|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":{"wan_fused":false}},- "video|minimax-h3|max|bfloat16|offload=0|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},- "video|minimax-h3|max|bfloat16|offload=1|gguf=0": {"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},+ "video|minimax-h3|max|bfloat16|offload=0|gguf=0": {"patches":{"wan_fused":false},"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"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"]],"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","graph_after_placement":false,"modules":{"transformer":{"compile_calls":[{"fullgraph":true,"dynamic":null,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"static":false,"auto_dynamic":true,"int8_gemm":false}}},+ "video|minimax-h3|max|bfloat16|offload=1|gguf=0": {"patches":{"wan_fused":false},"applied":[["compiled","cudnn_benchmark","fp16_accum","tf32"]],"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"]],"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","graph_after_placement":false,"modules":{"transformer":{"compile_calls":[{"fullgraph":false,"dynamic":null,"options":"{'max_autotune': True, 'coordinate_descent_tuning': True, 'test_configs.force_filter_reduction_configs': True}"}],"static":false,"auto_dynamic":true,"int8_gemm":false}}},"video|minimax-h3|max|float16|offload=0|gguf=0": {"applied":[["cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},"video|minimax-h3|max|float16|offload=1|gguf=0": {"applied":[["cudnn_benchmark","fp16_accum","tf32"]],"graph_after_placement":false,"graph_reason":"measured GPU-bound: 1.0018x resident for 3.93 GB held; streamed, its group onloads wait on the host (27 per step at 16 GB), which a graph cannot record","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":{"wan_fused":false}},"video|minimax-h3|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":{}},diff --git a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json b/studio/backend/tests/fixtures/diffusion_family_data_freeze.jsonindex d93677d6032..b32a9f8e829 100644--- a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json+++ b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json@@ -441,7 +441,7 @@},"minimax-h3": {"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_h3_reduction_filter.py b/studio/backend/tests/test_h3_reduction_filter.pynew file mode 100644index 00000000000..5cf737fcf48--- /dev/null+++ b/studio/backend/tests/test_h3_reduction_filter.py@@ -0,0 +1,43 @@+# SPDX-License-Identifier: AGPL-3.0-only+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++"""MiniMax-H3 pins inductor's reduction-config filter on every arch (kill switch ``UNSLOTH_DIFFUSION_DYNAMIC_SCALE_RBLOCK=1``)."""++from __future__ import annotations++import types++import pytest++torch = pytest.importorskip("torch")++from core.inference import diffusion_compile_config as cc # noqa: E402+from core.inference import diffusion_speed as ds # noqa: E402+++def _h3():+ from core.inference import video_families+ return next(f for f in video_families._FAMILIES if f.name == "minimax-h3")++[email protected]("cap", [(8, 0), (8, 9), (9, 0), (10, 0), (12, 0), None])+def test_h3_filters_reductions_on_every_arch(monkeypatch, cap):+ monkeypatch.setattr(cc, "_device_capability", lambda: cap)+ assert _h3().filter_reduction_configs is True+ assert cc.family_filters_reductions(_h3()) is True+++def test_the_filter_reaches_h3s_regional_compile(monkeypatch):+ seen = {}++ def fake_compile(pipe, logger, **kwargs):+ seen.update(kwargs)+ return False++ monkeypatch.setattr(ds, "compile_eligible", lambda *a, **k: True)+ monkeypatch.setattr(ds, "_compile_repeated_blocks", fake_compile)+ target = types.SimpleNamespace(device = "cpu", dtype = torch.bfloat16, backend = "cuda")+ ds.apply_speed_optims(+ types.SimpleNamespace(), target, is_gguf = False, family = _h3(), speed_mode = ds.SPEED_DEFAULT+ )+ assert seen["filter_reductions"] is True