

from typing import Any, Callable, Dict, List, Optional, Union

import PIL.Image
import torch
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer

from diffusers import (
    AutoencoderKL,
    DDIMScheduler,
    DiffusionPipeline,
    LMSDiscreteScheduler,
    PNDMScheduler,
    StableDiffusionImgaImgPipeline,
    StableDiffusionInpaintPipelineLegacy,
    StableDiffusionPipeline,
    UNetaDConditionModel,
)
from diffusers.configuration_utils import FrozenDict
from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
from diffusers.utils import deprecate, logging


_snake_case			=						logging.get_logger(__name__)  # pylint: disable=invalid-name




class 					_snake_case						(						snake_case_				):
					lowerCamelCase__:		Any  =     ["safety_checker", "feature_extractor"]
					def __init__(  self:				List[Any]	,  __lowerCamelCase:				str	,  __lowerCamelCase:				Optional[int]	,  __lowerCamelCase:				str	,  __lowerCamelCase:				List[Any]	,  __lowerCamelCase:				Tuple	,  __lowerCamelCase:				Dict	,  __lowerCamelCase:				str	,  __lowerCamelCase:				str = True	,  )    ->				List[Any]:
												super().__init__()
												if hasattr(scheduler.config	,  "steps_offset"     ) and scheduler.config.steps_offset != 1:
																			__UpperCAmelCase						:			List[str]         =   (
																			    f'''The configuration file of this scheduler: {scheduler} is outdated. `steps_offset`'''
																			    f''' should be set to 1 instead of {scheduler.config.steps_offset}. Please make sure '''
																			    "to update the config accordingly as leaving `steps_offset` might led to incorrect results"
																			    " in future versions. If you have downloaded this checkpoint from the Hugging Face Hub,"
																			    " it would be very nice if you could open a Pull request for the `scheduler/scheduler_config.json`"
																			    " file"
																			)
																			deprecate("steps_offset!=1"	,  "1.0.0"	,  __lowerCamelCase	,  standard_warn=__lowerCamelCase     )
																			__UpperCAmelCase						:			Union[str, Any]         =   dict(scheduler.config     )
																			__UpperCAmelCase						:			Tuple         =   1
																			__UpperCAmelCase						:			List[Any]         =   FrozenDict(__lowerCamelCase     )

												self.register_modules(
												    vae=__lowerCamelCase	,  text_encoder=__lowerCamelCase	,  tokenizer=__lowerCamelCase	,  unet=__lowerCamelCase	,  scheduler=__lowerCamelCase	,  safety_checker=__lowerCamelCase	,  feature_extractor=__lowerCamelCase	,  )
												self.register_to_config(requires_safety_checker=__lowerCamelCase     )
					@property
					def    _lowerCamelCase (  self:				str     )    ->				Dict[str, Any]:
												return {k: getattr(self	,  __lowerCamelCase     ) for k in self.config.keys() if not k.startswith("_"     )}
					def    _lowerCamelCase (  self:				int	,  __lowerCamelCase:				List[str] = "auto"     )    ->				Union[str, Any]:
												if slice_size == "auto":
																			# half the attention head size is usually a good trade-off between
																			# speed and memory
																			__UpperCAmelCase						:			Optional[int]         =   self.unet.config.attention_head_dim // 2
												self.unet.set_attention_slice(__lowerCamelCase     )
					def    _lowerCamelCase (  self:				Union[str, Any]     )    ->				Any:
												self.enable_attention_slicing(__lowerCamelCase     )
					@torch.no_grad()
					def    _lowerCamelCase (  self:				Tuple	,  __lowerCamelCase:				Any	,  __lowerCamelCase:				Union[str, Any]	,  __lowerCamelCase:				List[Any]	,  __lowerCamelCase:				List[str] = 0.8	,  __lowerCamelCase:				Optional[int] = 50	,  __lowerCamelCase:				Union[str, Any] = 7.5	,  __lowerCamelCase:				Dict = None	,  __lowerCamelCase:				List[str] = 1	,  __lowerCamelCase:				str = 0.0	,  __lowerCamelCase:				Tuple = None	,  __lowerCamelCase:				List[Any] = "pil"	,  __lowerCamelCase:				str = True	,  __lowerCamelCase:				List[Any] = None	,  __lowerCamelCase:				int = 1	,  )    ->				Union[str, Any]:
												# For more information on how this function works, please see: https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion#diffusers.StableDiffusionImg2ImgPipeline
												return StableDiffusionInpaintPipelineLegacy(**self.components     )(
												    prompt=__lowerCamelCase	,  image=__lowerCamelCase	,  mask_image=__lowerCamelCase	,  strength=__lowerCamelCase	,  num_inference_steps=__lowerCamelCase	,  guidance_scale=__lowerCamelCase	,  negative_prompt=__lowerCamelCase	,  num_images_per_prompt=__lowerCamelCase	,  eta=__lowerCamelCase	,  generator=__lowerCamelCase	,  output_type=__lowerCamelCase	,  return_dict=__lowerCamelCase	,  callback=__lowerCamelCase	,  )
					@torch.no_grad()
					def    _lowerCamelCase (  self:				Union[str, Any]	,  __lowerCamelCase:				Union[str, Any]	,  __lowerCamelCase:				List[str]	,  __lowerCamelCase:				int = 0.8	,  __lowerCamelCase:				Any = 50	,  __lowerCamelCase:				Dict = 7.5	,  __lowerCamelCase:				Any = None	,  __lowerCamelCase:				List[str] = 1	,  __lowerCamelCase:				Union[str, Any] = 0.0	,  __lowerCamelCase:				Dict = None	,  __lowerCamelCase:				Any = "pil"	,  __lowerCamelCase:				Optional[Any] = True	,  __lowerCamelCase:				Any = None	,  __lowerCamelCase:				List[str] = 1	,  **__lowerCamelCase:				List[Any]	,  )    ->				Optional[Any]:
												# For more information on how this function works, please see: https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion#diffusers.StableDiffusionImg2ImgPipeline
												return StableDiffusionImgaImgPipeline(**self.components     )(
												    prompt=__lowerCamelCase	,  image=__lowerCamelCase	,  strength=__lowerCamelCase	,  num_inference_steps=__lowerCamelCase	,  guidance_scale=__lowerCamelCase	,  negative_prompt=__lowerCamelCase	,  num_images_per_prompt=__lowerCamelCase	,  eta=__lowerCamelCase	,  generator=__lowerCamelCase	,  output_type=__lowerCamelCase	,  return_dict=__lowerCamelCase	,  callback=__lowerCamelCase	,  callback_steps=__lowerCamelCase	,  )





					@torch.no_grad()
					def    _lowerCamelCase (  self:				str	,  __lowerCamelCase:				Tuple	,  __lowerCamelCase:				Dict = 5_12	,  __lowerCamelCase:				int = 5_12	,  __lowerCamelCase:				str = 50	,  __lowerCamelCase:				Any = 7.5	,  __lowerCamelCase:				List[Any] = None	,  __lowerCamelCase:				Optional[int] = 1	,  __lowerCamelCase:				Dict = 0.0	,  __lowerCamelCase:				Dict = None	,  __lowerCamelCase:				Dict = None	,  __lowerCamelCase:				Optional[int] = "pil"	,  __lowerCamelCase:				Optional[int] = True	,  __lowerCamelCase:				str = None	,  __lowerCamelCase:				List[str] = 1	,  )    ->				Any:
												# For more information on how this function https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion#diffusers.StableDiffusionPipeline
												return StableDiffusionPipeline(**self.components     )(
												    prompt=__lowerCamelCase	,  height=__lowerCamelCase	,  width=__lowerCamelCase	,  num_inference_steps=__lowerCamelCase	,  guidance_scale=__lowerCamelCase	,  negative_prompt=__lowerCamelCase	,  num_images_per_prompt=__lowerCamelCase	,  eta=__lowerCamelCase	,  generator=__lowerCamelCase	,  latents=__lowerCamelCase	,  output_type=__lowerCamelCase	,  return_dict=__lowerCamelCase	,  callback=__lowerCamelCase	,  callback_steps=__lowerCamelCase	,  )





