diff --git a/build.bat b/build.bat index 96232c0a..d1bcaab7 100644 --- a/build.bat +++ b/build.bat @@ -8,8 +8,6 @@ set /p answer=Are you a developer of this project (Y/N)? if /i "%answer:~,1%" NEQ "Y" exit /b -@set PYTHONNOUSERSITE=1 - @mkdir dist\stable-diffusion-ui @echo "Downloading components for the installer.." @@ -17,6 +15,11 @@ if /i "%answer:~,1%" NEQ "Y" exit /b @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 @@ -34,7 +37,6 @@ if /i "%answer:~,1%" NEQ "Y" exit /b @copy ..\..\LICENSE . @copy "..\..\CreativeML Open RAIL-M License" . @copy "..\..\How to install and run.txt" . -@echo. > scripts\install_status.txt @echo "Build ready. Zip the 'dist\stable-diffusion-ui' folder." diff --git a/build.sh b/build.sh index 577dcb8b..04579d1f 100755 --- a/build.sh +++ b/build.sh @@ -11,8 +11,6 @@ case $yn in * ) exit;; esac -export PYTHONNOUSERSITE=1 - mkdir -p dist/stable-diffusion-ui echo "Downloading components for the installer.." @@ -40,7 +38,6 @@ cp ../../scripts/start.sh . cp ../../LICENSE . cp "../../CreativeML Open RAIL-M License" . cp "../../How to install and run.txt" . -echo "" > scripts/install_status.txt chmod u+x start.sh diff --git a/scripts/Start Stable Diffusion UI.cmd b/scripts/Start Stable Diffusion UI.cmd index e34c2b36..4f67c7bf 100644 --- a/scripts/Start Stable Diffusion UI.cmd +++ b/scripts/Start Stable Diffusion UI.cmd @@ -1,19 +1 @@ -@echo off - -@REM Delete the post-activate hook from the old installer -@if exist "installer\etc\conda\activate.d\post_activate.bat" ( - del "installer\etc\conda\activate.d\post_activate.bat" -) - -@call installer\Scripts\activate.bat - -@call conda-unpack - -@call conda --version -@call git --version - -@cd installer - -@call scripts\on_env_start.bat - -@pause \ No newline at end of file +installer\Scripts\activate.bat diff --git a/scripts/on_env_start.bat b/scripts/on_env_start.bat index 16312a5a..8e46c62c 100644 --- a/scripts/on_env_start.bat +++ b/scripts/on_env_start.bat @@ -2,7 +2,7 @@ @echo. & echo "Stable Diffusion UI - v2" & echo. -set PATH=C:\Windows\System32;%PATH% +@REM set PATH=C:\Windows\System32;%PATH% @cd .. diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 1c7b8644..7d633757 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -79,7 +79,7 @@ @echo conda_sd_env_created >> ..\scripts\install_status.txt ) -set PATH=C:\Windows\System32;%PATH% +@REM set PATH=C:\Windows\System32;%PATH% @>nul grep -c "conda_sd_gfpgan_deps_installed" ..\scripts\install_status.txt @if "%ERRORLEVEL%" EQU "0" ( diff --git a/scripts/start.sh b/scripts/start.sh index e077593a..d6c75ad8 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -4,7 +4,4 @@ source installer/bin/activate conda-unpack -conda --version -git --version - scripts/on_env_start.sh diff --git a/ui/sd_internal/env_yaml.patch b/ui/sd_internal/env_yaml.patch index ba4d2a19..cc140ef1 100644 --- a/ui/sd_internal/env_yaml.patch +++ b/ui/sd_internal/env_yaml.patch @@ -1,16 +1,7 @@ diff --git a/environment.yaml b/environment.yaml -index 7f25da8..19ddcd8 100644 +index 7f25da8..306750f 100644 --- a/environment.yaml +++ b/environment.yaml -@@ -3,7 +3,7 @@ channels: - - pytorch - - defaults - dependencies: -- - python=3.8.5 -+ - python=3.8.13 - - pip=20.3 - - cudatoolkit=11.3 - - pytorch=1.11.0 @@ -23,6 +23,8 @@ dependencies: - torch-fidelity==0.3.0 - transformers==4.19.2