comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
49.82k stars 5.25k forks source link

Upscale time still very slow #1698

Open kri1927 opened 11 months ago

kri1927 commented 11 months ago

I have reported this issue a months ago. and during the time I haven't use it at all cuz the first time I reported it. it still haven't fixed for weeks so I just quit and think that I'll come back later

same issue as https://github.com/comfyanonymous/ComfyUI/issues/858 and https://github.com/comfyanonymous/ComfyUI/issues/1294 when generating the first pic it takes only 40-50s but when It sends the pic to the upscale (the second Ksampler) the time used is usually 7-8 s/it but now it is 50-70 s/it Fix this pls it is unuseable T_T

the sampling method is dpmpp_2m_sde-karras on all the sampler preview method Taesd

this is the image

0005_ComfyUI

can you fix some code like what you did on https://github.com/comfyanonymous/ComfyUI/issues/858#issuecomment-1627726371 ? image this is the prompt window, the one that have 1:30 upscale time is because I set the first sampler (first generate to dpmpp_2m I think, that makes the time goes up to 7 minute and the upscale time went back to normal) but the face detailer still use a lot of time as the same...

edit** the Sampler are irrelevant. I just did one that are 3 minute at first generation, and normal speed on upscale and face detailer, but then I redo the same setting, prompt, same seed and it got slower

NeedsMoar commented 11 months ago

What is your hardware?

suede299 commented 10 months ago

I had a similar problem, confirmed it was a memory footprint issue, then disabled xformers and replaced it with pytorch 2.1 and the problem went away. In my case with img2img, replacing the input image 1 time slowed down the processing. Every time I start comfyui the 1st image is processed quickly.

kri1927 commented 10 months ago

What is your hardware?

Win10 Gtx1650 super 4G Vram Cpu iirc it's I3-10100F. Not sure about CPU I'll go check it this evening Ram 8Gb

NeedsMoar commented 10 months ago

8GB of ram is barely enough for Windows to run smoothly TBH, and the low vram / model swapping won't help. Even with a higher vram card, everything needs to be backed into system memory.

Additionally 8GB indicates a single stick, but those processors should be dual channel memory so you're only getting 1/2 the memory bandwidth you could be which hurts.

For that hardware I'd actually say those are really good times except that you'd been getting faster ones before somehow. RAM is dirt cheap these days, especially DDR4, and you could swap that out for 32GB for next to nothing (I'd just do 64 because it won't be much more, but I always get more than I think I need). I don't know what's changed but there's a certain point where software evolves and needs more ram and it might just not be maintainable without it. Finding an older release where you didn't have this issue would probably help it get solved if it's solvable though.

kri1927 commented 10 months ago

8GB of ram is barely enough for Windows to run smoothly TBH, and the low vram / model swapping won't help. Even with a higher vram card, everything needs to be backed into system memory.

Additionally 8GB indicates a single stick, but those processors should be dual channel memory so you're only getting 1/2 the memory bandwidth you could be which hurts.

For that hardware I'd actually say those are really good times except that you'd been getting faster ones before somehow. RAM is dirt cheap these days, especially DDR4, and you could swap that out for 32GB for next to nothing (I'd just do 64 because it won't be much more, but I always get more than I think I need). I don't know what's changed but there's a certain point where software evolves and needs more ram and it might just not be maintainable without it. Finding an older release where you didn't have this issue would probably help it get solved if it's solvable though.

The thing is it still randomly went fast like then sometimes but Idk why or how T_T

Reekin commented 6 months ago

I encounter the same problem. The second pass is extremely slow. Hires fix in SD only costs 30s but the second KSampler cost over 600s. Help me plz.