import inspect
import unittest

from transformers import SwinaSRConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
	import torch
	from torch import nn

	from transformers import SwinaSRForImageSuperResolution, SwinaSRModel
	from transformers.models.swinasr.modeling_swinasr import SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST

if is_vision_available():
	from PIL import Image

	from transformers import SwinaSRImageProcessor




class 					_snake_case						:
					def __init__(  self:				Tuple	,  __lowerCamelCase:				Tuple	,  __lowerCamelCase:				Union[str, Any]=13	,  __lowerCamelCase:				str=32	,  __lowerCamelCase:				Dict=1	,  __lowerCamelCase:				List[Any]=3	,  __lowerCamelCase:				List[Any]=16	,  __lowerCamelCase:				Any=[1, 2, 1]	,  __lowerCamelCase:				List[str]=[2, 2, 4]	,  __lowerCamelCase:				Tuple=2	,  __lowerCamelCase:				Tuple=2.0	,  __lowerCamelCase:				Optional[Any]=True	,  __lowerCamelCase:				List[str]=0.0	,  __lowerCamelCase:				str=0.0	,  __lowerCamelCase:				List[str]=0.1	,  __lowerCamelCase:				Optional[Any]="gelu"	,  __lowerCamelCase:				List[str]=False	,  __lowerCamelCase:				int=True	,  __lowerCamelCase:				List[str]=0.02	,  __lowerCamelCase:				Dict=1e-5	,  __lowerCamelCase:				Dict=True	,  __lowerCamelCase:				List[Any]=None	,  __lowerCamelCase:				Tuple=False	,  __lowerCamelCase:				Optional[Any]=2	,  )    ->				Union[str, Any]:
												__UpperCAmelCase						:			Any         =   parent
												__UpperCAmelCase						:			Optional[int]         =   batch_size
												__UpperCAmelCase						:			Union[str, Any]         =   image_size
												__UpperCAmelCase						:			int         =   patch_size
												__UpperCAmelCase						:			str         =   num_channels
												__UpperCAmelCase						:			Any         =   embed_dim
												__UpperCAmelCase						:			str         =   depths
												__UpperCAmelCase						:			Optional[int]         =   num_heads
												__UpperCAmelCase						:			Any         =   window_size
												__UpperCAmelCase						:			Tuple         =   mlp_ratio
												__UpperCAmelCase						:			List[str]         =   qkv_bias
												__UpperCAmelCase						:			int         =   hidden_dropout_prob
												__UpperCAmelCase						:			Dict         =   attention_probs_dropout_prob
												__UpperCAmelCase						:			Union[str, Any]         =   drop_path_rate
												__UpperCAmelCase						:			Union[str, Any]         =   hidden_act
												__UpperCAmelCase						:			Optional[int]         =   use_absolute_embeddings
												__UpperCAmelCase						:			Any         =   patch_norm
												__UpperCAmelCase						:			str         =   layer_norm_eps
												__UpperCAmelCase						:			Any         =   initializer_range
												__UpperCAmelCase						:			List[str]         =   is_training
												__UpperCAmelCase						:			Union[str, Any]         =   scope
												__UpperCAmelCase						:			Optional[int]         =   use_labels
												__UpperCAmelCase						:			int         =   upscale

												# here we set some attributes to make tests pass
												__UpperCAmelCase						:			Union[str, Any]         =   len(__lowerCamelCase     )
												__UpperCAmelCase						:			Optional[Any]         =   embed_dim
												__UpperCAmelCase						:			List[Any]         =   (image_size // patch_size) ** 2
					def    _lowerCamelCase (  self:				List[Any]     )    ->				List[Any]:
												__UpperCAmelCase						:			Any         =   floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]     )

												__UpperCAmelCase						:			Union[str, Any]         =   None
												if self.use_labels:
																			__UpperCAmelCase						:			Any         =   ids_tensor([self.batch_size]	,  self.type_sequence_label_size     )

												__UpperCAmelCase						:			Optional[Any]         =   self.get_config()

												return config, pixel_values, labels
					def    _lowerCamelCase (  self:				List[Any]     )    ->				Tuple:
												return SwinaSRConfig(
												    image_size=self.image_size	,  patch_size=self.patch_size	,  num_channels=self.num_channels	,  embed_dim=self.embed_dim	,  depths=self.depths	,  num_heads=self.num_heads	,  window_size=self.window_size	,  mlp_ratio=self.mlp_ratio	,  qkv_bias=self.qkv_bias	,  hidden_dropout_prob=self.hidden_dropout_prob	,  attention_probs_dropout_prob=self.attention_probs_dropout_prob	,  drop_path_rate=self.drop_path_rate	,  hidden_act=self.hidden_act	,  use_absolute_embeddings=self.use_absolute_embeddings	,  path_norm=self.patch_norm	,  layer_norm_eps=self.layer_norm_eps	,  initializer_range=self.initializer_range	,  upscale=self.upscale	,  )
					def    _lowerCamelCase (  self:				List[Any]	,  __lowerCamelCase:				List[Any]	,  __lowerCamelCase:				Any	,  __lowerCamelCase:				List[Any]     )    ->				Optional[int]:
												__UpperCAmelCase						:			str         =   SwinaSRModel(config=__lowerCamelCase     )
												model.to(__lowerCamelCase     )
												model.eval()
												__UpperCAmelCase						:			List[str]         =   model(__lowerCamelCase     )

												self.parent.assertEqual(
												    result.last_hidden_state.shape	,  (self.batch_size, self.embed_dim, self.image_size, self.image_size)     )
					def    _lowerCamelCase (  self:				Union[str, Any]	,  __lowerCamelCase:				Optional[int]	,  __lowerCamelCase:				Tuple	,  __lowerCamelCase:				int     )    ->				Union[str, Any]:
												__UpperCAmelCase						:			Dict         =   SwinaSRForImageSuperResolution(__lowerCamelCase     )
												model.to(__lowerCamelCase     )
												model.eval()
												__UpperCAmelCase						:			List[str]         =   model(__lowerCamelCase     )

												__UpperCAmelCase						:			Optional[Any]         =   self.image_size * self.upscale
												self.parent.assertEqual(
												    result.reconstruction.shape	,  (self.batch_size, self.num_channels, expected_image_size, expected_image_size)     )





					def    _lowerCamelCase (  self:				Any     )    ->				Dict:
												__UpperCAmelCase						:			List[Any]         =   self.prepare_config_and_inputs()
												__UpperCAmelCase    ,	__UpperCAmelCase    ,	__UpperCAmelCase						:			Any         =   config_and_inputs
												__UpperCAmelCase						:			Dict         =   {"pixel_values": pixel_values}
												return config, inputs_dict




