Merge branch 'lstein/feat/load-one-file' of github.com:invoke-ai/InvokeAI into lstein/feat/load-one-file

This commit is contained in:
Lincoln Stein
2024-06-15 19:57:44 -04:00

View File

@@ -57,7 +57,7 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader):
if isinstance(config, CheckpointConfigBase):
return self._load_from_singlefile(config, submodel_type)
if not submodel_type is not None:
if submodel_type is None:
raise Exception("A submodel type must be provided when loading main pipelines.")
model_path = Path(config.path)
@@ -128,11 +128,11 @@ class StableDiffusionDiffusersModel(GenericDiffusersLoader):
load_safety_checker=False,
)
# Proactively load the various submodels into the RAM cache so that we don't have to re-load
# the entire pipeline every time a new submodel is needed.
if not submodel_type:
return pipeline
# Proactively load the various submodels into the RAM cache so that we don't have to re-load
# the entire pipeline every time a new submodel is needed.
for subtype in SubModelType:
if subtype == submodel_type:
continue