allow submodels to be fetched independent of parent pipeline

This commit is contained in:
Lincoln Stein 2023-05-13 16:54:47 -04:00
parent d8b1f29066
commit 2204e47596

View File

@ -357,6 +357,13 @@ class ModelManager(object):
vae_id = mconfig.vae.repo_id
vae = (SDModelType.vae, vae_id)
# optimization - don't load whole model if the user
# is asking for just a piece of it
if model_type == SDModelType.diffusers and submodel and not subfolder:
model_type = submodel
subfolder = submodel.name
submodel = None
model_context = self.cache.get_model(
location,
model_type = model_type,