Comments (5)
maybe
from stable-diffusion-webui.
Here a a version i've made, probably not the most optimized, I will make a pull request soon
To build you need to have in the same folder :
sd-v1-4.ckpt
webui.py
FROM pytorch/pytorch:latest
# Make RUN commands use `bash --login`:
SHELL ["/bin/bash", "--login", "-c"]
RUN apt update
RUN apt install git curl -y
RUN apt-get update -yq \
&& apt-get -yq install curl gnupg ca-certificates \
&& curl -L https://deb.nodesource.com/setup_12.x | bash \
&& apt-get update -yq \
&& apt-get install -yq \
nodejs
RUN apt install -y wget
RUN npm install -g localtunnel
WORKDIR /app
RUN git clone https://github.com/CompVis/stable-diffusion.git
WORKDIR /app/stable-diffusion
RUN conda env create -f environment.yaml
COPY webui.py ./
RUN mkdir models/ldm/stable-diffusion-v1/
RUN mkdir embeddings
RUN apt install wget -y
RUN wget -P embeddings/ url-to-my-emmbeding.pt
COPY sd-v1-4.ckpt /app/stable-diffusion/models/ldm/stable-diffusion-v1/model.ckpt
SHELL ["conda", "run", "-n", "ldm", "/bin/bash", "-c"]
RUN git clone https://github.com/TencentARC/GFPGAN.git
WORKDIR /app/stable-diffusion/GFPGAN
RUN pip install -r requirements.txt
RUN wget -P experiments/pretrained_models/ https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth
WORKDIR /app/stable-diffusion/
RUN pip install opencv-python
RUN apt update && apt install -y libsm6 libxext6
RUN apt-get install -y libxrender-dev
RUN pip install realesrgan
RUN pip install gradio
RUN pip install git+https://github.com/crowsonkb/k-diffusion/
RUN mkdir outputs
RUN mkdir outputs/txt2img-samples
RUN mkdir outputs/img2img-samples
RUN mkdir outputs/extras-samples
RUN mkdir outputs/txt2img-samples/samples
RUN mkdir outputs/img2img-samples/samples
RUN mkdir outputs/extras-samples/samples
in the docker image you can launch the following commands
I've used local tunnel, to expose my app because I rent a distant GPU
cd /app/stable-diffusion
nohup bash -c "lt --port 8080 &" && sleep 4
conda run -n ldm python webui.py --gfpgan-dir GFPGAN --no-progressbar-hiding
from stable-diffusion-webui.
You also can use the gradio share url in replacement of localtunnel
from stable-diffusion-webui.
thanks
from stable-diffusion-webui.
@Pipazoul are you still planning to make a PR? This could be very useful. I would also suggest adding an entrypoint.sh
file that executes the commands you should otherwise run in the Docker container. In other words, you could modify the Dockerfile adding these lines:
EXPOSE 8080
COPY ./entrypoint.sh /sd/
ENTRYPOINT /sd/entrypoint.sh
and include an entrypoint.sh
file which contains the following:
#!/bin/bash
cd /app/stable-diffusion
nohup bash -c "lt --port 8080 &" && sleep 4
conda run -n ldm python webui.py --gfpgan-dir GFPGAN --no-progressbar-hiding
Does it work on your side?
from stable-diffusion-webui.
Related Issues (20)
- [Feature Request]: Please add support for the COSXL model by Stability AI HOT 1
- [Bug]: After upgrading to 1.9.0, you can't start it, you will report "Expected String or Bytes-Like Object" HOT 1
- [Bug]: No module named 'pillow_avif' HOT 2
- [Feature Request]: Backwards compatibility for txt2img and img2img API calls in 1.9.x versions
- AttributeError: 'UiControlNetUnit' object has no attribute 'enable'[Bug]: at last version HOT 10
- ERROR Calling AnimateDiff HOT 10
- [Bug]: Can't create venv at the first launch HOT 2
- RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument weight in method wrapper_CUDA___slow_conv2d_forward)[Bug]: HOT 2
- Torch is not able to see GPU HOT 6
- [Bug]: sd-webui-prompt-all-in-one extension is glitching the prompt bar HOT 2
- [Bug]: LORA's with .zip extension do not display in list with other LORA's HOT 1
- [Feature Request]: HOT 5
- [Feature Request]: Image Formats passed to api calls HOT 1
- [Feature Request]: Add GPEN to Face Restoration models HOT 1
- [Bug]: Error
- [Bug]: AttributeError: 'NoneType' object has no attribute 'lowvram' -- Clean install on Mac
- [Bug]: --share not work with paperspace HOT 1
- [Bug]: Error loading specific Upscalers: "RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found"
- [GET THE OLD SAMPLING METHOD BACK]: HOT 7
- [Bug]: Prompt in textarea cannot be drag and drop since 1.9.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion-webui.