Closed
Description
I see that ConfigMixin & @register_to_config are used to handle model configs:
class UNet2DConditionModel(ModelMixin, ConfigMixin):
@register_to_config
# there is no `UNet2DConfig` class (i.e. XYZConfig class)
comparing it to transformers (for example here), there are explicit config classes such as BertConfig that inherit from PretrainedConfig
class BertPreTrainedModel(PreTrainedModel):
config_class = BertConfig
Why was ConfigMixin
approach preferred over the XYZConfig class
?
Thanks a lot! 🤗
Metadata
Metadata
Assignees
Labels
No labels