@require_torch
class 					_snake_case						(						_lowercase					,      _lowercase					,      unittest.TestCase				):
					lowerCamelCase__:		List[str]  =     (SwinaSRModel, SwinaSRForImageSuperResolution) if is_torch_available() else ()
					lowerCamelCase__:		List[Any]  =     {"feature-extraction": SwinaSRModel} if is_torch_available() else {}

					lowerCamelCase__:		List[Any]  =     False
					lowerCamelCase__:		Any  =     False
					lowerCamelCase__:		int  =     False
					lowerCamelCase__:		Optional[Any]  =     False
					lowerCamelCase__:		str  =     False
					def    _lowerCamelCase (  self:				List[Any]     )    ->				Union[str, Any]:
												__UpperCAmelCase						:			Union[str, Any]         =   SwinaSRModelTester(self     )
												__UpperCAmelCase						:			Optional[int]         =   ConfigTester(self	,  config_class=__lowerCamelCase	,  embed_dim=37     )
					def    _lowerCamelCase (  self:				List[str]     )    ->				List[Any]:
												self.config_tester.create_and_test_config_to_json_string()
												self.config_tester.create_and_test_config_to_json_file()
												self.config_tester.create_and_test_config_from_and_save_pretrained()
												self.config_tester.create_and_test_config_with_num_labels()
												self.config_tester.check_config_can_be_init_without_params()
												self.config_tester.check_config_arguments_init()
					def    _lowerCamelCase (  self:				Union[str, Any]     )    ->				Optional[Any]:
												__UpperCAmelCase						:			Optional[int]         =   self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_model(*__lowerCamelCase     )
					def    _lowerCamelCase (  self:				Optional[Any]     )    ->				List[str]:
												__UpperCAmelCase						:			Union[str, Any]         =   self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_for_image_super_resolution(*__lowerCamelCase     )
					@unittest.skip(reason="Got `CUDA error: misaligned address` with PyTorch 2.0.0."     )
					def    _lowerCamelCase (  self:				str     )    ->				List[Any]:
												pass
					@unittest.skip(reason="Swin2SR does not use inputs_embeds"     )
					def    _lowerCamelCase (  self:				str     )    ->				Optional[Any]:
												pass
					@unittest.skip(reason="Swin2SR does not support training yet"     )
					def    _lowerCamelCase (  self:				int     )    ->				Dict:
												pass
					@unittest.skip(reason="Swin2SR does not support training yet"     )
					def    _lowerCamelCase (  self:				List[str]     )    ->				Optional[Any]:
												pass
					def    _lowerCamelCase (  self:				Optional[Any]     )    ->				Optional[int]:
												__UpperCAmelCase    ,	__UpperCAmelCase						:			Union[str, Any]         =   self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																			__UpperCAmelCase						:			Dict         =   model_class(__lowerCamelCase     )
																			self.assertIsInstance(model.get_input_embeddings()	,  (nn.Module)     )
																			__UpperCAmelCase						:			Union[str, Any]         =   model.get_output_embeddings()
																			self.assertTrue(x is None or isinstance(__lowerCamelCase	,  nn.Linear     )     )
					def    _lowerCamelCase (  self:				List[Any]     )    ->				Union[str, Any]:
												__UpperCAmelCase    ,	__UpperCAmelCase						:			Dict         =   self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																			__UpperCAmelCase						:			List[Any]         =   model_class(__lowerCamelCase     )
																			__UpperCAmelCase						:			Dict         =   inspect.signature(model.forward     )
																			# signature.parameters is an OrderedDict => so arg_names order is deterministic
																			__UpperCAmelCase						:			int         =   [*signature.parameters.keys()]

																			__UpperCAmelCase						:			int         =   ["pixel_values"]
																			self.assertListEqual(arg_names[:1]	,  __lowerCamelCase     )
					@slow
					def    _lowerCamelCase (  self:				List[Any]     )    ->				Union[str, Any]:
												for model_name in SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																			__UpperCAmelCase						:			Union[str, Any]         =   SwinaSRModel.from_pretrained(__lowerCamelCase     )
																			self.assertIsNotNone(__lowerCamelCase     )
					def    _lowerCamelCase (  self:				Dict     )    ->				Optional[Any]:
												__UpperCAmelCase    ,	__UpperCAmelCase						:			Any         =   self.model_tester.prepare_config_and_inputs_for_common()

												__UpperCAmelCase						:			Union[str, Any]         =   _config_zero_init(__lowerCamelCase     )
												for model_class in self.all_model_classes:
																			__UpperCAmelCase						:			Tuple         =   model_class(config=__lowerCamelCase     )
																			for name, param in model.named_parameters():
																										if "logit_scale" in name:
																																	continue
																										if param.requires_grad:
																																	self.assertIn(
																																	    ((param.data.mean() * 1e9).round() / 1e9).item()	,  [0.0, 1.0]	,  msg=f'''Parameter {name} of model {model_class} seems not properly initialized'''	,  )





					def    _lowerCamelCase (  self:				Optional[int]     )    ->				List[Any]:
												__UpperCAmelCase    ,	__UpperCAmelCase						:			int         =   self.model_tester.prepare_config_and_inputs_for_common()
												__UpperCAmelCase						:			List[Any]         =   True

												for model_class in self.all_model_classes:
																			__UpperCAmelCase						:			Optional[int]         =   True
																			__UpperCAmelCase						:			str         =   False
																			__UpperCAmelCase						:			int         =   True
																			__UpperCAmelCase						:			Dict         =   model_class(__lowerCamelCase     )
																			model.to(__lowerCamelCase     )
																			model.eval()
																			with torch.no_grad():
																										__UpperCAmelCase						:			Optional[int]         =   model(**self._prepare_for_class(__lowerCamelCase	,  __lowerCamelCase     )     )
																			__UpperCAmelCase						:			Any         =   outputs.attentions
																			__UpperCAmelCase						:			Union[str, Any]         =   len(self.model_tester.depths     )
																			self.assertEqual(len(__lowerCamelCase     )	,  __lowerCamelCase     )

																			# check that output_attentions also work using config
																			del inputs_dict["output_attentions"]
																			__UpperCAmelCase						:			List[str]         =   True
																			__UpperCAmelCase						:			Any         =   config.window_size**2
																			__UpperCAmelCase						:			List[str]         =   model_class(__lowerCamelCase     )
																			model.to(__lowerCamelCase     )
																			model.eval()
																			with torch.no_grad():
																										__UpperCAmelCase						:			int         =   model(**self._prepare_for_class(__lowerCamelCase	,  __lowerCamelCase     )     )
																			__UpperCAmelCase						:			List[Any]         =   outputs.attentions
																			self.assertEqual(len(__lowerCamelCase     )	,  __lowerCamelCase     )

																			self.assertListEqual(
																			    list(attentions[0].shape[-3:]     )	,  [self.model_tester.num_heads[0], window_size_squared, window_size_squared]	,  )
																			__UpperCAmelCase						:			List[str]         =   len(__lowerCamelCase     )

																			# Check attention is always last and order is fine
																			__UpperCAmelCase						:			Tuple         =   True
																			__UpperCAmelCase						:			List[str]         =   True
																			__UpperCAmelCase						:			List[Any]         =   model_class(__lowerCamelCase     )
																			model.to(__lowerCamelCase     )
																			model.eval()
																			with torch.no_grad():
																										__UpperCAmelCase						:			Optional[int]         =   model(**self._prepare_for_class(__lowerCamelCase	,  __lowerCamelCase     )     )

																			self.assertEqual(out_len + 1	,  len(__lowerCamelCase     )     )

																			__UpperCAmelCase						:			List[Any]         =   outputs.attentions

																			self.assertEqual(len(__lowerCamelCase     )	,  __lowerCamelCase     )

																			self.assertListEqual(
																			    list(self_attentions[0].shape[-3:]     )	,  [self.model_tester.num_heads[0], window_size_squared, window_size_squared]	,  )




