




"""simple docstring"""

from itertools import product






def 		_snake_case	(   _snake_case				:   Dict							,    _snake_case				:   Dict				)       ->   list[int]:






      '''simple docstring'''


      _A     =  sides_number
      _A     =  max_face_number * dice_number
      _A     =  [0] * (max_total + 1)

      _A     =  1
      _A     =  range(_snake_case							,    max_face_number + 1				)
      for dice_numbers in product(_snake_case							,    repeat=_snake_case				):
            _A     =  sum(_snake_case				)
            totals_frequencies[total] += 1

      return totals_frequencies






def 		_snake_case	(   )       ->   float:






      '''simple docstring'''


      _A     =  total_frequency_distribution(
          sides_number=4							,    dice_number=9				)
      _A     =  total_frequency_distribution(
          sides_number=6							,    dice_number=6				)

      _A     =  0
      _A     =  9
      _A     =  4 * 9
      _A     =  6
      for peter_total in range(_snake_case							,    max_peter_total + 1				):
            peter_wins_count += peter_totals_frequencies[peter_total] * sum(
                colin_totals_frequencies[min_colin_total:peter_total]				)

      _A     =  (4**9) * (6**6)
      _A     =  peter_wins_count / total_games_number

      _A     =  round(_snake_case							,    ndigits=7				)

      return rounded_peter_win_probability


if __name__ == "__main__":
       print(F'''{solution() = }''')



import argparse

from transformers import CLIPImageProcessor, CLIPVisionModelWithProjection

from diffusers import UnCLIPImageVariationPipeline, UnCLIPPipeline


if __name__ == "__main__":
							lowerCamelCase_    :			int    =	argparse.ArgumentParser()

							parser.add_argument("""--dump_path""", default=None, type=str, required=True, help="""Path to the output model.""")

							parser.add_argument(
							    """--txt2img_unclip""",
							    default="""kakaobrain/karlo-v1-alpha""",
							    type=str,
							    required=False,
							    help="""The pretrained txt2img unclip.""",
							)

							lowerCamelCase_    :			Dict    =	parser.parse_args()

							lowerCamelCase_    :			str    =	UnCLIPPipeline.from_pretrained(args.txtaimg_unclip)

							lowerCamelCase_    :			int    =	CLIPImageProcessor()
							lowerCamelCase_    :			Any    =	CLIPVisionModelWithProjection.from_pretrained("""openai/clip-vit-large-patch14""")

							lowerCamelCase_    :			Union[str, Any]    =	UnCLIPImageVariationPipeline(
							    decoder=txtaimg.decoder,
							    text_encoder=txtaimg.text_encoder,
							    tokenizer=txtaimg.tokenizer,
							    text_proj=txtaimg.text_proj,
							    feature_extractor=feature_extractor,
							    image_encoder=image_encoder,
							    super_res_first=txtaimg.super_res_first,
							    super_res_last=txtaimg.super_res_last,
							    decoder_scheduler=txtaimg.decoder_scheduler,
							    super_res_scheduler=txtaimg.super_res_scheduler,
							)

							imgaimg.save_pretrained(args.dump_path)






