from manim import *





class      A							(				UpperCAmelCase_     ):


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



         UpperCAmelCase__								=  Rectangle(height=0.5       ,  width=0.5		)
         UpperCAmelCase__								=  Rectangle(height=0.46       ,  width=0.46		).set_stroke(width=0		)

         UpperCAmelCase__								=  [mem.copy() for i in range(6		)]
         UpperCAmelCase__								=  [mem.copy() for i in range(6		)]
         UpperCAmelCase__								=  VGroup(*__UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0		)
         UpperCAmelCase__								=  VGroup(*__UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0		)
         UpperCAmelCase__								=  VGroup(__UpperCAmelCase       ,  __UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0		)
         UpperCAmelCase__								=  Text("CPU"       ,  font_size=2_4		)
         UpperCAmelCase__								=  Group(__UpperCAmelCase       ,  __UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0.5       ,  aligned_edge=__UpperCAmelCase		)
         cpu.move_to([-2.5, -0.5, 0]		)
         self.add(__UpperCAmelCase		)

         UpperCAmelCase__								=  [mem.copy() for i in range(1		)]
         UpperCAmelCase__								=  VGroup(*__UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0		)
         UpperCAmelCase__								=  Text("GPU"       ,  font_size=2_4		)
         UpperCAmelCase__								=  Group(__UpperCAmelCase       ,  __UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0.5       ,  aligned_edge=__UpperCAmelCase		)
         gpu.align_to(__UpperCAmelCase       ,  __UpperCAmelCase		)
         gpu.set_x(gpu.get_x() - 1		)

         self.add(__UpperCAmelCase		)

         UpperCAmelCase__								=  [mem.copy() for i in range(6		)]
         UpperCAmelCase__								=  VGroup(*__UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0		)

         UpperCAmelCase__								=  Text("Model"       ,  font_size=2_4		)
         UpperCAmelCase__								=  Group(__UpperCAmelCase       ,  __UpperCAmelCase		).arrange(__UpperCAmelCase       ,  buff=0.5       ,  aligned_edge=__UpperCAmelCase		)
         model.move_to([3, -1.0, 0]		)

         self.play(
             Create(__UpperCAmelCase       ,  run_time=1		)       ,  Create(__UpperCAmelCase       ,  run_time=1		)       ,  Create(__UpperCAmelCase       ,  run_time=1		)       ,  )

         UpperCAmelCase__								=  MarkupText(
             f"""First, an empty model skeleton is loaded\ninto <span fgcolor='{YELLOW}'>memory</span> without using much RAM."""       ,  font_size=2_4       ,  )

         UpperCAmelCase__								=  Square(side_length=2.2		)
         key.move_to([-5, 2, 0]		)

         UpperCAmelCase__								=  MarkupText(
             f"""<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model"""       ,  font_size=1_8       ,  )

         key_text.move_to([-5, 2.4, 0]		)

         step_a.move_to([2, 2, 0]		)
         self.play(Write(__UpperCAmelCase       ,  run_time=2.5		)       ,  Write(__UpperCAmelCase		)       ,  Write(__UpperCAmelCase		)		)

         self.add(__UpperCAmelCase		)

         UpperCAmelCase__								=  []
         UpperCAmelCase__								=  []
         UpperCAmelCase__								=  []
         for i, rect in enumerate(__UpperCAmelCase		):
               UpperCAmelCase__								=  Rectangle(height=0.46       ,  width=0.46		).set_stroke(width=0.0		).set_fill(__UpperCAmelCase       ,  opacity=0.7		)
               cpu_target.move_to(__UpperCAmelCase		)
               cpu_target.generate_target()
               UpperCAmelCase__								=  0.46 / 4
               UpperCAmelCase__								=  0.46 / 3

               if i == 0:
                     cpu_target.target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT		)       ,  buff=0.02       ,  direction=__UpperCAmelCase		)
                     cpu_target.target.set_x(cpu_target.target.get_x() + 0.1		)
               elif i == 3:
                     cpu_target.target.next_to(cpu_targs[0].target       ,  direction=__UpperCAmelCase       ,  buff=0.0		)
               else:
                     cpu_target.target.next_to(cpu_targs[i - 1].target       ,  direction=__UpperCAmelCase       ,  buff=0.0		)
               cpu_targs.append(__UpperCAmelCase		)

               first_animations.append(rect.animate(run_time=0.5		).set_stroke(__UpperCAmelCase		)		)
               second_animations.append(MoveToTarget(__UpperCAmelCase       ,  run_time=1.5		)		)

         self.play(*__UpperCAmelCase		)
         self.play(*__UpperCAmelCase		)

         self.wait()





"""simple docstring"""



UpperCAmelCase__          = {
    'Pillow': 'Pillow',
    'accelerate': 'accelerate>=0.11.0',
    'compel': 'compel==0.1.8',
    'black': 'black~=23.1',
    'datasets': 'datasets',
    'filelock': 'filelock',
    'flax': 'flax>=0.4.1',
    'hf-doc-builder': 'hf-doc-builder>=0.3.0',
    'huggingface-hub': 'huggingface-hub>=0.13.2',
    'requests-mock': 'requests-mock==1.10.0',
    'importlib_metadata': 'importlib_metadata',
    'invisible-watermark': 'invisible-watermark',
    'isort': 'isort>=5.5.4',
    'jax': 'jax>=0.2.8,!=0.3.2',
    'jaxlib': 'jaxlib>=0.1.65',
    'Jinja2': 'Jinja2',
    'k-diffusion': 'k-diffusion>=0.0.12',
    'torchsde': 'torchsde',
    'note_seq': 'note_seq',
    'librosa': 'librosa',
    'numpy': 'numpy',
    'omegaconf': 'omegaconf',
    'parameterized': 'parameterized',
    'protobuf': 'protobuf>=3.20.3,<4',
    'pytest': 'pytest',
    'pytest-timeout': 'pytest-timeout',
    'pytest-xdist': 'pytest-xdist',
    'ruff': 'ruff>=0.0.241',
    'safetensors': 'safetensors',
    'sentencepiece': 'sentencepiece>=0.1.91,!=0.1.92',
    'scipy': 'scipy',
    'onnx': 'onnx',
    'regex': 'regex!=2019.12.17',
    'requests': 'requests',
    'tensorboard': 'tensorboard',
    'torch': 'torch>=1.4',
    'torchvision': 'torchvision',
    'transformers': 'transformers>=4.25.1',
    'urllib3': 'urllib3<=2.0.0',
}