@require_vision
@require_torch
@slow
class 					_snake_case						(						unittest.TestCase				):
					def    _lowerCamelCase (  self:				Optional[Any]     )    ->				Optional[int]:
												__UpperCAmelCase						:			List[str]         =   SwinaSRImageProcessor()
												__UpperCAmelCase						:			int         =   SwinaSRForImageSuperResolution.from_pretrained("caidas/swin2SR-classical-sr-x2-64"     ).to(__lowerCamelCase     )

												__UpperCAmelCase						:			Union[str, Any]         =   Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"     )
												__UpperCAmelCase						:			Dict         =   processor(images=__lowerCamelCase	,  return_tensors="pt"     ).to(__lowerCamelCase     )

												# forward pass
												with torch.no_grad():
																			__UpperCAmelCase						:			int         =   model(**__lowerCamelCase     )

												# verify the logits
												__UpperCAmelCase						:			str         =   torch.Size([1, 3, 9_76, 12_96]     )
												self.assertEqual(outputs.reconstruction.shape	,  __lowerCamelCase     )
												__UpperCAmelCase						:			Union[str, Any]         =   torch.tensor(
												    [[0.54_58, 0.55_46, 0.56_38], [0.55_26, 0.55_65, 0.56_51], [0.53_96, 0.54_26, 0.56_21]]     ).to(__lowerCamelCase     )
												self.assertTrue(torch.allclose(outputs.reconstruction[0, 0, :3, :3]	,  __lowerCamelCase	,  atol=1e-4     )     )




