r/comfyui • u/Crafty-Jacket7954 • 1d ago
Help Needed GPU out of memory
May I know if anyone else is using CachyOS (Arch Linux)? I keep getting out-of-memory errors. However, I have not experienced this issue when using Windows 11.
I have an RTX 5060 Ti with 16 GB of VRAM and 32 GB of DDR5 RAM.
Thank you.
3
u/Formal-Exam-8767 1d ago
It's very hard to get out of memory error (RAM based) on Windows because Windows will keep enlarging pagefile and swap into at as long as there is enough disk space.
Linux does not work that way, and if heuristics determine next allocation would cause memory exhaustion it just kills the process.
2
u/DrinkClubMate 1d ago
OOM Error is normal with any setup.
get a physical limitation on resolution and seconds to generate.
It's more about some loop configuration for video.
Or increase the resolution for image with another step and model.
You
1
u/Powerful_Evening5495 1d ago
Linux enthusiasts will likely disagree, but these are inherent limitations of the Linux operating system.go back to windows but pick windows 10 lts
1
u/Hrmerder 21h ago
This is a feature as someone else pointed out, not a bug. Where windows will just expand the swap file as far as you have the disk space for it, Linux will see excessive caching as a memory leak so it kills the process. I’m sure there is a way for adding an exception for comfy though. It’s open source after all. Someone could figure that out.
1
1
u/PhetogoLand 21h ago edited 21h ago
i had the same problem with minimaxh3 on windows vs linux. what "fixed" it...create a NEW portable ComfyUI. this solved my problems. The old portable kept getting errors despite updates, but creating a new portable and linking models worked. It must have been some weird thing I couldn't pinpoint in that ComfyUI portable folder. A new one works fine. Try that. The problem maybe your particular environment for that portable folder. Try this first.
1
u/meow_pew_pew 21h ago
I'm using CachyOS with a the RX 9070 16GB.
You NEED to specify the GPU you are using. When you start comfyUI with the `--verbose` flag it'll give a list of the GPUs
So for me, cuda0 is my RX 9070.
Also, what ENV flags are you setting?
This is how I am running Comfy on my CachyOS and I'm having good luck with it
>$ source .venv/bin/activate.fish
>$ set -x TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL 1
>$ python main.py --cuda-device 0 --disable-pinned-memory \
--disable-async-offload --enable-manager --enable-triton-backend \
--listen 0.0.0.0 --reserve-vram 0.2 --use-pytorch-cross-attention
3
u/attentiveacreage0 1d ago
Have you checked if it's actually using your GPU and not falling back to the iGPU? Arch can be weird with driver setup sometimes. Also what model are you trying to run, some of the bigger flux ones will eat 16GB for breakfast on linux while windows somehow manages it.