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! 馃
I see that ConfigMixin & @register_to_config are used to handle model configs:
comparing it to transformers (for example here), there are explicit config classes such as BertConfig that inherit from PretrainedConfig
Why was
ConfigMixinapproach preferred over theXYZConfig class?Thanks a lot! 馃