[GH-ISSUE #74] [ROCm] DynamicVRAM failed to initialize: funchook_prepare(cuMemAlloc_v2) failed: 8 Failed to allocate memory in unused regions #23

Open
opened 2026-10-26 22:23:42 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @lokvahkooravidya on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/74

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

Originally created by @lokvahkooravidya on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/74 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
Author
Owner

@michaelmanly commented on GitHub (Jul 22, 2026):

@lokvahkooravidya

<!-- gh-comment-id:5042404533 --> @michaelmanly commented on GitHub (Jul 22, 2026): @lokvahkooravidya
Author
Owner

@0xDELUXA commented on GitHub (Jul 22, 2026):

It works on the latest Windows ROCm via TheRock (7.15), torch 2.12, Python 3.12, RDNA4 with --enable-dynamic-vram. Have you tried just this flag?
I don’t have a Linux system though.

<!-- gh-comment-id:5045078388 --> @0xDELUXA commented on GitHub (Jul 22, 2026): It works on the latest Windows ROCm via TheRock (7.15), torch 2.12, Python 3.12, RDNA4 with `--enable-dynamic-vram`. Have you tried just this flag? I don’t have a Linux system though.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-aimdo#23
No description provided.