Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the webui script directories as PWD #946

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions webui-streamlit.cmd
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -55,4 +58,4 @@ IF EXIST "models\ldm\stable-diffusion-v1\model.ckpt" (
python -m streamlit run scripts\webui_streamlit.py
) ELSE (
ECHO Your model file does not exist! Place it in 'models\ldm\stable-diffusion-v1' with the name 'model.ckpt'.
)
)
7 changes: 5 additions & 2 deletions webui.cmd
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'.
)
)