






"""simple docstring"""



from manim import *

class        a     (   a_	):







    def 			UpperCamelCase_      (			self       ):
      lowercase							    =       Rectangle(height=0.5							,		width=0.5       )
      lowercase							    =       Rectangle(height=0.4_6							,		width=0.4_6       ).set_stroke(width=0       )

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

      lowercase							    =       [mem.copy() for i in range(4       )]
      lowercase							    =       VGroup(*_lowerCamelCase       ).arrange(_lowerCamelCase							,		buff=0       )
      lowercase							    =       Text('GPU'							,		font_size=2_4       )
      lowercase							    =       Group(_lowerCamelCase							,		_lowerCamelCase       ).arrange(_lowerCamelCase							,		buff=0.5							,		aligned_edge=_lowerCamelCase       )
      gpu.move_to([-1, -1, 0]       )
      self.add(_lowerCamelCase       )

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

      lowercase							    =       Text('Model'							,		font_size=2_4       )
      lowercase							    =       Group(_lowerCamelCase							,		_lowerCamelCase       ).arrange(_lowerCamelCase							,		buff=0.5							,		aligned_edge=_lowerCamelCase       )
      model.move_to([3, -1.0, 0]       )
      self.add(_lowerCamelCase       )

      lowercase							    =       []
      for i, rect in enumerate(_lowerCamelCase       ):
        rect.set_stroke(_lowerCamelCase       )
        # target = fill.copy().set_fill(YELLOW, opacity=0.7)
        # target.move_to(rect)
        # self.add(target)

        lowercase							    =       Rectangle(height=0.4_6 / 4							,		width=0.4_6 / 3       ).set_stroke(width=0.0       ).set_fill(_lowerCamelCase							,		opacity=0.7       )

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

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

      lowercase							    =       Text('Loaded Checkpoint'							,		font_size=2_4       )
      lowercase							    =       Group(_lowerCamelCase							,		_lowerCamelCase       ).arrange(_lowerCamelCase							,		aligned_edge=_lowerCamelCase							,		buff=0.4       )
      checkpoint.move_to([3, 0.5, 0]       )

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

      lowercase							    =       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]       )

      self.add(_lowerCamelCase							,		_lowerCamelCase       )

      lowercase							    =       MarkupText(
          F'<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'							,		font_size=1_8							,		)

      blue_text.next_to(_lowerCamelCase							,		DOWN * 2.4							,		aligned_edge=key_text.get_left()       )

      lowercase							    =       MarkupText(
          F'Next, a <i><span fgcolor="{BLUE}">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor="{BLUE}">single shard</span>.'							,		font_size=2_4							,		)
      step_a.move_to([2, 2, 0]       )
      self.play(Write(_lowerCamelCase       )							,		Write(_lowerCamelCase       )       )

      self.play(Write(_lowerCamelCase							,		run_time=1       )							,		Create(_lowerCamelCase							,		run_time=1       )       )

      lowercase							    =       []
      lowercase							    =       []
      for i, rect in enumerate(_lowerCamelCase       ):
        lowercase							    =       fill.copy().set_fill(_lowerCamelCase							,		opacity=0.7       )
        target.move_to(_lowerCamelCase       )
        first_animations.append(GrowFromCenter(_lowerCamelCase							,		run_time=1       )       )

        lowercase							    =       target.copy()
        cpu_target.generate_target()
        if i < 5:
          cpu_target.target.move_to(cpu_left_col_base[i + 1]       )
        else:
          cpu_target.target.move_to(cpu_right_col_base[i - 5]       )
        second_animations.append(MoveToTarget(_lowerCamelCase							,		run_time=1.5       )       )

      self.play(*_lowerCamelCase       )
      self.play(*_lowerCamelCase       )
      self.wait()










"""simple docstring"""



from argparse import ArgumentParser

from .env import EnvironmentCommand
def 						_SCREAMING_SNAKE_CASE (    ):





  '''simple docstring'''





  lowercase							    =       ArgumentParser('Diffusers CLI tool'		,					usage='diffusers-cli <command> [<args>]'    )
  lowercase							    =       parser.add_subparsers(help='diffusers-cli command helpers'    )

  # Register commands
  EnvironmentCommand.register_subcommand(__snake_case    )

  # Let's go
  lowercase							    =       parser.parse_args()

  if not hasattr(__snake_case		,					'func'    ):
    parser.print_help()
    exit(1    )

  # Run
  lowercase							    =       args.func(__snake_case    )
  service.run()


if __name__ == "__main__":
    main()


