From 9321dfdd898b664d0c560611b72a120ee182dcf7 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 6 Oct 2022 10:37:41 +0530 Subject: [PATCH] Developer console, to enter the activated conda environment easily for debugging and fixing the environnment --- scripts/Open Developer Console.cmd | 14 ++++++++++++++ scripts/on_env_start.bat | 1 + scripts/on_env_start.sh | 1 + scripts/open_dev_console.sh | 17 +++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 scripts/Open Developer Console.cmd create mode 100644 scripts/open_dev_console.sh diff --git a/scripts/Open Developer Console.cmd b/scripts/Open Developer Console.cmd new file mode 100644 index 00000000..e9bfb28b --- /dev/null +++ b/scripts/Open Developer Console.cmd @@ -0,0 +1,14 @@ +@echo off + +echo "Opening Stable Diffusion UI - Developer Console.." & echo. + +@call installer\Scripts\activate.bat + +@call conda-unpack + +@call conda --version +@call git --version + +@call conda activate .\stable-diffusion\env + +cmd /k \ No newline at end of file diff --git a/scripts/on_env_start.bat b/scripts/on_env_start.bat index 16312a5a..749701cd 100644 --- a/scripts/on_env_start.bat +++ b/scripts/on_env_start.bat @@ -55,6 +55,7 @@ if "%update_branch%"=="" ( @xcopy sd-ui-files\ui ui /s /i /Y @copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y @copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y +@copy "sd-ui-files\scripts\Open Developer Console.cmd" . /Y @call scripts\on_sd_start.bat diff --git a/scripts/on_env_start.sh b/scripts/on_env_start.sh index 79ab23a7..1f2d505d 100755 --- a/scripts/on_env_start.sh +++ b/scripts/on_env_start.sh @@ -37,6 +37,7 @@ rm -rf ui cp -Rf sd-ui-files/ui . cp sd-ui-files/scripts/on_sd_start.sh scripts/ cp sd-ui-files/scripts/start.sh . +cp sd-ui-files/scripts/open_dev_console.sh . ./scripts/on_sd_start.sh diff --git a/scripts/open_dev_console.sh b/scripts/open_dev_console.sh new file mode 100644 index 00000000..9cd84f49 --- /dev/null +++ b/scripts/open_dev_console.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ "$0" == "bash" ]; then + echo "Opening Stable Diffusion UI - Developer Console.." + echo "" + + source installer/bin/activate + + conda-unpack + + conda --version + git --version + + conda activate ./stable-diffusion/env +else + bash --init-file open_dev_console.sh +fi \ No newline at end of file