mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-06 05:41:49 -08:00
added detection if SD repo is located in a current directory
This commit is contained in:
parent
b90feb02aa
commit
d5dfbc45a6
1 changed files with 3 additions and 1 deletions
4
webui.py
4
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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue