




import random
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
 import torch

if is_vision_available():
 import PIL

 from transformers import FlavaImageProcessor
 from transformers.image_utils import PILImageResampling
 from transformers.models.flava.image_processing_flava import (
     FLAVA_CODEBOOK_MEAN,
     FLAVA_CODEBOOK_STD,
     FLAVA_IMAGE_MEAN,
     FLAVA_IMAGE_STD,
 )
else:
 SCREAMING_SNAKE_CASE_    :       Any       =							None







class 		__UpperCAmelCase(		unittest.TestCase			):





     """simple docstring"""



     def __init__(   self			:							Optional[Any]    ,					A			:							Tuple    ,					A			:							List[str]=7    ,					A			:							Union[str, Any]=3    ,					A			:							Union[str, Any]=30    ,					A			:							Any=4_00    ,					A			:							Union[str, Any]=True    ,					A			:							int=None    ,					A			:							Any=True    ,					A			:							Any=None    ,					A			:							List[str]=None    ,					A			:							Dict=True    ,					A			:							Dict=1 / 2_55    ,					A			:							Optional[Any]=True    ,					A			:							List[str]=FLAVA_IMAGE_MEAN    ,					A			:							List[Any]=FLAVA_IMAGE_STD    ,					A			:							int=14    ,					A			:							int=75    ,					A			:							str=None    ,					A			:							Tuple=16    ,					A			:							List[Any]=0.3    ,					A			:							Optional[Any]=None    ,					A			:							Tuple=True    ,					A			:							Dict=None    ,					A			:							List[str]=None    ,					A			:							Any=True    ,					A			:							List[Any]=None    ,					A			:							Optional[int]=True    ,					A			:							List[Any]=True    ,					A			:							Optional[Any]=FLAVA_CODEBOOK_MEAN    ,					A			:							Dict=FLAVA_CODEBOOK_STD    ,					)      ->      int:






         """simple docstring"""
         a__  			=							size if size is not None else {"""height""": 2_24, """width""": 2_24}
         a__  			=							crop_size if crop_size is not None else {"""height""": 2_24, """width""": 2_24}
         a__  			=							codebook_size if codebook_size is not None else {"""height""": 1_12, """width""": 1_12}
         a__  			=							codebook_crop_size if codebook_crop_size is not None else {"""height""": 1_12, """width""": 1_12}

         a__  			=							parent
         a__  			=							batch_size
         a__  			=							num_channels
         a__  			=							do_resize
         a__  			=							do_rescale
         a__  			=							rescale_factor
         a__  			=							min_resolution
         a__  			=							max_resolution
         a__  			=							size
         a__  			=							resample if resample is not None else PILImageResampling.BICUBIC
         a__  			=							do_normalize
         a__  			=							image_mean
         a__  			=							image_std
         a__  			=							do_center_crop
         a__  			=							crop_size

         a__  			=							input_size_patches
         a__  			=							total_mask_patches
         a__  			=							mask_group_max_patches
         a__  			=							mask_group_min_patches
         a__  			=							mask_group_min_aspect_ratio
         a__  			=							mask_group_max_aspect_ratio

         a__  			=							codebook_do_resize
         a__  			=							codebook_size
         a__  			=							codebook_resample if codebook_resample is not None else PILImageResampling.LANCZOS
         a__  			=							codebook_do_center_crop
         a__  			=							codebook_crop_size
         a__  			=							codebook_do_map_pixels
         a__  			=							codebook_do_normalize
         a__  			=							codebook_image_mean
         a__  			=							codebook_image_std

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






         """simple docstring"""
         return {
             "image_mean": self.image_mean,
             "image_std": self.image_std,
             "do_normalize": self.do_normalize,
             "do_resize": self.do_resize,
             "size": self.size,
             "resample": self.resample,
             "do_rescale": self.do_rescale,
             "rescale_factor": self.rescale_factor,
             "do_center_crop": self.do_center_crop,
             "crop_size": self.crop_size,
             "input_size_patches": self.input_size_patches,
             "total_mask_patches": self.total_mask_patches,
             "mask_group_max_patches": self.mask_group_max_patches,
             "mask_group_min_patches": self.mask_group_min_patches,
             "mask_group_min_aspect_ratio": self.mask_group_min_aspect_ratio,
             "mask_group_max_aspect_ratio": self.mask_group_min_aspect_ratio,
             "codebook_do_resize": self.codebook_do_resize,
             "codebook_size": self.codebook_size,
             "codebook_resample": self.codebook_resample,
             "codebook_do_center_crop": self.codebook_do_center_crop,
             "codebook_crop_size": self.codebook_crop_size,
             "codebook_do_map_pixels": self.codebook_do_map_pixels,
             "codebook_do_normalize": self.codebook_do_normalize,
             "codebook_image_mean": self.codebook_image_mean,
             "codebook_image_std": self.codebook_image_std,
         }

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






         """simple docstring"""
         return (self.size["height"], self.size["width"])

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






         """simple docstring"""
         return (
             (self.input_size_patches, self.input_size_patches)
             if not isinstance(self.input_size_patches    ,					A     )
             else self.input_size_patches
         )






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






         """simple docstring"""
         return (self.codebook_size["height"], self.codebook_size["width"])







