

from typing import Any







class 				a__				:







  """simple docstring"""




  def __init__(	self			:       Optional[int] , UpperCAmelCase__			:       Any						)    ->List[str]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE       :					int        =      data
        SCREAMING_SNAKE_CASE       :					Any        =      None




  def __repr__(	self			:       Any						)    ->int:
        """simple docstring"""







        return f"Node({self.data})"







class 				a__				:







  """simple docstring"""




  def __init__(	self			:       List[str]						)    ->Union[str, Any]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE       :					Optional[int]        =      None


  def __iter__(	self			:       Optional[int]						)    ->Any:
        """simple docstring"""







        SCREAMING_SNAKE_CASE       :					List[Any]        =      self.head
        while node:
              yield node.data
              SCREAMING_SNAKE_CASE       :					int        =      node.next


  def __len__(	self			:       List[Any]						)    ->Dict:
        """simple docstring"""







        return sum(1 for _ in self						)


  def __repr__(	self			:       List[str]						)    ->Optional[int]:
        """simple docstring"""







        return "->".join([str(A_						) for item in self]						)


  def __getitem__(	self			:       Optional[int] , UpperCAmelCase__			:       int						)    ->int:
        """simple docstring"""







        if not 0 <= index < len(self						):
              raise ValueError("""list index out of range."""						)
        for i, node in enumerate(self						):
              if i == index:
                    return node
        return None


  def __setitem__(	self			:       str , UpperCAmelCase__			:       int , UpperCAmelCase__			:       Any						)    ->List[Any]:
        """simple docstring"""







        if not 0 <= index < len(self						):
              raise ValueError("""list index out of range."""						)
        SCREAMING_SNAKE_CASE       :					Optional[Any]        =      self.head
        for _ in range(A_						):
              SCREAMING_SNAKE_CASE       :					Tuple        =      current.next
        SCREAMING_SNAKE_CASE       :					List[str]        =      data


  def        _lowercase					(	self			:       List[Any] , UpperCAmelCase__			:       Any						)    ->Any:
        """simple docstring"""







        self.insert_nth(len(self						) , A_						)


  def        _lowercase					(	self			:       Optional[int] , UpperCAmelCase__			:       Any						)    ->Dict:
        """simple docstring"""







        self.insert_nth(0 , A_						)


  def        _lowercase					(	self			:       Tuple , UpperCAmelCase__			:       int , UpperCAmelCase__			:       Any						)    ->List[Any]:
        """simple docstring"""







        if not 0 <= index <= len(self						):
              raise IndexError("""list index out of range"""						)
        SCREAMING_SNAKE_CASE       :					Any        =      Node(A_						)
        if self.head is None:
              SCREAMING_SNAKE_CASE       :					Any        =      new_node
        elif index == 0:
              SCREAMING_SNAKE_CASE       :					List[Any]        =      self.head  # link new_node to head
              SCREAMING_SNAKE_CASE       :					Union[str, Any]        =      new_node
        else:
              SCREAMING_SNAKE_CASE       :					Optional[Any]        =      self.head
              for _ in range(index - 1						):
                    SCREAMING_SNAKE_CASE       :					Union[str, Any]        =      temp.next
              SCREAMING_SNAKE_CASE       :					str        =      temp.next
              SCREAMING_SNAKE_CASE       :					List[str]        =      new_node


  def        _lowercase					(	self			:       List[Any]						)    ->Optional[int]:  # print every node data
        """simple docstring"""







        print(self						)


  def        _lowercase					(	self			:       str						)    ->Tuple:
        """simple docstring"""







        return self.delete_nth(0						)


  def        _lowercase					(	self			:       Any						)    ->Tuple:  # delete from tail
        """simple docstring"""







        return self.delete_nth(len(self						) - 1						)


  def        _lowercase					(	self			:       Union[str, Any] , UpperCAmelCase__			:       int = 0						)    ->List[str]:
        """simple docstring"""







        if not 0 <= index <= len(self						) - 1:  # test if index is valid
              raise IndexError("""List index out of range."""						)
        SCREAMING_SNAKE_CASE       :					Optional[Any]        =      self.head  # default first node
        if index == 0:
              SCREAMING_SNAKE_CASE       :					Any        =      self.head.next
        else:
              SCREAMING_SNAKE_CASE       :					int        =      self.head
              for _ in range(index - 1						):
                    SCREAMING_SNAKE_CASE       :					Dict        =      temp.next
              SCREAMING_SNAKE_CASE       :					Any        =      temp.next
              SCREAMING_SNAKE_CASE       :					str        =      temp.next.next
        return delete_node.data


  def        _lowercase					(	self			:       str						)    ->Any:
        """simple docstring"""







        return self.head is None




  def        _lowercase					(	self			:       int						)    ->Optional[int]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE       :					Tuple        =      None
        SCREAMING_SNAKE_CASE       :					List[Any]        =      self.head

        while current:
              # Store the current node's next node.
              SCREAMING_SNAKE_CASE       :					Optional[int]        =      current.next
              # Make the current node's next point backwards
              SCREAMING_SNAKE_CASE       :					Tuple        =      prev
              # Make the previous node be the current node
              SCREAMING_SNAKE_CASE       :					int        =      current
              # Make the current node the next node (to progress iteration)
              SCREAMING_SNAKE_CASE       :					List[Any]        =      next_node
        # Return prev in order to put the head at the end
        SCREAMING_SNAKE_CASE       :					Tuple        =      prev






