

from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import PIL
import torch
from transformers import CLIPImageProcessor, CLIPVisionModel

from ...models import PriorTransformer
from ...pipelines import DiffusionPipeline
from ...schedulers import HeunDiscreteScheduler
from ...utils import (
    BaseOutput,
    is_accelerate_available,
    logging,
    randn_tensor,
    replace_example_docstring,
)
from .renderer import ShapERenderer


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

_lowerCamelCase    :       Optional[int]        =							"\n    Examples:\n        ```py\n        >>> from PIL import Image\n        >>> import torch\n        >>> from diffusers import DiffusionPipeline\n        >>> from diffusers.utils import export_to_gif, load_image\n\n        >>> device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n        >>> repo = \"openai/shap-e-img2img\"\n        >>> pipe = DiffusionPipeline.from_pretrained(repo, torch_dtype=torch.float16)\n        >>> pipe = pipe.to(device)\n\n        >>> guidance_scale = 3.0\n        >>> image_url = \"https://hf.co/datasets/diffusers/docs-images/resolve/main/shap-e/corgi.png\"\n        >>> image = load_image(image_url).convert(\"RGB\")\n\n        >>> images = pipe(\n        ...     image,\n        ...     guidance_scale=guidance_scale,\n        ...     num_inference_steps=64,\n        ...     frame_size=256,\n        ... ).images\n\n        >>> gif_path = export_to_gif(images[0], \"corgi_3d.gif\")\n        ```\n"





@dataclass
class  __UpperCAmelCase					(	lowerCamelCase__						):
   UpperCamelCase       					=					42






