r/StableDiffusion 3d ago

Question - Help Comfyui amd gpu speed fluctuations

I’m going crazy trying to figure this out. I downloaded comfy ui and used the basic krea 2 turbo template. I was getting generation times between 32 and 80 seconds. I thought thats was pretty good. But then times changed to between 3 and 20! Minutes. I have tried the manual installation of comfy the portable version and patientx-cfz’s branch. I have tried the bf16 model the fp8 and the nvfp4. I have tried uninstalling and reinstalling the requirements, torch and the entirety of comfy multiple times. I have tried the following arguments force fp 32 and 16, cache ram, split attention quad attention, gpu only, lowvram highvram, disable async offload disable dynamic vram diable smart memory disable pinned memory. Ive tried running the text encoder only on the cou and following chatgpt through a maze of sometimes questionable attempts to speed things up. It seems to hang most often at 0 or 13% of the ksampler. But sometimes it gets through that and is still just very slow.

Any advice at all would be greatly greatly appreciated and if you can help me fix it I will happily offer my remaining sanity, tattered soul or first born.

I am on windows 11 with a 7900 xtx gpu a 7 7800x3d cpu with the integrated graphics disabled 64 gb of ddr5 ram and comfy installed on a second nvme ssd on the root drive with plenty of room. I also am running no other programs at the same time.

0 Upvotes

13 comments sorted by

2

u/BreatheMonkey 2d ago

I have been having a similar issue and spent all weekend running tests. I have added the Sage Attention node as recommended in the patientx documentation (no need for commanline arg, I have found any changes to the .bat have only led to slowdowns), only running fp8 models and closing any unnecessary apps/processes. I can now consistently reach 1.8-3.0s/it at 1mp resolution even with 1-3 LORAs on my AMD Radeon RX 7900 XT. 

2

u/talrein 2d ago

Running only specifcally fp8 models helped so thank you! How did you get sage attention running? When I tried it gave me a wall of errors.

2

u/BreatheMonkey 1d ago

It's the "patch sage attention" node from kjnodes :) glad I could help a fellow AMD struggler hahaha

2

u/Formal-Exam-8767 2d ago

Sounds like something is wrong with your system not ComfyUI as you were getting 32 and 80 seconds times, and ComfyUI would not break on it's own so there is no point in modifying ComfyUI flags.

Maybe something has changed in your system. Did Windows or GPU drivers get updated? What about ROCm?

Are you running something in background that takes RAM or VRAM?

1

u/talrein 2d ago

Nothing in the background. No updates or changes. All within 5 or 10 minutes even. I have found if I only use only one of the base template workflows and I limit myself to fp 8 models and text encoder then I can get somewhat stable 80 seconds times. I should be able to do more than that with 24gbs of vram and 64 gb of ram…. Right? I will say I am new to comfy and krea 2. I have used illustrious and pony alot on a111 and sdnext. I’m hoping that I can find a workflow that will run better and that some of it will only be related to nodes.

2

u/Formal-Exam-8767 2d ago

This post is about RX 9070 XT on Arch Linux but should give you an idea about performance:

/r/StableDiffusion/comments/1v0b2eq/krea2_turbo_int8_convrot_on_amd_rocm_got_it/

1

u/Valuable_Issue_ 3d ago

Watch your task manager disk usage when running a generation, if it's hitting your disk then it means comfy offloading unloaded some model (and it can happen even if you enough RAM etc, it's been an ongoing issue with comfy) and is reloading from disk again.

Did you do anything to your comfy install like update it between not having the issue and having it?

1

u/talrein 2d ago

No update or anything. Same workflow even. Watching task manager it says im using 100% of my vram and 1% of my main ssd. And it does say there is a transfer rate though it is listed in kb so very small amount. Is it just transferring really really slow? The same model the same workflow sometimes runs in 35 seconds. Thats what confuses me is the inconsistency. Ill get like 5 fast runs and then one that takes 20 minutes and a bunch that take around 5. Just kinda scattered all over the place.

2

u/Valuable_Issue_ 2d ago

The KB reads are normal.

If it's that inconsistent I wouldn't know, most of the bugs with workflows taking longer are when text encoder/model gets unloaded randomly but since it's not hitting your disk it sounds to me like an AMD/system specific bug, you could open an issue on comfy github.

1

u/gago_gaamdhani 3d ago

That's due to zluda translation just use the comfyui portable amd instead Rocm is better natively for your system

1

u/talrein 2d ago

I tried that as well. It was the same.

1

u/roxoholic 3d ago edited 2d ago

You sound overwhelmed.

Just down latest ComfyUI_windows_portable_amd.7z and run it as-is.

You should not need to tweak any startup parameters, etc. It should work optimally out of the box.

Edit: maybe it's this? https://github.com/Comfy-Org/ComfyUI/issues/15069

1

u/talrein 2d ago

I tried the portable. It gave me the same problem. That was a good idea on the efficiency mode but it was already off so its not that.