



"""simple docstring"""






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






def 					snake_case__       (		__lowerCamelCase    :   int							,		__lowerCamelCase    :   int							,		__lowerCamelCase    :   int     ):
			"""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:
			lowerCamelCase__		:		List[str]		     =year // 100
			lowerCamelCase__		:		Optional[int]		     =(5 * (century % 4) + 2) % 7
			lowerCamelCase__		:		List[str]		     =year % 100
			lowerCamelCase__		:		List[Any]		     =centurian % 12
			lowerCamelCase__		:		int		     =(
			    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
			) % 7
			lowerCamelCase__		:		Any		     =(
			    DOOMSDAY_NOT_LEAP[month - 1]
			    if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
			    else DOOMSDAY_LEAP[month - 1]
			)
			lowerCamelCase__		:		int		     =(dooms_day + day - day_anchor) % 7
			return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
		import doctest

		doctest.testmod()









"""simple docstring"""






import unittest

import numpy as np
import torch

from diffusers import VersatileDiffusionImageVariationPipeline
from diffusers.utils.testing_utils import load_image, require_torch_gpu, slow, torch_device


_lowercase			:			Tuple										=						False

class 	__SCREAMING_SNAKE_CASE     (				unittest.TestCase       ):


					'''simple docstring'''





					pass





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


					'''simple docstring'''





					def 		snake_case	(	self							:  List[Any]					)-> Dict:
								lowerCamelCase__		:		str		     =VersatileDiffusionImageVariationPipeline.from_pretrained('''shi-labs/versatile-diffusion'''					)
								pipe.to(lowerCamelCase					)
								pipe.set_progress_bar_config(disable=lowerCamelCase					)

								lowerCamelCase__		:		int		     =load_image(
								    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg'''					)
								lowerCamelCase__		:		Dict		     =torch.manual_seed(0					)
								lowerCamelCase__		:		str		     =pipe(
								    image=lowerCamelCase,  generator=lowerCamelCase,  guidance_scale=7.5,  num_inference_steps=50,  output_type='''numpy''',  ).images

								lowerCamelCase__		:		Dict		     =image[0, 253:256, 253:256, -1]

								assert image.shape == (1, 512, 512, 3)
								lowerCamelCase__		:		List[Any]		     =np.array([0.0_441, 0.0_469, 0.0_507, 0.0_575, 0.0_632, 0.0_650, 0.0_865, 0.0_909, 0.0_945]					)

								assert np.abs(image_slice.flatten() - expected_slice					).max() < 1E-2




