
"""simple docstring"""




import gc
import random
import unittest

import torch

from diffusers import (
    IFImgaImgPipeline,
    IFImgaImgSuperResolutionPipeline,
    IFInpaintingPipeline,
    IFInpaintingSuperResolutionPipeline,
    IFPipeline,
    IFSuperResolutionPipeline,
)
from diffusers.models.attention_processor import AttnAddedKVProcessor
from diffusers.utils.import_utils import is_xformers_available
from diffusers.utils.testing_utils import floats_tensor, load_numpy, require_torch_gpu, skip_mps, slow, torch_device

from ..pipeline_params import TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_PARAMS
from ..test_pipelines_common import PipelineTesterMixin, assert_mean_pixel_difference
from . import IFPipelineTesterMixin



@skip_mps
class 			lowerCAmelCase_		(a__				,      a__				,      unittest.TestCase						):


    """simple docstring"""



    __UpperCamelCase   :		str       =     IFPipeline
    __UpperCamelCase   :		Optional[Any]       =     TEXT_TO_IMAGE_PARAMS - {'''width''', '''height''', '''latents'''}
    __UpperCamelCase   :		List[Any]       =     TEXT_TO_IMAGE_BATCH_PARAMS
    __UpperCamelCase   :		List[Any]       =     PipelineTesterMixin.required_optional_params - {'''latents'''}



    def 			__magic_name__					(self					)      ->	Any:



           """simple docstring"""




           return self._get_dummy_components()



    def 			__magic_name__					(self     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__=0					)      ->	Union[str, Any]:



           """simple docstring"""




           if str(_SCREAMING_SNAKE_CASE					).startswith("""mps"""					):
                  SCREAMING_SNAKE_CASE__		: Optional[int]     =     torch.manual_seed(_SCREAMING_SNAKE_CASE					)
           else:
                  SCREAMING_SNAKE_CASE__		: Dict     =     torch.Generator(device=_SCREAMING_SNAKE_CASE					).manual_seed(_SCREAMING_SNAKE_CASE					)

           SCREAMING_SNAKE_CASE__		: List[str]     =     {
               """prompt""": """A painting of a squirrel eating a burger""",
               """generator""": generator,
               """num_inference_steps""": 2,
               """output_type""": """numpy""",
           }

           return inputs



    def 			__magic_name__					(self					)      ->	Dict:



           """simple docstring"""




           self._test_save_load_optional_components()



    @unittest.skipIf(torch_device != """cuda"""     , reason="""float16 requires CUDA"""					)
    def 			__magic_name__					(self					)      ->	Optional[int]:



           """simple docstring"""




           super().test_save_load_floataa(expected_max_diff=1E-1					)



    def 			__magic_name__					(self					)      ->	Any:



           """simple docstring"""




           self._test_attention_slicing_forward_pass(expected_max_diff=1E-2					)



    def 			__magic_name__					(self					)      ->	Tuple:



           """simple docstring"""




           self._test_save_load_local()



    def 			__magic_name__					(self					)      ->	Dict:



           """simple docstring"""




           self._test_inference_batch_single_identical(
               expected_max_diff=1E-2     , )



    @unittest.skipIf(
        torch_device != """cuda""" or not is_xformers_available()     , reason="""XFormers attention is only available with CUDA and `xformers` installed"""     , )
    def 			__magic_name__					(self					)      ->	Tuple:



           """simple docstring"""




           self._test_xformers_attention_forwardGenerator_pass(expected_max_diff=1E-3					)






