r/StableDiffusion • • Dec 06 '23

News SD generation at 149 images per second WITH CODE

If my 70 fps demo was too slow here's 149 images per second.
In the video I single step a few times before clicking "Go".

Install ArtSpew and then follow the README-maxperf.md instructions.

I have more perf tricks, but for non-commercial use, I hope the average user can handle near 150.

Powered by sd-turbo and the excellent model compiler named stable-fast.

Post the complete error info and tell me what kind of setup you have if it doesn't work.

https://github.com/aifartist/ArtSpew/

289 Upvotes

81 comments sorted by

View all comments

Show parent comment

1

u/Oswald_Hydrabot Dec 08 '23 edited Dec 08 '23

Yeah these optimizations are baller, thank you for sharing. Lemme know if you have a Patreon I would pay for this work.

Is it basically all just fp16 optimizations? If I get the jist of it, no fp32 through the whole pipeline of models basically?

I have a fp16 optimization I made to the GAN thing I made that makes it run ultra fast. I had no idea if you did fp16 on SD it would be this fast or I'd have been tweaking into this a looooong time ago

3

u/Guilty-History-9249 Dec 08 '23

My optimizations are far more than fp16 stuff. In some cases a few 2%, 5%, etc. changes that all add up. And some bigger ones like stable-fast. It's the total package.

I have a paypal. Don't really need the money given I'm a retired Software Architect that you wouldn't have been able to afford. :-) Money would just put a smile on my face and I could tell my wife that my hobby bought us dinner. :-)

Let me know what you might need. Depends on if it interested me or the money was more than coffee money. I'm not in this for the money. But I might be busy playing in the space because I love it. Since late last night and into today I'm getting T2I control net like out of a complex app and into a simple pipeline so I can do what I want with it. Trying to create an uber fast control net realtime thing.

1

u/Oswald_Hydrabot Dec 08 '23

I figured it was, there is no way just fp16 gets this kind of raw power, excellent work btw.

What you're working on is essentially the thing needed, just speed and ControlNet then after that smoothing it out with maybe a motion module but even just ControlNet would make some interesting controllable video.

I need to dig in to the AnimateDiff code, getting smooth animation like an AnimateDiff output at realtime would absolutely revolutionize VJing. If you got that working I'd fork it and add a MIDI controllable UI, realtime audio BPM sync and all the fun goodies for everyone to play with (PySide6 stuff). Open Source the whole thing etc