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.

Turn the CUDA graph off for MiniMax-H3: measured 1.0018x for 3.93 GB (#11175)

Daniel Han7e0897981d44
diff --git a/studio/backend/core/inference/video_families.py b/studio/backend/core/inference/video_families.py
index 99058cdaccc..82387d7775d 100644
--- a/studio/backend/core/inference/video_families.py
+++ b/studio/backend/core/inference/video_families.py
@@ -173,7 +173,15 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# recompiles across captions of 19 to 402 tokens. The loader engages this only when the denoiser is RESIDENT;
# compiling inside a full CPU-offload rotation measured slower than eager.
supports_torch_compile = True,
- supports_cuda_graph = True,
+ # Measured and declined. The early 1.006x does not survive pairing: at 960x544x124, 30 steps, fp8, the graph
+ # is 32.188 s p50 against 32.246 s eager over 5 renders per arm, 1.0018x, inside the 0.19% spread of a
+ # never-armed control. The capture works (29 replays/render, 0 eager, 0 fallbacks, bit-identical); there is
+ # nothing to win. The GPU is 92.7% busy either way, so removing ALL 25.3 s of host launch time (0.873 s/step
+ # to 0.1 ms) moved the wall 0.058 s: the host was never the wall. At 4 cores instead of 192 that 25.3 s is
+ # unchanged, so no weaker host turns H3 launch-bound. The cost is real: 3.93 GB held plus 4.03 GB at the
+ # capture peak, on a family already needing 87.5 GB, and 31.1 s on the first render (break-even ~530 videos).
+ # This is the CHEAPEST grid H3 ships, so the larger presets can only be more GPU-bound.
+ supports_cuda_graph = False,
gguf_repo = "unsloth/MiniMax-H3-GGUF",
# Hosted pre-quantized FL2VA denoisers. The modular workflow builds each component through its own
# from_pretrained, so there is no dense module to quantise in place: these are the ONLY way to run the 66.3 GB
diff --git a/studio/backend/tests/test_video_backend.py b/studio/backend/tests/test_video_backend.py
index 42fd3c9ec11..18357c9713f 100644
--- a/studio/backend/tests/test_video_backend.py
+++ b/studio/backend/tests/test_video_backend.py
@@ -8859,16 +8859,23 @@ def test_a_direct_worker_call_keeps_its_cancellation(fake_runtime, tmp_path, mon
def test_cuda_graph_is_a_per_family_opt_in():
- from core.inference.video_families import detect_video_family
+ """No video family opts in. Every one measured so far is GPU-bound at its shipped grid, so the capture buys
+ no wall and costs VRAM: H3 measured 1.0018x for 3.93 GB held, Wan measured 9.4% SLOWER. The opt-in stays a
+ field rather than being deleted because it is the only way a future launch-bound video family gets graphs,
+ and because deleting it would silently hand video the image backend's opt-OUT default."""
+ from core.inference.video_families import _FAMILIES, detect_video_family
h3 = detect_video_family("MiniMaxAI/MiniMax-H3")
assert h3 is not None and h3.name == "minimax-h3"
- assert h3.supports_cuda_graph is True
+ assert h3.supports_cuda_graph is False
wan = detect_video_family("Wan-AI/Wan2.2-TI2V-5B-Diffusers")
assert wan is not None and wan.name == "wan2.2-ti2v-5b"
assert wan.supports_cuda_graph is False
+ opted_in = [f.name for f in _FAMILIES if f.supports_cuda_graph]
+ assert opted_in == [], f"{opted_in} opts into CUDA graphs with no measurement on record"
+
def test_every_rebuilt_speed_target_carries_the_backend():
"""The CUDA-graph arm refuses ROCm by target.backend, which ROCm reports as device "cuda"."""