class  __UpperCAmelCase					(	lowerCamelCase__						):



   def __init__(							self							:					Union[str, Any],		__A							:					PriorTransformer,		__A							:					CLIPVisionModel,		__A							:					CLIPImageProcessor,		__A							:					HeunDiscreteScheduler,		__A							:					ShapERenderer,		):
     super().__init__()

     self.register_modules(
         prior=__A,		image_encoder=__A,		image_processor=__A,		scheduler=__A,		renderer=__A,		)



   def 	__magic_name__   (							self							:					Optional[int],		__A							:					Optional[Any],		__A							:					Any,		__A							:					Union[str, Any],		__A							:					List[Any],		__A							:					Any,		__A							:					Union[str, Any]						):
     if latents is None:
       UpperCAmelCase	:							Tuple						=			randn_tensor(__A,		generator=__A,		device=__A,		dtype=__A						)
     else:
       if latents.shape != shape:
         raise ValueError(F'''Unexpected latents shape, got {latents.shape}, expected {shape}'''						)
       UpperCAmelCase	:							List[str]						=			latents.to(__A						)

     UpperCAmelCase	:							Union[str, Any]						=			latents * scheduler.init_noise_sigma
     return latents



   def 	__magic_name__   (							self							:					Union[str, Any],		__A							:					Optional[int]=0						):
     if is_accelerate_available():
       from accelerate import cpu_offload
     else:
       raise ImportError('''Please install accelerate via `pip install accelerate`'''						)

     UpperCAmelCase	:							int						=			torch.device(F'''cuda:{gpu_id}'''						)

     UpperCAmelCase	:							int						=			[self.image_encoder, self.prior]
     for cpu_offloaded_model in models:
       if cpu_offloaded_model is not None:
         cpu_offload(__A,		__A						)



   @property
   def 	__magic_name__   (							self							:					Dict						):
     if self.device != torch.device('''meta'''						) or not hasattr(self.image_encoder,		'''_hf_hook'''						):
       return self.device
     for module in self.image_encoder.modules():
       if (
           hasattr(__A,		'''_hf_hook'''						)
           and hasattr(module._hf_hook,		'''execution_device'''						)
           and module._hf_hook.execution_device is not None
       ):
         return torch.device(module._hf_hook.execution_device						)
     return self.device



   def 	__magic_name__   (							self							:					Dict,		__A							:					int,		__A							:					List[str],		__A							:					str,		__A							:					List[Any],		):
     if isinstance(__A,		__A						) and isinstance(image[0],		torch.Tensor						):
       UpperCAmelCase	:							Dict						=			torch.cat(__A,		axis=0						) if image[0].ndim == 4 else torch.stack(__A,		axis=0						)

     if not isinstance(__A,		torch.Tensor						):
       UpperCAmelCase	:							int						=			self.image_processor(__A,		return_tensors='''pt'''						).pixel_values[0].unsqueeze(0						)

     UpperCAmelCase	:							Dict						=			image.to(dtype=self.image_encoder.dtype,		device=__A						)

     UpperCAmelCase	:							int						=			self.image_encoder(__A						)['''last_hidden_state''']
     UpperCAmelCase	:							Optional[Any]						=			image_embeds[:, 1:, :].contiguous()  # batch_size, dim, 256

     UpperCAmelCase	:							Union[str, Any]						=			image_embeds.repeat_interleave(__A,		dim=0						)

     if do_classifier_free_guidance:
       UpperCAmelCase	:							int						=			torch.zeros_like(__A						)

       # For classifier free guidance, we need to do two forward passes.
       # Here we concatenate the unconditional and text embeddings into a single batch
       # to avoid doing two forward passes
       UpperCAmelCase	:							str						=			torch.cat([negative_image_embeds, image_embeds]						)

     return image_embeds





   @torch.no_grad()
   @replace_example_docstring(__A						)
   def __call__(							self							:					List[Any],		__A							:					Union[PIL.Image.Image, List[PIL.Image.Image]],		__A							:					int = 1,		__A							:					int = 2_5,		__A							:					Optional[Union[torch.Generator, List[torch.Generator]]] = None,		__A							:					Optional[torch.FloatTensor] = None,		__A							:					float = 4.0,		__A							:					int = 6_4,		__A							:					Optional[str] = "pil",		__A							:					bool = True,		):

     if isinstance(__A,		PIL.Image.Image						):
       UpperCAmelCase	:							Tuple						=			1
     elif isinstance(__A,		torch.Tensor						):
       UpperCAmelCase	:							Tuple						=			image.shape[0]
     elif isinstance(__A,		__A						) and isinstance(image[0],		(torch.Tensor, PIL.Image.Image)						):
       UpperCAmelCase	:							Dict						=			len(__A						)
     else:
       raise ValueError(
           F'''`image` has to be of type `PIL.Image.Image`, `torch.Tensor`, `List[PIL.Image.Image]` or `List[torch.Tensor]` but is {type(__A						)}'''						)

     UpperCAmelCase	:							Tuple						=			self._execution_device

     UpperCAmelCase	:							int						=			batch_size * num_images_per_prompt

     UpperCAmelCase	:							str						=			guidance_scale > 1.0
     UpperCAmelCase	:							List[Any]						=			self._encode_image(__A,		__A,		__A,		__A						)

     # prior

     self.scheduler.set_timesteps(__A,		device=__A						)
     UpperCAmelCase	:							Dict						=			self.scheduler.timesteps

     UpperCAmelCase	:							Union[str, Any]						=			self.prior.config.num_embeddings
     UpperCAmelCase	:							Optional[int]						=			self.prior.config.embedding_dim

     UpperCAmelCase	:							Any						=			self.prepare_latents(
         (batch_size, num_embeddings * embedding_dim),		image_embeds.dtype,		__A,		__A,		__A,		self.scheduler,		)

     # YiYi notes: for testing only to match ldm, we can directly create a latents with desired shape: batch_size, num_embeddings, embedding_dim
     UpperCAmelCase	:							List[Any]						=			latents.reshape(latents.shape[0],		__A,		__A						)

     for i, t in enumerate(self.progress_bar(__A						)						):
       # expand the latents if we are doing classifier free guidance
       UpperCAmelCase	:							List[str]						=			torch.cat([latents] * 2						) if do_classifier_free_guidance else latents
       UpperCAmelCase	:							Optional[Any]						=			self.scheduler.scale_model_input(__A,		__A						)

       UpperCAmelCase	:							Any						=			self.prior(
           __A,		timestep=__A,		proj_embedding=__A,		).predicted_image_embedding

       # remove the variance
       UpperCAmelCase			,						UpperCAmelCase	:							Tuple						=			noise_pred.split(
           scaled_model_input.shape[2],		dim=2						)  # batch_size, num_embeddings, embedding_dim

       if do_classifier_free_guidance is not None:
         UpperCAmelCase			,						UpperCAmelCase	:							List[str]						=			noise_pred.chunk(2						)
         UpperCAmelCase	:							int						=			noise_pred_uncond + guidance_scale * (noise_pred - noise_pred_uncond)

       UpperCAmelCase	:							int						=			self.scheduler.step(
           __A,		timestep=__A,		sample=__A,		).prev_sample

     if output_type == "latent":
       return ShapEPipelineOutput(images=__A						)

     UpperCAmelCase	:							Union[str, Any]						=			[]
     for i, latent in enumerate(__A						):
       print()
       UpperCAmelCase	:							Any						=			self.renderer.decode(
           latent[None, :],		__A,		size=__A,		ray_batch_size=4_0_9_6,		n_coarse_samples=6_4,		n_fine_samples=1_2_8,		)

       images.append(__A						)

     UpperCAmelCase	:							Optional[int]						=			torch.stack(__A						)

     if output_type not in ["np", "pil"]:
       raise ValueError(F'''Only the output types `pil` and `np` are supported not output_type={output_type}'''						)

     UpperCAmelCase	:							str						=			images.cpu().numpy()

     if output_type == "pil":
       UpperCAmelCase	:							str						=			[self.numpy_to_pil(__A						) for image in images]

     # Offload last model to CPU
     if hasattr(self,		'''final_offload_hook'''						) and self.final_offload_hook is not None:
       self.final_offload_hook.offload()

     if not return_dict:
       return (images,)

     return ShapEPipelineOutput(images=__A						)








