

"""simple docstring"""





import unittest

from diffusers.models.unet_ad_blocks import *  # noqa F403
from diffusers.utils import torch_device

from .test_unet_blocks_common import UNetBlockTesterMixin



class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				DownBlockaD  # noqa F405
			snake_case	      =				"down"




			def      lowerCamelCase__     (				self						:					Optional[int]	)      -> Tuple:







								"""simple docstring"""
								A_				 =						[-0.0_2_3_2, -0.9_8_6_9, 0.8_0_5_4, -0.0_6_3_7, -0.1_6_8_8, -1.4_2_6_4, 0.4_4_7_0, -1.3_3_9_4, 0.0_9_0_4]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				ResnetDownsampleBlockaD  # noqa F405
			snake_case	      =				"down"




			def      lowerCamelCase__     (				self						:					List[Any]	)      -> Dict:







								"""simple docstring"""
								A_				 =						[0.0_7_1_0, 0.2_4_1_0, -0.7_3_2_0, -1.0_7_5_7, -1.1_3_4_3, 0.3_5_4_0, -0.0_1_3_3, -0.2_5_7_6, 0.0_9_4_8]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				AttnDownBlockaD  # noqa F405
			snake_case	      =				"down"




			def      lowerCamelCase__     (				self						:					List[str]	)      -> Union[str, Any]:







								"""simple docstring"""
								A_				 =						[0.0_6_3_6, 0.8_9_6_4, -0.6_2_3_4, -1.0_1_3_1, 0.0_8_4_4, 0.4_9_3_5, 0.3_4_3_7, 0.0_9_1_1, -0.2_9_5_7]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				CrossAttnDownBlockaD  # noqa F405
			snake_case	      =				"down"




			def      lowerCamelCase__     (				self						:					Any	)      -> Optional[Any]:







								"""simple docstring"""
								A_ ,    A_				 =						super().prepare_init_args_and_inputs_for_common()
								A_				 =						32
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					Tuple	)      -> Optional[Any]:







								"""simple docstring"""
								A_				 =						[0.2_2_3_8, -0.7_3_9_6, -0.2_2_5_5, -0.3_8_2_9, 0.1_9_2_5, 1.1_6_6_5, 0.0_6_0_3, -0.7_2_9_5, 0.1_9_8_3]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				SimpleCrossAttnDownBlockaD  # noqa F405
			snake_case	      =				"down"




			@property
			def      lowerCamelCase__     (				self						:					Tuple	)      -> Optional[int]:







								"""simple docstring"""
								return super().get_dummy_input(include_encoder_hidden_states=_snake_case	)




			def      lowerCamelCase__     (				self						:					Union[str, Any]	)      -> List[str]:







								"""simple docstring"""
								A_ ,    A_				 =						super().prepare_init_args_and_inputs_for_common()
								A_				 =						32
								return init_dict, inputs_dict






			@unittest.skipIf(torch_device == "mps"       ,   "MPS result is not consistent"	)
			def      lowerCamelCase__     (				self						:					Dict	)      -> Optional[int]:







								"""simple docstring"""
								A_				 =						[0.7_9_2_1, -0.0_9_9_2, -0.1_9_6_2, -0.7_6_9_5, -0.4_2_4_2, 0.7_8_0_4, 0.4_7_3_7, 0.2_7_6_5, 0.3_3_3_8]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				SkipDownBlockaD  # noqa F405
			snake_case	      =				"down"




			@property
			def      lowerCamelCase__     (				self						:					int	)      -> Tuple:







								"""simple docstring"""
								return super().get_dummy_input(include_skip_sample=_snake_case	)






			def      lowerCamelCase__     (				self						:					str	)      -> int:







								"""simple docstring"""
								A_				 =						[-0.0_8_4_5, -0.2_0_8_7, -0.2_4_6_5, 0.0_9_7_1, 0.1_9_0_0, -0.0_4_8_4, 0.2_6_6_4, 0.4_1_7_9, 0.5_0_6_9]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				AttnSkipDownBlockaD  # noqa F405
			snake_case	      =				"down"




			@property
			def      lowerCamelCase__     (				self						:					List[Any]	)      -> Tuple:







								"""simple docstring"""
								return super().get_dummy_input(include_skip_sample=_snake_case	)






			def      lowerCamelCase__     (				self						:					Tuple	)      -> List[str]:







								"""simple docstring"""
								A_				 =						[0.5_5_3_9, 0.1_6_0_9, 0.4_9_2_4, 0.0_5_3_7, -0.1_9_9_5, 0.4_0_5_0, 0.0_9_7_9, -0.2_7_2_1, -0.0_6_4_2]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				DownEncoderBlockaD  # noqa F405
			snake_case	      =				"down"




			@property
			def      lowerCamelCase__     (				self						:					Dict	)      -> List[Any]:







								"""simple docstring"""
								return super().get_dummy_input(include_temb=_snake_case	)




			def      lowerCamelCase__     (				self						:					int	)      -> Dict:







								"""simple docstring"""
								A_				 =						{
								    "in_channels": 32,
								    "out_channels": 32,
								}
								A_				 =						self.dummy_input
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					int	)      -> Any:







								"""simple docstring"""
								A_				 =						[1.1_1_0_2, 0.5_3_0_2, 0.4_8_7_2, -0.0_0_2_3, -0.8_0_4_2, 0.0_4_8_3, -0.3_4_8_9, -0.5_6_3_2, 0.7_6_2_6]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				AttnDownEncoderBlockaD  # noqa F405
			snake_case	      =				"down"




			@property
			def      lowerCamelCase__     (				self						:					Optional[int]	)      -> Any:







								"""simple docstring"""
								return super().get_dummy_input(include_temb=_snake_case	)




			def      lowerCamelCase__     (				self						:					Optional[Any]	)      -> Optional[int]:







								"""simple docstring"""
								A_				 =						{
								    "in_channels": 32,
								    "out_channels": 32,
								}
								A_				 =						self.dummy_input
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					int	)      -> Tuple:







								"""simple docstring"""
								A_				 =						[0.8_9_6_6, -0.1_4_8_6, 0.8_5_6_8, 0.8_1_4_1, -0.9_0_4_6, -0.1_3_4_2, -0.0_9_7_2, -0.7_4_1_7, 0.1_5_3_8]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				UNetMidBlockaD  # noqa F405
			snake_case	      =				"mid"




			def      lowerCamelCase__     (				self						:					List[str]	)      -> Optional[Any]:







								"""simple docstring"""
								A_				 =						{
								    "in_channels": 32,
								    "temb_channels": 128,
								}
								A_				 =						self.dummy_input
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					List[Any]	)      -> Any:







								"""simple docstring"""
								A_				 =						[-0.1_0_6_2, 1.7_2_4_8, 0.3_4_9_4, 1.4_5_6_9, -0.0_9_1_0, -1.2_4_2_1, -0.9_9_8_4, 0.6_7_3_6, 1.0_0_2_8]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				UNetMidBlockaDCrossAttn  # noqa F405
			snake_case	      =				"mid"




			def      lowerCamelCase__     (				self						:					List[Any]	)      -> Any:







								"""simple docstring"""
								A_ ,    A_				 =						super().prepare_init_args_and_inputs_for_common()
								A_				 =						32
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					int	)      -> str:







								"""simple docstring"""
								A_				 =						[0.0_1_8_7, 2.4_2_2_0, 0.4_4_8_4, 1.1_2_0_3, -0.6_1_2_1, -1.5_1_2_2, -0.8_2_7_0, 0.7_8_5_1, 1.8_3_3_5]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				UNetMidBlockaDSimpleCrossAttn  # noqa F405
			snake_case	      =				"mid"




			@property
			def      lowerCamelCase__     (				self						:					List[str]	)      -> Union[str, Any]:







								"""simple docstring"""
								return super().get_dummy_input(include_encoder_hidden_states=_snake_case	)




			def      lowerCamelCase__     (				self						:					List[str]	)      -> str:







								"""simple docstring"""
								A_ ,    A_				 =						super().prepare_init_args_and_inputs_for_common()
								A_				 =						32
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					Tuple	)      -> str:







								"""simple docstring"""
								A_				 =						[0.7_1_4_3, 1.9_9_7_4, 0.5_4_4_8, 1.3_9_7_7, 0.1_2_8_2, -1.1_2_3_7, -1.4_2_3_8, 0.5_5_3_0, 0.8_8_8_0]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				UpBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					Any	)      -> Optional[Any]:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case	)






			def      lowerCamelCase__     (				self						:					int	)      -> int:







								"""simple docstring"""
								A_				 =						[-0.2_0_4_1, -0.4_1_6_5, -0.3_0_2_2, 0.0_0_4_1, -0.6_6_2_8, -0.7_0_5_3, 0.1_9_2_8, -0.0_3_2_5, 0.0_5_2_3]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				ResnetUpsampleBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					Union[str, Any]	)      -> Any:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case	)






			def      lowerCamelCase__     (				self						:					Union[str, Any]	)      -> Optional[int]:







								"""simple docstring"""
								A_				 =						[0.2_2_8_7, 0.3_5_4_9, -0.1_3_4_6, 0.4_7_9_7, -0.1_7_1_5, -0.9_6_4_9, 0.7_3_0_5, -0.5_8_6_4, -0.6_2_4_4]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				CrossAttnUpBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					Optional[Any]	)      -> int:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case	)




			def      lowerCamelCase__     (				self						:					List[str]	)      -> Tuple:







								"""simple docstring"""
								A_ ,    A_				 =						super().prepare_init_args_and_inputs_for_common()
								A_				 =						32
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					str	)      -> Any:







								"""simple docstring"""
								A_				 =						[-0.1_4_0_3, -0.3_5_1_5, -0.0_4_2_0, -0.1_4_2_5, 0.3_1_6_7, 0.5_0_9_4, -0.2_1_8_1, 0.5_9_3_1, 0.5_5_8_2]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				SimpleCrossAttnUpBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					List[str]	)      -> Optional[int]:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case       ,   include_encoder_hidden_states=_snake_case	)




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







								"""simple docstring"""
								A_ ,    A_				 =						super().prepare_init_args_and_inputs_for_common()
								A_				 =						32
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					Optional[Any]	)      -> Any:







								"""simple docstring"""
								A_				 =						[0.2_6_4_5, 0.1_4_8_0, 0.0_9_0_9, 0.8_0_4_4, -0.9_7_5_8, -0.9_0_8_3, 0.0_9_9_4, -1.1_4_5_3, -0.7_4_0_2]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				AttnUpBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					List[str]	)      -> Union[str, Any]:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case	)






			@unittest.skipIf(torch_device == "mps"       ,   "MPS result is not consistent"	)
			def      lowerCamelCase__     (				self						:					List[str]	)      -> List[Any]:







								"""simple docstring"""
								A_				 =						[0.0_9_7_9, 0.1_3_2_6, 0.0_0_2_1, 0.0_6_5_9, 0.2_2_4_9, 0.0_0_5_9, 0.1_1_3_2, 0.5_9_5_2, 0.1_0_3_3]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				SkipUpBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					Union[str, Any]	)      -> int:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case	)






			def      lowerCamelCase__     (				self						:					Dict	)      -> List[str]:







								"""simple docstring"""
								A_				 =						[-0.0_8_9_3, -0.1_2_3_4, -0.1_5_0_6, -0.0_3_3_2, 0.0_1_2_3, -0.0_2_1_1, 0.0_5_6_6, 0.0_1_4_3, 0.0_3_6_2]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				AttnSkipUpBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					List[Any]	)      -> Any:







								"""simple docstring"""
								return super().get_dummy_input(include_res_hidden_states_tuple=_snake_case	)






			def      lowerCamelCase__     (				self						:					Union[str, Any]	)      -> List[str]:







								"""simple docstring"""
								A_				 =						[0.0_3_6_1, 0.0_6_1_7, 0.2_7_8_7, -0.0_3_5_0, 0.0_3_4_2, 0.3_4_2_1, -0.0_8_4_3, 0.0_9_1_3, 0.3_0_1_5]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				UpDecoderBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					List[Any]	)      -> Tuple:







								"""simple docstring"""
								return super().get_dummy_input(include_temb=_snake_case	)




			def      lowerCamelCase__     (				self						:					Dict	)      -> Optional[Any]:







								"""simple docstring"""
								A_				 =						{"in_channels": 32, "out_channels": 32}

								A_				 =						self.dummy_input
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					Optional[int]	)      -> Any:







								"""simple docstring"""
								A_				 =						[0.4_4_0_4, 0.1_9_9_8, -0.9_8_8_6, -0.3_3_2_0, -0.3_1_2_8, -0.7_0_3_4, -0.6_9_5_5, -0.2_3_3_8, -0.3_1_3_7]
								super().test_output(_snake_case	)





