From e5a21fda327a744b8884c20eda30cff0a3780949 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 11:38:55 +0530 Subject: [PATCH 01/11] Update Troubleshooting.md --- Troubleshooting.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 6f911de9..b28acd60 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -1,5 +1,14 @@ Common issues and their solutions. If these solutions don't work, please feel free to ask at the [discord server](https://discord.com/invite/u9yhsFmEkB) or [file an issue](https://github.com/cmdr2/stable-diffusion-ui/issues). +## RuntimeError: CUDA out of memory +This can happen if your PC has less than 6GB of VRAM. + +Try disabling the "Turbo mode" setting under "Advanced Settings", since that takes an additional 1 GB of VRAM (to increase the speed). + +Additionally, a common reason for this error is that you're using an initial image larger than 768x768 pixels. Try using a smaller initial image. + +Also try generating smaller sized images. + ## Green image generated This usually happens if you're running NVIDIA 1650 or 1660 Super. To solve this, please close and run the Stable Diffusion command on your computer. If you're using the older Docker-based solution (v1), please upgrade to v2: https://github.com/cmdr2/stable-diffusion-ui/tree/v2#installation @@ -25,4 +34,4 @@ After this, you can access the server at `http://localhost:1337` (where 1337 is ## RuntimeError: CUDA error: unknown error Please ensure that you have an NVIDIA GPU and the latest [NVIDIA driver](http://www.nvidia.com/Download/index.aspx), and that you've installed [nvidia-container-toolkit](https://stackoverflow.com/a/58432877). -Also, if you are using WSL (Windows), please ensure you have the latest WSL kernel by running `wsl --shutdown` and then `wsl --update`. (Thanks [AndrWeisR](https://github.com/AndrWeisR)) \ No newline at end of file +Also, if you are using WSL (Windows), please ensure you have the latest WSL kernel by running `wsl --shutdown` and then `wsl --update`. (Thanks [AndrWeisR](https://github.com/AndrWeisR)) From 8d596c07dfb80b429cfb1bd3191a70eecac61d7f Mon Sep 17 00:00:00 2001 From: elwynelwyn Date: Thu, 8 Sep 2022 19:53:06 +1200 Subject: [PATCH 02/11] Add shebangs to all sh files --- scripts/on_env_start.sh | 2 ++ scripts/on_sd_start.sh | 2 ++ scripts/post_activate.sh | 2 ++ scripts/start.sh | 2 ++ 4 files changed, 8 insertions(+) diff --git a/scripts/on_env_start.sh b/scripts/on_env_start.sh index 145abd3a..044f9124 100755 --- a/scripts/on_env_start.sh +++ b/scripts/on_env_start.sh @@ -1,3 +1,5 @@ +#!/bin/bash + printf "\n\nStable Diffusion UI\n\n" if [ -f "scripts/install_status.txt" ] && [ `grep -c sd_ui_git_cloned scripts/install_status.txt` -gt "0" ]; then diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 200d7f20..fdd2ff70 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -1,3 +1,5 @@ +#!/bin/bash + cp sd-ui-files/scripts/on_env_start.sh scripts/ source installer/etc/profile.d/conda.sh diff --git a/scripts/post_activate.sh b/scripts/post_activate.sh index 4f0921d2..ec715af0 100755 --- a/scripts/post_activate.sh +++ b/scripts/post_activate.sh @@ -1,3 +1,5 @@ +#!/bin/bash + conda-unpack source $CONDA_PREFIX/etc/profile.d/conda.sh diff --git a/scripts/start.sh b/scripts/start.sh index 407796a6..d6c75ad8 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,3 +1,5 @@ +#!/bin/bash + source installer/bin/activate conda-unpack From 678e0912ae2d077dffa93e80d528a140122f0c2a Mon Sep 17 00:00:00 2001 From: elwynelwyn Date: Thu, 8 Sep 2022 21:06:26 +1200 Subject: [PATCH 03/11] Add contributing doc with instructions for dev env --- CONTRIBUTING.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..d0222f64 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +Hi there, +These instructions are meant for developers. +If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. +Please download and follow the instructions at https://github.com/cmdr2/stable-diffusion-ui#installation +Thanks + +# For developers: + +If you would like to contribute to this project, there is a discord for dicussion: +[![Discord Server](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.com/invite/u9yhsFmEkB) + +## Development environment +This is in-flux, but one way to get a development environment running for editing the UI of this project is: +(swap `.sh` or `.bat` in instructions depending on your environment, and be sure to adjust any paths to match where you're working) + +1) `git clone` the repository, e.g. to `/projects/stable-diffusion-ui-repo` +2) Download the pre-built end user archive from the link on github, and extract it, e.g. to `/projects/stable-diffusion-ui-archive` +3) `cd /projects/stable-diffusion-ui-archive` and run the script to set up and start the project, e.g. `start.sh` +4) Check you can view and generate images on `localhost:9000` +5) Close the server, and edit `/projects/stable-diffusion-ui-archive/scripts/on_env_start.sh` +6) Comment out the line near the bottom that copies the `files/ui` folder, e.g. `cp -Rf sd-ui-files/ui ui` for `.sh` or `@xcopy sd-ui-files\ui ui /s /i /Y` for `.bat` +7) Delete the current `ui` folder at `/projects/stable-diffusion-ui-archive/ui` +8) Now make a symlink between the repository clone (where you will be making changes) and this archive (where you will be running stable diffusion): +`ln -s /projects/stable-diffusion-ui-repo/ui /projects/stable-diffusion-ui-archive/ui` +or for Windows +`mklink /projects/stable-diffusion-ui-repo/ui /projects/stable-diffusion-ui-archive/ui` +9) Run the archive again `start.sh` and ensure you can still use the UI. +10) Congrats, now any changes you make in your repo `ui` folder are linked to this running archive of the app and can be previewed in the browser. + +Check the `ui/frontend/build/README.md` for instructions on running and building the React code. \ No newline at end of file From 2f60afb03902bc476649f8d42ee262fbe962c770 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 14:47:50 +0530 Subject: [PATCH 04/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d0222f64..3d53b017 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,8 @@ Hi there, -These instructions are meant for developers. +These instructions are meant for developers of this project. + If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. + Please download and follow the instructions at https://github.com/cmdr2/stable-diffusion-ui#installation Thanks @@ -27,4 +29,4 @@ or for Windows 9) Run the archive again `start.sh` and ensure you can still use the UI. 10) Congrats, now any changes you make in your repo `ui` folder are linked to this running archive of the app and can be previewed in the browser. -Check the `ui/frontend/build/README.md` for instructions on running and building the React code. \ No newline at end of file +Check the `ui/frontend/build/README.md` for instructions on running and building the React code. From fc6954a54143063cd8fcfc2a7da9c2bde122a18f Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 14:48:07 +0530 Subject: [PATCH 05/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d53b017..d3e4dc83 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ Hi there, -These instructions are meant for developers of this project. +These instructions are meant for the developers of this project. If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. From 107a0e1b7db8438f3697f9af6e39687aba67edab Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 14:55:19 +0530 Subject: [PATCH 06/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3e4dc83..b0a4bfe3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ -Hi there, -These instructions are meant for the developers of this project. +Hi there, these instructions are meant for the developers of this project. If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. Please download and follow the instructions at https://github.com/cmdr2/stable-diffusion-ui#installation + Thanks # For developers: From 78971ac50458c98df902e0cec46ae6b78f537106 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 14:55:36 +0530 Subject: [PATCH 07/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0a4bfe3..033f42d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,6 @@ Hi there, these instructions are meant for the developers of this project. -If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. - -Please download and follow the instructions at https://github.com/cmdr2/stable-diffusion-ui#installation +If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. In that case, please download and follow the instructions at https://github.com/cmdr2/stable-diffusion-ui#installation Thanks From 2628a061f76ed6a41f1080c694707fd45a4b7084 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 15:10:44 +0530 Subject: [PATCH 08/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 033f42d1..a4b8a19a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ This is in-flux, but one way to get a development environment running for editin 8) Now make a symlink between the repository clone (where you will be making changes) and this archive (where you will be running stable diffusion): `ln -s /projects/stable-diffusion-ui-repo/ui /projects/stable-diffusion-ui-archive/ui` or for Windows -`mklink /projects/stable-diffusion-ui-repo/ui /projects/stable-diffusion-ui-archive/ui` +`mklink /D \projects\stable-diffusion-ui-archive\ui \projects\stable-diffusion-ui-repo\ui` (link name first, source repo dir second) 9) Run the archive again `start.sh` and ensure you can still use the UI. 10) Congrats, now any changes you make in your repo `ui` folder are linked to this running archive of the app and can be previewed in the browser. From 0fc92942cf1e5b50db1286212925c6cf41520aec Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 15:17:24 +0530 Subject: [PATCH 09/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4b8a19a..528e50f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Thanks If you would like to contribute to this project, there is a discord for dicussion: [![Discord Server](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.com/invite/u9yhsFmEkB) -## Development environment +## Development environment for UI (frontend and server) changes This is in-flux, but one way to get a development environment running for editing the UI of this project is: (swap `.sh` or `.bat` in instructions depending on your environment, and be sure to adjust any paths to match where you're working) @@ -28,3 +28,13 @@ or for Windows 10) Congrats, now any changes you make in your repo `ui` folder are linked to this running archive of the app and can be previewed in the browser. Check the `ui/frontend/build/README.md` for instructions on running and building the React code. + +## Development environment for Installer changes +Build the Windows installer using Windows, and the Linux installer using Linux. Don't mix the two, and don't use WSL. + +1. Install Miniconda 3 or Anaconda. +2. Install `conda install -c conda-forge -y conda-pack` +3. Open the Anaconda Prompt. Do not use WSL if you're building for Windows. +4. Run `build.bat` or `./build.sh` depending on whether you're in Windows or Linux. +5. Compress the `stable-diffusion-ui` folder created inside the `dist` folder. Make a `zip` for Windows, and `tar.xz` for Linux (smaller files, and Linux users already have tar). +6. Make a new GitHub release and upload the Windows and Linux installer builds. From 8e1445d27ad68d6ff9ca89b7fc908cb612f3af5e Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 15:18:33 +0530 Subject: [PATCH 10/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 528e50f3..7449d8a6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ or for Windows Check the `ui/frontend/build/README.md` for instructions on running and building the React code. ## Development environment for Installer changes -Build the Windows installer using Windows, and the Linux installer using Linux. Don't mix the two, and don't use WSL. +Build the Windows installer using Windows, and the Linux installer using Linux. Don't mix the two, and don't use WSL. An Ubuntu VM is fine for building the Linux installer on a Windows host. 1. Install Miniconda 3 or Anaconda. 2. Install `conda install -c conda-forge -y conda-pack` From 0eae17075f0be22f7ba9111f0bae475af10b080d Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 8 Sep 2022 18:12:47 +0530 Subject: [PATCH 11/11] Clobber Errors --- Troubleshooting.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Troubleshooting.md b/Troubleshooting.md index b28acd60..4d8d4758 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -9,6 +9,11 @@ Additionally, a common reason for this error is that you're using an initial ima Also try generating smaller sized images. +## ClobberError: This transaction has incompatible packages due to a shared path +On Windows, please ensure that you had placed the `stable-diffusion-ui` folder after unzipping to the root of C: or D: (or any drive). For e.g. `C:\stable-diffusion-ui`. **Note:** This has to be done **before** you start the installation process. If you have already installed (and are facing this error), please delete the installed folder, and start fresh by unzipping and placing the folder at the top of your drive. + +This error can also be caused if you already have conda/miniconda/anaconda installed, due to package conflicts. Please open your Anaconda Prompt, and run `conda clean --all` to clean up unused packages. + ## Green image generated This usually happens if you're running NVIDIA 1650 or 1660 Super. To solve this, please close and run the Stable Diffusion command on your computer. If you're using the older Docker-based solution (v1), please upgrade to v2: https://github.com/cmdr2/stable-diffusion-ui/tree/v2#installation