Instructions to use Comfy-Org/MiniMax-H3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use Comfy-Org/MiniMax-H3 with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
[Help] RX 9070 XT (AMD) 16g vram + 5600x 32g + win11 – CUDA invalid argument when loading MiniMaxH3VideoVAE / any success stories?
Hi everyone,
I’m trying to run ComfyUI with the MiniMaxH3AudioVAE and MiniMaxH3VideoVAE models on my AMD Radeon RX 9070 XT (Windows 11). The audio VAE loads fine, but as soon as the workflow tries to load the video VAE (or decode video latents), I get the following error:
[ERROR] !!! Exception during processing !!! CUDA error: invalid argument
Search for `hipErrorInvalidValue' in https://rocm.docs.amd.com/projects/HIP/en/latest/index.html for more information.
Device-side assertion tracking was not enabled by user.
...
File "C:\ComfyUI-master\comfy\model_patcher.py", line 1075, in load
x[2].to(device_to)
torch.AcceleratorError: CUDA error: invalid argument
My main questions:
Has anyone successfully run the MiniMaxH3VideoVAE (or the whole MiniMaxH3 pipeline) on an RX 9070 XT (or any RDNA 3/4 AMD GPU) under Windows? If yes, what PyTorch version/driver/setup did you use?
Are there any known workarounds for this invalid argument error on AMD hardware – e.g., forcing CPU offload for the VAE, using a different attention implementation, or switching to Linux with proper ROCm support?
Could the error be related to the SageAttention dependency? If so, is there a way to disable it or replace it with standard PyTorch attention?
I’d really appreciate any hints, or even a confirmation that this is currently not supported on AMD GPUs. Thanks in advance for your time!
Feel free to adjust any details (e.g., driver version, PyTorch version) to match your actual setup. Good luck! 🍀
Here is the traceback:
[INFO] Requested to load MiniMaxH3VideoVAE
[INFO] Unloaded partially: 5001.72 MB freed, 7208.36 MB remains loaded, 918.83 MB buffer reserved, lowvram patches: 0
[ERROR] !!! Exception during processing !!! CUDA error: invalid argument
Search for hipErrorInvalidValue' in https://rocm.docs.amd.com/projects/HIP/en/latest/index.html for more information. Device-side assertion tracking was not enabled by user. [ERROR] Traceback (most recent call last): File "C:\ComfyUI-master\execution.py", line 545, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\execution.py", line 344, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\execution.py", line 318, in _async_map_node_over_list await process_inputs(input_dict, i) File "C:\ComfyUI-master\execution.py", line 306, in process_inputs result = f(**inputs) File "C:\ComfyUI-master\nodes.py", line 335, in decode images = vae.decode(latent) File "C:\ComfyUI-master\comfy\sd.py", line 1188, in decode model_management.raise_non_oom(e) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ File "C:\ComfyUI-master\comfy\model_management.py", line 395, in raise_non_oom raise e File "C:\ComfyUI-master\comfy\sd.py", line 1165, in decode model_management.load_models_gpu([self.patcher], memory_required=memory_used, force_full_load=self.disable_offload) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\comfy\model_management.py", line 996, in load_models_gpu loaded_model.model_load(lowvram_model_memory, force_patch_weights=force_patch_weights) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\comfy\model_management.py", line 782, in model_load self.model_use_more_vram(use_more_vram, force_patch_weights=force_patch_weights) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\comfy\model_management.py", line 810, in model_use_more_vram return self.model.partially_load(self.device, extra_memory, force_patch_weights=force_patch_weights) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\comfy\model_patcher.py", line 1272, in partially_load raise e File "C:\ComfyUI-master\comfy\model_patcher.py", line 1269, in partially_load self.load(device_to, lowvram_model_memory=current_used + extra_memory, force_patch_weights=force_patch_weights, full_load=full_load) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI-master\comfy\model_patcher.py", line 1075, in load x[2].to(device_to) ~~~~~~~^^^^^^^^^^^ File "C:\Users\***\AppData\Local\Programs\Python\Python313\Lib\site-packages\torch\nn\modules\module.py", line 1383, in to return self._apply(convert) ~~~~~~~~~~~^^^^^^^^^ File "C:\Users\***\AppData\Local\Programs\Python\Python313\Lib\site-packages\torch\nn\modules\module.py", line 964, in _apply param_applied = fn(param) File "C:\Users\***\AppData\Local\Programs\Python\Python313\Lib\site-packages\torch\nn\modules\module.py", line 1369, in convert return t.to( ~~~~^ device, ^^^^^^^ dtype if t.is_floating_point() or t.is_complex() else None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ non_blocking, ^^^^^^^^^^^^^ ) ^ torch.AcceleratorError: CUDA error: invalid argument Search for hipErrorInvalidValue' in https://rocm.docs.amd.com/projects/HIP/en/latest/index.html for more information.
Device-side assertion tracking was not enabled by user.
please, if you got the solution share you generation time.
please, if you got the solution share you generation time.
tested with this param:
'python main.py --disable-smart-memory' work perfect.
Anything else you can try for your espicially one.
I have run the whole pipeline with amd gpu, although the audio sounds like a blown microphone. (https://github.com/Comfy-Org/ComfyUI/issues/15283)
My setup
- ComfyUI 0.30.1 (Desktop)
- Windows
- AMD Radeon RX 7800 XT, 16 GB VRAM (ROCm 7.14)
- 64 GB RAM
- PyTorch 2.12.0+rocm7.14.0
Let AI help you find 'tile_size' and set it from 256 to 128 then you would not get an OOM. But the result exhibits noticeable blocky artifacts.
Let AI help you find 'tile_size' and set it from 256 to 128 then you would not get an OOM. But the result exhibits noticeable blocky artifacts.
3q,i tried for this that day,it says shape error, i just replaced all vae decoder to tile vae decoder。 maybe my tile size set wrong。 I fount 32g ram + vram on windows use swap frequencely, now i'm trying to step by step unload the model, to less write to the ssd. Run only once wrote about 10~30G.
Linux + ROCm data point for the same GPU (RX 9070 XT, gfx1201) — it works, and it's fast
Same card as OP, different platform: Linux instead of Win11. Posting numbers since I couldn't find any RDNA4 timings anywhere.
Setup
- RX 9070 XT 16GB (gfx1201), Ryzen 9 3900X, 64GB RAM
rocm/pytorch:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.9.1(torch 2.9.1+rocm7.2.4),HSA_OVERRIDE_GFX_VERSION=12.0.1- ComfyUI v0.30.2, flags:
--lowvram --fp16-vae --disable-smart-memory minimax_h3_fl2va_pruned_int8_convrot+qwen3vl_32b_minimax_h3_nvfp4_awq+ both VAEs- Official T2V template wiring (SamplerCustomAdvanced + BasicGuider, res_multistep, simple, 20 steps)
1. --disable-smart-memory fixes the video VAE crash on Linux too. Confirmed — the MiniMaxH3VideoVAE load that throws CUDA error: invalid argument for OP goes through cleanly with that flag. No other patches needed.
2. Timings (20 steps, T2V, video+stereo audio muxed in one MP4):
| Resolution | Frames | Total | Sampling only |
|---|---|---|---|
| 320×192 | 5 | 176.7s | 14.3s (cold start: 21GB DiT load + CPU text encode) |
| 848×480 | 124 (5.2s) | 403.4s (6.7 min) | 270.8s |
| 1344×768 | 124 (5.2s) | 1340s (22.3 min) | 1190.9s |
For reference, the Strix Halo 8060S report in #33 took 31m51s for 480p/5s with 49GB of VRAM. This 16GB card does the same job in 6.7 minutes. RDNA4 is not the bottleneck people expect.
3. Why: int8 is native on gfx1201, only nvfp4 is emulated. ComfyUI logs on startup:
Native ops: int8_tensorwise, float8_e5m2, convrot_w4a4, float8_e4m3fn , emulated ops: nvfp4, mxfp8
So the int8_convrot diffusion checkpoint — the compute-heavy part — runs on the native path. Only the NVFP4 text encoder is emulated, and that's a once-per-generation cost. I had assumed from reading comfy/model_management.py (supports_nvfp4_compute() returns False for non-NVIDIA) that everything would fall back; that turned out to be wrong. int8 doesn't go through that gate.
The NVFP4 text encoder loads as 14960.20 MB, full load: True — it stays packed and dequantizes per-op rather than expanding to bf16, so the 15.7GB file really is 15.7GB resident.
4. The actual bottleneck is the text encoder on CPU. With --lowvram, ComfyUI places Qwen3-VL 32B on the CPU (CLIP/text encoder model load device: cpu) and it takes 90-104 seconds per new prompt on a 3900X (12 threads pegged). That is a flat cost independent of resolution and length — at 480p/5s it's a quarter of total runtime. Reusing a prompt makes it 0s (CLIPTextEncode is cached), which is worth knowing if you benchmark: my 608×352/39f run came out at 47s only because of that cache. Anyone with VRAM headroom should try forcing the encoder onto the GPU.
5. There is an offload cliff, and it breaks naive extrapolation. The DiT's share of VRAM shrinks as the latent grows:
| 320×192/5f | 848×480/124f | 1344×768/124f | |
|---|---|---|---|
| usable | 15010 MB | 11601 MB | 6582 MB |
| DiT resident | 14636 MB | 10996 MB | 5737 MB |
| offloaded to CPU | 5360 MB | 8999 MB | 14259 MB |
At 1344×768 two-thirds of the 21GB DiT streams over PCIe every step. Consequently the scaling exponent changes: sampling goes as N^1.25 while the model mostly fits (8.35M to 50.5M px-frames), but N^1.59 once offload dominates (50.5M to 128M). Predicting the 1344×768 run from the low-resolution points underestimated it by 38% (14.4 min predicted vs 19.8 min actual sampling). Don't extrapolate H3 timings on a 16GB card from small test renders.
lowvram patches: 0 throughout — it's block-level residency, not per-layer swapping. Peak system RAM reached about 56GB of 62GB, so 32GB machines will likely struggle.
6. Where one hour lands. Using the offload-regime exponent, sampling reaches 3600s at about 256M px-frames — that's 1344×768 at about 248 frames (about 10s). The model's maximum config (1344×768 x 362 frames, about 15s) extrapolates to about 109 minutes and would shrink the DiT's VRAM share further still, so treat that as a lower bound or an OOM. Practical ceiling on 16GB: 1344×768/5s or 848×480/about 10s.