diff --git a/.gitignore b/.gitignore index bee8a64b..5b668843 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ __pycache__ +installer +installer.tar +dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 01014ae5..00000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.9 - -RUN mkdir /app -WORKDIR /app - -RUN apt update - -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt - -COPY . . - -EXPOSE 9000 - -ENTRYPOINT ["uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "9000"] \ No newline at end of file diff --git a/How to install and run.txt b/How to install and run.txt new file mode 100644 index 00000000..2f35d75b --- /dev/null +++ b/How to install and run.txt @@ -0,0 +1,24 @@ +Congrats on downloading Stable Diffusion UI, version 2! + +If you haven't downloaded Stable Diffusion UI yet, please download from https://github.com/cmdr2/stable-diffusion-ui + +After downloading, to install please follow these instructions: + +For Windows: +- Please double-click the "Start Stable Diffusion UI.cmd" file inside the "stable-diffusion-ui" folder. + +For Linux: +- Please open a terminal, and go to the "stable-diffusion-ui" directory. Then run ./start.sh + +That file will automatically install everything. After that it will start the Stable Diffusion interface in a web browser. + +To start the UI in the future, please run the same command mentioned above. + + +If you have any problems, please: +1. Try the troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting +2. Or, seek help from the community at https://discord.com/invite/u9yhsFmEkB +3. Or, file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues + +Thanks +cmdr2 (and contributors to the project) \ No newline at end of file diff --git a/OldPortDockerfile b/OldPortDockerfile deleted file mode 100644 index 22990ee2..00000000 --- a/OldPortDockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.9 - -RUN mkdir /app -WORKDIR /app - -RUN apt update - -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt - -COPY . . - -EXPOSE 8000 - -ENTRYPOINT ["uvicorn", "old_port_main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 00000000..e5e30b6a --- /dev/null +++ b/build.bat @@ -0,0 +1,39 @@ +@mkdir dist\stable-diffusion-ui + +@echo "Downloading components for the installer.." + +@call conda env create --prefix installer -f environment.yaml +@call conda activate .\installer + +@echo "Setting up startup scripts.." + +@mkdir installer\etc\conda\activate.d +@copy scripts\post_activate.bat installer\etc\conda\activate.d\ + +@echo "Creating a distributable package.." + +@call conda install -c conda-forge -y conda-pack +@call conda pack --n-threads -1 --prefix installer --format tar + +@cd dist\stable-diffusion-ui +@mkdir installer + +@call tar -xf ..\..\installer.tar -C installer + +@mkdir scripts + +@copy ..\..\scripts\on_env_start.bat scripts\ +@copy "..\..\scripts\Start Stable Diffusion UI.cmd" . +@copy ..\..\LICENSE . +@copy "..\..\CreativeML Open RAIL-M License" . +@copy "..\..\How to install and run.txt" . + +@echo "Build ready. Zip the 'dist\stable-diffusion-ui' folder." + +@echo "Cleaning up.." + +@cd ..\.. + +@rmdir /s /q installer + +@del installer.tar \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 00000000..582f81da --- /dev/null +++ b/build.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +mkdir -p dist/stable-diffusion-ui + +echo "Downloading components for the installer.." + +source ~/miniconda3/etc/profile.d/conda.sh + +conda install -c conda-forge -y conda-pack + +conda env create --prefix installer -f environment.yaml +conda activate ./installer + +echo "Creating a distributable package.." + +conda pack --n-threads -1 --prefix installer --format tar + +cd dist/stable-diffusion-ui +mkdir installer + +tar -xf ../../installer.tar -C installer + +mkdir scripts + +cp ../../scripts/on_env_start.sh scripts/ +cp "../../scripts/start.sh" . +cp ../../LICENSE . +cp "../../CreativeML Open RAIL-M License" . +cp "../../How to install and run.txt" . + +echo "Build ready. Zip the 'dist/stable-diffusion-ui' folder." + +echo "Cleaning up.." + +cd ../.. + +rm -rf installer + +rm installer.tar \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 584b63c2..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: '3.3' - -services: - stability-ai: - container_name: sd - ports: - - '5000:5000' - image: 'r8.im/stability-ai/stable-diffusion@sha256:be04660a5b93ef2aff61e3668dedb4cbeb14941e62a3fd5998364a32d613e35e' - deploy: - resources: - reservations: - devices: - - capabilities: [gpu] - - stable-diffusion-ui: - container_name: sd-ui - ports: - - '9000:9000' - build: - context: . - dockerfile: Dockerfile - volumes: - - .:/app - depends_on: - - stability-ai - -networks: - default: diff --git a/environment.yaml b/environment.yaml new file mode 100644 index 00000000..6ac07d5c --- /dev/null +++ b/environment.yaml @@ -0,0 +1,7 @@ +name: stable-diffusion-ui-installer +channels: + - defaults + - conda-forge +dependencies: + - conda + - git diff --git a/index.html b/index.html deleted file mode 100644 index 6d71d3bd..00000000 --- a/index.html +++ /dev/null @@ -1,912 +0,0 @@ - - - - - -
-