@slow
@require_torch_gpu
class 			lowerCAmelCase_		(unittest.TestCase						):


    """simple docstring"""



    def 			__magic_name__					(self					)      ->	int:



           """simple docstring"""




           super().tearDown()
           gc.collect()
           torch.cuda.empty_cache()



    def 			__magic_name__					(self					)      ->	Dict:



           """simple docstring"""




           SCREAMING_SNAKE_CASE__		: Optional[int]     =     IFPipeline.from_pretrained("""DeepFloyd/IF-I-XL-v1.0"""     , variant="""fp16"""     , torch_dtype=torch.floataa					)

           SCREAMING_SNAKE_CASE__		: List[Any]     =     IFSuperResolutionPipeline.from_pretrained(
               """DeepFloyd/IF-II-L-v1.0"""     , variant="""fp16"""     , torch_dtype=torch.floataa     , text_encoder=_SCREAMING_SNAKE_CASE     , tokenizer=_SCREAMING_SNAKE_CASE					)

           # pre compute text embeddings and remove T5 to save memory

           pipe_a.text_encoder.to("""cuda"""					)

           SCREAMING_SNAKE_CASE__   ,   SCREAMING_SNAKE_CASE__		: Any     =     pipe_a.encode_prompt("""anime turtle"""     , device="""cuda"""					)

           del pipe_a.tokenizer
           del pipe_a.text_encoder
           gc.collect()

           SCREAMING_SNAKE_CASE__		: Any     =     None
           SCREAMING_SNAKE_CASE__		: Optional[int]     =     None

           pipe_a.enable_model_cpu_offload()
           pipe_a.enable_model_cpu_offload()

           pipe_a.unet.set_attn_processor(AttnAddedKVProcessor()					)
           pipe_a.unet.set_attn_processor(AttnAddedKVProcessor()					)

           self._test_if(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)

           pipe_a.remove_all_hooks()
           pipe_a.remove_all_hooks()

           # img2img

           SCREAMING_SNAKE_CASE__		: List[Any]     =     IFImgaImgPipeline(**pipe_a.components					)
           SCREAMING_SNAKE_CASE__		: Tuple     =     IFImgaImgSuperResolutionPipeline(**pipe_a.components					)

           pipe_a.enable_model_cpu_offload()
           pipe_a.enable_model_cpu_offload()

           pipe_a.unet.set_attn_processor(AttnAddedKVProcessor()					)
           pipe_a.unet.set_attn_processor(AttnAddedKVProcessor()					)

           self._test_if_imgaimg(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)

           pipe_a.remove_all_hooks()
           pipe_a.remove_all_hooks()

           # inpainting

           SCREAMING_SNAKE_CASE__		: Optional[int]     =     IFInpaintingPipeline(**pipe_a.components					)
           SCREAMING_SNAKE_CASE__		: Optional[Any]     =     IFInpaintingSuperResolutionPipeline(**pipe_a.components					)

           pipe_a.enable_model_cpu_offload()
           pipe_a.enable_model_cpu_offload()

           pipe_a.unet.set_attn_processor(AttnAddedKVProcessor()					)
           pipe_a.unet.set_attn_processor(AttnAddedKVProcessor()					)

           self._test_if_inpainting(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)



    def 			__magic_name__					(self     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__					)      ->	Dict:



           """simple docstring"""




           _start_torch_memory_measurement()

           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     torch.Generator(device="""cpu"""					).manual_seed(0					)
           SCREAMING_SNAKE_CASE__		: Any     =     pipe_a(
               prompt_embeds=_SCREAMING_SNAKE_CASE     , negative_prompt_embeds=_SCREAMING_SNAKE_CASE     , num_inference_steps=2     , generator=_SCREAMING_SNAKE_CASE     , output_type="""np"""     , )

           SCREAMING_SNAKE_CASE__		: Optional[int]     =     output.images[0]

           assert image.shape == (64, 64, 3)

           SCREAMING_SNAKE_CASE__		: List[str]     =     torch.cuda.max_memory_allocated()
           assert mem_bytes < 13 * 10**9

           SCREAMING_SNAKE_CASE__		: str     =     load_numpy(
               """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if.npy"""					)
           assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)

           # pipeline 2

           _start_torch_memory_measurement()

           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     torch.Generator(device="""cpu"""					).manual_seed(0					)

           SCREAMING_SNAKE_CASE__		: Dict     =     floats_tensor((1, 3, 64, 64)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)

           SCREAMING_SNAKE_CASE__		: Dict     =     pipe_a(
               prompt_embeds=_SCREAMING_SNAKE_CASE     , negative_prompt_embeds=_SCREAMING_SNAKE_CASE     , image=_SCREAMING_SNAKE_CASE     , generator=_SCREAMING_SNAKE_CASE     , num_inference_steps=2     , output_type="""np"""     , )

           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     output.images[0]

           assert image.shape == (2_56, 2_56, 3)

           SCREAMING_SNAKE_CASE__		: int     =     torch.cuda.max_memory_allocated()
           assert mem_bytes < 4 * 10**9

           SCREAMING_SNAKE_CASE__		: Optional[Any]     =     load_numpy(
               """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_superresolution_stage_II.npy"""					)
           assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)



    def 			__magic_name__					(self     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__					)      ->	Tuple:



           """simple docstring"""




           _start_torch_memory_measurement()

           SCREAMING_SNAKE_CASE__		: Dict     =     floats_tensor((1, 3, 64, 64)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)

           SCREAMING_SNAKE_CASE__		: Any     =     torch.Generator(device="""cpu"""					).manual_seed(0					)

           SCREAMING_SNAKE_CASE__		: int     =     pipe_a(
               prompt_embeds=_SCREAMING_SNAKE_CASE     , negative_prompt_embeds=_SCREAMING_SNAKE_CASE     , image=_SCREAMING_SNAKE_CASE     , num_inference_steps=2     , generator=_SCREAMING_SNAKE_CASE     , output_type="""np"""     , )

           SCREAMING_SNAKE_CASE__		: str     =     output.images[0]

           assert image.shape == (64, 64, 3)

           SCREAMING_SNAKE_CASE__		: List[str]     =     torch.cuda.max_memory_allocated()
           assert mem_bytes < 10 * 10**9

           SCREAMING_SNAKE_CASE__		: Tuple     =     load_numpy(
               """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_img2img.npy"""					)
           assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)

           # pipeline 2

           _start_torch_memory_measurement()

           SCREAMING_SNAKE_CASE__		: str     =     torch.Generator(device="""cpu"""					).manual_seed(0					)

           SCREAMING_SNAKE_CASE__		: Dict     =     floats_tensor((1, 3, 2_56, 2_56)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)
           SCREAMING_SNAKE_CASE__		: int     =     floats_tensor((1, 3, 64, 64)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)

           SCREAMING_SNAKE_CASE__		: List[str]     =     pipe_a(
               prompt_embeds=_SCREAMING_SNAKE_CASE     , negative_prompt_embeds=_SCREAMING_SNAKE_CASE     , image=_SCREAMING_SNAKE_CASE     , original_image=_SCREAMING_SNAKE_CASE     , generator=_SCREAMING_SNAKE_CASE     , num_inference_steps=2     , output_type="""np"""     , )

           SCREAMING_SNAKE_CASE__		: Tuple     =     output.images[0]

           assert image.shape == (2_56, 2_56, 3)

           SCREAMING_SNAKE_CASE__		: Any     =     torch.cuda.max_memory_allocated()
           assert mem_bytes < 4 * 10**9

           SCREAMING_SNAKE_CASE__		: List[str]     =     load_numpy(
               """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_img2img_superresolution_stage_II.npy"""					)
           assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)



    def 			__magic_name__					(self     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__     , SCREAMING_SNAKE_CASE__					)      ->	Union[str, Any]:



           """simple docstring"""




           _start_torch_memory_measurement()

           SCREAMING_SNAKE_CASE__		: Tuple     =     floats_tensor((1, 3, 64, 64)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)
           SCREAMING_SNAKE_CASE__		: str     =     floats_tensor((1, 3, 64, 64)     , rng=random.Random(1					)					).to(_SCREAMING_SNAKE_CASE					)

           SCREAMING_SNAKE_CASE__		: Dict     =     torch.Generator(device="""cpu"""					).manual_seed(0					)
           SCREAMING_SNAKE_CASE__		: List[str]     =     pipe_a(
               prompt_embeds=_SCREAMING_SNAKE_CASE     , negative_prompt_embeds=_SCREAMING_SNAKE_CASE     , image=_SCREAMING_SNAKE_CASE     , mask_image=_SCREAMING_SNAKE_CASE     , num_inference_steps=2     , generator=_SCREAMING_SNAKE_CASE     , output_type="""np"""     , )

           SCREAMING_SNAKE_CASE__		: List[Any]     =     output.images[0]

           assert image.shape == (64, 64, 3)

           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     torch.cuda.max_memory_allocated()
           assert mem_bytes < 10 * 10**9

           SCREAMING_SNAKE_CASE__		: Any     =     load_numpy(
               """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_inpainting.npy"""					)
           assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)

           # pipeline 2

           _start_torch_memory_measurement()

           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     torch.Generator(device="""cpu"""					).manual_seed(0					)

           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     floats_tensor((1, 3, 64, 64)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)
           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     floats_tensor((1, 3, 2_56, 2_56)     , rng=random.Random(0					)					).to(_SCREAMING_SNAKE_CASE					)
           SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     floats_tensor((1, 3, 2_56, 2_56)     , rng=random.Random(1					)					).to(_SCREAMING_SNAKE_CASE					)

           SCREAMING_SNAKE_CASE__		: Any     =     pipe_a(
               prompt_embeds=_SCREAMING_SNAKE_CASE     , negative_prompt_embeds=_SCREAMING_SNAKE_CASE     , image=_SCREAMING_SNAKE_CASE     , mask_image=_SCREAMING_SNAKE_CASE     , original_image=_SCREAMING_SNAKE_CASE     , generator=_SCREAMING_SNAKE_CASE     , num_inference_steps=2     , output_type="""np"""     , )

           SCREAMING_SNAKE_CASE__		: str     =     output.images[0]

           assert image.shape == (2_56, 2_56, 3)

           SCREAMING_SNAKE_CASE__		: Dict     =     torch.cuda.max_memory_allocated()
           assert mem_bytes < 4 * 10**9

           SCREAMING_SNAKE_CASE__		: str     =     load_numpy(
               """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_inpainting_superresolution_stage_II.npy"""					)
           assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE     , _SCREAMING_SNAKE_CASE					)






