[Bug][AMD / ROCm][Windows] Access Violation (0xC0000005) in amdhip64_7.dll during MiniMax H3 Dynamic VRAM Staging & Sampling (RX 9070 XT / Adrenalin 26.11.2)

Open
#17,929 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
python, pytorch

Research direction

The crash is reported at the start of sampling in comfy/samplers.py (inner_sample, around line 1223, reached via outer_sample and patcher_extension.py execute), with the native frame in the ROCm torch_hip count_nonzero call. Start by reading how Dynamic VRAM staging hands weights to the sampler, and check whether the Windows ROCm 7.2.1 path is covered by the related issue #16776. Done would mean a reproducible root cause, either a guard in the sampler or a documented workaround, verified on the affected AMD setup.

Written by the indexing model from the issue text.

Description

Potential Bug
Custom Node Testing
Expected Behavior
Expected Behavior

MiniMax H3 video generation completes sampling on an AMD Radeon RX 9070 XT (16 GB VRAM) under Windows 11 with ROCm (PyTorch 2.9.1+rocm7.2.1), just as it did prior to recent updates.

Actual Behavior
Actual Behavior

Immediately after ComfyUI prepares the model for Dynamic VRAM loading (Model MiniMaxH3 prepared for dynamic VRAM loading) and enters sampling (comfy.samplers.inner_sample), Python crashes with a fatal native access violation (0xC0000005) inside amdhip64_7.dll (hipLaunchKernel) triggered via torch_hip.dll (count_nonzero_cuda).

Steps to Reproduce
Steps to Reproduce
  1. Run ComfyUI (via SwarmUI backend) on Windows 11 with an AMD Radeon RX 9070 XT (gfx1201, 16 GB VRAM) and Adrenalin Driver 26.11.2 (32.0.32029.2010, dated 2026-11-18).
  2. Use PyTorch 2.9.1+rocm7.2.1 (with embedded _rocm_sdk_core\bin\amdhip64_7.dll) and default Dynamic VRAM loading enabled.
  3. Load a MiniMax H3 workflow (minimaxH3INT8Convrot_fl2vaINT8Pruned.safetensors, minimax_h3_video_vae_int8_convrot.safetensors, minimax_h3_audio_vae_fp32.safetensors, qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors).
  4. Start generation; the crash occurs immediately at the start of sampling.
Debug Logs
### Debug Logs

[INFO] Model storage policy: fast_disk=True paths=['G:\\SwarmUI-new\\SwarmUI\\Models\\VAE\\MiniMaxH3\\minimax_h3_audio_vae_fp32.safetensors']
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
[INFO] Requested to load MiniMaxH3TEModel_
[INFO] Model MiniMaxH3TEModel_ prepared for dynamic VRAM loading. 14956MB Staged. 0 patches attached. Force pre-loaded 410 weights: 4572 KB.
[INFO] Requested to load MiniMaxH3
[INFO] Model MiniMaxH3 prepared for dynamic VRAM loading. 19995MB Staged. 208 patches attached. Force pre-loaded 210 weights: 1175 KB.
Windows fatal exception: access violation

Stack (most recent call first):
  File "G:\SwarmUI-new\SwarmUI\dlbackend\comfy\ComfyUI\comfy\samplers.py", line 1223 in inner_sample
  File "G:\SwarmUI-new\SwarmUI\dlbackend\comfy\ComfyUI\comfy\samplers.py", line 1263 in outer_sample
  File "G:\SwarmUI-new\SwarmUI\dlbackend\comfy\ComfyUI\comfy\patcher_extension.py", line 113 in execute
  File "G:\SwarmUI-new\SwarmUI\dlbackend\comfy\ComfyUI\comfy\samplers.py", line 1336 in sample
  File "G:\SwarmUI-new\SwarmUI\src\BuiltinExtensions\ComfyUIBackend\ExtraNodes\SwarmComfyCommon\SwarmKSampler.py", line 340 in samplers_sample

Exception Code: 0xC0000005
0x00007FFE0A4C39FA, _rocm_sdk_core\bin\amdhip64_7.dll + 0x2B39FA byte(s), hipRegisterTracerCallback() + 0x11464A byte(s)
0x00007FFE0A5955BD, _rocm_sdk_core\bin\amdhip64_7.dll + 0x3855BD byte(s), hipLaunchKernel() + 0x6D byte(s)
0x00007FFDB5919641, torch\lib\torch_hip.dll + 0x849641 byte(s), ?col2im_cuda@native@at@@...
0x00007FFDB777479D, torch\lib\torch_hip.dll + 0x26A479D byte(s), ?count_nonzero@cuda@at@@...
Other
Other
  • GPU: AMD Radeon RX 9070 XT (16 GB VRAM, gfx1201)
  • OS: Windows 11 (10.0.26200.9974), 32 GB System RAM
  • Driver: AMD Adrenalin 26.11.2 (32.0.32029.2010, 2026-11-18)
  • PyTorch: 2.9.1+rocm7.2.1
  • Related Issues: Upstream ROCm issue filed at ROCm/TheRock#10201; shares the same native amdhip64_7.dll (hipLaunchKernel / hipRegisterTracerCallback) 0xC0000005 crash signature seen in #16776.
Dominant language
Python
Stars
150k
Forks
17.9k
Avg merge
1d 1h
Merged PRs (30d)
181

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/ComfyUI

All issues in Comfy-Org/ComfyUI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.