We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7a84ba commit c104482Copy full SHA for c104482
src/diffusers/models/unets/unet_motion_model.py
@@ -597,7 +597,9 @@ def from_unet2d(
597
if not config.get("num_attention_heads"):
598
config["num_attention_heads"] = config["attention_head_dim"]
599
600
- config = FrozenDict(config)
+ expected_kwargs, optional_kwargs = cls._get_signature_keys(cls)
601
+ config = FrozenDict({k: config.get(k) for k in config if k in expected_kwargs or k in optional_kwargs})
602
+ config["_class_name"] = cls.__name__
603
model = cls.from_config(config)
604
605
if not load_weights:
0 commit comments