Coder Social home page Coder Social logo

kalaspuff / stable-diffusion-webui-controlnet-docker Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 6.0 163 KB

🧑‍🎨 Stable Diffusion WebUI + ControlNet extension running in Docker. Built Docker image to be run as a Space at Hugging Face.

Home Page: https://huggingface.co/spaces/carloscar/stable-diffusion-webui-controlnet-docker

Dockerfile 22.04% Shell 45.74% Python 32.21%
controlnet docker dockerfile hugging-face-spaces stable-diffusion stable-diffusion-webui

stable-diffusion-webui-controlnet-docker's Introduction

title emoji colorFrom colorTo sdk app_port pinned tags models
Stable Diffusion WebUI ControlNet
🦄
pink
yellow
docker
7860
true
stable-diffusion
stable-diffusion-diffusers
text-to-image
stabilityai/stable-diffusion-2-1
runwayml/stable-diffusion-v1-5
lllyasviel/ControlNet
webui/ControlNet-modules-safetensors
dreamlike-art/dreamlike-diffusion-1.0
Anashel/rpg
Lykon/DreamShaper

Stable Diffusion WebUI + ControlNet

Private image builds with both with Stable Diffusion 2.1 models and Stable Diffusion 1.5 models and bundles several popular extensions to AUTOMATIC1111's WebUI, including the ControlNet WebUI extension. ControlNet models primarily works best with the SD 1.5 models at the time of writing.

Shared UI space would usually load with a model based on Stable Diffusion 1.5.

🐳 🦄 Builds a Docker image to be run as a Space at Hugging Face using A10G or T4 hardware.

Setup on Hugging Face

  1. Duplicate this space to your Hugging Face account or clone this repo to your account.
  2. Under the "Settings" tab of your space you can choose which hardware for your space, that you will also be billed for.
  3. The on_start.sh file will be run when the container is started, right before the WebUI is initiated. This is where you can install any additional extensions or models you may need. Make sure the env value IS_SHARED_UI is set to 0 or is unset for your space, or else only the lightweight model installation will run and some features will be disabled.

Relevant links for more information

Repo for this builder

This repo, containing the Dockerfile, etc. for building the image can originally be found on both 🤗 Hugging Face ➔ carloscar/stable-diffusion-webui-controlnet-docker and 🐙 GitHub ➔ kalaspuff/stable-diffusion-webui-controlnet-docker.

Stable Diffusion Web UI

WebUI extension for ControlNet

ControlNet models

Licenses for using Stable Diffusion models and ControlNet models

Enable additional models (checkpoints, LoRA, VAE, etc.)

Enable the models you want to use on the bottom of the on_start.sh file. This is also the place to add any additional models you may want to install when starting your space.

## Checkpoint · Example:
download-model --checkpoint "FILENAME" "URL"

## LORA (low-rank adaptation) · Example:
download-model --lora "FILENAME" "URL"

## VAE (variational autoencoder) · Example:
download-model --vae "FILENAME" "URL"

Some examples of additional (optional) models

Some models such as additional checkpoints, VAE, LoRA, etc. may already be present in the on_start.sh file. You can enable them by removing the # in front of their respective line or disable them by removing the line or adding a leading # before download-model.

Visit the individual model pages for more information on the models and their licenses.

Extensions

Additional acknowledgements

A lot of inspiration for this Docker build comes from GitHub ➔ camenduru. Amazing things! 🙏

stable-diffusion-webui-controlnet-docker's People

Contributors

kalaspuff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stable-diffusion-webui-controlnet-docker's Issues

GIT branches no longer available.

Thanks for making this available. Wanted a local docker image.

I had to remove the git branch options on git clone because they were no longer available. v2 and v1.6 in 3 places.

crashes at startup (torchmetrics error)

Hi
The image crashes when starting the ui on a torchmetrics error

