Skip to content

Commit cdaaa40

Browse files
committed
update ComponentSpec.from_component, only update config if it is created with from_config
1 parent ffbaa89 commit cdaaa40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/modular_pipelines/modular_pipeline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def from_component(cls, name: str, component: Any) -> Any:
117117
type_hint = component.__class__
118118
default_creation_method = "from_config" if component._diffusers_load_id == "null" else "from_pretrained"
119119

120-
if isinstance(component, ConfigMixin):
120+
if isinstance(component, ConfigMixin) and default_creation_method == "from_config":
121121
config = component.config
122122
else:
123123
config = None

0 commit comments

Comments
 (0)