fixed logic error in resolution of model path

This commit is contained in:
Lincoln Stein 2023-05-18 14:35:34 -04:00
parent d96175d127
commit a77c4c87b2

View File

@ -318,8 +318,10 @@ class ModelManager(object):
# with the equivalent diffusers model
if mconfig.format in ["ckpt", "safetensors"]:
location = self.convert_ckpt_and_cache(mconfig)
elif mconfig.get('path'):
location = self.globals.root_dir / mconfig.get('path')
else:
location = self.globals.root_dir / mconfig.get('path') or mconfig.get('repo_id')
location = mconfig.get('repo_id')
elif p := mconfig.get('path'):
location = self.globals.root_dir / p
elif r := mconfig.get('repo_id'):