@require_torch
@require_vision
class 		__UpperCAmelCase(		lowercase__							,						unittest.TestCase			):





     """simple docstring"""



     __UpperCAmelCase						:			List[Any]							=     FlavaImageProcessor if is_vision_available() else None
     __UpperCAmelCase						:			Dict							=     None

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






         """simple docstring"""
         a__  			=							FlavaImageProcessingTester(self     )

     @property
     def 					__SCREAMING_SNAKE_CASE		(   self			:							str     )      ->      List[str]:






         """simple docstring"""
         return self.image_processor_tester.prepare_image_processor_dict()

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






         """simple docstring"""
         a__  			=							self.image_processing_class(**self.image_processor_dict     )
         self.assertTrue(hasattr(A    ,					"""image_mean"""     )     )
         self.assertTrue(hasattr(A    ,					"""image_std"""     )     )
         self.assertTrue(hasattr(A    ,					"""do_normalize"""     )     )
         self.assertTrue(hasattr(A    ,					"""do_resize"""     )     )
         self.assertTrue(hasattr(A    ,					"""resample"""     )     )
         self.assertTrue(hasattr(A    ,					"""crop_size"""     )     )
         self.assertTrue(hasattr(A    ,					"""do_center_crop"""     )     )
         self.assertTrue(hasattr(A    ,					"""do_rescale"""     )     )
         self.assertTrue(hasattr(A    ,					"""rescale_factor"""     )     )
         self.assertTrue(hasattr(A    ,					"""masking_generator"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_do_resize"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_size"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_resample"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_do_center_crop"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_crop_size"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_do_map_pixels"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_do_normalize"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_image_mean"""     )     )
         self.assertTrue(hasattr(A    ,					"""codebook_image_std"""     )     )

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






         """simple docstring"""
         a__  			=							self.image_processing_class.from_dict(self.image_processor_dict     )
         self.assertEqual(image_processor.size    ,					{"""height""": 2_24, """width""": 2_24}     )
         self.assertEqual(image_processor.crop_size    ,					{"""height""": 2_24, """width""": 2_24}     )
         self.assertEqual(image_processor.codebook_size    ,					{"""height""": 1_12, """width""": 1_12}     )
         self.assertEqual(image_processor.codebook_crop_size    ,					{"""height""": 1_12, """width""": 1_12}     )

         a__  			=							self.image_processing_class.from_dict(
             self.image_processor_dict    ,					size=42    ,					crop_size=84    ,					codebook_size=33    ,					codebook_crop_size=66     )
         self.assertEqual(image_processor.size    ,					{"""height""": 42, """width""": 42}     )
         self.assertEqual(image_processor.crop_size    ,					{"""height""": 84, """width""": 84}     )
         self.assertEqual(image_processor.codebook_size    ,					{"""height""": 33, """width""": 33}     )
         self.assertEqual(image_processor.codebook_crop_size    ,					{"""height""": 66, """width""": 66}     )

     def 					__SCREAMING_SNAKE_CASE		(   self			:							str     )      ->      Tuple:






         """simple docstring"""
         pass

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






         """simple docstring"""
         # Initialize image_processing
         a__  			=							self.image_processing_class(**self.image_processor_dict     )
         # create random PIL images
         a__  			=							prepare_image_inputs(self.image_processor_tester    ,					equal_resolution=A     )
         for image in image_inputs:
             self.assertIsInstance(A    ,					PIL.Image.Image     )

         # Test not batched input
         a__  			=							image_processing(image_inputs[0]    ,					return_tensors="""pt"""     )

         # Test no bool masked pos
         self.assertFalse("""bool_masked_pos""" in encoded_images     )

         a__			,		a__  			=							self.image_processor_tester.get_expected_image_size()

         self.assertEqual(
             encoded_images.pixel_values.shape    ,					(1, self.image_processor_tester.num_channels, expected_height, expected_width)    ,					)

         # Test batched
         a__  			=							image_processing(A    ,					return_tensors="""pt"""     )
         a__			,		a__  			=							self.image_processor_tester.get_expected_image_size()

         # Test no bool masked pos
         self.assertFalse("""bool_masked_pos""" in encoded_images     )

         self.assertEqual(
             encoded_images.pixel_values.shape    ,					(
                 self.image_processor_tester.batch_size,
                 self.image_processor_tester.num_channels,
                 expected_height,
                 expected_width,
             )    ,					)

     def 					__SCREAMING_SNAKE_CASE		(   self			:							Dict    ,					A			:							Union[str, Any]    ,					A			:							Optional[int]     )      ->      str:






         """simple docstring"""
         # Initialize image_processing
         a__  			=							self.image_processing_class(**self.image_processor_dict     )
         # create random tensors
         a__  			=							prepare_image_inputs(self.image_processor_tester    ,					equal_resolution=A    ,					**A     )
         for image in image_inputs:
             self.assertIsInstance(A    ,					A     )

         # Test not batched input
         a__  			=							image_processing(image_inputs[0]    ,					return_tensors="""pt"""     )

         a__			,		a__  			=							self.image_processor_tester.get_expected_image_size()
         self.assertEqual(
             encoded_images.pixel_values.shape    ,					(1, self.image_processor_tester.num_channels, expected_height, expected_width)    ,					)

         a__  			=							image_processing(A    ,					return_image_mask=A    ,					return_tensors="""pt"""     )

         a__			,		a__  			=							self.image_processor_tester.get_expected_image_size()
         self.assertEqual(
             encoded_images.pixel_values.shape    ,					(
                 self.image_processor_tester.batch_size,
                 self.image_processor_tester.num_channels,
                 expected_height,
                 expected_width,
             )    ,					)

         a__			,		a__  			=							self.image_processor_tester.get_expected_mask_size()
         self.assertEqual(
             encoded_images.bool_masked_pos.shape    ,					(
                 self.image_processor_tester.batch_size,
                 expected_height,
                 expected_width,
             )    ,					)

         # Test batched
         a__  			=							image_processing(A    ,					return_tensors="""pt"""     ).pixel_values

         a__			,		a__  			=							self.image_processor_tester.get_expected_image_size()
         self.assertEqual(
             encoded_images.shape    ,					(
                 self.image_processor_tester.batch_size,
                 self.image_processor_tester.num_channels,
                 expected_height,
                 expected_width,
             )    ,					)

         # Test masking
         a__  			=							image_processing(A    ,					return_image_mask=A    ,					return_tensors="""pt"""     )

         a__			,		a__  			=							self.image_processor_tester.get_expected_image_size()
         self.assertEqual(
             encoded_images.pixel_values.shape    ,					(
                 self.image_processor_tester.batch_size,
                 self.image_processor_tester.num_channels,
                 expected_height,
                 expected_width,
             )    ,					)

         a__			,		a__  			=							self.image_processor_tester.get_expected_mask_size()
         self.assertEqual(
             encoded_images.bool_masked_pos.shape    ,					(
                 self.image_processor_tester.batch_size,
                 expected_height,
                 expected_width,
             )    ,					)

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






         """simple docstring"""
         self._test_call_framework(np.ndarray    ,					prepare_kwargs={"""numpify""": True}     )

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






         """simple docstring"""
         self._test_call_framework(torch.Tensor    ,					prepare_kwargs={"""torchify""": True}     )

     def 					__SCREAMING_SNAKE_CASE		(   self			:							Any     )      ->      str:






         """simple docstring"""
         # Initialize image_processing
         random.seed(12_34     )
         a__  			=							self.image_processing_class(**self.image_processor_dict     )
         a__  			=							prepare_image_inputs(self.image_processor_tester    ,					equal_resolution=A    ,					torchify=A     )

         # Test not batched input
         a__  			=							image_processing(image_inputs[0]    ,					return_image_mask=A    ,					return_tensors="""pt"""     )
         self.assertEqual(encoded_images.bool_masked_pos.sum().item()    ,					75     )






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






         """simple docstring"""
         # Initialize image_processing
         a__  			=							self.image_processing_class(**self.image_processor_dict     )
         # create random PIL images
         a__  			=							prepare_image_inputs(self.image_processor_tester    ,					equal_resolution=A     )
         for image in image_inputs:
             self.assertIsInstance(A    ,					PIL.Image.Image     )

         # Test not batched input
         a__  			=							image_processing(image_inputs[0]    ,					return_codebook_pixels=A    ,					return_tensors="""pt"""     )
         a__			,		a__  			=							self.image_processor_tester.get_expected_codebook_image_size()
         self.assertEqual(
             encoded_images.codebook_pixel_values.shape    ,					(1, self.image_processor_tester.num_channels, expected_height, expected_width)    ,					)

         # Test batched
         a__  			=							image_processing(A    ,					return_codebook_pixels=A    ,					return_tensors="""pt"""     )
         a__			,		a__  			=							self.image_processor_tester.get_expected_codebook_image_size()
         self.assertEqual(
             encoded_images.codebook_pixel_values.shape    ,					(
                 self.image_processor_tester.batch_size,
                 self.image_processor_tester.num_channels,
                 expected_height,
                 expected_width,
             )    ,					)












