stablediffusion icon indicating copy to clipboard operation
stablediffusion copied to clipboard

Leverage deepspeed for much faster inference time

Open LifeIsStrange opened this issue 3 years ago • 5 comments

https://github.com/microsoft/DeepSpeed Deepspeed delivers considerable inference time reduction for both single gpu and cluster gpus. It is the state of the art of inference optimization and is very easy to use, it's only a few lines of configuration!

Moreover it is exposed via Huggingface Accelerate https://github.com/CompVis/stable-diffusion/issues/180#issuecomment-1288059199

LifeIsStrange avatar Nov 24 '22 12:11 LifeIsStrange

Needs to be optional as DeepSpeed does not work properly on Windows.

n00mkrad avatar Nov 24 '22 13:11 n00mkrad

note Deepspeed Mii would be better https://github.com/microsoft/DeepSpeed-MII

LifeIsStrange avatar Nov 24 '22 21:11 LifeIsStrange

see the benchmark for stablediffusion (V1?): https://github.com/microsoft/DeepSpeed-MII/tree/main/examples/benchmark/txt2img

LifeIsStrange avatar Nov 24 '22 21:11 LifeIsStrange

Hey @dmarx, would I be able to try adding this enhancement? I haven't really contributed to open source projects, but I would love to get involved and start building something

dabenor avatar Mar 11 '23 17:03 dabenor

Anyone tried doing it locally? Any guides/pointers would be appreciated. Don't want to use hugging face.

saqibameen avatar Feb 20 '24 23:02 saqibameen