


'''simple docstring'''
import gc
import unittest

import numpy as np
import torch
import torch.nn.functional as F
from transformers import (
    ClapTextConfig,
    ClapTextModelWithProjection,
    RobertaTokenizer,
    SpeechTaHifiGan,
    SpeechTaHifiGanConfig,
)

from diffusers import (
    AudioLDMPipeline,
    AutoencoderKL,
    DDIMScheduler,
    LMSDiscreteScheduler,
    PNDMScheduler,
    UNetaDConditionModel,
)
from diffusers.utils import is_xformers_available, slow, torch_device
from diffusers.utils.testing_utils import enable_full_determinism

from ..pipeline_params import TEXT_TO_AUDIO_BATCH_PARAMS, TEXT_TO_AUDIO_PARAMS
from ..test_pipelines_common import PipelineTesterMixin


enable_full_determinism()




class      lowerCamelCase_  (      __a	,			unittest.TestCase ):
      lowerCAmelCase__							=	AudioLDMPipeline
      lowerCAmelCase__							=	TEXT_TO_AUDIO_PARAMS
      lowerCAmelCase__							=	TEXT_TO_AUDIO_BATCH_PARAMS
      lowerCAmelCase__							=	frozenset(
          [
              'num_inference_steps',
              'num_waveforms_per_prompt',
              'generator',
              'latents',
              'output_type',
              'return_dict',
              'callback',
              'callback_steps',
          ] )






      def lowercase_				(   self							:       List[Any]					):


          '''simple docstring'''


          torch.manual_seed(0					)
          UpperCAmelCase__     :						int						=							UNetaDConditionModel(
              block_out_channels=(32, 64)		,		layers_per_block=2		,		sample_size=32		,		in_channels=4		,		out_channels=4		,		down_block_types=('''DownBlock2D''', '''CrossAttnDownBlock2D''')		,		up_block_types=('''CrossAttnUpBlock2D''', '''UpBlock2D''')		,		cross_attention_dim=(32, 64)		,		class_embed_type='''simple_projection'''		,		projection_class_embeddings_input_dim=32		,		class_embeddings_concat=__lowerCAmelCase		,		)
          UpperCAmelCase__     :						Optional[Any]						=							DDIMScheduler(
              beta_start=0.0_0_0_8_5		,		beta_end=0.0_1_2		,		beta_schedule='''scaled_linear'''		,		clip_sample=__lowerCAmelCase		,		set_alpha_to_one=__lowerCAmelCase		,		)
          torch.manual_seed(0					)
          UpperCAmelCase__     :						List[str]						=							AutoencoderKL(
              block_out_channels=[32, 64]		,		in_channels=1		,		out_channels=1		,		down_block_types=['''DownEncoderBlock2D''', '''DownEncoderBlock2D''']		,		up_block_types=['''UpDecoderBlock2D''', '''UpDecoderBlock2D''']		,		latent_channels=4		,		)
          torch.manual_seed(0					)
          UpperCAmelCase__     :						Optional[Any]						=							ClapTextConfig(
              bos_token_id=0		,		eos_token_id=2		,		hidden_size=32		,		intermediate_size=37		,		layer_norm_eps=1e-05		,		num_attention_heads=4		,		num_hidden_layers=5		,		pad_token_id=1		,		vocab_size=1_000		,		projection_dim=32		,		)
          UpperCAmelCase__     :						Optional[int]						=							ClapTextModelWithProjection(__lowerCAmelCase					)
          UpperCAmelCase__     :						List[str]						=							RobertaTokenizer.from_pretrained('''hf-internal-testing/tiny-random-roberta'''		,		model_max_length=77					)

          UpperCAmelCase__     :						Dict						=							SpeechTaHifiGanConfig(
              model_in_dim=8		,		sampling_rate=16_000		,		upsample_initial_channel=16		,		upsample_rates=[2, 2]		,		upsample_kernel_sizes=[4, 4]		,		resblock_kernel_sizes=[3, 7]		,		resblock_dilation_sizes=[[1, 3, 5], [1, 3, 5]]		,		normalize_before=__lowerCAmelCase		,		)

          UpperCAmelCase__     :						List[Any]						=							SpeechTaHifiGan(__lowerCAmelCase					)

          UpperCAmelCase__     :						Union[str, Any]						=							{
              '''unet''': unet,
              '''scheduler''': scheduler,
              '''vae''': vae,
              '''text_encoder''': text_encoder,
              '''tokenizer''': tokenizer,
              '''vocoder''': vocoder,
          }
          return components






      def lowercase_				(   self							:       Optional[int]		,		_A							:       Tuple		,		_A							:       str=0					):


          '''simple docstring'''


          if str(__lowerCAmelCase					).startswith('''mps'''					):
              UpperCAmelCase__     :						Optional[int]						=							torch.manual_seed(__lowerCAmelCase					)
          else:
              UpperCAmelCase__     :						Tuple						=							torch.Generator(device=__lowerCAmelCase					).manual_seed(__lowerCAmelCase					)
          UpperCAmelCase__     :						str						=							{
              '''prompt''': '''A hammer hitting a wooden surface''',
              '''generator''': generator,
              '''num_inference_steps''': 2,
              '''guidance_scale''': 6.0,
          }
          return inputs






      def lowercase_				(   self							:       Union[str, Any]					):


          '''simple docstring'''


          UpperCAmelCase__     :						Optional[int]						=							'''cpu'''  # ensure determinism for the device-dependent torch.Generator

          UpperCAmelCase__     :						List[Any]						=							self.get_dummy_components()
          UpperCAmelCase__     :						int						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						int						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						int						=							audioldm_pipe(**__lowerCAmelCase					)
          UpperCAmelCase__     :						List[str]						=							output.audios[0]

          assert audio.ndim == 1
          assert len(__lowerCAmelCase					) == 256

          UpperCAmelCase__     :						Any						=							audio[:10]
          UpperCAmelCase__     :						List[Any]						=							np.array(
              [-0.0_0_5_0, 0.0_0_5_0, -0.0_0_6_0, 0.0_0_3_3, -0.0_0_2_6, 0.0_0_3_3, -0.0_0_2_7, 0.0_0_3_3, -0.0_0_2_8, 0.0_0_3_3]					)

          assert np.abs(audio_slice - expected_slice					).max() < 1e-2






      def lowercase_				(   self							:       Optional[int]					):


          '''simple docstring'''


          UpperCAmelCase__     :						Any						=							self.get_dummy_components()
          UpperCAmelCase__     :						Optional[Any]						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Tuple						=							audioldm_pipe.to(__lowerCAmelCase					)
          UpperCAmelCase__     :						Dict						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						str						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						str						=							3 * [inputs['''prompt''']]

          # forward
          UpperCAmelCase__     :						Dict						=							audioldm_pipe(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Dict						=							output.audios[0]

          UpperCAmelCase__     :						Dict						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Dict						=							3 * [inputs.pop('''prompt'''					)]

          UpperCAmelCase__     :						Dict						=							audioldm_pipe.tokenizer(
              __lowerCAmelCase		,		padding='''max_length'''		,		max_length=audioldm_pipe.tokenizer.model_max_length		,		truncation=__lowerCAmelCase		,		return_tensors='''pt'''		,		)
          UpperCAmelCase__     :						Optional[Any]						=							text_inputs['''input_ids'''].to(__lowerCAmelCase					)

          UpperCAmelCase__     :						Optional[Any]						=							audioldm_pipe.text_encoder(
              __lowerCAmelCase		,		)
          UpperCAmelCase__     :						Optional[Any]						=							prompt_embeds.text_embeds
          # additional L_2 normalization over each hidden-state
          UpperCAmelCase__     :						Optional[int]						=							F.normalize(__lowerCAmelCase		,		dim=-1					)

          UpperCAmelCase__     :						Optional[int]						=							prompt_embeds

          # forward
          UpperCAmelCase__     :						Tuple						=							audioldm_pipe(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Union[str, Any]						=							output.audios[0]

          assert np.abs(audio_a - audio_a					).max() < 1e-2






      def lowercase_				(   self							:       Any					):


          '''simple docstring'''


          UpperCAmelCase__     :						List[Any]						=							self.get_dummy_components()
          UpperCAmelCase__     :						List[str]						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe.to(__lowerCAmelCase					)
          UpperCAmelCase__     :						Union[str, Any]						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						Dict						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Dict						=							3 * ['''this is a negative prompt''']
          UpperCAmelCase__     :						Any						=							negative_prompt
          UpperCAmelCase__     :						int						=							3 * [inputs['''prompt''']]

          # forward
          UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe(**__lowerCAmelCase					)
          UpperCAmelCase__     :						List[str]						=							output.audios[0]

          UpperCAmelCase__     :						Optional[int]						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Any						=							3 * [inputs.pop('''prompt'''					)]

          UpperCAmelCase__     :						Dict						=							[]
          for p in [prompt, negative_prompt]:
              UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe.tokenizer(
                  __lowerCAmelCase		,		padding='''max_length'''		,		max_length=audioldm_pipe.tokenizer.model_max_length		,		truncation=__lowerCAmelCase		,		return_tensors='''pt'''		,		)
              UpperCAmelCase__     :						str						=							text_inputs['''input_ids'''].to(__lowerCAmelCase					)

              UpperCAmelCase__     :						int						=							audioldm_pipe.text_encoder(
                  __lowerCAmelCase		,		)
              UpperCAmelCase__     :						Optional[Any]						=							text_embeds.text_embeds
              # additional L_2 normalization over each hidden-state
              UpperCAmelCase__     :						List[str]						=							F.normalize(__lowerCAmelCase		,		dim=-1					)

              embeds.append(__lowerCAmelCase					)

          UpperCAmelCase__		,		UpperCAmelCase__     :						int						=							embeds

          # forward
          UpperCAmelCase__     :						Dict						=							audioldm_pipe(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Optional[Any]						=							output.audios[0]

          assert np.abs(audio_a - audio_a					).max() < 1e-2






      def lowercase_				(   self							:       int					):


          '''simple docstring'''


          UpperCAmelCase__     :						List[Any]						=							'''cpu'''  # ensure determinism for the device-dependent torch.Generator
          UpperCAmelCase__     :						List[Any]						=							self.get_dummy_components()
          UpperCAmelCase__     :						int						=							PNDMScheduler(skip_prk_steps=__lowerCAmelCase					)
          UpperCAmelCase__     :						Optional[Any]						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Any						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						Optional[Any]						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Dict						=							'''egg cracking'''
          UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe(**__lowerCAmelCase		,		negative_prompt=__lowerCAmelCase					)
          UpperCAmelCase__     :						Union[str, Any]						=							output.audios[0]

          assert audio.ndim == 1
          assert len(__lowerCAmelCase					) == 256

          UpperCAmelCase__     :						Optional[int]						=							audio[:10]
          UpperCAmelCase__     :						Dict						=							np.array(
              [-0.0_0_5_1, 0.0_0_5_0, -0.0_0_6_0, 0.0_0_3_4, -0.0_0_2_6, 0.0_0_3_3, -0.0_0_2_7, 0.0_0_3_3, -0.0_0_2_8, 0.0_0_3_2]					)

          assert np.abs(audio_slice - expected_slice					).max() < 1e-2






      def lowercase_				(   self							:       Any					):


          '''simple docstring'''


          UpperCAmelCase__     :						List[str]						=							'''cpu'''  # ensure determinism for the device-dependent torch.Generator
          UpperCAmelCase__     :						Tuple						=							self.get_dummy_components()
          UpperCAmelCase__     :						str						=							PNDMScheduler(skip_prk_steps=__lowerCAmelCase					)
          UpperCAmelCase__     :						str						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						List[str]						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						Optional[Any]						=							'''A hammer hitting a wooden surface'''

          # test num_waveforms_per_prompt=1 (default)
          UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe(__lowerCAmelCase		,		num_inference_steps=2					).audios

          assert audios.shape == (1, 256)

          # test num_waveforms_per_prompt=1 (default) for batch of prompts
          UpperCAmelCase__     :						Dict						=							2
          UpperCAmelCase__     :						Any						=							audioldm_pipe([prompt] * batch_size		,		num_inference_steps=2					).audios

          assert audios.shape == (batch_size, 256)

          # test num_waveforms_per_prompt for single prompt
          UpperCAmelCase__     :						str						=							2
          UpperCAmelCase__     :						List[str]						=							audioldm_pipe(__lowerCAmelCase		,		num_inference_steps=2		,		num_waveforms_per_prompt=__lowerCAmelCase					).audios

          assert audios.shape == (num_waveforms_per_prompt, 256)

          # test num_waveforms_per_prompt for batch of prompts
          UpperCAmelCase__     :						List[Any]						=							2
          UpperCAmelCase__     :						List[Any]						=							audioldm_pipe(
              [prompt] * batch_size		,		num_inference_steps=2		,		num_waveforms_per_prompt=__lowerCAmelCase					).audios

          assert audios.shape == (batch_size * num_waveforms_per_prompt, 256)






      def lowercase_				(   self							:       Optional[Any]					):


          '''simple docstring'''


          UpperCAmelCase__     :						Any						=							'''cpu'''  # ensure determinism for the device-dependent torch.Generator
          UpperCAmelCase__     :						Union[str, Any]						=							self.get_dummy_components()
          UpperCAmelCase__     :						List[str]						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						Tuple						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)
          UpperCAmelCase__     :						Tuple						=							audioldm_pipe.vocoder.config.sampling_rate

          UpperCAmelCase__     :						List[Any]						=							self.get_dummy_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Optional[int]						=							audioldm_pipe(audio_length_in_s=0.0_1_6		,		**__lowerCAmelCase					)
          UpperCAmelCase__     :						int						=							output.audios[0]

          assert audio.ndim == 1
          assert len(__lowerCAmelCase					) / vocoder_sampling_rate == 0.0_1_6

          UpperCAmelCase__     :						int						=							audioldm_pipe(audio_length_in_s=0.0_3_2		,		**__lowerCAmelCase					)
          UpperCAmelCase__     :						Optional[Any]						=							output.audios[0]

          assert audio.ndim == 1
          assert len(__lowerCAmelCase					) / vocoder_sampling_rate == 0.0_3_2






      def lowercase_				(   self							:       List[str]					):


          '''simple docstring'''


          UpperCAmelCase__     :						Optional[int]						=							self.get_dummy_components()
          UpperCAmelCase__     :						List[str]						=							AudioLDMPipeline(**__lowerCAmelCase					)
          UpperCAmelCase__     :						List[str]						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						Any						=							['''hey''']

          UpperCAmelCase__     :						List[str]						=							audioldm_pipe(__lowerCAmelCase		,		num_inference_steps=1					)
          UpperCAmelCase__     :						Tuple						=							output.audios.shape
          assert audio_shape == (1, 256)

          UpperCAmelCase__     :						int						=							audioldm_pipe.vocoder.config
          config.model_in_dim *= 2
          UpperCAmelCase__     :						Tuple						=							SpeechTaHifiGan(__lowerCAmelCase					).to(__lowerCAmelCase					)
          UpperCAmelCase__     :						Union[str, Any]						=							audioldm_pipe(__lowerCAmelCase		,		num_inference_steps=1					)
          UpperCAmelCase__     :						Union[str, Any]						=							output.audios.shape
          # waveform shape is unchanged, we just have 2x the number of mel channels in the spectrogram
          assert audio_shape == (1, 256)






      def lowercase_				(   self							:       List[Any]					):


          '''simple docstring'''


          self._test_attention_slicing_forward_pass(test_mean_pixel_difference=__lowerCAmelCase					)






      def lowercase_				(   self							:       Tuple					):


          '''simple docstring'''


          self._test_inference_batch_single_identical(test_mean_pixel_difference=__lowerCAmelCase					)






      @unittest.skipIf(
          torch_device != '''cuda''' or not is_xformers_available()		,		reason='''XFormers attention is only available with CUDA and `xformers` installed'''		,		)
      def lowercase_				(   self							:       Optional[Any]					):


          '''simple docstring'''


          self._test_xformers_attention_forwardGenerator_pass(test_mean_pixel_difference=__lowerCAmelCase					)




@slow
class      lowerCamelCase_  (      unittest.TestCase ):






      def lowercase_				(   self							:       Optional[Any]					):


          '''simple docstring'''


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






      def lowercase_				(   self							:       List[str]		,		_A							:       Optional[int]		,		_A							:       List[str]="cpu"		,		_A							:       Optional[Any]=torch.floataa		,		_A							:       Optional[int]=0					):


          '''simple docstring'''


          UpperCAmelCase__     :						List[Any]						=							torch.Generator(device=__lowerCAmelCase					).manual_seed(__lowerCAmelCase					)
          UpperCAmelCase__     :						int						=							np.random.RandomState(__lowerCAmelCase					).standard_normal((1, 8, 128, 16)					)
          UpperCAmelCase__     :						Union[str, Any]						=							torch.from_numpy(__lowerCAmelCase					).to(device=__lowerCAmelCase		,		dtype=__lowerCAmelCase					)
          UpperCAmelCase__     :						Tuple						=							{
              '''prompt''': '''A hammer hitting a wooden surface''',
              '''latents''': latents,
              '''generator''': generator,
              '''num_inference_steps''': 3,
              '''guidance_scale''': 2.5,
          }
          return inputs






      def lowercase_				(   self							:       Any					):


          '''simple docstring'''


          UpperCAmelCase__     :						List[str]						=							AudioLDMPipeline.from_pretrained('''cvssp/audioldm'''					)
          UpperCAmelCase__     :						List[Any]						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						Union[str, Any]						=							self.get_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Tuple						=							25
          UpperCAmelCase__     :						str						=							audioldm_pipe(**__lowerCAmelCase					).audios[0]

          assert audio.ndim == 1
          assert len(__lowerCAmelCase					) == 81_920

          UpperCAmelCase__     :						Optional[Any]						=							audio[77_230:77_240]
          UpperCAmelCase__     :						Optional[int]						=							np.array(
              [-0.4_8_8_4, -0.4_6_0_7, 0.0_0_2_3, 0.5_0_0_7, 0.5_8_9_6, 0.5_1_5_1, 0.3_8_1_3, -0.0_2_0_8, -0.3_6_8_7, -0.4_3_1_5]					)
          UpperCAmelCase__     :						List[Any]						=							np.abs(expected_slice - audio_slice					).max()
          assert max_diff < 1e-2






      def lowercase_				(   self							:       Optional[int]					):


          '''simple docstring'''


          UpperCAmelCase__     :						Dict						=							AudioLDMPipeline.from_pretrained('''cvssp/audioldm'''					)
          UpperCAmelCase__     :						Optional[Any]						=							LMSDiscreteScheduler.from_config(audioldm_pipe.scheduler.config					)
          UpperCAmelCase__     :						Tuple						=							audioldm_pipe.to(__lowerCAmelCase					)
          audioldm_pipe.set_progress_bar_config(disable=__lowerCAmelCase					)

          UpperCAmelCase__     :						Optional[Any]						=							self.get_inputs(__lowerCAmelCase					)
          UpperCAmelCase__     :						Dict						=							audioldm_pipe(**__lowerCAmelCase					).audios[0]

          assert audio.ndim == 1
          assert len(__lowerCAmelCase					) == 81_920

          UpperCAmelCase__     :						Tuple						=							audio[27_780:27_790]
          UpperCAmelCase__     :						str						=							np.array([-0.2_1_3_1, -0.0_8_7_3, -0.0_1_2_4, -0.0_1_8_9, 0.0_5_6_9, 0.1_3_7_3, 0.1_8_8_3, 0.2_8_8_6, 0.3_2_9_7, 0.2_2_1_2]					)
          UpperCAmelCase__     :						Dict						=							np.abs(expected_slice - audio_slice					).max()
          assert max_diff < 3e-2







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


A       :   Optional[int]					= logging.get_logger(__name__)

A       :   Dict					= {
    '''vinvino02/glpn-kitti''': '''https://huggingface.co/vinvino02/glpn-kitti/resolve/main/config.json''',
    # See all GLPN models at https://huggingface.co/models?filter=glpn
}


class     A     (SCREAMING_SNAKE_CASE       ):
			'''simple docstring'''




			__lowerCamelCase      :			Tuple							     =       '''glpn'''






			def __init__(     self  :       Optional[int]				,      __lowerCAmelCase  :       Union[str, Any]=3				,      __lowerCAmelCase  :       Any=4				,      __lowerCAmelCase  :       Tuple=[2, 2, 2, 2]				,      __lowerCAmelCase  :       int=[8, 4, 2, 1]				,      __lowerCAmelCase  :       int=[32, 64, 1_60, 2_56]				,      __lowerCAmelCase  :       str=[7, 3, 3, 3]				,      __lowerCAmelCase  :       Dict=[4, 2, 2, 2]				,      __lowerCAmelCase  :       List[str]=[1, 2, 5, 8]				,      __lowerCAmelCase  :       List[Any]=[4, 4, 4, 4]				,      __lowerCAmelCase  :       str="gelu"				,      __lowerCAmelCase  :       Union[str, Any]=0.0				,      __lowerCAmelCase  :       Tuple=0.0				,      __lowerCAmelCase  :       List[Any]=0.0_2				,      __lowerCAmelCase  :       Dict=0.1				,      __lowerCAmelCase  :       Dict=1e-6				,      __lowerCAmelCase  :       Tuple=64				,      __lowerCAmelCase  :       Tuple=10				,      __lowerCAmelCase  :       Union[str, Any]=-1				,      **__lowerCAmelCase  :       Any				,      )      ->      Tuple:







					"""simple docstring"""






					super().__init__(**__lowerCAmelCase  )

					A__     =  num_channels
					A__     =  num_encoder_blocks
					A__     =  depths
					A__     =  sr_ratios
					A__     =  hidden_sizes
					A__     =  patch_sizes
					A__     =  strides
					A__     =  mlp_ratios
					A__     =  num_attention_heads
					A__     =  hidden_act
					A__     =  hidden_dropout_prob
					A__     =  attention_probs_dropout_prob
					A__     =  initializer_range
					A__     =  drop_path_rate
					A__     =  layer_norm_eps
					A__     =  decoder_hidden_size
					A__     =  max_depth
					A__     =  head_in_index