class __lowerCAmelCase				(					_lowercase     ,				unittest.TestCase      ):




			"""simple docstring"""







			snake_case	      =				AttnUpDecoderBlockaD  # noqa F405
			snake_case	      =				"up"




			@property
			def      lowerCamelCase__     (				self						:					Tuple	)      -> List[Any]:







								"""simple docstring"""
								return super().get_dummy_input(include_temb=_snake_case	)




			def      lowerCamelCase__     (				self						:					int	)      -> List[str]:







								"""simple docstring"""
								A_				 =						{"in_channels": 32, "out_channels": 32}

								A_				 =						self.dummy_input
								return init_dict, inputs_dict






			def      lowerCamelCase__     (				self						:					int	)      -> int:







								"""simple docstring"""
								A_				 =						[0.6_7_3_8, 0.4_4_9_1, 0.1_0_5_5, 1.0_7_1_0, 0.7_3_1_6, 0.3_3_3_9, 0.3_3_5_2, 0.1_0_2_3, 0.3_5_6_8]
								super().test_output(_snake_case	)






"""simple docstring"""





from argparse import ArgumentParser, Namespace

from ..utils import logging
from . import BaseTransformersCLICommand
def 							A_     (__a				):

					'''simple docstring'''





					return ConvertCommand(
					    args.model_type				,   args.tf_checkpoint				,   args.pytorch_dump_output				,   args.config				,   args.finetuning_task_name				)


