diff --git a/CHANGES.md b/CHANGES.md index ae67cf50..aa8883f6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -23,6 +23,7 @@ ### Detailed changelog * 2.4.14 - 23 Nov 2022 - Button to retrieve the network addresses of the server in the systems setting dialog +* 2.4.14 - 22 Nov 2022 - Change the backend to a custom fork of Stable Diffusion * 2.4.13 - 21 Nov 2022 - Change the modifier weight via mouse wheel, drag to reorder selected modifiers, and some more modifier-related fixes. Thanks @patriceac * 2.4.12 - 21 Nov 2022 - Another fix for improving how long images take to generate. Reduces the time taken for an enqueued task to start processing. * 2.4.11 - 21 Nov 2022 - Installer improvements: avoid crashing if the username contains a space or special characters, allow moving/renaming the folder after installation on Windows, whitespace fix on git apply diff --git a/README.md b/README.md index 47edb505..2038c15b 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Useful for judging (and stopping) an image quickly, without waiting for it to fi You don't need to install or struggle with Python, Anaconda, Docker etc. The installer will take care of whatever is needed. # Installation -1. **Download** [for Windows](https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.3.5/stable-diffusion-ui-windows.zip) or [for Linux](https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.3.5/stable-diffusion-ui-linux.zip). +1. **Download** [for Windows](https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.4.13/stable-diffusion-ui-windows.zip) or [for Linux](https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.4.13/stable-diffusion-ui-linux.zip). 2. **Extract**: - For Windows: After unzipping the file, please move the `stable-diffusion-ui` folder to your `C:` (or any drive like D:, at the top root level), e.g. `C:\stable-diffusion-ui`. This will avoid a common problem with Windows (file path length limits). diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat index 7d067cc3..cb0909d0 100644 --- a/scripts/bootstrap.bat +++ b/scripts/bootstrap.bat @@ -42,11 +42,11 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( mkdir "%MAMBA_ROOT_PREFIX%" call curl -Lk "%MICROMAMBA_DOWNLOAD_URL%" > "%MAMBA_ROOT_PREFIX%\micromamba.exe" - @REM if "%ERRORLEVEL%" NEQ "0" ( - @REM echo "There was a problem downloading micromamba. Cannot continue." - @REM pause - @REM exit /b - @REM ) + if "%ERRORLEVEL%" NEQ "0" ( + echo "There was a problem downloading micromamba. Cannot continue." + pause + exit /b + ) mkdir "%APPDATA%" mkdir "%USERPROFILE%" diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 1acb7b3a..6e4ffd36 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -16,11 +16,11 @@ if exist "%cd%\profile" ( @rem activate the installer env call conda activate -@rem @if "%ERRORLEVEL%" NEQ "0" ( -@rem @echo. & echo "Error activating conda for Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. -@rem pause -@rem exit /b -@rem ) +@if "%ERRORLEVEL%" NEQ "0" ( + @echo. & echo "Error activating conda for Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. + pause + exit /b +) @REM remove the old version of the dev console script, if it's still present if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" @@ -33,18 +33,19 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" @cd stable-diffusion + @call git remote set-url origin https://github.com/easydiffusion/diffusion-kit.git + @call git reset --hard @call git pull - @call git -c advice.detachedHead=false checkout f6cfebffa752ee11a7b07497b8529d5971de916c + @call git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a - @call git apply --whitespace=nowarn ..\ui\sd_internal\ddim_callback.patch - @call git apply --whitespace=nowarn ..\ui\sd_internal\env_yaml.patch + @call git apply --whitespace=warn ..\ui\sd_internal\ddim_callback.patch @cd .. ) else ( @echo. & echo "Downloading Stable Diffusion.." & echo. - @call git clone https://github.com/basujindal/stable-diffusion.git && ( + @call git clone https://github.com/easydiffusion/diffusion-kit.git stable-diffusion && ( @echo sd_git_cloned >> scripts\install_status.txt ) || ( @echo "Error downloading Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" @@ -53,10 +54,9 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" ) @cd stable-diffusion - @call git -c advice.detachedHead=false checkout f6cfebffa752ee11a7b07497b8529d5971de916c + @call git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a - @call git apply --whitespace=nowarn ..\ui\sd_internal\ddim_callback.patch - @call git apply --whitespace=nowarn ..\ui\sd_internal\env_yaml.patch + @call git apply --whitespace=warn ..\ui\sd_internal\ddim_callback.patch @cd .. ) @@ -88,12 +88,6 @@ if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" @call conda activate .\env - @call conda install -c conda-forge -y --prefix env antlr4-python3-runtime=4.8 || ( - @echo. & echo "Error installing antlr4-python3-runtime for Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. - pause - exit /b - ) - for /f "tokens=*" %%a in ('python -c "import torch; import ldm; import transformers; import numpy; import antlr4; print(42)"') do if "%%a" NEQ "42" ( @echo. & echo "Dependency test failed! Error installing the packages necessary for Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. pause @@ -117,18 +111,6 @@ set PATH=C:\Windows\System32;%PATH% set PYTHONPATH=%cd%;%cd%\env\lib\site-packages - @call pip install -e git+https://github.com/TencentARC/GFPGAN#egg=GFPGAN || ( - @echo. & echo "Error installing the packages necessary for GFPGAN (Face Correction). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. - pause - exit /b - ) - - @call pip install basicsr==1.4.2 || ( - @echo. & echo "Error installing the basicsr package necessary for GFPGAN (Face Correction). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. - pause - exit /b - ) - for /f "tokens=*" %%a in ('python -c "from gfpgan import GFPGANer; print(42)"') do if "%%a" NEQ "42" ( @echo. & echo "Dependency test failed! Error installing the packages necessary for GFPGAN (Face Correction). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. pause @@ -150,12 +132,6 @@ set PATH=C:\Windows\System32;%PATH% set PYTHONPATH=%cd%;%cd%\env\lib\site-packages - @call pip install -e git+https://github.com/xinntao/Real-ESRGAN#egg=realesrgan || ( - @echo. & echo "Error installing the packages necessary for ESRGAN (Resolution Upscaling). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. - pause - exit /b - ) - for /f "tokens=*" %%a in ('python -c "from basicsr.archs.rrdbnet_arch import RRDBNet; from realesrgan import RealESRGANer; print(42)"') do if "%%a" NEQ "42" ( @echo. & echo "Dependency test failed! Error installing the packages necessary for ESRGAN (Resolution Upscaling). Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo. pause diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh old mode 100755 new mode 100644 index 7745855a..ff6a04d4 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -26,28 +26,28 @@ if [ -e "scripts/install_status.txt" ] && [ `grep -c sd_git_cloned scripts/insta cd stable-diffusion + git remote set-url origin https://github.com/easydiffusion/diffusion-kit.git + git reset --hard git pull - git -c advice.detachedHead=false checkout f6cfebffa752ee11a7b07497b8529d5971de916c + git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a - git apply --whitespace=nowarn ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed" - git apply --whitespace=nowarn ../ui/sd_internal/env_yaml.patch || fail "yaml patch failed" + git apply --whitespace=warn ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed" cd .. else printf "\n\nDownloading Stable Diffusion..\n\n" - if git clone https://github.com/basujindal/stable-diffusion.git ; then + if git clone https://github.com/easydiffusion/diffusion-kit.git stable-diffusion ; then echo sd_git_cloned >> scripts/install_status.txt else fail "git clone of basujindal/stable-diffusion.git failed" fi cd stable-diffusion - git -c advice.detachedHead=false checkout f6cfebffa752ee11a7b07497b8529d5971de916c + git -c advice.detachedHead=false checkout 7f32368ed1030a6e710537047bacd908adea183a - git apply --whitespace=nowarn ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed" - git apply --whitespace=nowarn ../ui/sd_internal/env_yaml.patch || fail "yaml patch failed" + git apply --whitespace=warn ../ui/sd_internal/ddim_callback.patch || fail "ddim patch failed" cd .. fi @@ -74,12 +74,6 @@ else conda activate ./env || fail "conda activate failed" - if conda install -c conda-forge --prefix ./env -y antlr4-python3-runtime=4.8 ; then - echo "Installed. Testing.." - else - fail "Error installing antlr4-python3-runtime" - fi - out_test=`python -c "import torch; import ldm; import transformers; import numpy; import antlr4; print(42)"` if [ "$out_test" != "42" ]; then fail "Dependency test failed" @@ -96,12 +90,6 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$(pwd):$(pwd)/env/lib/site-packages" - if pip install -e git+https://github.com/TencentARC/GFPGAN#egg=GFPGAN ; then - echo "Installed. Testing.." - else - fail "Error installing the packages necessary for GFPGAN (Face Correction)." - fi - out_test=`python -c "from gfpgan import GFPGANer; print(42)"` if [ "$out_test" != "42" ]; then echo "EE The dependency check has failed. This usually means that some system libraries are missing." @@ -121,12 +109,6 @@ else export PYTHONNOUSERSITE=1 export PYTHONPATH="$(pwd):$(pwd)/env/lib/site-packages" - if pip install -e git+https://github.com/xinntao/Real-ESRGAN#egg=realesrgan ; then - echo "Installed. Testing.." - else - fail "Error installing the packages necessary for ESRGAN" - fi - out_test=`python -c "from basicsr.archs.rrdbnet_arch import RRDBNet; from realesrgan import RealESRGANer; print(42)"` if [ "$out_test" != "42" ]; then fail "ESRGAN dependency test failed" diff --git a/ui/index.html b/ui/index.html index 21482614..cb03836b 100644 --- a/ui/index.html +++ b/ui/index.html @@ -20,7 +20,10 @@