def     __lowercase					(   )   ->  List[Any]:
      SCREAMING_SNAKE_CASE       :					int        =      LinkedList()
      assert linked_list.is_empty() is True
      assert str(__UpperCamelCase	) == ""

      try:
            linked_list.delete_head()
            raise AssertionError  # This should not happen.
      except IndexError:
            assert True  # This should happen.

      try:
            linked_list.delete_tail()
            raise AssertionError  # This should not happen.
      except IndexError:
            assert True  # This should happen.

      for i in range(10	):
            assert len(__UpperCamelCase	) == i
            linked_list.insert_nth(__UpperCamelCase  ,			i + 1	)
      assert str(__UpperCamelCase	) == "->".join(str(__UpperCamelCase	) for i in range(1  ,			11	)	)

      linked_list.insert_head(0	)
      linked_list.insert_tail(11	)
      assert str(__UpperCamelCase	) == "->".join(str(__UpperCamelCase	) for i in range(0  ,			12	)	)

      assert linked_list.delete_head() == 0
      assert linked_list.delete_nth(9	) == 10
      assert linked_list.delete_tail() == 11
      assert len(__UpperCamelCase	) == 9
      assert str(__UpperCamelCase	) == "->".join(str(__UpperCamelCase	) for i in range(1  ,			10	)	)

      assert all(linked_list[i] == i + 1 for i in range(0  ,			9	)	) is True

      for i in range(0  ,			9	):
            SCREAMING_SNAKE_CASE       :					int        =      -i
      assert all(linked_list[i] == -i for i in range(0  ,			9	)	) is True

      linked_list.reverse()
      assert str(__UpperCamelCase	) == "->".join(str(__UpperCamelCase	) for i in range(-8  ,			1	)	)