UpperCamelCase_					:						Tuple				= '''
transformers can only be used from the commandline to convert TensorFlow models in PyTorch, In that case, it requires
TensorFlow to be installed. Please see https://www.tensorflow.org/install/ for installation instructions.
'''




class __lowerCAmelCase				(					_lowercase      ):




			"""simple docstring"""







			@staticmethod
			def      lowerCamelCase__     (				_snake_case						:					ArgumentParser	)      -> Union[str, Any]:







								"""simple docstring"""
								A_				 =						parser.add_parser(
								    "convert"       ,   help="CLI tool to run convert model from original author checkpoints to Transformers PyTorch checkpoints."       ,   )
								train_parser.add_argument("--model_type"       ,   type=_snake_case       ,   required=_snake_case       ,   help="Model's type."	)
								train_parser.add_argument(
								    "--tf_checkpoint"       ,   type=_snake_case       ,   required=_snake_case       ,   help="TensorFlow checkpoint path or folder."	)
								train_parser.add_argument(
								    "--pytorch_dump_output"       ,   type=_snake_case       ,   required=_snake_case       ,   help="Path to the PyTorch saved model output."	)
								train_parser.add_argument("--config"       ,   type=_snake_case       ,   default=""       ,   help="Configuration file path or folder."	)
								train_parser.add_argument(
								    "--finetuning_task_name"       ,   type=_snake_case       ,   default=_snake_case       ,   help="Optional fine-tuning task name if the TF model was a finetuned model."       ,   )
								train_parser.set_defaults(func=_snake_case	)




			def __init__(				self						:					str       ,   _snake_case						:					str       ,   _snake_case						:					str       ,   _snake_case						:					str       ,   _snake_case						:					str       ,   _snake_case						:					str       ,   *_snake_case						:					Optional[int]       ,   )      -> Union[str, Any]:







								"""simple docstring"""
								A_				 =						logging.get_logger("transformers-cli/converting"	)

								self._logger.info(F'Loading model {model_type}'	)
								A_				 =						model_type
								A_				 =						tf_checkpoint
								A_				 =						pytorch_dump_output
								A_				 =						config
								A_				 =						finetuning_task_name






			def      lowerCamelCase__     (				self						:					Tuple	)      -> Dict:







								"""simple docstring"""
								if self._model_type == "albert":
													try:
																		from ..models.albert.convert_albert_original_tf_checkpoint_to_pytorch import (
																		    convert_tf_checkpoint_to_pytorch,
																		)
													except ImportError:
																		raise ImportError(_snake_case	)

													convert_tf_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								elif self._model_type == "bert":
													try:
																		from ..models.bert.convert_bert_original_tf_checkpoint_to_pytorch import (
																		    convert_tf_checkpoint_to_pytorch,
																		)
													except ImportError:
																		raise ImportError(_snake_case	)

													convert_tf_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								elif self._model_type == "funnel":
													try:
																		from ..models.funnel.convert_funnel_original_tf_checkpoint_to_pytorch import (
																		    convert_tf_checkpoint_to_pytorch,
																		)
													except ImportError:
																		raise ImportError(_snake_case	)

													convert_tf_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								elif self._model_type == "t5":
													try:
																		from ..models.ta.convert_ta_original_tf_checkpoint_to_pytorch import convert_tf_checkpoint_to_pytorch
													except ImportError:
																		raise ImportError(_snake_case	)

													convert_tf_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								elif self._model_type == "gpt":
													from ..models.openai.convert_openai_original_tf_checkpoint_to_pytorch import (
													    convert_openai_checkpoint_to_pytorch,
													)

													convert_openai_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								elif self._model_type == "transfo_xl":
													try:
																		from ..models.transfo_xl.convert_transfo_xl_original_tf_checkpoint_to_pytorch import (
																		    convert_transfo_xl_checkpoint_to_pytorch,
																		)
													except ImportError:
																		raise ImportError(_snake_case	)

													if "ckpt" in self._tf_checkpoint.lower():
																		A_				 =						self._tf_checkpoint
																		A_				 =						""
													else:
																		A_				 =						self._tf_checkpoint
																		A_				 =						""
													convert_transfo_xl_checkpoint_to_pytorch(
													    _snake_case       ,   self._config       ,   self._pytorch_dump_output       ,   _snake_case	)
								elif self._model_type == "gpt2":
													try:
																		from ..models.gpta.convert_gpta_original_tf_checkpoint_to_pytorch import (
																		    convert_gpta_checkpoint_to_pytorch,
																		)
													except ImportError:
																		raise ImportError(_snake_case	)

													convert_gpta_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								elif self._model_type == "xlnet":
													try:
																		from ..models.xlnet.convert_xlnet_original_tf_checkpoint_to_pytorch import (
																		    convert_xlnet_checkpoint_to_pytorch,
																		)
													except ImportError:
																		raise ImportError(_snake_case	)

													convert_xlnet_checkpoint_to_pytorch(
													    self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output       ,   self._finetuning_task_name	)
								elif self._model_type == "xlm":
													from ..models.xlm.convert_xlm_original_pytorch_checkpoint_to_pytorch import (
													    convert_xlm_checkpoint_to_pytorch,
													)

													convert_xlm_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._pytorch_dump_output	)
								elif self._model_type == "lxmert":
													from ..models.lxmert.convert_lxmert_original_tf_checkpoint_to_pytorch import (
													    convert_lxmert_checkpoint_to_pytorch,
													)

													convert_lxmert_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._pytorch_dump_output	)
								elif self._model_type == "rembert":
													from ..models.rembert.convert_rembert_tf_checkpoint_to_pytorch import (
													    convert_rembert_tf_checkpoint_to_pytorch,
													)

													convert_rembert_tf_checkpoint_to_pytorch(self._tf_checkpoint       ,   self._config       ,   self._pytorch_dump_output	)
								else:
													raise ValueError(
													    "--model_type should be selected in the list [bert, gpt, gpt2, t5, transfo_xl, xlnet, xlm, lxmert]"	)




