You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@register_to_config computes _use_default_values as set(new_kwargs) - set(init_kwargs), but init_kwargs only contains keyword arguments (src/diffusers/configuration_utils.py:725-726). Any constructor argument passed positionally is mislabeled as "used default value", and extract_init_dict then strips it on every from_config round trip (configuration_utils.py:500-501).
Expected: per the comment at configuration_utils.py:499 ("Skip keys that were not present in the original config, so default __init__ values were used") and the design intent in Add timestep_spacing to schedulers #3929 (comment), _use_default_values should only contain parameters the caller did not provide — positional and keyword calls should round-trip identically.
Actual: the config displays the explicitly-set value, but from_config(obj.config) (the documented scheduler-swap pattern) silently reverts it to the class default. Affects every ConfigMixin subclass.
I'd be happy to open a PR: exclude positionally-bound parameter names from the _use_default_values computation in inner_init (a two-line change), plus a regression test in tests/others/test_config.py — once a maintainer acks, per the AI-assisted contributions guidelines.
Describe the bug
@register_to_configcomputes_use_default_valuesasset(new_kwargs) - set(init_kwargs), butinit_kwargsonly contains keyword arguments (src/diffusers/configuration_utils.py:725-726). Any constructor argument passed positionally is mislabeled as "used default value", andextract_init_dictthen strips it on everyfrom_configround trip (configuration_utils.py:500-501).configuration_utils.py:499("Skip keys that were not present in the original config, so default__init__values were used") and the design intent in Add timestep_spacing to schedulers #3929 (comment),_use_default_valuesshould only contain parameters the caller did not provide — positional and keyword calls should round-trip identically.from_config(obj.config)(the documented scheduler-swap pattern) silently reverts it to the class default. Affects everyConfigMixinsubclass.I'd be happy to open a PR: exclude positionally-bound parameter names from the
_use_default_valuescomputation ininner_init(a two-line change), plus a regression test intests/others/test_config.py— once a maintainer acks, per the AI-assisted contributions guidelines.Reproduction
Logs
System Info
main@ 614ae4b)Who can help?
No response
Disclosure: this report was prepared with AI assistance; I reproduced the issue locally and reviewed every claim myself.