def     __lowercase					(   )   ->  List[Any]:
      SCREAMING_SNAKE_CASE       :					Dict        =      [
          -9,
          100,
          Node(77345112	),
          '''dlrow olleH''',
          7,
          5555,
          0,
          -192.55555,
          '''Hello, world!''',
          77.9,
          Node(10	),
          None,
          None,
          12.20,
      ]
      SCREAMING_SNAKE_CASE       :					Any        =      LinkedList()

      for i in test_input:
            linked_list.insert_tail(__UpperCamelCase	)

      # Check if it's empty or not
      assert linked_list.is_empty() is False
      assert (
          str(__UpperCamelCase	) == "-9->100->Node(77345112)->dlrow olleH->7->5555->0->"
          "-192.55555->Hello, world!->77.9->Node(10)->None->None->12.2"
      )

      # Delete the head
      SCREAMING_SNAKE_CASE       :					int        =      linked_list.delete_head()
      assert result == -9
      assert (
          str(__UpperCamelCase	) == "100->Node(77345112)->dlrow olleH->7->5555->0->-192.55555->"
          "Hello, world!->77.9->Node(10)->None->None->12.2"
      )

      # Delete the tail
      SCREAMING_SNAKE_CASE       :					Optional[int]        =      linked_list.delete_tail()
      assert result == 12.2
      assert (
          str(__UpperCamelCase	) == "100->Node(77345112)->dlrow olleH->7->5555->0->-192.55555->"
          "Hello, world!->77.9->Node(10)->None->None"
      )

      # Delete a node in specific location in linked list
      SCREAMING_SNAKE_CASE       :					Dict        =      linked_list.delete_nth(10	)
      assert result is None
      assert (
          str(__UpperCamelCase	) == "100->Node(77345112)->dlrow olleH->7->5555->0->-192.55555->"
          "Hello, world!->77.9->Node(10)->None"
      )

      # Add a Node instance to its head
      linked_list.insert_head(Node("""Hello again, world!"""	)	)
      assert (
          str(__UpperCamelCase	)
          == "Node(Hello again, world!)->100->Node(77345112)->dlrow olleH->"
          "7->5555->0->-192.55555->Hello, world!->77.9->Node(10)->None"
      )

      # Add None to its tail
      linked_list.insert_tail(__UpperCamelCase	)
      assert (
          str(__UpperCamelCase	)
          == "Node(Hello again, world!)->100->Node(77345112)->dlrow olleH->"
          "7->5555->0->-192.55555->Hello, world!->77.9->Node(10)->None->None"
      )

      # Reverse the linked list
      linked_list.reverse()
      assert (
          str(__UpperCamelCase	)
          == "None->None->Node(10)->77.9->Hello, world!->-192.55555->0->5555->"
          "7->dlrow olleH->Node(77345112)->100->Node(Hello again, world!)"
      )






def     __lowercase					(   )   ->  int:
      from doctest import testmod

      testmod()

      SCREAMING_SNAKE_CASE       :					Any        =      LinkedList()
      linked_list.insert_head(input("""Inserting 1st at head """	).strip()	)
      linked_list.insert_head(input("""Inserting 2nd at head """	).strip()	)
      print("""\nPrint list:"""	)
      linked_list.print_list()
      linked_list.insert_tail(input("""\nInserting 1st at tail """	).strip()	)
      linked_list.insert_tail(input("""Inserting 2nd at tail """	).strip()	)
      print("""\nPrint list:"""	)
      linked_list.print_list()
      print("""\nDelete head"""	)
      linked_list.delete_head()
      print("""Delete tail"""	)
      linked_list.delete_tail()
      print("""\nPrint list:"""	)
      linked_list.print_list()
      print("""\nReverse linked list"""	)
      linked_list.reverse()
      print("""\nPrint list:"""	)
      linked_list.print_list()
      print("""\nString representation of linked list:"""	)
      print(__UpperCamelCase	)
      print("""\nReading/changing Node data using indexing:"""	)
      print(F"Element at Position 1: {linked_list[1]}"	)
      SCREAMING_SNAKE_CASE       :					Optional[Any]        =      input("""Enter New Value: """	).strip()
      print("""New list:"""	)
      print(__UpperCamelCase	)
      print(F"length of linked_list is : {len(__UpperCamelCase	)}"	)


if __name__ == "__main__":
  main()









import gc
import random
import unittest

import torch

from diffusers import (
    IFImgaImgPipeline,
    IFImgaImgSuperResolutionPipeline,
    IFInpaintingPipeline,
    IFInpaintingSuperResolutionPipeline,
    IFPipeline,
    IFSuperResolutionPipeline,
)
from diffusers.models.attention_processor import AttnAddedKVProcessor
from diffusers.utils.import_utils import is_xformers_available
from diffusers.utils.testing_utils import floats_tensor, load_numpy, require_torch_gpu, skip_mps, slow, torch_device

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



