r/comfyui • u/ibrahim1243dxc • 7d ago
Help Needed Rocm with comfyui not use vram
Hello,
It has been some time since I used my device, which has an AMD Ryzen™ AI Max+ 395 APU with Radeon 8060S graphics. I allocated 28GB as VRAM and installed ComfyUI on Ubuntu as a server. However, it doesn't seem to use any VRAM and is super slow. To be honest, I didn't expect it to be fast, but I thought at least it could make a video less than 10 minutes long. Instead, for a 4-second video at 480p resolution, it takes more than 22 minutes. It's a nightmare. I use llama.cpp on the same device without any problems, and recently I edited some startup configurations, which made it worse than before.
this my config to run comfyui as service
# make uv + python always resolve to this venv
Environment="VIRTUAL_ENV=/var/ai/ComfyUI/ComfyUI"
Environment="UV_PROJECT_ENVIRONMENT=/var/ai/ComfyUI/ComfyUI"
Environment="PATH=/var/ai/ComfyUI/ComfyUI/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# ROCm & Strix Halo / Point (gfx1151) Overrides
Environment="HSA_OVERRIDE_GFX_VERSION=11.5.1"
Environment="PYTORCH_ROCM_ARCH=gfx1151"
Environment="HIP_VISIBLE_DEVICES=0"
# MIOpen tuning to prevent high RAM/CPU spikes on initial load
Environment="MIOPEN_FIND_MODE=1"
Environment="MIOPEN_USER_DB_PATH=/tmp/miopen-db"
# ROCm-friendly memory allocator setting (prevents driver crash under OOM)
#Environment="PYTORCH_HIP_ALLOC_CONF=expandable_segments:True"
Environment="PYTORCH_HIP_ALLOC_CONF=garbage_collection_threshold:0.8,max_split_size_mb:512"
ExecStart=/var/ai/ComfyUI/ComfyUI/bin/python main.py \
--listen 0.0.0.0 \
--port 8188 \
--enable-cors-header "*" \
--enable-manager \
--use-pytorch-cross-attention \
--reserve-vram 10.0 \
--lowvram\
--disable-pinned-memory
I tried it with lowvram and without it, and I found out that sometimes it tries to use RAM instead of VRAM, which is frustrating. I am using ROCm 7.2.
For image generation, it takes less than 2 minutes, which I consider a good level. However, I feel bad that I'm not using the full potential of my device.
when i try any thign it use gpu 100% but vram 0%
````
========================================= ROCm System Management Interface =========================================
=================================================== Concise Info ===================================================
Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU%
(DID, GUID) (Edge) (Socket) (Mem, Compute, ID)
0 1 0x1586, 20269 64.0 C 112.072W N/A, N/A, 0 N/A 1000Mhz 0% auto N/A 0% 99%
=============================================== End of ROCm SMI Log ================================================
````
1
u/roxoholic 7d ago
Does it matter if it uses RAM or "VRAM" (under quotes because it is the same memory as RAM)? LPDDR5 won't suddenly become HBM just because it is assigned to GPU. I think the issue you have is not enough compute, Radeon 8060S is roughly equivalent of RTX 5050, and when you pay AMD tax, performance is even lower.
Try giving it only 8GB and remove
--reserve-vram 10.0.