ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Almost unusably-slow - nodes fail to cache after recent update. ComfyUI now redundantly reprocesses unchanged inputs at every queue (IPAdapter reloads its model, ControlNet reloads depth map image, etc.)

Open robertalanbevan opened this issue 1 year ago • 7 comments

I use ComfyUI on Windows 10, running Stable Diffusion 1.5. I've tested this in Brave browser and Microsoft Edge and had the same results.

I always use a Save Image node to render the processed ControlNet depth map for my analysis, and it's never done this before. The processed depth image normally shows up in the output feed once, and never has to be reloaded again until I change something relevant to the depth map, like changing my depth image or how the depth image is cropped. This new redundant reprocessing occurs with or without that Save Image node, and it hugely impacts my processing times. I made the following workflow from scratch to ensure this wasn't just a quirk of my usual workflow: comfyui bug

I'd also give an example or proof of this with IPAdapter if I could, but all I can discern is that it takes around twice the processing time compared to usual (ControlNet was removed from that workflow when I tested this). IPAdapter seems to reprocess its model (e.g., from two unchanging images) at every queue.

The actual SD models don't reload, thankfully. Switching the "randomized" latent seed to "fixed" also did nothing - so it even fails when the entire workflow is static and unchanging. The log contains no errors.

I put this under User Support because my current guess is that this is just me missing a newly-introduced setting, or the result of some of my prior tinkering that's interfering with a new feature. Possibly something to do with the recent update's new RAM handling features. I've also noticed the "free model and node cache" and "unload models" buttons on the new top/bottom menu, which seems like it must be related.

Have I just unticked a "Reuse unchanged node and model inputs in cache" setting somewhere?

robertalanbevan avatar Aug 27 '24 10:08 robertalanbevan

Yeh its taking 30mins what usually took 20-30secs

icchansan avatar Aug 27 '24 15:08 icchansan

Can you post the actual workflow?

comfyanonymous avatar Aug 27 '24 17:08 comfyanonymous

Can you post the actual workflow?

testing-node-cache-workflow.json It doesn't seem to be the result of anything I manually changed in my workflow - I noticed it immediately after updating and restarting. I always update my installed nodes along with ComfyUI itself, so I suppose it's possible an updated node is the culprit and not ComfyUI.

robertalanbevan avatar Aug 27 '24 17:08 robertalanbevan

if you replace that Zoe-DepthMapPreprocessor with the "Canny" node does it have the same behaviour?

comfyanonymous avatar Aug 27 '24 18:08 comfyanonymous

image No change when I switched to the Canny image processor node. I tried it with both the Canny ControlNet model as well as the Depth model. I'll make a new install of ComfyUI and report if that fixes it.

robertalanbevan avatar Aug 27 '24 19:08 robertalanbevan

Can you reproduce it on a simple workflow with core only nodes?

comfyanonymous avatar Aug 27 '24 19:08 comfyanonymous

image I removed the obvious non-core nodes and went through and made sure the rest were all core nodes - no change. This is still on my main ComfyUI install, so I haven't yet gotten around to testing a fresh install.

robertalanbevan avatar Aug 27 '24 20:08 robertalanbevan

The fresh install seems to have fixed the problem. Still not sure what caused it.

robertalanbevan avatar Aug 28 '24 17:08 robertalanbevan