diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-01 22:06:11 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-01 22:06:11 +0000 |
commit | d5dfbc45a6056fa066e0b5b57f6c1d6a4c7a87b1 (patch) | |
tree | 400a5352a5f05c7a6d41da437bd04a1769ca2bf2 | |
parent | b90feb02aa87dc5456542f1e8ba70a1526037387 (diff) | |
download | stable-diffusion-webui-gfx803-d5dfbc45a6056fa066e0b5b57f6c1d6a4c7a87b1.tar.gz stable-diffusion-webui-gfx803-d5dfbc45a6056fa066e0b5b57f6c1d6a4c7a87b1.tar.bz2 stable-diffusion-webui-gfx803-d5dfbc45a6056fa066e0b5b57f6c1d6a4c7a87b1.zip |
added detection if SD repo is located in a current directory
-rw-r--r-- | webui.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 = [
|