class_docstr: Base class for all models.
  
  [`ModelMixin`] takes care of storing the model configuration and provides methods for loading, downloading and
  saving models.
  
      - **config_name** ([`str`]) -- Filename to save a model to when calling [`~models.ModelMixin.save_pretrained`].
class_docstr_tok: ["Base","class","for","all","models",".","[","`","ModelMixin","`","]","takes","care","of","storing","the","model","configuration","and","provides","methods","for","loading",",","downloading","and","saving","models",".","-","*","*","config_name","*","*","(","[","`","str","`","]",")","--","Filename","to","save","a","model","to","when","calling","[","`","~models.ModelMixin.save_pretrained","`","]","."]
docstr: The only reason we overwrite `getattr` here is to gracefully deprecate accessing
  config attributes directly. See https://github.com/huggingface/diffusers/pull/3129 We need to overwrite
  __getattr__ here in addition so that we don't trigger `torch.nn.Module`'s __getattr__':
  https://pytorch.org/docs/stable/_modules/torch/nn/modules/module.html#Module
docstr_tok: ["The","only","reason","we","overwrite","`","getattr","`","here","is","to","gracefully","deprecate","accessing","config","attributes","directly",".","See","https",":","\/\/github.com\/huggingface\/diffusers\/pull\/3129","We","need","to","overwrite","__getattr__","here","in","addition","so","that","we","do","n't","trigger","`","torch.nn.Module","`","'s","__getattr__","'",":","https",":","\/\/pytorch.org\/docs\/stable\/_modules\/torch\/nn\/modules\/module.html","#","Module"]
code: def __getattr__(self, name: str) -> Any:
      """The only reason we overwrite `getattr` here is to gracefully deprecate accessing
      config attributes directly. See https://github.com/huggingface/diffusers/pull/3129 We need to overwrite
      __getattr__ here in addition so that we don't trigger `torch.nn.Module`'s __getattr__':
      https://pytorch.org/docs/stable/_modules/torch/nn/modules/module.html#Module
      """
  
      is_in_config = "_internal_dict" in self.__dict__ and hasattr(
          self.__dict__["_internal_dict"], name
      )
      is_attribute = name in self.__dict__
  
      if is_in_config and not is_attribute:
          deprecation_message = f"Accessing config attribute `{name}` directly via '{type(self).__name__}' object attribute is deprecated. Please access '{name}' over '{type(self).__name__}'s config object instead, e.g. 'unet.config.{name}'."
          deprecate(
              "direct config name access",
              "1.0.0",
              deprecation_message,
              standard_warn=False,
              stacklevel=3,
          )
          return self._internal_dict[name]
  
      # call PyTorch's https://pytorch.org/docs/stable/_modules/torch/nn/modules/module.html#Module
      return super().__getattr__(name)
  
imports: import inspect
  import itertools
  import os
  import re
  from collections import OrderedDict
  from functools import partial
  from typing import Any, Callable, List, Optional, Tuple, Union
  import safetensors
  import torch
  from huggingface_hub import create_repo
  from huggingface_hub.utils import validate_hf_hub_args
  from torch import Tensor, nn
  from ..None import __version__
  from ..utils import CONFIG_NAME, FLAX_WEIGHTS_NAME, SAFETENSORS_WEIGHTS_NAME, WEIGHTS_NAME, _add_variant, _get_model_file, deprecate, is_accelerate_available, is_torch_version, logging
  from ..utils.hub_utils import PushToHubMixin
label_desc: Use image node_id 2 for calling the ModelMixin obj's underlying member method code with example usage: obj.__getattr__(name) and returns: super, self