Git Product home page Git Product logo

stable-diffusion-webui-docker's Introduction

Stable Diffusion WebUI Docker

Easily and quickly run stable-diffsion-webui with ControlNet in Docker.

Requirements

  • Docker
  • Docker Compose

Setup

$ cp .env.example .env

Edit your environment,

$ cat .env

TZ=Etc/UTC      # timezone
PORT=7861       # port mapping
VOLUME=data     # docker volume storage mount point, eg. ./data to /data

If you modified the value of VOLUME, for example from VOLUME=data to VOLUME=volume, please follow these steps as well,

$ cat .env

...
VOLUME=volume   # docker volume storage mount point, eg. ./data to /data
$ mv data volume

Pre-download models and etc.

Here are some models for reference,

$ cat data/enhancing.sh

#!/usr/bin/env bash

declare -A arr

# models
arr["https://huggingface.co/prompthero/openjourney/resolve/main/mdjrny-v4.safetensors"]="models/Stable-diffusion"
arr+=(["https://huggingface.co/prompthero/openjourney-v2/resolve/main/openjourney-v2.ckpt"]="models/Stable-diffusion")
arr+=(["https://huggingface.co/ckpt/anything-v4.5-vae-swapped/resolve/main/anything-v4.5-vae-swapped.safetensors"]="models/Stable-diffusion")
arr+=(["https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0/resolve/main/dreamlike-photoreal-2.0.safetensors"]="models/Stable-diffusion")
arr+=(["https://huggingface.co/nuigurumi/basil_mix/resolve/main/Basil_mix_fixed.safetensors"]="models/Stable-diffusion")
arr+=(["https://huggingface.co/Alsebay/Chilloutmix-Ni-fix/resolve/main/Chilloutmix-Ni-fix/Chilloutmix-Ni-prune-fp32-fix.safetensors"]="models/Stable-diffusion")
# vae
arr+=(["https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors"]="models/VAE")
# embeddings
arr+=(["https://huggingface.co/datasets/gsdf/EasyNegative/resolve/main/EasyNegative.safetensors"]="embeddings")

...

Downloading ...

$ cd data ; bash enhancing.sh

These models, and others. will be linked in Docker once the container is successfully running.

Installation

$ docker compose --profile cpu up -d     # for CPU

$ docker compose --profile gpu up -d     # for GPU

Please wait while the process completes.

If you want to track the progress,

$ docker compose --profile cpu logs -f   # for CPU

$ docker compose --profile gpu logs -f   # for GPU

Usage

  • Open your browser and navigate to http://127.0.0.1:7861. The default port specified in the .env file is 7861.
  • The saved images will be located in the data/outputs directory.
  • Examples of prompts can be found in data/prompts.

Restart, Stop or Deinstallation

$ docker compose --profile cpu restart   # for restart

$ docker compose --profile cpu stop      # for stop

$ docker compose --profile cpu down      # for deinstallation

stable-diffusion-webui-docker's People

Contributors

yftzeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.