import random
import unittest

import numpy as np
import torch
from PIL import Image
from torch import nn
from transformers import (
    CLIPImageProcessor,
    CLIPTextConfig,
    CLIPTextModelWithProjection,
    CLIPTokenizer,
    CLIPVisionConfig,
    CLIPVisionModelWithProjection,
)

from diffusers import KandinskyVaaPriorEmbaEmbPipeline, PriorTransformer, UnCLIPScheduler
from diffusers.utils import floats_tensor, torch_device
from diffusers.utils.testing_utils import enable_full_determinism, skip_mps

from ..test_pipelines_common import PipelineTesterMixin


enable_full_determinism()







class 		__UpperCAmelCase(		lowercase__							,						unittest.TestCase			):





     """simple docstring"""



     __UpperCAmelCase						:			Optional[int]							=     KandinskyVaaPriorEmbaEmbPipeline
     __UpperCAmelCase						:			str							=     ["""prompt""", """image"""]
     __UpperCAmelCase						:			Dict							=     ["""prompt""", """image"""]
     __UpperCAmelCase						:			Optional[Any]							=     [
         """num_images_per_prompt""",
         """strength""",
         """generator""",
         """num_inference_steps""",
         """latents""",
         """negative_prompt""",
         """guidance_scale""",
         """output_type""",
         """return_dict""",
     ]
     __UpperCAmelCase						:			Dict							=     False

     @property
     def 					__SCREAMING_SNAKE_CASE		(   self			:							Any     )      ->      int:






         """simple docstring"""
         return 32

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






         """simple docstring"""
         return 32

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






         """simple docstring"""
         return self.time_input_dim

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






         """simple docstring"""
         return self.time_input_dim * 4

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






         """simple docstring"""
         return 1_00

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






         """simple docstring"""
         a__  			=							CLIPTokenizer.from_pretrained("""hf-internal-testing/tiny-random-clip"""     )
         return tokenizer

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






         """simple docstring"""
         torch.manual_seed(0     )
         a__  			=							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=37    ,					layer_norm_eps=1E-05    ,					num_attention_heads=4    ,					num_hidden_layers=5    ,					pad_token_id=1    ,					vocab_size=10_00    ,					)
         return CLIPTextModelWithProjection(A     )

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






         """simple docstring"""
         torch.manual_seed(0     )

         a__  			=							{
             """num_attention_heads""": 2,
             """attention_head_dim""": 12,
             """embedding_dim""": self.text_embedder_hidden_size,
             """num_layers""": 1,
         }

         a__  			=							PriorTransformer(**A     )
         # clip_std and clip_mean is initialized to be 0 so PriorTransformer.post_process_latents will always return 0 - set clip_std to be 1 so it won't return 0
         a__  			=							nn.Parameter(torch.ones(model.clip_std.shape     )     )
         return model

     @property
     def 					__SCREAMING_SNAKE_CASE		(   self			:							Dict     )      ->      Optional[int]:






         """simple docstring"""
         torch.manual_seed(0     )
         a__  			=							CLIPVisionConfig(
             hidden_size=self.text_embedder_hidden_size    ,					image_size=2_24    ,					projection_dim=self.text_embedder_hidden_size    ,					intermediate_size=37    ,					num_attention_heads=4    ,					num_channels=3    ,					num_hidden_layers=5    ,					patch_size=14    ,					)

         a__  			=							CLIPVisionModelWithProjection(A     )
         return model

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






         """simple docstring"""
         a__  			=							CLIPImageProcessor(
             crop_size=2_24    ,					do_center_crop=A    ,					do_normalize=A    ,					do_resize=A    ,					image_mean=[0.4_8_1_4_5_4_6_6, 0.4_5_7_8_2_7_5, 0.4_0_8_2_1_0_7_3]    ,					image_std=[0.2_6_8_6_2_9_5_4, 0.2_6_1_3_0_2_5_8, 0.2_7_5_7_7_7_1_1]    ,					resample=3    ,					size=2_24    ,					)

         return image_processor

     def 					__SCREAMING_SNAKE_CASE		(   self			:							List[Any]     )      ->      Tuple:






         """simple docstring"""
         a__  			=							self.dummy_prior
         a__  			=							self.dummy_image_encoder
         a__  			=							self.dummy_text_encoder
         a__  			=							self.dummy_tokenizer
         a__  			=							self.dummy_image_processor

         a__  			=							UnCLIPScheduler(
             variance_type="""fixed_small_log"""    ,					prediction_type="""sample"""    ,					num_train_timesteps=10_00    ,					clip_sample=A    ,					clip_sample_range=1_0.0    ,					)

         a__  			=							{
             """prior""": prior,
             """image_encoder""": image_encoder,
             """text_encoder""": text_encoder,
             """tokenizer""": tokenizer,
             """scheduler""": scheduler,
             """image_processor""": image_processor,
         }

         return components

     def 					__SCREAMING_SNAKE_CASE		(   self			:							Optional[int]    ,					A			:							Tuple    ,					A			:							Optional[Any]=0     )      ->      Any:






         """simple docstring"""
         if str(A     ).startswith("""mps"""     ):
             a__  			=							torch.manual_seed(A     )
         else:
             a__  			=							torch.Generator(device=A     ).manual_seed(A     )

         a__  			=							floats_tensor((1, 3, 64, 64)    ,					rng=random.Random(A     )     ).to(A     )
         a__  			=							image.cpu().permute(0    ,					2    ,					3    ,					1     )[0]
         a__  			=							Image.fromarray(np.uinta(A     )     ).convert("""RGB"""     ).resize((2_56, 2_56)     )

         a__  			=							{
             """prompt""": """horse""",
             """image""": init_image,
             """strength""": 0.5,
             """generator""": generator,
             """guidance_scale""": 4.0,
             """num_inference_steps""": 2,
             """output_type""": """np""",
         }
         return inputs

     def 					__SCREAMING_SNAKE_CASE		(   self			:							Dict     )      ->      Optional[int]:






         """simple docstring"""
         a__  			=							"""cpu"""

         a__  			=							self.get_dummy_components()

         a__  			=							self.pipeline_class(**A     )
         a__  			=							pipe.to(A     )

         pipe.set_progress_bar_config(disable=A     )

         a__  			=							pipe(**self.get_dummy_inputs(A     )     )
         a__  			=							output.image_embeds

         a__  			=							pipe(
             **self.get_dummy_inputs(A     )    ,					return_dict=A    ,					)[0]

         a__  			=							image[0, -10:]
         a__  			=							image_from_tuple[0, -10:]

         assert image.shape == (1, 32)

         a__  			=							np.array(
             [
                 0.1_0_7_1_2_8_4,
                 1.3_3_3_0_2_7_1,
                 0.6_1_2_6_0_2_2_3,
                 -0.6_6_9_1_0_6_5,
                 -0.3_8_4_6_8_5_2,
                 -1.0_3_0_3_6_6_1,
                 0.2_2_7_1_6_1_1_1,
                 0.0_3_3_4_8_9_0_1,
                 0.3_0_0_4_0_6_7_5,
                 -0.2_4_8_0_5_0_2_9,
             ]     )

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

     @skip_mps
     def 					__SCREAMING_SNAKE_CASE		(   self			:							str     )      ->      Optional[Any]:






         """simple docstring"""
         a__  			=							torch_device == """cpu"""
         a__  			=							True
         a__  			=							False

         self._test_inference_batch_single_identical(
             test_max_difference=A    ,					relax_max_difference=A    ,					test_mean_pixel_difference=A    ,					)






     @skip_mps
     def 					__SCREAMING_SNAKE_CASE		(   self			:							Tuple     )      ->      Union[str, Any]:






         """simple docstring"""
         a__  			=							torch_device == """cpu"""
         a__  			=							False

         self._test_attention_slicing_forward_pass(
             test_max_difference=A    ,					test_mean_pixel_difference=A    ,					)






