





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


_SCREAMING_SNAKE_CASE   						=		logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE   						=		{
    """ZinengTang/tvlt-base""": """https://huggingface.co/ZinengTang/tvlt-base/blob/main/config.json""",
}
class SCREAMING_SNAKE_CASE_    (       snake_case_       ):
						__magic_name__:      int			   =							"tvlt"






						def __init__(   self   :   Dict		, _A   :   Tuple=224		, _A   :   Optional[Any]=2048		, _A   :   List[str]=128		, _A   :   Tuple=[16, 16]		, _A   :   List[str]=[16, 16]		, _A   :   Any=3		, _A   :   Tuple=1		, _A   :   Optional[Any]=8		, _A   :   Union[str, Any]=768		, _A   :   Any=12		, _A   :   List[str]=12		, _A   :   Any=3072		, _A   :   Any="gelu"		, _A   :   List[Any]=0.0		, _A   :   Optional[int]=0.0		, _A   :   Tuple=0.0_2		, _A   :   Union[str, Any]=1E-6		, _A   :   Optional[int]=True		, _A   :   Dict=False		, _A   :   List[Any]=16		, _A   :   Dict=512		, _A   :   Union[str, Any]=8		, _A   :   Optional[Any]=2048		, _A   :   Optional[int]=0.7_5		, _A   :   List[str]=0.1_5		, _A   :   Optional[Any]="frame-level"		, _A   :   Tuple=True		, _A   :   Dict=True		, _A   :   Dict="classification"		, **_A   :   List[Any]		, )				->     Dict:







							"""simple docstring"""


							super().__init__(**_A						)

							if audio_mask_type not in ("frame-level", "patch_level"):
								raise ValueError(
								    'audio_mask_type must be one of two acceptable strategies - {\'frame_level\', \'patch-level\') '
								    F"""got {audio_mask_type}"""						)

							snake_case_		:      Tuple           =						image_size
							snake_case_		:      Dict           =						spectrogram_length
							snake_case_		:      int           =						frequency_length
							snake_case_		:      List[Any]           =						image_patch_size
							snake_case_		:      Dict           =						audio_patch_size
							snake_case_		:      List[str]           =						num_image_channels
							snake_case_		:      Optional[Any]           =						num_audio_channels
							snake_case_		:      Optional[int]           =						num_frames

							snake_case_		:      List[str]           =						hidden_size
							snake_case_		:      Optional[Any]           =						num_hidden_layers
							snake_case_		:      Optional[Any]           =						num_attention_heads
							snake_case_		:      Any           =						intermediate_size
							snake_case_		:      List[str]           =						hidden_act
							snake_case_		:      Optional[int]           =						hidden_dropout_prob
							snake_case_		:      int           =						attention_probs_dropout_prob
							snake_case_		:      str           =						initializer_range
							snake_case_		:      str           =						layer_norm_eps
							snake_case_		:      Tuple           =						qkv_bias
							snake_case_		:      str           =						use_mean_pooling

							snake_case_		:      Optional[int]           =						decoder_num_attention_heads
							snake_case_		:      Any           =						decoder_hidden_size
							snake_case_		:      Dict           =						decoder_num_hidden_layers
							snake_case_		:      Dict           =						decoder_intermediate_size
							snake_case_		:      int           =						pixel_mask_ratio
							snake_case_		:      str           =						audio_mask_ratio
							snake_case_		:      Dict           =						audio_mask_type

							snake_case_		:      int           =						task_matching
							snake_case_		:      Dict           =						task_mae
							snake_case_		:      Union[str, Any]           =						loss_type








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

import diffusers.utils.hub_utils
class SCREAMING_SNAKE_CASE_    (       unittest.TestCase       ):






						@patch('diffusers.utils.hub_utils.get_full_repo_name'						)
						def UpperCAmelCase_					(   self   :   Optional[int]		, _A   :   Mock						)				->     None:







							"""simple docstring"""


							snake_case_		:      Optional[Any]           =						'full_repo_name'
							with TemporaryDirectory() as tmpdir:
								# Dummy args values
								snake_case_		:      Optional[int]           =						Mock()
								snake_case_		:      Union[str, Any]           =						tmpdir
								snake_case_		:      Optional[Any]           =						0
								snake_case_		:      Union[str, Any]           =						'hub_token'
								snake_case_		:      Any           =						'dataset_name'
								snake_case_		:      Tuple           =						0.0_1
								snake_case_		:      Dict           =						100000
								snake_case_		:      Any           =						10000
								snake_case_		:      str           =						0.0_1
								snake_case_		:      Any           =						0.0_2
								snake_case_		:      Optional[Any]           =						0.0_3
								snake_case_		:      Tuple           =						0.0_0_0_5
								snake_case_		:      Tuple           =						0.0_0_0_0_0_1
								snake_case_		:      str           =						1
								snake_case_		:      Optional[int]           =						10
								snake_case_		:      List[str]           =						0.0_0_1
								snake_case_		:      Any           =						0.1
								snake_case_		:      List[str]           =						0.2
								snake_case_		:      Dict           =						True

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

