prioritize repositories/stable-diffusion path when searching for SD
This commit is contained in:
parent
22faf30c0b
commit
695c05fb30
|
@ -7,7 +7,7 @@ sys.path.insert(0, script_path)
|
||||||
|
|
||||||
# search for directory of stable diffsuion in following palces
|
# search for directory of stable diffsuion in following palces
|
||||||
sd_path = None
|
sd_path = None
|
||||||
possible_sd_paths = ['.', os.path.dirname(script_path), os.path.join(script_path, 'repositories/stable-diffusion')]
|
possible_sd_paths = [os.path.join(script_path, 'repositories/stable-diffusion'), '.', os.path.dirname(script_path)]
|
||||||
for possible_sd_path in possible_sd_paths:
|
for possible_sd_path in possible_sd_paths:
|
||||||
if os.path.exists(os.path.join(possible_sd_path, 'ldm/models/diffusion/ddpm.py')):
|
if os.path.exists(os.path.join(possible_sd_path, 'ldm/models/diffusion/ddpm.py')):
|
||||||
sd_path = os.path.abspath(possible_sd_path)
|
sd_path = os.path.abspath(possible_sd_path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user