SamuKata
NerdyRodent
NerdyRodent

patreon


Boost SDXL, Flux, LTXV or Hunyuan Video Speeds!

Video - https://youtu.be/beiVSzsH2R0

Overview

Who wants to generate images or video faster? Me, for one! Thanks to these new cache nodes for ComfyUI, those much needed speed boosts are available - even for those of use with older cards!

Things can go even faster with torch.compile, however you'll need at least a 40 series card to take advantage of it.

TeaCache and WaveSpeed are two possible options, so I figured I'd put them both through their paces with some image generation.

Of the two, WaveSpeed certainly seemed the most versatile to me, but there are now a handful of different cache options available to install via ComfyUI Manager. It also didn't seem to have the persistence issue of TeaCache, which is certainly a bonus when you're trying to test things :)

LoRAs, ControlNets, FireFlow, Flux, SDXL, LTXV, Hunyuan video and probably a whole lot more should work nicely with WaveSpeed too.

The cache works best with more steps, though even 8-step LoRA workflows got a chunky 1s speed boost!

Give it a go loads of things and see what you think :)

Links

The nodes used in the video:

https://github.com/welltop-cn/ComfyUI-TeaCache

https://github.com/chengzeyi/Comfy-WaveSpeed

NB. WaveSpeed doesn't seem to be found in ComfyUI Manager any more :/ Currently git clone install only

Attachments

As well as the workflows, I've also included the full versions of the example images used in the video which show the impact of applying more cache.

Again, the are numbered in order of appearance in the video, with the FireFlow workflow being an extra bonus ;) It can be used to compare base fireflow output to cached fireflow output, and for me it gives a nice speedup at 16s vs 24s without the cache.

Example run of an image edit with fireflow:

 

Boost SDXL, Flux, LTXV or Hunyuan Video Speeds! Boost SDXL, Flux, LTXV or Hunyuan Video Speeds!

Comments

3090 here!

Nerdy Rodent

Thanks a lot! the WaveSpeed node did not show up in my manager, and it didn’t show up under missing nodes either, so I installed it manually and everything is working fine. What graphics card/system are you using? In my normal workflows with Euler/beta, it takes 130 seconds. With WaveSpeed set to 0.250, it takes 107 seconds. The Turbo LoRA, however, completes in just 56 seconds, so it’s faster than WaveSpeed. I still need to run more quality tests to compare the results. Also I replaced the standard LoRA Loader with the Power LoRA Loader since I often use multiple LoRAs. This change didn’t impact the speed. However, I’m still not entirely sure what difference the loader makes when passing through just the model or both the model and CLIP. 😊

Danny

Thanks Jeroen, now works perfect!

Tribaloide

TeaCache still working here, though with any updates don't forget to set your values!

Nerdy Rodent

Linux is also failing here with your Flux Speed test examples. Perhaps uses an older version of Teachest ? The examples supplied in the teachest node directory work fine. xx

Pete Tama

That's a great idea!

ThoughtFission

Yes, Linux is the best supported, easiest and gives the best performance for all the new AI stuff - mostly because that's what all the developers use. A dual boot system gets the best of both worlds, so all you need is a partition or a second drive and you're golden. MS Windows does indeed need all that extra techy know-how to port stuff over and hack things into a working state. I totally gave up on Windows for that reason myself, so it's fully understandable!

Nerdy Rodent

Thanks Nerdy. I wish I could use Linux but the PC with the 4090 is windows. I do too many things with it to change over to Linux. And the other stuff you mentioned is exactly what I was struggling with in the first place. I'm not a techy, just an artist. So this stuff is quite daunting.

ThoughtFission

That page is updated a lot, and is the most comprehensive set of step-by-step instructions for a wide variety of Windows setups - including embedded python :) As mentioned, the most common mistake for ComfyUI portable looks to be using installed python instead of portable python.

Nerdy Rodent

Thanks for the link, really appreciate it. And yes Windows is lovely that way. I must be doing something wrong then. When I run the sample work flow, it says it needs Triton. Anyway, I'll give the pre-compiled stuff a go.

ThoughtFission

Updated & restart is something I do every day ;)

Nerdy Rodent

Yes, getting AI to work on Windows is like getting a PS5 game playing on an Xbox ;) https://github.com/woct0rdho/triton-windows has the windows pre-compiled versions. Remember you don't need triton for your 4090 when using the cache!

Nerdy Rodent

WSL is a whole level of extra pain, but remember you don't need triton for the cache!

Nerdy Rodent

I had that too. Nothing shows up when you check missing nodes. I did a few update all and restarts and all of a sudden the node worked. No idea exactly why. Good luck!

Jeroen Van Harten

3_SDXL-DD-WaveSpeed_v0.json for me does not work. I have tried with the models realvisxlV50_v50Bakedvae.safetensors and realisticVisionV60B1_v60B1VAE.safetensors and it does not work, I get this error: ApplyFBCacheOnModel No transformer blocks found. The sdxl model has to be diffusion? The ones I have tested are not diffusion?

Tribaloide

Hi Nerdy. I also have windows 11, I'll try to install triton with linux on wsl, does it work? It would be great to have a docker version of comfy with triton.

EruoAuri

I'm on windows 11. Definitely doesn't take 10 seconds. If you know of an easy install tutorial I would be eternally grateful.

ThoughtFission

If you need triton there are a number of options. Using Linux, triton is takes about 10 seconds to install via "pip install -U triton" (-U gets the latest version). It's needed for loads of things, so certainly worth installing. On other operating systems, such as Microsoft Windows, it's also a case of "pip install" but you'll need to pick a fixed version of triton which matches your current setup from the precompiled versions at https://github.com/woct0rdho/triton-windows To add a third layer of complication, by using a portable download over a standard install you'll need to remember to use the emedded python you downloaded. Any time you see a normal pip install, you'll need to instead use the absolute path to your download - e.g "/your/path/to/python_embedded/python.exe -m pip install"

Nerdy Rodent

I tried installing Wavespeed last night. Wavespeed itself is dead easy. But trying to install Triton, on a portable version of Comfy, was impossible. I admitted defeat about 3 am this morning. Desperately need that speed boost! Even on my 4090 Flux is a pig.

ThoughtFission


More Creators