@skip_mps
class 				__snake_case						(     UpperCamelCase_						,UpperCamelCase_						,unittest.TestCase						):
							_a			      = IFPipeline
							_a			      = TEXT_TO_IMAGE_PARAMS - {'''width''', '''height''', '''latents'''}
							_a			      = TEXT_TO_IMAGE_BATCH_PARAMS
							_a			      = PipelineTesterMixin.required_optional_params - {'''latents'''}




							def    UpperCAmelCase__			(       self     :       List[str]):
									return self._get_dummy_components()




							def    UpperCAmelCase__			(       self     :       List[str]				,				A_     :       List[Any]				,				A_     :       Any=0):
									if str(A_).startswith('''mps'''):
											lowerCAmelCase_			:     List[Any]									= torch.manual_seed(A_)
									else:
											lowerCAmelCase_			:     List[str]									= torch.Generator(device=A_).manual_seed(A_)

									lowerCAmelCase_			:     Optional[Any]									= {
									    '''prompt''': '''A painting of a squirrel eating a burger''',
									    '''generator''': generator,
									    '''num_inference_steps''': 2,
									    '''output_type''': '''numpy''',
									}

									return inputs




							def    UpperCAmelCase__			(       self     :       int):
									self._test_save_load_optional_components()




							@unittest.skipIf(torch_device != '''cuda'''				,				reason='''float16 requires CUDA''')
							def    UpperCAmelCase__			(       self     :       str):
									# Due to non-determinism in save load of the hf-internal-testing/tiny-random-t5 text encoder
									super().test_save_load_floataa(expected_max_diff=1e-1)




							def    UpperCAmelCase__			(       self     :       str):
									self._test_attention_slicing_forward_pass(expected_max_diff=1e-2)




							def    UpperCAmelCase__			(       self     :       int):
									self._test_save_load_local()




							def    UpperCAmelCase__			(       self     :       str):
									self._test_inference_batch_single_identical(
									    expected_max_diff=1e-2				,				)







							@unittest.skipIf(
							    torch_device != '''cuda''' or not is_xformers_available()				,				reason='''XFormers attention is only available with CUDA and `xformers` installed'''				,				)
							def    UpperCAmelCase__			(       self     :       Optional[int]):
									self._test_xformers_attention_forwardGenerator_pass(expected_max_diff=1e-3)





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




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




							def    UpperCAmelCase__			(       self     :       List[str]):
									# if

									lowerCAmelCase_			:     Dict									= IFPipeline.from_pretrained('''DeepFloyd/IF-I-XL-v1.0'''				,				variant='''fp16'''				,				torch_dtype=torch.floataa)

									lowerCAmelCase_			:     Dict									= IFSuperResolutionPipeline.from_pretrained(
									    '''DeepFloyd/IF-II-L-v1.0'''				,				variant='''fp16'''				,				torch_dtype=torch.floataa				,				text_encoder=A_				,				tokenizer=A_)

									# pre compute text embeddings and remove T5 to save memory

									pipe_a.text_encoder.to('''cuda''')

									lowerCAmelCase_					,  lowerCAmelCase_			:     List[str]									= pipe_a.encode_prompt('''anime turtle'''				,				device='''cuda''')

									del pipe_a.tokenizer
									del pipe_a.text_encoder
									gc.collect()

									lowerCAmelCase_			:     Tuple									= None
									lowerCAmelCase_			:     str									= None

									pipe_a.enable_model_cpu_offload()
									pipe_a.enable_model_cpu_offload()

									pipe_a.unet.set_attn_processor(AttnAddedKVProcessor())
									pipe_a.unet.set_attn_processor(AttnAddedKVProcessor())

									self._test_if(A_				,				A_				,				A_				,				A_)

									pipe_a.remove_all_hooks()
									pipe_a.remove_all_hooks()

									# img2img

									lowerCAmelCase_			:     List[str]									= IFImgaImgPipeline(**pipe_a.components)
									lowerCAmelCase_			:     Any									= IFImgaImgSuperResolutionPipeline(**pipe_a.components)

									pipe_a.enable_model_cpu_offload()
									pipe_a.enable_model_cpu_offload()

									pipe_a.unet.set_attn_processor(AttnAddedKVProcessor())
									pipe_a.unet.set_attn_processor(AttnAddedKVProcessor())

									self._test_if_imgaimg(A_				,				A_				,				A_				,				A_)

									pipe_a.remove_all_hooks()
									pipe_a.remove_all_hooks()

									# inpainting

									lowerCAmelCase_			:     int									= IFInpaintingPipeline(**pipe_a.components)
									lowerCAmelCase_			:     Union[str, Any]									= IFInpaintingSuperResolutionPipeline(**pipe_a.components)

									pipe_a.enable_model_cpu_offload()
									pipe_a.enable_model_cpu_offload()

									pipe_a.unet.set_attn_processor(AttnAddedKVProcessor())
									pipe_a.unet.set_attn_processor(AttnAddedKVProcessor())

									self._test_if_inpainting(A_				,				A_				,				A_				,				A_)




							def    UpperCAmelCase__			(       self     :       int				,				A_     :       Optional[int]				,				A_     :       Any				,				A_     :       str				,				A_     :       Union[str, Any]):
									# pipeline 1

									_start_torch_memory_measurement()

									lowerCAmelCase_			:     Optional[Any]									= torch.Generator(device='''cpu''').manual_seed(0)
									lowerCAmelCase_			:     Optional[Any]									= pipe_a(
									    prompt_embeds=A_				,				negative_prompt_embeds=A_				,				num_inference_steps=2				,				generator=A_				,				output_type='''np'''				,				)

									lowerCAmelCase_			:     Dict									= output.images[0]

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

									lowerCAmelCase_			:     Any									= torch.cuda.max_memory_allocated()
									assert mem_bytes < 1_3 * 1_0**9

									lowerCAmelCase_			:     List[str]									= load_numpy(
									    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if.npy''')
									assert_mean_pixel_difference(A_				,				A_)

									# pipeline 2

									_start_torch_memory_measurement()

									lowerCAmelCase_			:     List[str]									= torch.Generator(device='''cpu''').manual_seed(0)

									lowerCAmelCase_			:     str									= floats_tensor((1, 3, 6_4, 6_4)				,				rng=random.Random(0)).to(A_)

									lowerCAmelCase_			:     Optional[int]									= pipe_a(
									    prompt_embeds=A_				,				negative_prompt_embeds=A_				,				image=A_				,				generator=A_				,				num_inference_steps=2				,				output_type='''np'''				,				)

									lowerCAmelCase_			:     Union[str, Any]									= output.images[0]

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

									lowerCAmelCase_			:     Any									= torch.cuda.max_memory_allocated()
									assert mem_bytes < 4 * 1_0**9

									lowerCAmelCase_			:     int									= load_numpy(
									    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_superresolution_stage_II.npy''')
									assert_mean_pixel_difference(A_				,				A_)




							def    UpperCAmelCase__			(       self     :       int				,				A_     :       Optional[int]				,				A_     :       Any				,				A_     :       List[str]				,				A_     :       List[str]):
									# pipeline 1

									_start_torch_memory_measurement()

									lowerCAmelCase_			:     Any									= floats_tensor((1, 3, 6_4, 6_4)				,				rng=random.Random(0)).to(A_)

									lowerCAmelCase_			:     Tuple									= torch.Generator(device='''cpu''').manual_seed(0)

									lowerCAmelCase_			:     Any									= pipe_a(
									    prompt_embeds=A_				,				negative_prompt_embeds=A_				,				image=A_				,				num_inference_steps=2				,				generator=A_				,				output_type='''np'''				,				)

									lowerCAmelCase_			:     Union[str, Any]									= output.images[0]

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

									lowerCAmelCase_			:     str									= torch.cuda.max_memory_allocated()
									assert mem_bytes < 1_0 * 1_0**9

									lowerCAmelCase_			:     Optional[int]									= load_numpy(
									    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_img2img.npy''')
									assert_mean_pixel_difference(A_				,				A_)

									# pipeline 2

									_start_torch_memory_measurement()

									lowerCAmelCase_			:     int									= torch.Generator(device='''cpu''').manual_seed(0)

									lowerCAmelCase_			:     List[Any]									= floats_tensor((1, 3, 2_5_6, 2_5_6)				,				rng=random.Random(0)).to(A_)
									lowerCAmelCase_			:     Any									= floats_tensor((1, 3, 6_4, 6_4)				,				rng=random.Random(0)).to(A_)

									lowerCAmelCase_			:     List[str]									= pipe_a(
									    prompt_embeds=A_				,				negative_prompt_embeds=A_				,				image=A_				,				original_image=A_				,				generator=A_				,				num_inference_steps=2				,				output_type='''np'''				,				)

									lowerCAmelCase_			:     Union[str, Any]									= output.images[0]

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

									lowerCAmelCase_			:     str									= torch.cuda.max_memory_allocated()
									assert mem_bytes < 4 * 1_0**9

									lowerCAmelCase_			:     Tuple									= load_numpy(
									    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_img2img_superresolution_stage_II.npy''')
									assert_mean_pixel_difference(A_				,				A_)







							def    UpperCAmelCase__			(       self     :       str				,				A_     :       Optional[Any]				,				A_     :       Optional[Any]				,				A_     :       Dict				,				A_     :       List[str]):
									# pipeline 1

									_start_torch_memory_measurement()

									lowerCAmelCase_			:     Union[str, Any]									= floats_tensor((1, 3, 6_4, 6_4)				,				rng=random.Random(0)).to(A_)
									lowerCAmelCase_			:     int									= floats_tensor((1, 3, 6_4, 6_4)				,				rng=random.Random(1)).to(A_)

									lowerCAmelCase_			:     Optional[Any]									= torch.Generator(device='''cpu''').manual_seed(0)
									lowerCAmelCase_			:     Any									= pipe_a(
									    prompt_embeds=A_				,				negative_prompt_embeds=A_				,				image=A_				,				mask_image=A_				,				num_inference_steps=2				,				generator=A_				,				output_type='''np'''				,				)

									lowerCAmelCase_			:     List[Any]									= output.images[0]

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

									lowerCAmelCase_			:     str									= torch.cuda.max_memory_allocated()
									assert mem_bytes < 1_0 * 1_0**9

									lowerCAmelCase_			:     int									= load_numpy(
									    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_inpainting.npy''')
									assert_mean_pixel_difference(A_				,				A_)

									# pipeline 2

									_start_torch_memory_measurement()

									lowerCAmelCase_			:     Optional[Any]									= torch.Generator(device='''cpu''').manual_seed(0)

									lowerCAmelCase_			:     Optional[Any]									= floats_tensor((1, 3, 6_4, 6_4)				,				rng=random.Random(0)).to(A_)
									lowerCAmelCase_			:     Union[str, Any]									= floats_tensor((1, 3, 2_5_6, 2_5_6)				,				rng=random.Random(0)).to(A_)
									lowerCAmelCase_			:     Optional[Any]									= floats_tensor((1, 3, 2_5_6, 2_5_6)				,				rng=random.Random(1)).to(A_)

									lowerCAmelCase_			:     int									= pipe_a(
									    prompt_embeds=A_				,				negative_prompt_embeds=A_				,				image=A_				,				mask_image=A_				,				original_image=A_				,				generator=A_				,				num_inference_steps=2				,				output_type='''np'''				,				)

									lowerCAmelCase_			:     Tuple									= output.images[0]

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

									lowerCAmelCase_			:     int									= torch.cuda.max_memory_allocated()
									assert mem_bytes < 4 * 1_0**9

									lowerCAmelCase_			:     Any									= load_numpy(
									    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/if/test_if_inpainting_superresolution_stage_II.npy''')
									assert_mean_pixel_difference(A_				,				A_)





def 			UpperCamelCase(  ):
		torch.cuda.empty_cache()
		torch.cuda.reset_max_memory_allocated()
		torch.cuda.reset_peak_memory_stats()





