inspired https://github.com/fboulnois/stable-diffusion-docker
many thx!!
The pipeline uses the full model and weights which requires 8GB+ of GPU RAM. On smaller GPUs you may need to modify some of the parameters. It should take a few seconds to create one image.
Since it uses the official model, you will need to create a user access token
in your Huggingface account. Save the
user access token in a file called token.txt
and make sure it is available
when building the container.
The pipeline is managed using a single build.sh
script. You must
build the image before it can be run.
Make sure your user access token is saved in a file called
token.txt
. The token content should begin with hf_...
To build:
./build.sh build # or just ./build.sh
To run:
./build.sh run
The model and other files are cached in a volume called huggingface
.
The images are saved as PNGs in the output
folder using the prompt text. The
build.sh
script creates and mounts this folder as a volume in the container.
./gen.py An impressionist painting of a parakeet eating spaghetti in the desert
if your terminal supports sixel, install libsixel-bin (also img2sixel) and run
./gen.sh An impressionist painting of a parakeet eating spaghetti in the desert
./switch-model.sh