Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Runs the official Stable Diffusion release in a Docker container with HTTP interface.

License

Notifications You must be signed in to change notification settings

sharl/stable-diffusion-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stable Diffusion in Docker with HTTP interface

Before you start

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.

Quickstart

The pipeline is managed using a single build.sh script. You must build the image before it can be run.

Build

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

Run Docker Container

To run:

./build.sh run

Generate

./gen.py 'An impressionist painting of a parakeet eating spaghetti in the desert'

Outputs

Model

The model and other files are cached in a volume called huggingface.

Images

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.

About

Runs the official Stable Diffusion release in a Docker container with HTTP interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.5%
  • Shell 13.4%
  • Dockerfile 8.1%