1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

update ComponentSpec.from_component, only update config if it is created with from_config

This commit is contained in:
yiyixuxu
2025-06-25 08:56:08 +02:00
parent ffbaa890ba
commit cdaaa40d31

View File

@@ -117,7 +117,7 @@ class ComponentSpec:
type_hint = component.__class__
default_creation_method = "from_config" if component._diffusers_load_id == "null" else "from_pretrained"
if isinstance(component, ConfigMixin):
if isinstance(component, ConfigMixin) and default_creation_method == "from_config":
config = component.config
else:
config = None