possible fix for fallback for fast model creation from config

This commit is contained in:
AUTOMATIC 2023-01-11 10:24:56 +03:00
parent 954091697f
commit 4fdacd31e4
1 changed files with 3 additions and 0 deletions

View File

@ -337,6 +337,9 @@ def load_model(checkpoint_info=None):
with sd_disable_initialization.DisableInitialization():
sd_model = instantiate_from_config(sd_config.model)
except Exception as e:
pass
if sd_model is None:
print('Failed to create model quickly; will retry using slow method.', file=sys.stderr)
sd_model = instantiate_from_config(sd_config.model)