import inspect
import unittest

from transformers import DPTConfig
from transformers.file_utils import is_torch_available, is_vision_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, require_vision, slow, torch_device

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 MODEL_MAPPING, DPTForDepthEstimation, DPTForSemanticSegmentation, DPTModel
     from transformers.models.dpt.modeling_dpt import DPT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
     from PIL import Image

     from transformers import DPTImageProcessor





class  __UpperCAmelCase					:



   def __init__(							self							:					Any,		__A							:					List[Any],		__A							:					Optional[Any]=2,		__A							:					List[Any]=3_2,		__A							:					Tuple=1_6,		__A							:					int=3,		__A							:					Any=True,		__A							:					List[Any]=True,		__A							:					List[Any]=3_2,		__A							:					List[Any]=4,		__A							:					Union[str, Any]=[0, 1, 2, 3],		__A							:					List[Any]=4,		__A							:					Optional[int]=3_7,		__A							:					int="gelu",		__A							:					Any=0.1,		__A							:					Tuple=0.1,		__A							:					Any=0.0_2,		__A							:					List[str]=3,		__A							:					int=[1, 3_8_4, 2_4, 2_4],		__A							:					Any=True,		__A							:					List[str]=None,		):
     UpperCAmelCase	:							List[str]						=			parent
     UpperCAmelCase	:							List[Any]						=			batch_size
     UpperCAmelCase	:							Tuple						=			image_size
     UpperCAmelCase	:							Dict						=			patch_size
     UpperCAmelCase	:							str						=			num_channels
     UpperCAmelCase	:							Tuple						=			is_training
     UpperCAmelCase	:							Optional[Any]						=			use_labels
     UpperCAmelCase	:							Dict						=			hidden_size
     UpperCAmelCase	:							Optional[int]						=			num_hidden_layers
     UpperCAmelCase	:							str						=			backbone_out_indices
     UpperCAmelCase	:							Dict						=			num_attention_heads
     UpperCAmelCase	:							Dict						=			intermediate_size
     UpperCAmelCase	:							Union[str, Any]						=			hidden_act
     UpperCAmelCase	:							Optional[Any]						=			hidden_dropout_prob
     UpperCAmelCase	:							Tuple						=			attention_probs_dropout_prob
     UpperCAmelCase	:							str						=			initializer_range
     UpperCAmelCase	:							Optional[int]						=			num_labels
     UpperCAmelCase	:							int						=			backbone_featmap_shape
     UpperCAmelCase	:							Union[str, Any]						=			scope
     UpperCAmelCase	:							int						=			is_hybrid
     # sequence length of DPT = num_patches + 1 (we add 1 for the [CLS] token)
     UpperCAmelCase	:							Any						=			(image_size // patch_size) ** 2
     UpperCAmelCase	:							Optional[Any]						=			num_patches + 1



   def 	__magic_name__   (							self							:					Union[str, Any]						):
     UpperCAmelCase	:							Optional[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	:							List[Any]						=			ids_tensor([self.batch_size, self.image_size, self.image_size],		self.num_labels						)

     UpperCAmelCase	:							Tuple						=			self.get_config()

     return config, pixel_values, labels



   def 	__magic_name__   (							self							:					Dict						):
     UpperCAmelCase	:							List[Any]						=			{
         '''global_padding''': '''same''',
         '''layer_type''': '''bottleneck''',
         '''depths''': [3, 4, 9],
         '''out_features''': ['''stage1''', '''stage2''', '''stage3'''],
         '''embedding_dynamic_padding''': True,
         '''hidden_sizes''': [9_6, 1_9_2, 3_8_4, 7_6_8],
         '''num_groups''': 2,
     }

     return DPTConfig(
         image_size=self.image_size,		patch_size=self.patch_size,		num_channels=self.num_channels,		hidden_size=self.hidden_size,		num_hidden_layers=self.num_hidden_layers,		backbone_out_indices=self.backbone_out_indices,		num_attention_heads=self.num_attention_heads,		intermediate_size=self.intermediate_size,		hidden_act=self.hidden_act,		hidden_dropout_prob=self.hidden_dropout_prob,		attention_probs_dropout_prob=self.attention_probs_dropout_prob,		is_decoder=__A,		initializer_range=self.initializer_range,		is_hybrid=self.is_hybrid,		backbone_config=__A,		backbone_featmap_shape=self.backbone_featmap_shape,		)



   def 	__magic_name__   (							self							:					Optional[Any],		__A							:					List[Any],		__A							:					Union[str, Any],		__A							:					Tuple						):
     UpperCAmelCase	:							Optional[Any]						=			DPTModel(config=__A						)
     model.to(__A						)
     model.eval()
     UpperCAmelCase	:							int						=			model(__A						)
     self.parent.assertEqual(result.last_hidden_state.shape,		(self.batch_size, self.seq_length, self.hidden_size)						)



   def 	__magic_name__   (							self							:					Optional[int],		__A							:					Any,		__A							:					Dict,		__A							:					Optional[int]						):
     UpperCAmelCase	:							Optional[Any]						=			self.num_labels
     UpperCAmelCase	:							List[Any]						=			DPTForDepthEstimation(__A						)
     model.to(__A						)
     model.eval()
     UpperCAmelCase	:							Tuple						=			model(__A						)
     self.parent.assertEqual(result.predicted_depth.shape,		(self.batch_size, self.image_size, self.image_size)						)



   def 	__magic_name__   (							self							:					Union[str, Any],		__A							:					Dict,		__A							:					List[Any],		__A							:					Optional[int]						):
     UpperCAmelCase	:							Dict						=			self.num_labels
     UpperCAmelCase	:							Tuple						=			DPTForSemanticSegmentation(__A						)
     model.to(__A						)
     model.eval()
     UpperCAmelCase	:							Dict						=			model(__A,		labels=__A						)
     self.parent.assertEqual(
         result.logits.shape,		(self.batch_size, self.num_labels, self.image_size, self.image_size)						)





   def 	__magic_name__   (							self							:					Optional[int]						):
     UpperCAmelCase	:							str						=			self.prepare_config_and_inputs()
     UpperCAmelCase			,						UpperCAmelCase			,						UpperCAmelCase	:							Union[str, Any]						=			config_and_inputs
     UpperCAmelCase	:							Union[str, Any]						=			{'''pixel_values''': pixel_values}
     return config, inputs_dict






@require_torch
class  __UpperCAmelCase					(	lowerCamelCase__      ,  lowerCamelCase__      ,  unittest.TestCase						):
   UpperCamelCase       					=					(DPTModel, DPTForDepthEstimation, DPTForSemanticSegmentation) if is_torch_available() else ()
   UpperCamelCase       					=					(
       {
           """depth-estimation""": DPTForDepthEstimation,
           """feature-extraction""": DPTModel,
           """image-segmentation""": DPTForSemanticSegmentation,
       }
       if is_torch_available()
       else {}
   )

   UpperCamelCase       					=					False
   UpperCamelCase       					=					False
   UpperCamelCase       					=					False



   def 	__magic_name__   (							self							:					Tuple						):
     UpperCAmelCase	:							int						=			DPTModelTester(self						)
     UpperCAmelCase	:							List[Any]						=			ConfigTester(self,		config_class=__A,		has_text_modality=__A,		hidden_size=3_7						)



   def 	__magic_name__   (							self							:					Any						):
     self.config_tester.run_common_tests()



   @unittest.skip(reason='''DPT does not use inputs_embeds'''						)
   def 	__magic_name__   (							self							:					int						):
     pass



   def 	__magic_name__   (							self							:					List[Any]						):
     UpperCAmelCase			,						UpperCAmelCase	:							Optional[int]						=			self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
       UpperCAmelCase	:							List[Any]						=			model_class(__A						)
       self.assertIsInstance(model.get_input_embeddings(),		(nn.Module)						)
       UpperCAmelCase	:							Union[str, Any]						=			model.get_output_embeddings()
       self.assertTrue(x is None or isinstance(__A,		nn.Linear						)						)



   def 	__magic_name__   (							self							:					Dict						):
     UpperCAmelCase			,						UpperCAmelCase	:							Optional[Any]						=			self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
       UpperCAmelCase	:							Tuple						=			model_class(__A						)
       UpperCAmelCase	:							Tuple						=			inspect.signature(model.forward						)
       # signature.parameters is an OrderedDict => so arg_names order is deterministic
       UpperCAmelCase	:							Optional[int]						=			[*signature.parameters.keys()]

       UpperCAmelCase	:							Dict						=			['''pixel_values''']
       self.assertListEqual(arg_names[:1],		__A						)



   def 	__magic_name__   (							self							:					Tuple						):
     UpperCAmelCase	:							Optional[int]						=			self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_model(*__A						)



   def 	__magic_name__   (							self							:					Any						):
     UpperCAmelCase	:							int						=			self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_depth_estimation(*__A						)



   def 	__magic_name__   (							self							:					List[str]						):
     UpperCAmelCase	:							List[str]						=			self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_semantic_segmentation(*__A						)



   def 	__magic_name__   (							self							:					Union[str, Any]						):
     for model_class in self.all_model_classes:
       if model_class.__name__ == "DPTForDepthEstimation":
         continue

       UpperCAmelCase			,						UpperCAmelCase	:							Any						=			self.model_tester.prepare_config_and_inputs_for_common()
       UpperCAmelCase	:							str						=			True

       if model_class in get_values(__A						):
         continue

       UpperCAmelCase	:							Union[str, Any]						=			model_class(__A						)
       model.to(__A						)
       model.train()
       UpperCAmelCase	:							str						=			self._prepare_for_class(__A,		__A,		return_labels=__A						)
       UpperCAmelCase	:							Union[str, Any]						=			model(**__A						).loss
       loss.backward()



   def 	__magic_name__   (							self							:					Optional[int]						):
     for model_class in self.all_model_classes:
       if model_class.__name__ == "DPTForDepthEstimation":
         continue

       UpperCAmelCase			,						UpperCAmelCase	:							List[Any]						=			self.model_tester.prepare_config_and_inputs_for_common()
       UpperCAmelCase	:							int						=			False
       UpperCAmelCase	:							int						=			True

       if model_class in get_values(__A						) or not model_class.supports_gradient_checkpointing:
         continue
       UpperCAmelCase	:							Dict						=			model_class(__A						)
       model.to(__A						)
       model.gradient_checkpointing_enable()
       model.train()
       UpperCAmelCase	:							List[str]						=			self._prepare_for_class(__A,		__A,		return_labels=__A						)
       UpperCAmelCase	:							Any						=			model(**__A						).loss
       loss.backward()



   def 	__magic_name__   (							self							:					Dict						):
     UpperCAmelCase			,						UpperCAmelCase	:							List[Any]						=			self.model_tester.prepare_config_and_inputs_for_common()

     UpperCAmelCase	:							Optional[Any]						=			_config_zero_init(__A						)
     for model_class in self.all_model_classes:
       UpperCAmelCase	:							Dict						=			model_class(config=__A						)
       # Skip the check for the backbone
       UpperCAmelCase	:							Dict						=			[]
       for name, module in model.named_modules():
         if module.__class__.__name__ == "DPTViTHybridEmbeddings":
           UpperCAmelCase	:							Optional[Any]						=			[F'''{name}.{key}''' for key in module.state_dict().keys()]
           break

       for name, param in model.named_parameters():
         if param.requires_grad:
           if name in backbone_params:
             continue
           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''',		)



   @unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.'''						)
   def 	__magic_name__   (							self							:					Optional[int]						):
     pass



   @slow
   def 	__magic_name__   (							self							:					Optional[Any]						):
     for model_name in DPT_PRETRAINED_MODEL_ARCHIVE_LIST[1:]:
       UpperCAmelCase	:							Optional[int]						=			DPTModel.from_pretrained(__A						)
       self.assertIsNotNone(__A						)





   def 	__magic_name__   (							self							:					int						):
     # We do this test only for DPTForDepthEstimation since it is the only model that uses readout_type
     UpperCAmelCase			,						UpperCAmelCase	:							Optional[int]						=			self.model_tester.prepare_config_and_inputs_for_common()
     UpperCAmelCase	:							int						=			'''add'''
     with self.assertRaises(__A						):
       UpperCAmelCase	:							Dict						=			DPTForDepthEstimation(__A						)






def       a__					(		)  ->						Tuple:
  UpperCAmelCase	:							Optional[Any]						=			Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''      )
  return image






