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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user