Skip to content

Commit 372222a

Browse files
committed
load_components by default only load components that are not already loaded
1 parent 1f57b17 commit 372222a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diffusers/modular_pipelines/modular_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,7 @@ def load_components(self, names: Optional[Union[List[str], str]] = None, **kwarg
21422142
name
21432143
for name in self._component_specs.keys()
21442144
if self._component_specs[name].default_creation_method == "from_pretrained"
2145+
and getattr(self, name, None) is None
21452146
]
21462147
elif isinstance(names, str):
21472148
names = [names]

0 commit comments

Comments
 (0)