@require_torch
@require_vision
@slow
class  __UpperCAmelCase					(	unittest.TestCase						):



   def 	__magic_name__   (							self							:					Dict						):
     UpperCAmelCase	:							Dict						=			DPTImageProcessor.from_pretrained('''Intel/dpt-hybrid-midas'''						)
     UpperCAmelCase	:							Tuple						=			DPTForDepthEstimation.from_pretrained('''Intel/dpt-hybrid-midas'''						).to(__A						)

     UpperCAmelCase	:							List[Any]						=			prepare_img()
     UpperCAmelCase	:							Union[str, Any]						=			image_processor(images=__A,		return_tensors='''pt'''						).to(__A						)

     # forward pass
     with torch.no_grad():
       UpperCAmelCase	:							int						=			model(**__A						)
       UpperCAmelCase	:							int						=			outputs.predicted_depth

     # verify the predicted depth
     UpperCAmelCase	:							Tuple						=			torch.Size((1, 3_8_4, 3_8_4)						)
     self.assertEqual(predicted_depth.shape,		__A						)

     UpperCAmelCase	:							Dict						=			torch.tensor(
         [[[5.6_4_3_7, 5.6_1_4_6, 5.6_5_1_1], [5.4_3_7_1, 5.5_6_4_9, 5.5_9_5_8], [5.5_2_1_5, 5.5_1_8_4, 5.5_2_9_3]]]						).to(__A						)

     self.assertTrue(torch.allclose(outputs.predicted_depth[:3, :3, :3] / 1_0_0,		__A,		atol=1E-4						)						)





