


import gc
import unittest

import numpy as np
import torch
from transformers import CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokenizer

from diffusers import PriorTransformer, UnCLIPPipeline, UnCLIPScheduler, UNetaDConditionModel, UNetaDModel
from diffusers.pipelines.unclip.text_proj import UnCLIPTextProjModel
from diffusers.utils import load_numpy, nightly, slow, torch_device
from diffusers.utils.testing_utils import enable_full_determinism, require_torch_gpu, skip_mps

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


enable_full_determinism()







class 					lowerCAmelCase__	(    a					,   unittest.TestCase):




     '''simple docstring'''
     __SCREAMING_SNAKE_CASE        =			UnCLIPPipeline
     __SCREAMING_SNAKE_CASE        =			TEXT_TO_IMAGE_PARAMS - {
         "negative_prompt",
         "height",
         "width",
         "negative_prompt_embeds",
         "guidance_scale",
         "prompt_embeds",
         "cross_attention_kwargs",
     }
     __SCREAMING_SNAKE_CASE        =			TEXT_TO_IMAGE_BATCH_PARAMS
     __SCREAMING_SNAKE_CASE        =			[
         "generator",
         "return_dict",
         "prior_num_inference_steps",
         "decoder_num_inference_steps",
         "super_res_num_inference_steps",
     ]
     __SCREAMING_SNAKE_CASE        =			False


     @property
     def 			_lowerCamelCase			(						self)      ->    int:
            return 3_2


     @property
     def 			_lowerCamelCase			(						self)      ->    int:
            return 3_2


     @property
     def 			_lowerCamelCase			(						self)      ->    List[Any]:
            return self.time_input_dim


     @property
     def 			_lowerCamelCase			(						self)      ->    Tuple:
            return self.time_input_dim * 4


     @property
     def 			_lowerCamelCase			(						self)      ->    Tuple:
            return 1_0_0


     @property
     def 			_lowerCamelCase			(						self)      ->    Union[str, Any]:
            _A				:	str       =			CLIPTokenizer.from_pretrained("hf-internal-testing/tiny-random-clip")
            return tokenizer


     @property
     def 			_lowerCamelCase			(						self)      ->    Union[str, Any]:
            torch.manual_seed(0)
            _A				:	Optional[Any]       =			CLIPTextConfig(
                bos_token_id=0			,						eos_token_id=2			,						hidden_size=self.text_embedder_hidden_size			,						projection_dim=self.text_embedder_hidden_size			,						intermediate_size=3_7			,						layer_norm_eps=1e-05			,						num_attention_heads=4			,						num_hidden_layers=5			,						pad_token_id=1			,						vocab_size=1_0_0_0			,						)
            return CLIPTextModelWithProjection(__lowerCamelCase)


     @property
     def 			_lowerCamelCase			(						self)      ->    str:
            torch.manual_seed(0)

            _A				:	List[Any]       =			{
                "num_attention_heads": 2,
                "attention_head_dim": 1_2,
                "embedding_dim": self.text_embedder_hidden_size,
                "num_layers": 1,
            }

            _A				:	List[Any]       =			PriorTransformer(**__lowerCamelCase)
            return model


     @property
     def 			_lowerCamelCase			(						self)      ->    List[str]:
            torch.manual_seed(0)

            _A				:	Tuple       =			{
                "clip_embeddings_dim": self.text_embedder_hidden_size,
                "time_embed_dim": self.time_embed_dim,
                "cross_attention_dim": self.cross_attention_dim,
            }

            _A				:	Union[str, Any]       =			UnCLIPTextProjModel(**__lowerCamelCase)
            return model


     @property
     def 			_lowerCamelCase			(						self)      ->    Any:
            torch.manual_seed(0)

            _A				:	int       =			{
                "sample_size": 3_2,
                # RGB in channels
                "in_channels": 3,
                # Out channels is double in channels because predicts mean and variance
                "out_channels": 6,
                "down_block_types": ("ResnetDownsampleBlock2D", "SimpleCrossAttnDownBlock2D"),
                "up_block_types": ("SimpleCrossAttnUpBlock2D", "ResnetUpsampleBlock2D"),
                "mid_block_type": "UNetMidBlock2DSimpleCrossAttn",
                "block_out_channels": (self.block_out_channels_a, self.block_out_channels_a * 2),
                "layers_per_block": 1,
                "cross_attention_dim": self.cross_attention_dim,
                "attention_head_dim": 4,
                "resnet_time_scale_shift": "scale_shift",
                "class_embed_type": "identity",
            }

            _A				:	Union[str, Any]       =			UNetaDConditionModel(**__lowerCamelCase)
            return model


     @property
     def 			_lowerCamelCase			(						self)      ->    List[Any]:
            return {
                "sample_size": 6_4,
                "layers_per_block": 1,
                "down_block_types": ("ResnetDownsampleBlock2D", "ResnetDownsampleBlock2D"),
                "up_block_types": ("ResnetUpsampleBlock2D", "ResnetUpsampleBlock2D"),
                "block_out_channels": (self.block_out_channels_a, self.block_out_channels_a * 2),
                "in_channels": 6,
                "out_channels": 3,
            }


     @property
     def 			_lowerCamelCase			(						self)      ->    List[Any]:
            torch.manual_seed(0)

            _A				:	str       =			UNetaDModel(**self.dummy_super_res_kwargs)
            return model


     @property
     def 			_lowerCamelCase			(						self)      ->    int:
            # seeded differently to get different unet than `self.dummy_super_res_first`
            torch.manual_seed(1)

            _A				:	List[str]       =			UNetaDModel(**self.dummy_super_res_kwargs)
            return model


     def 			_lowerCamelCase			(						self)      ->    Any:
            _A				:	Tuple       =			self.dummy_prior
            _A				:	str       =			self.dummy_decoder
            _A				:	Dict       =			self.dummy_text_proj
            _A				:	List[str]       =			self.dummy_text_encoder
            _A				:	List[Any]       =			self.dummy_tokenizer
            _A				:	Optional[Any]       =			self.dummy_super_res_first
            _A				:	List[Any]       =			self.dummy_super_res_last

            _A				:	Any       =			UnCLIPScheduler(
                variance_type="fixed_small_log"			,						prediction_type="sample"			,						num_train_timesteps=1_0_0_0			,						clip_sample_range=5.0			,						)

            _A				:	Optional[int]       =			UnCLIPScheduler(
                variance_type="learned_range"			,						prediction_type="epsilon"			,						num_train_timesteps=1_0_0_0			,						)

            _A				:	List[str]       =			UnCLIPScheduler(
                variance_type="fixed_small_log"			,						prediction_type="epsilon"			,						num_train_timesteps=1_0_0_0			,						)

            _A				:	Dict       =			{
                "prior": prior,
                "decoder": decoder,
                "text_proj": text_proj,
                "text_encoder": text_encoder,
                "tokenizer": tokenizer,
                "super_res_first": super_res_first,
                "super_res_last": super_res_last,
                "prior_scheduler": prior_scheduler,
                "decoder_scheduler": decoder_scheduler,
                "super_res_scheduler": super_res_scheduler,
            }

            return components


     def 			_lowerCamelCase			(						self			,						__lowerCamelCase			,						__lowerCamelCase=0)      ->    Union[str, Any]:
            if str(__lowerCamelCase).startswith("mps"):
                   _A				:	Optional[Any]       =			torch.manual_seed(__lowerCamelCase)
            else:
                   _A				:	List[str]       =			torch.Generator(device=__lowerCamelCase).manual_seed(__lowerCamelCase)
            _A				:	Optional[Any]       =			{
                "prompt": "horse",
                "generator": generator,
                "prior_num_inference_steps": 2,
                "decoder_num_inference_steps": 2,
                "super_res_num_inference_steps": 2,
                "output_type": "numpy",
            }
            return inputs


     def 			_lowerCamelCase			(						self)      ->    Tuple:
            _A				:	Dict       =			"cpu"

            _A				:	List[Any]       =			self.get_dummy_components()

            _A				:	Optional[Any]       =			self.pipeline_class(**__lowerCamelCase)
            _A				:	List[str]       =			pipe.to(__lowerCamelCase)

            pipe.set_progress_bar_config(disable=__lowerCamelCase)

            _A				:	int       =			pipe(**self.get_dummy_inputs(__lowerCamelCase))
            _A				:	Optional[Any]       =			output.images

            _A				:	Tuple       =			pipe(
                **self.get_dummy_inputs(__lowerCamelCase)			,						return_dict=__lowerCamelCase			,						)[0]

            _A				:	Union[str, Any]       =			image[0, -3:, -3:, -1]
            _A				:	List[Any]       =			image_from_tuple[0, -3:, -3:, -1]

            assert image.shape == (1, 6_4, 6_4, 3)

            _A				:	int       =			np.array(
                [
                    0.9_9_9_7,
                    0.9_9_8_8,
                    0.0_0_2_8,
                    0.9_9_9_7,
                    0.9_9_8_4,
                    0.9_9_6_5,
                    0.0_0_2_9,
                    0.9_9_8_6,
                    0.0_0_2_5,
                ])

            assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
            assert np.abs(image_from_tuple_slice.flatten() - expected_slice).max() < 1e-2


     def 			_lowerCamelCase			(						self)      ->    Union[str, Any]:
            _A				:	int       =			torch.device("cpu")







            class 					lowerCAmelCase__	:




                 '''simple docstring'''
                 __SCREAMING_SNAKE_CASE        =			1




            _A				:	List[str]       =			self.get_dummy_components()

            _A				:	Union[str, Any]       =			self.pipeline_class(**__lowerCamelCase)
            _A				:	Optional[int]       =			pipe.to(__lowerCamelCase)

            _A				:	Tuple       =			components["prior"]
            _A				:	str       =			components["decoder"]
            _A				:	Dict       =			components["super_res_first"]
            _A				:	List[Any]       =			components["tokenizer"]
            _A				:	Optional[int]       =			components["text_encoder"]

            _A				:	str       =			torch.Generator(device=__lowerCamelCase).manual_seed(0)
            _A				:	int       =			prior.dtype
            _A				:	Dict       =			1

            _A				:	List[str]       =			(batch_size, prior.config.embedding_dim)
            _A				:	List[str]       =			pipe.prepare_latents(
                __lowerCamelCase			,						dtype=__lowerCamelCase			,						device=__lowerCamelCase			,						generator=__lowerCamelCase			,						latents=__lowerCamelCase			,						scheduler=DummyScheduler())
            _A				:	int       =			(batch_size, decoder.config.in_channels, decoder.config.sample_size, decoder.config.sample_size)
            _A				:	List[str]       =			pipe.prepare_latents(
                __lowerCamelCase			,						dtype=__lowerCamelCase			,						device=__lowerCamelCase			,						generator=__lowerCamelCase			,						latents=__lowerCamelCase			,						scheduler=DummyScheduler())

            _A				:	Any       =			(
                batch_size,
                super_res_first.config.in_channels // 2,
                super_res_first.config.sample_size,
                super_res_first.config.sample_size,
            )
            _A				:	Optional[int]       =			pipe.prepare_latents(
                __lowerCamelCase			,						dtype=__lowerCamelCase			,						device=__lowerCamelCase			,						generator=__lowerCamelCase			,						latents=__lowerCamelCase			,						scheduler=DummyScheduler())

            pipe.set_progress_bar_config(disable=__lowerCamelCase)

            _A				:	List[str]       =			"this is a prompt example"

            _A				:	Any       =			torch.Generator(device=__lowerCamelCase).manual_seed(0)
            _A				:	str       =			pipe(
                [prompt]			,						generator=__lowerCamelCase			,						prior_num_inference_steps=2			,						decoder_num_inference_steps=2			,						super_res_num_inference_steps=2			,						prior_latents=__lowerCamelCase			,						decoder_latents=__lowerCamelCase			,						super_res_latents=__lowerCamelCase			,						output_type="np"			,						)
            _A				:	Union[str, Any]       =			output.images

            _A				:	Optional[Any]       =			tokenizer(
                __lowerCamelCase			,						padding="max_length"			,						max_length=tokenizer.model_max_length			,						return_tensors="pt"			,						)
            _A				:	Any       =			text_encoder(text_inputs.input_ids)
            _A				:	List[str]       =			text_inputs.attention_mask

            _A				:	Union[str, Any]       =			torch.Generator(device=__lowerCamelCase).manual_seed(0)
            _A				:	int       =			pipe(
                generator=__lowerCamelCase			,						prior_num_inference_steps=2			,						decoder_num_inference_steps=2			,						super_res_num_inference_steps=2			,						prior_latents=__lowerCamelCase			,						decoder_latents=__lowerCamelCase			,						super_res_latents=__lowerCamelCase			,						text_model_output=__lowerCamelCase			,						text_attention_mask=__lowerCamelCase			,						output_type="np"			,						)[0]

            # make sure passing text embeddings manually is identical
            assert np.abs(image - image_from_text).max() < 1e-4


     @skip_mps
     def 			_lowerCamelCase			(						self)      ->    Optional[int]:
            _A				:	str       =			torch_device == "cpu"

            self._test_attention_slicing_forward_pass(test_max_difference=__lowerCamelCase			,						expected_max_diff=0.0_1)


     @skip_mps
     def 			_lowerCamelCase			(						self)      ->    List[str]:
            _A				:	Optional[Any]       =			torch_device == "cpu"
            _A				:	Optional[int]       =			True
            _A				:	List[Any]       =			[
                "prior_num_inference_steps",
                "decoder_num_inference_steps",
                "super_res_num_inference_steps",
            ]

            self._test_inference_batch_single_identical(
                test_max_difference=__lowerCamelCase			,						relax_max_difference=__lowerCamelCase			,						additional_params_copy_to_batched_inputs=__lowerCamelCase			,						)


     def 			_lowerCamelCase			(						self)      ->    Optional[int]:
            _A				:	Union[str, Any]       =			[
                "prior_num_inference_steps",
                "decoder_num_inference_steps",
                "super_res_num_inference_steps",
            ]

            if torch_device == "mps":
                   # TODO: MPS errors with larger batch sizes
                   _A				:	Union[str, Any]       =			[2, 3]
                   self._test_inference_batch_consistent(
                       batch_sizes=__lowerCamelCase			,						additional_params_copy_to_batched_inputs=__lowerCamelCase			,						)
            else:
                   self._test_inference_batch_consistent(
                       additional_params_copy_to_batched_inputs=__lowerCamelCase)


     @skip_mps
     def 			_lowerCamelCase			(						self)      ->    int:
            return super().test_dict_tuple_outputs_equivalent()


     @skip_mps
     def 			_lowerCamelCase			(						self)      ->    Optional[Any]:
            return super().test_save_load_local()


     @skip_mps
     def 			_lowerCamelCase			(						self)      ->    Tuple:
            return super().test_save_load_optional_components()







