From d5dfbc45a6056fa066e0b5b57f6c1d6a4c7a87b1 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Fri, 2 Sep 2022 01:06:11 +0300 Subject: [PATCH] added detection if SD repo is located in a current directory --- webui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 2b465396..49002a2a 100644 --- a/webui.py +++ b/webui.py @@ -3,7 +3,9 @@ import os import sys script_path = os.path.dirname(os.path.realpath(__file__)) -sd_path = os.path.dirname(script_path) + +# use current directory as SD dir if it has related files, otherwise parent dir of script as stated in guide +sd_path = os.path.abspath('.') if os.path.exists('./ldm/models/diffusion/ddpm.py') else os.path.dirname(script_path) # add parent directory to path; this is where Stable diffusion repo should be path_dirs = [