Use the webui script directories as PWD (#946)

This commit is contained in:
Matt Soucy 2022-09-12 04:41:47 -04:00 committed by GitHub
parent ba63fd7004
commit 4f7ea60a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,8 @@
@echo off
:: Run all commands using this script's directory as the working directory
cd %~dp0
:: copy over the first line from environment.yaml, e.g. name: ldm, and take the second word after splitting by ":" delimiter
set /p first_line=< environment.yaml
for /f "tokens=2 delims=:" %%i in ("%first_line%") do set untrimmed_conda_env_name=%%i
@ -26,7 +29,7 @@ for %%a in (%paths%) do (
)
)
for %%a in (%paths%) do (
for %%a in (%paths%) do (
if EXIST "%%a\Scripts\activate.bat" (
SET CONDA_PATH=%%a
echo anaconda3/miniconda3 detected in %%a
@ -55,4 +58,4 @@ IF EXIST "models\ldm\stable-diffusion-v1\model.ckpt" (
python -m streamlit run scripts\webui_streamlit.py --theme.base dark
) ELSE (
ECHO Your model file does not exist! Place it in 'models\ldm\stable-diffusion-v1' with the name 'model.ckpt'.
)
)

View File

@ -1,5 +1,8 @@
@echo off
:: Run all commands using this script's directory as the working directory
cd %~dp0
:: copy over the first line from environment.yaml, e.g. name: ldm, and take the second word after splitting by ":" delimiter
set /p first_line=< environment.yaml
for /f "tokens=2 delims=:" %%i in ("%first_line%") do set untrimmed_conda_env_name=%%i
@ -26,7 +29,7 @@ for %%a in (%paths%) do (
)
)
for %%a in (%paths%) do (
for %%a in (%paths%) do (
if EXIST "%%a\Scripts\activate.bat" (
SET CONDA_PATH=%%a
echo anaconda3/miniconda3 detected in %%a
@ -55,4 +58,4 @@ IF EXIST "models\ldm\stable-diffusion-v1\model.ckpt" (
python scripts/relauncher.py
) ELSE (
ECHO Your model file does not exist! Place it in 'models\ldm\stable-diffusion-v1' with the name 'model.ckpt'.
)
)