@nightly
class 					lowerCAmelCase__	(    unittest.TestCase):




     '''simple docstring'''


     def 			_lowerCamelCase			(						self)      ->    Optional[Any]:
            # clean up the VRAM after each test
            super().tearDown()
            gc.collect()
            torch.cuda.empty_cache()


     def 			_lowerCamelCase			(						self)      ->    Dict:
            _A				:	List[Any]       =			load_numpy(
                "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
                "/unclip/karlo_v1_alpha_horse_cpu.npy")

            _A				:	Optional[Any]       =			UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha")
            pipeline.set_progress_bar_config(disable=__lowerCamelCase)

            _A				:	int       =			torch.manual_seed(0)
            _A				:	Tuple       =			pipeline(
                "horse"			,						num_images_per_prompt=1			,						generator=__lowerCamelCase			,						output_type="np"			,						)

            _A				:	int       =			output.images[0]

            assert image.shape == (2_5_6, 2_5_6, 3)
            assert np.abs(expected_image - image).max() < 1e-1







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




     '''simple docstring'''


     def 			_lowerCamelCase			(						self)      ->    Dict:
            # clean up the VRAM after each test
            super().tearDown()
            gc.collect()
            torch.cuda.empty_cache()


     def 			_lowerCamelCase			(						self)      ->    Union[str, Any]:
            _A				:	Dict       =			load_numpy(
                "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
                "/unclip/karlo_v1_alpha_horse_fp16.npy")

            _A				:	Any       =			UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha"			,						torch_dtype=torch.floataa)
            _A				:	Optional[Any]       =			pipeline.to(__lowerCamelCase)
            pipeline.set_progress_bar_config(disable=__lowerCamelCase)

            _A				:	int       =			torch.Generator(device="cpu").manual_seed(0)
            _A				:	Union[str, Any]       =			pipeline(
                "horse"			,						generator=__lowerCamelCase			,						output_type="np"			,						)

            _A				:	Dict       =			output.images[0]

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

            assert_mean_pixel_difference(__lowerCamelCase			,						__lowerCamelCase)


     def 			_lowerCamelCase			(						self)      ->    Tuple:
            torch.cuda.empty_cache()
            torch.cuda.reset_max_memory_allocated()
            torch.cuda.reset_peak_memory_stats()

            _A				:	int       =			UnCLIPPipeline.from_pretrained("kakaobrain/karlo-v1-alpha"			,						torch_dtype=torch.floataa)
            _A				:	List[str]       =			pipe.to(__lowerCamelCase)
            pipe.set_progress_bar_config(disable=__lowerCamelCase)
            pipe.enable_attention_slicing()
            pipe.enable_sequential_cpu_offload()

            _A				:	Optional[int]       =			pipe(
                "horse"			,						num_images_per_prompt=1			,						prior_num_inference_steps=2			,						decoder_num_inference_steps=2			,						super_res_num_inference_steps=2			,						output_type="np"			,						)

            _A				:	Dict       =			torch.cuda.max_memory_allocated()
            # make sure that less than 7 GB is allocated
            assert mem_bytes < 7 * 1_0**9




