Comfy-Org / Comfy-Org/comfy-aimdo
[ROCm] DynamicVRAM failed to initialize: funchook_prepare(cuMemAlloc_v2) failed: 8 Failed to allocate memory in unused regions
- Dominant language
- C
- Stars
- 67
- Forks
- 39
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 10
Description
When launching ComfyUI with --enable-dynamic-vram inside an AMD ROCm PyTorch container, comfy-aimdo fails to initialize.
DynamicVRAM is disabled and ComfyUI falls back to the legacy ModelPatcher.
Log output
aimdo: /project/src-posix/cuda-funchooks.c:37:
ERROR:aimdo_setup_hooks:
funchook_prepare(cuMemAlloc_v2) failed: 8
Failed to allocate memory in unused regions
[WARNING] No working comfy-aimdo install detected.
DynamicVRAM support disabled.
Falling back to legacy ModelPatcher.
VRAM estimates may be unreliable especially on Windows.
Environment
Host OS:
Nobara 44 (Docker host)
Container OS:
Ubuntu 24.04 LTS
Container Image:
rocm/pytorch:rocm7.2.2_ubuntu24.04_py3.12_pytorch_release_2.10.0
Docker:
Default seccomp profile enabled
Seccomp: 2
Python:
3.12.3
PyTorch:
2.10.0+rocm7.2.4.git3d3aa833
GPU:
AMD Radeon RX 9070 XT
ComfyUI Startup Arguments:
--enable-dynamic-vram --high-ram --use-sage-attention --enable-triton-backend --reserve-vram 1
Contributor guide
Research direction
Start with /project/src-posix/cuda-funchooks.c at line 37, where funchook_prepare(cuMemAlloc_v2) fails during ComfyUI startup in the AMD ROCm PyTorch container. Reproduce with --enable-dynamic-vram and the reported environment, then trace the allocation failure. Done means DynamicVRAM initializes successfully instead of falling back to the legacy ModelPatcher, or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, docker, pytorch
- Domain
- ai, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100