assets | ||
LICENSE | ||
make_builds_linux.sh | ||
make_builds_mac_arm64.sh | ||
make_builds_mac_x86.sh | ||
make_builds_mac.sh | ||
make_builds_win.bat | ||
README.md | ||
requirements.txt | ||
screenshot-linux.png | ||
screenshot-macos.png | ||
SD-desktop.py |
Stable Diffusion Desktop
Overview
Stable diffusion model has been made available on Hugging Face spaces, which is nice. But sometimes the queue is long and you are in a hurry, so this desktop app is built. You can use it to run stable diffusion using your own GPU (or even just CPU) without writing any code. Obviously, if you are a developer, you really don't need this since the Hugging Face Diffuser library is so simple to use.
Setup
- You will need to provide a valid Hugging Face token with WRITE access. This is required by Hugging Face and the token will not be shared with anyone.
- For Windows, you will need to enable Developer mode. The easiest way to do this is to go to Settings -> For Developers and enable 'Developer mode'. Windows will download a bunch of files.
Limitations
PyInstaller requires building on each target platform separately (no cross-compiling is possible). Windows build is done on a virtual machine without access to GPU, so no CUDA libraries are bundled. Thus, no GPU support at the moment. It would be helpful if someone using Windows with GPU can help do the Windows build.
Implementation
The app is written with Flet for simplicity and packaged with PyInstaller.
Screenshots
Running on Linux:
Running on Mac:
FAQ
- Why is it so slow when I run it the first time?
This is because Stable Diffusion needs to download a bunch of large model files. Once that is done, it's much faster.
- Why is the executable so large?
This is because PyInstaller has to bundle everything into a single executable. There are a lot of dependencies.