import unittest

import numpy as np

from transformers import BlipTextConfig
from transformers.testing_utils import require_torch, slow, torch_device
from transformers.utils import is_torch_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask


if is_torch_available():
    import torch

    from transformers import BlipTextModel
    from transformers.models.blip.modeling_blip import BLIP_PRETRAINED_MODEL_ARCHIVE_LIST







class 					lowerCAmelCase__	:




     '''simple docstring'''


     def __init__(						self			,						__lowerCamelCase			,						__lowerCamelCase=1_2			,						__lowerCamelCase=7			,						__lowerCamelCase=True			,						__lowerCamelCase=True			,						__lowerCamelCase=True			,						__lowerCamelCase=9_9			,						__lowerCamelCase=3_2			,						__lowerCamelCase=3_2			,						__lowerCamelCase=5			,						__lowerCamelCase=4			,						__lowerCamelCase=3_7			,						__lowerCamelCase=0.1			,						__lowerCamelCase=0.1			,						__lowerCamelCase=5_1_2			,						__lowerCamelCase=0.0_2			,						__lowerCamelCase=0			,						__lowerCamelCase=None			,						)      ->    str:
            _A				:	Optional[int]       =			parent
            _A				:	Optional[int]       =			batch_size
            _A				:	Optional[int]       =			seq_length
            _A				:	Dict       =			is_training
            _A				:	Union[str, Any]       =			use_input_mask
            _A				:	Optional[int]       =			use_labels
            _A				:	Any       =			vocab_size
            _A				:	Dict       =			hidden_size
            _A				:	Optional[Any]       =			projection_dim
            _A				:	Union[str, Any]       =			num_hidden_layers
            _A				:	Tuple       =			num_attention_heads
            _A				:	List[str]       =			intermediate_size
            _A				:	Any       =			dropout
            _A				:	List[str]       =			attention_dropout
            _A				:	str       =			max_position_embeddings
            _A				:	List[Any]       =			initializer_range
            _A				:	int       =			scope
            _A				:	List[str]       =			bos_token_id


     def 			_lowerCamelCase			(						self)      ->    List[str]:
            _A				:	Tuple       =			ids_tensor([self.batch_size, self.seq_length]			,						self.vocab_size)

            _A				:	str       =			None
            if self.use_input_mask:
                   _A				:	Union[str, Any]       =			random_attention_mask([self.batch_size, self.seq_length])

            if input_mask is not None:
                   _A   ,      _A				:	int       =			input_mask.shape
                   _A				:	Optional[Any]       =			np.random.randint(1			,						seq_length - 1			,						size=(batch_size,))
                   for batch_idx, start_index in enumerate(__lowerCamelCase):
                          _A				:	Tuple       =			1
                          _A				:	List[str]       =			0

            _A				:	str       =			self.get_config()

            return config, input_ids, input_mask


     def 			_lowerCamelCase			(						self)      ->    Optional[int]:
            return BlipTextConfig(
                vocab_size=self.vocab_size			,						hidden_size=self.hidden_size			,						projection_dim=self.projection_dim			,						num_hidden_layers=self.num_hidden_layers			,						num_attention_heads=self.num_attention_heads			,						intermediate_size=self.intermediate_size			,						dropout=self.dropout			,						attention_dropout=self.attention_dropout			,						max_position_embeddings=self.max_position_embeddings			,						initializer_range=self.initializer_range			,						bos_token_id=self.bos_token_id			,						)


     def 			_lowerCamelCase			(						self			,						__lowerCamelCase			,						__lowerCamelCase			,						__lowerCamelCase)      ->    List[str]:
            _A				:	int       =			BlipTextModel(config=__lowerCamelCase)
            model.to(__lowerCamelCase)
            model.eval()
            with torch.no_grad():
                   _A				:	int       =			model(__lowerCamelCase			,						attention_mask=__lowerCamelCase)
                   _A				:	List[str]       =			model(__lowerCamelCase)
            self.parent.assertEqual(result.last_hidden_state.shape			,						(self.batch_size, self.seq_length, self.hidden_size))
            self.parent.assertEqual(result.pooler_output.shape			,						(self.batch_size, self.hidden_size))


     def 			_lowerCamelCase			(						self)      ->    Any:
            _A				:	Dict       =			self.prepare_config_and_inputs()
            _A   ,      _A   ,      _A				:	str       =			config_and_inputs
            _A				:	List[str]       =			{"input_ids": input_ids, "attention_mask": input_mask}
            return config, inputs_dict







