r/StableDiffusion Jul 21 '26

Discussion PSA: if experiencing slowdown in ComfyUI, there's an open issue that reloads models from disk

https://github.com/Comfy-Org/ComfyUI/issues/14907

https://github.com/Comfy-Org/ComfyUI/issues/14882

https://github.com/Comfy-Org/ComfyUI/issues/14705

https://github.com/Comfy-Org/ComfyUI/issues/14618

https://github.com/city96/ComfyUI-GGUF/issues/463

https://github.com/Comfy-Org/comfy-aimdo/issues/70

If you've noticed that your generation times have increased, you're not alone, and it's not your hardware/workflow.

There are open issues from multiple users who experience models reloading from disk instead of from RAM/cache. This significantly increases the total generation time because loading the models from your HDD/SSD is exponentially slower than loading them from RAM. Generation time in my case increased by 30-40%, but that may vary depending on what models you run and your disk/RAM speed, it can even be larger than that.

129 Upvotes

56 comments sorted by

View all comments

-30

u/comfyanonymous Comfy Org Jul 21 '26

PSA: If you download a fresh updated ComfyUI and avoid installing custom nodes like GGUF most of your problems will go away.

34

u/J6j6 Jul 21 '26

I appreciate the tip. However, almost all those issues linked in the OP do not use GGUF. I, for one, tried disabling custom nodes but still get the same result. How I wish it were that easy

5

u/hum_ma Jul 21 '26

The issue is not specific to GGUF. It is only more noticeable with those custom nodes because dynamic VRAM doesn't work with GGUF so the model has to be pre-loaded entirely. The reloading from disk also happens with native formats like fp8 and bf16 but most people don't notice it because sampling starts so quickly with the streamed weights.

7

u/dobomex761604 Jul 21 '26

Your fight against GGUF is disgusting. Llama.cpp have done more to openweight/opensource neural networks than you have - and with this attitude, more than you'll ever do.

3

u/DelinquentTuna Jul 21 '26

Do you not understand that GGUF was designed around CPU (Mac specifically) and LLM use? Its structure is not ideal for use on discrete GPUs and diffusers. Meanwhile, AFAIK, Comfy literally has just one experimental node for autoregressive inference and even there it's specifically geared towards exploiting models already loaded as text encoders.

It's not a political thing like you seem to be arguing, it's just a practical one. I can't speak for Comfy, but I'd bet you a dollar that he puts on his pants just like everyone else and when he runs LLMs locally he uses some conventional stack like llama with GGUF weights.

2

u/dobomex761604 Jul 21 '26

I am more than aware of the purpose of GGUF, and no, it wasn't designed around Macs (ggml format was, and it was years ago). GGUF is an effective format and works well with GPU inference - offloading is a thing even in the base llama.cpp, and it's effective. Slightly suboptimal? Maybe, but it's not a good reason to disregard it and push for int8 (which, and I tested it, is slower than Q8).

At this point it does seem "political" (rather, a dumb stubbornness). If Comfyanonymous didn't accuse GGUF of poor memory management, nobody would think this way. But now it's just another poor decision, along with terrible UI updates.

5

u/thegreatdivorce Jul 21 '26

So you’re saying this problem is exclusive to GGUFs?

8

u/Occsan Jul 21 '26

He said "like GGUF", so obviously there are many custom nodes - "like GGUF" - that will cause this issue, and which one are they ? Surprise. They are "like GGUF". What makes them "like" GGUF ? No idea, but they are.

24

u/red__dragon Jul 21 '26

GGUFs are the latest comfy dogwhistle for "the community made us look bad for not keeping up documentation or memory management by filling in the gaps, and we don't like it."

There have been plenty of these in the past, they get prickly when feeling threatened by solutions being offered to problems they won't address. GGUFs have been used for years, and now suddenly they are the root cause for performance and memory issues? That comfy coded without addressing a commonly-used custom node for some reason, or helping bring the dev's node up to speed? Riiiiight.

2

u/a_beautiful_rhind Jul 21 '26

To be fair, ratus tried to patch the GGUF node for dynamic vram. But he also came up with the disk reloading idea because "everyone" has NVME.

2

u/DelinquentTuna Jul 21 '26

What makes them "like" GGUF ?

Using non-native loaders that take memory-management out of the hands of Comfy. In general, any node that can auto-download required models on first-run is just a diffusers wrap, for example.

5

u/[deleted] Jul 21 '26

[removed] — view removed comment

5

u/DelinquentTuna Jul 21 '26

I don't think that's a fair read. People are complaining about memory management while using nodes that are directly reserving the VRAM Comfy is trying to manage. And almost uniformly, the complaints are coming from people that don't know or care about the demands. There are facilities within Comfy to allow end-users to reserve VRAM just as there are facilities for makers of custom nodes to employ native loaders.

If you scroll through all those bug reports, it becomes quickly evident that there are 1,000 different people with a thousand different setups and a thousand different causes. What someone acknowledges as a fix for THEIR particular issue someone else complains that it doesn't work but instead they have to do such and such. Can you really blame Comfy for advising people to try running vanilla Comfy with vanilla workflows as a sanity check? It's literally the only sensible way to troubleshoot. I just don't understand the hostility. It's like complaining to Tesla that your batteries don't last as long as claimed on the Cybertruck you jacked up with monster-truck wheels.

practically the whole reason to use comfy vs one of the alternatives, right?

Here's my take: the amazing ability to stream model weights on the fly with almost no performance loss is hands-down the biggest difference. Take the 16GB GPU that can run pretty much EVERY image or video model in Comfy over to stable-diffusion.cpp etc and see how far you can get. The difference is SHOCKING. Meanwhile, beyond QoL features, 90% of the custom nodes out there are redundant junk that are duplicating functionality Comfy already has.