


"""simple docstring"""





import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils

class  lowercase_  ( unittest.TestCase						):







      @patch("diffusers.utils.hub_utils.get_full_repo_name"    )
      def 				_lowerCAmelCase       (      self :							int		,  _lowercase :							Mock    ):
        lowerCAmelCase__    :    List[Any]								=					'''full_repo_name'''
        with TemporaryDirectory() as tmpdir:
          # Dummy args values
          lowerCAmelCase__    :    Union[str, Any]								=					Mock()
          lowerCAmelCase__    :    Optional[Any]								=					tmpdir
          lowerCAmelCase__    :    int								=					0
          lowerCAmelCase__    :    Optional[Any]								=					'''hub_token'''
          lowerCAmelCase__    :    Optional[int]								=					'''dataset_name'''
          lowerCAmelCase__    :    Optional[Any]								=					0.01
          lowerCAmelCase__    :    Tuple								=					1_0_0_0_0_0
          lowerCAmelCase__    :    Dict								=					1_0_0_0_0
          lowerCAmelCase__    :    str								=					0.01
          lowerCAmelCase__    :    Optional[int]								=					0.02
          lowerCAmelCase__    :    Optional[Any]								=					0.03
          lowerCAmelCase__    :    str								=					0.0005
          lowerCAmelCase__    :    int								=					0.00_0001
          lowerCAmelCase__    :    Optional[int]								=					1
          lowerCAmelCase__    :    List[str]								=					1_0
          lowerCAmelCase__    :    Tuple								=					0.001
          lowerCAmelCase__    :    Dict								=					0.1
          lowerCAmelCase__    :    Optional[int]								=					0.2
          lowerCAmelCase__    :    List[str]								=					True

          # Model card mush be rendered and saved
          diffusers.utils.hub_utils.create_model_card(UpperCamelCase__		,  model_name="model_name"    )
          self.assertTrue((Path(UpperCamelCase__    ) / "README.md").is_file()    )




"""simple docstring"""





from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCAmelCase    				=      logging.get_logger(__name__)

__UpperCAmelCase    				=      {
    "MCG-NJU/videomae-base": "https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json",
}

class  lowercase_  ( a_						):
      __magic_name__     :							Union[str, Any]          =				"""videomae"""







      def __init__(      self :							Dict		,  _lowercase :							int=2_2_4		,  _lowercase :							Optional[Any]=1_6		,  _lowercase :							List[Any]=3		,  _lowercase :							int=1_6		,  _lowercase :							Optional[Any]=2		,  _lowercase :							Union[str, Any]=7_6_8		,  _lowercase :							int=1_2		,  _lowercase :							Dict=1_2		,  _lowercase :							Optional[Any]=3_0_7_2		,  _lowercase :							List[str]="gelu"		,  _lowercase :							int=0.0		,  _lowercase :							int=0.0		,  _lowercase :							Optional[int]=0.02		,  _lowercase :							List[str]=1e-1_2		,  _lowercase :							Union[str, Any]=True		,  _lowercase :							Union[str, Any]=True		,  _lowercase :							Any=6		,  _lowercase :							Any=3_8_4		,  _lowercase :							int=4		,  _lowercase :							Optional[int]=1_5_3_6		,  _lowercase :							Tuple=True		,  **_lowercase :							List[str]		,  ):
        super().__init__(**_lowercase    )

        lowerCAmelCase__    :    List[Any]								=					image_size
        lowerCAmelCase__    :    Tuple								=					patch_size
        lowerCAmelCase__    :    Union[str, Any]								=					num_channels
        lowerCAmelCase__    :    Optional[Any]								=					num_frames
        lowerCAmelCase__    :    Union[str, Any]								=					tubelet_size

        lowerCAmelCase__    :    Union[str, Any]								=					hidden_size
        lowerCAmelCase__    :    Dict								=					num_hidden_layers
        lowerCAmelCase__    :    Any								=					num_attention_heads
        lowerCAmelCase__    :    List[Any]								=					intermediate_size
        lowerCAmelCase__    :    Optional[Any]								=					hidden_act
        lowerCAmelCase__    :    int								=					hidden_dropout_prob
        lowerCAmelCase__    :    Optional[Any]								=					attention_probs_dropout_prob
        lowerCAmelCase__    :    Any								=					initializer_range
        lowerCAmelCase__    :    Any								=					layer_norm_eps
        lowerCAmelCase__    :    Union[str, Any]								=					qkv_bias
        lowerCAmelCase__    :    int								=					use_mean_pooling

        lowerCAmelCase__    :    List[Any]								=					decoder_num_attention_heads
        lowerCAmelCase__    :    List[str]								=					decoder_hidden_size
        lowerCAmelCase__    :    int								=					decoder_num_hidden_layers
        lowerCAmelCase__    :    Optional[int]								=					decoder_intermediate_size
        lowerCAmelCase__    :    Optional[Any]								=					norm_pix_loss