def lowercase_						(     ):
       torch.cuda.empty_cache()
       torch.cuda.reset_max_memory_allocated()
       torch.cuda.reset_peak_memory_stats()






"""simple docstring"""




import functools
import operator

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


UpperCAmelCase__   :					str												=				logging.get_logger(__name__)

UpperCAmelCase__   :					Dict												=				{
    'microsoft/unispeech-large-1500h-cv': (
        'https://huggingface.co/microsoft/unispeech-large-1500h-cv/resolve/main/config.json'
    ),
    # See all UniSpeech models at https://huggingface.co/models?filter=unispeech
}



class 			lowerCAmelCase_		(a__						):


				"""simple docstring"""



				__UpperCamelCase   :		List[str]       =     '''unispeech'''



				def __init__(self     , SCREAMING_SNAKE_CASE__=32     , SCREAMING_SNAKE_CASE__=7_68     , SCREAMING_SNAKE_CASE__=12     , SCREAMING_SNAKE_CASE__=12     , SCREAMING_SNAKE_CASE__=30_72     , SCREAMING_SNAKE_CASE__="gelu"     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=0.0     , SCREAMING_SNAKE_CASE__=0.0     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=0.02     , SCREAMING_SNAKE_CASE__=1E-5     , SCREAMING_SNAKE_CASE__="group"     , SCREAMING_SNAKE_CASE__="gelu"     , SCREAMING_SNAKE_CASE__=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)     , SCREAMING_SNAKE_CASE__=(5, 2, 2, 2, 2, 2, 2)     , SCREAMING_SNAKE_CASE__=(10, 3, 3, 3, 3, 2, 2)     , SCREAMING_SNAKE_CASE__=False     , SCREAMING_SNAKE_CASE__=1_28     , SCREAMING_SNAKE_CASE__=16     , SCREAMING_SNAKE_CASE__=False     , SCREAMING_SNAKE_CASE__=True     , SCREAMING_SNAKE_CASE__=0.05     , SCREAMING_SNAKE_CASE__=10     , SCREAMING_SNAKE_CASE__=2     , SCREAMING_SNAKE_CASE__=0.0     , SCREAMING_SNAKE_CASE__=10     , SCREAMING_SNAKE_CASE__=0     , SCREAMING_SNAKE_CASE__=3_20     , SCREAMING_SNAKE_CASE__=2     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__=1_00     , SCREAMING_SNAKE_CASE__=2_56     , SCREAMING_SNAKE_CASE__=2_56     , SCREAMING_SNAKE_CASE__=0.1     , SCREAMING_SNAKE_CASE__="mean"     , SCREAMING_SNAKE_CASE__=False     , SCREAMING_SNAKE_CASE__=False     , SCREAMING_SNAKE_CASE__=2_56     , SCREAMING_SNAKE_CASE__=80     , SCREAMING_SNAKE_CASE__=0     , SCREAMING_SNAKE_CASE__=1     , SCREAMING_SNAKE_CASE__=2     , SCREAMING_SNAKE_CASE__=0.5     , **SCREAMING_SNAKE_CASE__     , )      ->	List[Any]:



											"""simple docstring"""




											super().__init__(**SCREAMING_SNAKE_CASE__     , pad_token_id=SCREAMING_SNAKE_CASE__     , bos_token_id=SCREAMING_SNAKE_CASE__     , eos_token_id=SCREAMING_SNAKE_CASE__					)
											SCREAMING_SNAKE_CASE__		: Optional[Any]     =     hidden_size
											SCREAMING_SNAKE_CASE__		: Optional[Any]     =     feat_extract_norm
											SCREAMING_SNAKE_CASE__		: Any     =     feat_extract_activation
											SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     list(SCREAMING_SNAKE_CASE__					)
											SCREAMING_SNAKE_CASE__		: str     =     list(SCREAMING_SNAKE_CASE__					)
											SCREAMING_SNAKE_CASE__		: Tuple     =     list(SCREAMING_SNAKE_CASE__					)
											SCREAMING_SNAKE_CASE__		: List[str]     =     conv_bias
											SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     num_conv_pos_embeddings
											SCREAMING_SNAKE_CASE__		: Optional[Any]     =     num_conv_pos_embedding_groups
											SCREAMING_SNAKE_CASE__		: Dict     =     len(self.conv_dim					)
											SCREAMING_SNAKE_CASE__		: List[str]     =     num_hidden_layers
											SCREAMING_SNAKE_CASE__		: str     =     intermediate_size
											SCREAMING_SNAKE_CASE__		: Optional[int]     =     hidden_act
											SCREAMING_SNAKE_CASE__		: Any     =     num_attention_heads
											SCREAMING_SNAKE_CASE__		: Dict     =     hidden_dropout
											SCREAMING_SNAKE_CASE__		: List[str]     =     attention_dropout
											SCREAMING_SNAKE_CASE__		: Any     =     activation_dropout
											SCREAMING_SNAKE_CASE__		: int     =     feat_proj_dropout
											SCREAMING_SNAKE_CASE__		: List[Any]     =     final_dropout
											SCREAMING_SNAKE_CASE__		: str     =     layerdrop
											SCREAMING_SNAKE_CASE__		: Optional[int]     =     layer_norm_eps
											SCREAMING_SNAKE_CASE__		: Dict     =     initializer_range
											SCREAMING_SNAKE_CASE__		: Dict     =     num_ctc_classes
											SCREAMING_SNAKE_CASE__		: List[Any]     =     vocab_size
											SCREAMING_SNAKE_CASE__		: str     =     do_stable_layer_norm
											SCREAMING_SNAKE_CASE__		: Dict     =     use_weighted_layer_sum
											SCREAMING_SNAKE_CASE__		: Union[str, Any]     =     classifier_proj_size

											if (
											    (len(self.conv_stride					) != self.num_feat_extract_layers)
											    or (len(self.conv_kernel					) != self.num_feat_extract_layers)
											    or (len(self.conv_dim					) != self.num_feat_extract_layers)
											):
																		raise ValueError(
																		    """Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="""
																		    """ `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="""
																		    F''' {len(self.conv_dim					)}`, `len(config.conv_stride) = {len(self.conv_stride					)}`,'''
																		    F''' `len(config.conv_kernel) = {len(self.conv_kernel					)}`.'''					)

											# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
											SCREAMING_SNAKE_CASE__		: Tuple     =     apply_spec_augment
											SCREAMING_SNAKE_CASE__		: Optional[int]     =     mask_time_prob
											SCREAMING_SNAKE_CASE__		: Optional[Any]     =     mask_time_length
											SCREAMING_SNAKE_CASE__		: List[str]     =     mask_time_min_masks
											SCREAMING_SNAKE_CASE__		: Tuple     =     mask_feature_prob
											SCREAMING_SNAKE_CASE__		: Any     =     mask_feature_length
											SCREAMING_SNAKE_CASE__		: int     =     mask_feature_min_masks

											# parameters for pretraining with codevector quantized representations
											SCREAMING_SNAKE_CASE__		: Dict     =     num_codevectors_per_group
											SCREAMING_SNAKE_CASE__		: Any     =     num_codevector_groups
											SCREAMING_SNAKE_CASE__		: str     =     contrastive_logits_temperature
											SCREAMING_SNAKE_CASE__		: str     =     feat_quantizer_dropout
											SCREAMING_SNAKE_CASE__		: Optional[Any]     =     num_negatives
											SCREAMING_SNAKE_CASE__		: Tuple     =     codevector_dim
											SCREAMING_SNAKE_CASE__		: List[Any]     =     proj_codevector_dim
											SCREAMING_SNAKE_CASE__		: Tuple     =     diversity_loss_weight

											# ctc loss
											SCREAMING_SNAKE_CASE__		: int     =     ctc_loss_reduction
											SCREAMING_SNAKE_CASE__		: str     =     ctc_zero_infinity

											# pretraining loss
											SCREAMING_SNAKE_CASE__		: List[str]     =     replace_prob



				@property
				def 			__magic_name__					(self					)      ->	Tuple:



											"""simple docstring"""




											return functools.reduce(operator.mul     , self.conv_stride     , 1					)




