- Nix (with flakes)
- An NVIDIA GPU
- enable CUDA support for pytorch only, to avoid long build times and broken
cupy
package. - add gradio
Follow the instructions at https://huggingface.co/CompVis/stable-diffusion-v-1-4-original.
Use --impure
if you need to enable broken packages.
nix develop [--impure]
Note that it will take a long time to build packages that use CUDA (opencv, torch).
python3 optimizedSD/optimized_txt2img.py --H 512 --W 768 --n_iter 1 --n_samples 4 --ddim_steps 50 --prompt "A young man sitting on the floor with his computer, a small messy apartment with dirty laundry and dishes, anime 8K miyasaki ghibli"
For further instructions, see: