跪拜 Guibai
← All articles
AIGC

Deploying MiniMax H3's Quantized Video Model on a Linux Server with ComfyUI

By 原凉是这样的丶 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

MiniMax H3 is one of the first open-weight video models to produce synchronized stereo audio alongside video, and the quantized weights make it runnable on consumer hardware. The CUDA version matrix in this guide prevents the common mistake of assuming a newer driver automatically supports a newer PyTorch wheel, which silently breaks SageAttention and other compiled extensions.

Summary

MiniMax H3 generates video and stereo audio in a single pass, and its quantized weights bring that capability to a single RTX 4090. The full repository weighs nearly 395 GB, but only five files totaling about 63 GB are needed for text-to-video, image-to-video, and reference-to-video workflows. This walkthrough pins ComfyUI 0.30.0, PyTorch 2.13.0+cu130, and a specific NVIDIA driver to avoid the version drift that breaks CUDA extensions.

The deployment isolates the model on a dedicated GPU, checks for existing compute processes before launch, and hands the service to systemd with a restart policy that skips the restart loop when the GPU is already busy. A startup script sources environment variables from a .env file, validates paths, and passes separate input, output, and temp directories to ComfyUI.

Benchmark numbers from the native attention baseline give a reference point before adding SageAttention. A 5-second, 864×480 T2V clip took 113.89 seconds; I2V ran in 102.18 seconds. VRAM usage hovered around 22.7 GB, leaving headroom on a 48 GB card for longer or higher-resolution generations.

Takeaways
Only five quantized weight files (63.44 GB total) are needed for T2V, I2V, and R2V workflows, not the full 395 GB repository.
PyTorch cu130 wheels work with NVIDIA driver 580.126.09; cu132 requires a newer driver that the same host may not satisfy.
ComfyUI 0.30.0 includes native MiniMax H3 workflow templates accessible from the template library.
Ref2VA and FL2VA are distinct diffusion models: R2V uses Ref2VA, while T2V and I2V require FL2VA.
A 5-second, 864×480 T2V generation took 113.89 seconds on a single RTX 4090 with native attention.
VRAM usage peaked at roughly 22.7 GB for 5-second clips, leaving room for longer generations on a 48 GB card.
The systemd unit uses RestartPreventExitStatus=78 to avoid restart loops when the target GPU is already occupied.
modelscope-hub 0.1.8 registers CLI commands as `ms` and `modelscope`; `ms-hub` only appears in versions above 0.1.8.
Conclusions

MiniMax H3's audio-visual co-generation changes the deployment calculus: a single model replaces separate video and audio pipelines, simplifying the node graph and reducing integration points that can drift.

Pinning every component version (ComfyUI, PyTorch, CUDA wheel, driver, and model weights) is not paranoia; it is the only way to get a reproducible baseline before layering on acceleration like SageAttention.

The gap between the full 395 GB repository and the 63 GB actually needed for three workflows shows how much dead weight ships in model releases. Selective downloading should be the default, not an optimization.

GPU occupancy checks in the startup script and the matching systemd exit code prevent the silent failure mode where two services fight over the same card and both degrade.

Concepts & terms
CUDA Runtime vs. CUDA Toolkit
The CUDA Runtime is a subset of libraries shipped inside PyTorch wheels that lets GPU code execute. The CUDA Toolkit is a full SDK including the nvcc compiler, needed only for building CUDA extensions from source like SageAttention. A deployment that only runs models needs the Runtime, not the Toolkit.
DynamicVRAM and CPU offloading
Techniques that move model layers between GPU memory and system RAM during inference. They let a model that would otherwise exceed VRAM run on a smaller card, but they add latency and can fail if system RAM is also under pressure.
Ref2VA vs. FL2VA
Two diffusion model variants in MiniMax H3. FL2VA handles text-to-video and image-to-video. Ref2VA handles reference-to-video, accepting up to 9 images, 3 videos with audio, and 3 audio clips as conditioning inputs alongside a text prompt.
Minor Version Compatibility (CUDA)
A CUDA driver can run applications built with a newer minor version of the same major CUDA release, but it may not expose all features of the newer Toolkit. A driver that meets the minimum for CUDA 13.0 does not guarantee full support for CUDA 13.3 extensions.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