mirror of
https://github.com/Comfy-Org/comfy-aimdo.git
synced 2026-11-04 23:37:21 +00:00
[GH-ISSUE #82] [ROCm/Windows] DynamicVRAM: gray image output with quantized models (INT4/GGUF); GGUF hangs before sampling #25
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-aimdo#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tutggadfasdfgsd-web on GitHub (Aug 5, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/82
Environment
Summary
With
--enable-dynamic-vramon ROCm/Windows, DynamicVRAM initializes successfully(log:
comfy-aimdo inited for GPU: AMD Radeon RX 7900 XT (VRAM: 20464 MB)), butquantized models produce wrong output or hang:
1) Quantized safetensors model (MiniMaxH3, INT4
convrot_w4a4, MixedPrecisionOps)→ output is a completely gray image (constant latent).
2) GGUF model (same MiniMaxH3 arch, qtypes F32/BF16/Q4_0/Q4_K, sd.cpp compat mode)
→ sampler never starts step 1: dedicated VRAM fills to ~19.4GB, GPU compute ~0%,
ComfyUI UI freezes for 5+ minutes (OS itself is responsive).
loaded partially; 16569 MB loaded),i.e. it does NOT use ModelPatcherDynamic — but aimdo's CUDA detour hooks
(6 hooks) are still installed at the torch level.
Diagnostics performed (inside a running ComfyUI process)
Minimal hostbuf → vbar → device roundtrip test with aimdo already initialized:
vbar_fault: OK ✅roundtrip_equal: true)So the low-level data path (HostBuffer → VBAR → VRAM) is correct on ROCm
for plain byte copies.
Suspected root cause
Issue appears specific to quantized weights interacting with dynamic loading:
ModelPatcherDynamic.load()(model_patcher.py), forQuantizedTensorweights thegeometry passed to vbar allocation is the weight object itself, whereas non-quantized
weights get a
TensorGeometry— possible incorrect size/layout accounting.load/compute path even though the model never uses ModelPatcherDynamic.
Questions
Happy to provide full logs or run additional diagnostics on request.
@coderabbitai[bot] commented on GitHub (Aug 5, 2026):
🔗 Related PRs
Comfy-Org/comfy-aimdo#78 - Implement NVML pressure and async pre-free clamping [merged]
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
@0xDELUXA commented on GitHub (Aug 12, 2026):
I haven't encountered this on RDNA4/Windows ROCm 10.1 and Torch 2.14. Could you try testing it again on your system? Also, GGUF or W4A4 isn't the best quantization option. W4A8 or int8 convrot would be a better choice.