

'''simple docstring'''


lowerCAmelCase__						:       Optional[int]										=						[4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowerCAmelCase__						:       Dict										=						[3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowerCAmelCase__						:       str										=						{
    0: """Sunday""",
    1: """Monday""",
    2: """Tuesday""",
    3: """Wednesday""",
    4: """Thursday""",
    5: """Friday""",
    6: """Saturday""",
}




def 	_a       (				__lowerCAmelCase		:      Optional[int]   ,							__lowerCAmelCase		:      Dict   ,							__lowerCAmelCase		:      Union[str, Any]     ):

			"""simple docstring"""

			assert len(str(_lowerCAmelCase     )     ) > 2, "year should be in YYYY format"
			assert 1 <= month <= 12, "month should be between 1 to 12"
			assert 1 <= day <= 31, "day should be between 1 to 31"

			# Doomsday algorithm:
			snake_case__						:       int       						=  year // 1_00
			snake_case__						:       Optional[Any]       						=  (5 * (century % 4) + 2) % 7
			snake_case__						:       str       						=  year % 1_00
			snake_case__						:       List[str]       						=  centurian % 12
			snake_case__						:       Union[str, Any]       						=  (
			    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
			) % 7
			snake_case__						:       List[str]       						=  (
			    DOOMSDAY_NOT_LEAP[month - 1]
			    if (year % 4 != 0) or (centurian == 0 and (year % 4_00) == 0)
			    else DOOMSDAY_LEAP[month - 1]
			)
			snake_case__						:       Dict       						=  (dooms_day + day - day_anchor) % 7
			return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
					import doctest

					doctest.testmod()






'''simple docstring'''


import argparse

from transformers import CLIPImageProcessor, CLIPVisionModelWithProjection

from diffusers import UnCLIPImageVariationPipeline, UnCLIPPipeline


if __name__ == "__main__":
					lowerCAmelCase__						:       Dict										=						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__						:       List[Any]										=						parser.parse_args()

					lowerCAmelCase__						:       Optional[Any]										=						UnCLIPPipeline.from_pretrained(args.txtaimg_unclip)

					lowerCAmelCase__						:       Optional[int]										=						CLIPImageProcessor()
					lowerCAmelCase__						:       str										=						CLIPVisionModelWithProjection.from_pretrained("""openai/clip-vit-large-patch14""")

					lowerCAmelCase__						:       Dict										=						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)