---------------
Launching Web UI with arguments: --listen --ui-config-file ui-config.json --ui-settings-file config.json --disable-console-progressbars --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding --enable-console-prompts --no-download-sd-model --api --skip-version-check --force-enable-xformers --xformers --enable-insecure-extension-access
---------------
Traceback (most recent call last):
  File "/app/stable-diffusion-webui/run.py", line 55, in <module>
    start()
  File "/app/stable-diffusion-webui/run.py", line 19, in start
    import webui  # type: ignore  # noqa
  File "/app/stable-diffusion-webui/webui.py", line 28, in <module>
    from modules import extra_networks, ui_extra_networks_checkpoints
  File "/app/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 5, in <module>
    from modules import shared, ui_extra_networks, sd_models
  File "/app/stable-diffusion-webui/modules/sd_models.py", line 17, in <module>
    from modules.sd_hijack_inpainting import do_inpainting_hijack
  File "/app/stable-diffusion-webui/modules/sd_hijack_inpainting.py", line 7, in <module>
    import ldm.models.diffusion.ddpm
  File "/app/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 12, in <module>
    import pytorch_lightning as pl
  File "/opt/venv/lib/python3.10/site-packages/pytorch_lightning/__init__.py", line 34, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "/opt/venv/lib/python3.10/site-packages/pytorch_lightning/callbacks/__init__.py", line 25, in <module>
    from pytorch_lightning.callbacks.progress import ProgressBarBase, RichProgressBar, TQDMProgressBar
  File "/opt/venv/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/__init__.py", line 22, in <module>
    from pytorch_lightning.callbacks.progress.rich_progress import RichProgressBar  # noqa: F401
  File "/opt/venv/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/rich_progress.py", line 20, in <module>
    from torchmetrics.utilities.imports import _compare_version
ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (/opt/venv/lib/python3.10/site-packages/torchmetrics/utilities/imports.py)

how to build on local?

hi, i am trying:

git clone https://github.com/kalaspuff/stable-diffusion-webui-docker

cd stable-diffusion-webui-docker

docker build . --rm -t kalaspuff/sdw 

but failed here:

 => ERROR [ 4/23] RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/poetry python3 - --yes     && ln -s /usr/local/poetry/bin/poetry /usr/bin/poetry         && poetry config virtualenvs.create false       1000.9s
------
 > [ 4/23] RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/poetry python3 - --yes     && ln -s /usr/local/poetry/bin/poetry /usr/bin/poetry         && poetry config virtualenvs.create false     && poetry config virtualenvs.in-project false:
#0 1.465 Retrieving Poetry metadata
#0 68.51
#0 68.52 # Welcome to Poetry!
#0 68.52
#0 68.52 This will download and install the latest version of Poetry,
#0 68.52 a dependency and package manager for Python.
#0 68.52
#0 68.52 It will add the `poetry` command to Poetry's bin directory, located at:
#0 68.52
#0 68.52 /usr/local/poetry/bin
#0 68.52
#0 68.52 You can uninstall at any time by executing this script with the --uninstall option,
#0 68.52 and these changes will be reverted.
#0 68.52
#0 68.52 Installing Poetry (1.4.0)
#0 68.52 Installing Poetry (1.4.0): Creating environment
#0 205.8 Installing Poetry (1.4.0): Installing Poetry
#0 1000.7 Installing Poetry (1.4.0): An error occurred. Removing partial environment.
#0 1000.8 Poetry installation failed.
#0 1000.8 See /poetry-installer-error-x3gj8j15.log for error logs.
------
Dockerfile:50
--------------------
  49 |     # Poetry for Python packages
  50 | >>> RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/poetry python3 - --yes \
  51 | >>>     && ln -s /usr/local/poetry/bin/poetry /usr/bin/poetry \
  52 | >>>     \
  53 | >>>     && poetry config virtualenvs.create false \
  54 | >>>     && poetry config virtualenvs.in-project false
  55 |
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/poetry python3 - --yes     && ln -s /usr/local/poetry/bin/poetry /usr/bin/poetry         && poetry config virtualenvs.create false     && poetry config virtualenvs.in-project false" did not complete successfully: exit code: 2

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.