1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

load_components by default only load components that are not already loaded

This commit is contained in:
yiyixuxu
2026-01-24 05:42:51 +01:00
parent 1f57b175ae
commit 372222a4b6

View File

@@ -2142,6 +2142,7 @@ class ModularPipeline(ConfigMixin, PushToHubMixin):
name
for name in self._component_specs.keys()
if self._component_specs[name].default_creation_method == "from_pretrained"
and getattr(self, name, None) is None
]
elif isinstance(names, str):
names = [names]