@require_torch
class 					lowerCAmelCase__	(    a					,   unittest.TestCase):




     '''simple docstring'''
     __SCREAMING_SNAKE_CASE        =			(BlipTextModel,) if is_torch_available() else ()
     __SCREAMING_SNAKE_CASE        =			False
     __SCREAMING_SNAKE_CASE        =			False
     __SCREAMING_SNAKE_CASE        =			False


     def 			_lowerCamelCase			(						self)      ->    Dict:
            _A				:	Optional[Any]       =			BlipTextModelTester(self)
            _A				:	List[str]       =			ConfigTester(self			,						config_class=__lowerCamelCase			,						hidden_size=3_7)


     def 			_lowerCamelCase			(						self)      ->    List[Any]:
            self.config_tester.run_common_tests()


     def 			_lowerCamelCase			(						self)      ->    Union[str, Any]:
            _A				:	Optional[Any]       =			self.model_tester.prepare_config_and_inputs()
            self.model_tester.create_and_check_model(*__lowerCamelCase)


     def 			_lowerCamelCase			(						self)      ->    Optional[Any]:
            pass


     def 			_lowerCamelCase			(						self)      ->    Dict:
            pass


     @unittest.skip(reason="Blip does not use inputs_embeds")
     def 			_lowerCamelCase			(						self)      ->    str:
            pass


     @unittest.skip(reason="BlipTextModel has no base class and is not available in MODEL_MAPPING")
     def 			_lowerCamelCase			(						self)      ->    Optional[Any]:
            pass


     @unittest.skip(reason="BlipTextModel has no base class and is not available in MODEL_MAPPING")
     def 			_lowerCamelCase			(						self)      ->    str:
            pass


     @slow
     def 			_lowerCamelCase			(						self)      ->    Optional[Any]:
            for model_name in BLIP_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                   _A				:	Union[str, Any]       =			BlipTextModel.from_pretrained(__lowerCamelCase)
                   self.assertIsNotNone(__lowerCamelCase)


     def 			_lowerCamelCase			(						self)      ->    Optional[int]:
            super().test_pt_tf_model_equivalence(allow_missing_keys=__lowerCamelCase)
