evilsocket / cake

Distributed LLM and StableDiffusion inference for mobile, desktop and server.
Other
2.44k stars 127 forks source link

Support running Stable Diffusion image generation models using multiple devices #27

Closed lukewwww closed 3 weeks ago

lukewwww commented 3 weeks ago

Add support to run the Stable Diffusion image generation models using multiple devices.

The code keeps the arguments & process untouched to run the LLM models, and add some more extra arguments to run the Stable Diffusion models.

The components on a SD pipeline, such as the Clip text encoders, the UNet and the VAE encoders, can be configured to run on different devices. The next step is to split the UNet so that different layers of it could be assigned to different devices.

The Readme file is updated with the instructions to run the SD models. A link to the demo video on Twitter is also included.