



import unittest

import numpy as np

from diffusers import OnnxStableDiffusionInpaintPipelineLegacy
from diffusers.utils.testing_utils import (
    is_onnx_available,
    load_image,
    load_numpy,
    nightly,
    require_onnxruntime,
    require_torch_gpu,
)


if is_onnx_available():
		import onnxruntime as ort







@nightly
@require_onnxruntime
@require_torch_gpu
class 		snake_case						(	unittest.TestCase  ):



			'''simple docstring'''






			@property
			def      UpperCamelCase_  (					self							:			str)				->				List[str]:

				"""simple docstring"""







				return (
				    "CUDAExecutionProvider",
				    {
				        "gpu_mem_limit": "15000000000",  # 15GB
				        "arena_extend_strategy": "kSameAsRequested",
				    },
				)

			@property
			def      UpperCamelCase_  (					self							:			Any)				->				Optional[Any]:

				"""simple docstring"""







				_snake_case    :  List[Any]					=					ort.SessionOptions()
				_snake_case    :  Optional[int]					=					False
				return options


			def      UpperCamelCase_  (					self							:			Union[str, Any])				->				Dict:

				"""simple docstring"""







				_snake_case    :  Any					=					load_image(
				    """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"""
				    """/in_paint/overture-creations-5sI6fQgYIuo.png""")
				_snake_case    :  int					=					load_image(
				    """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"""
				    """/in_paint/overture-creations-5sI6fQgYIuo_mask.png""")
				_snake_case    :  Union[str, Any]					=					load_numpy(
				    """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"""
				    """/in_paint/red_cat_sitting_on_a_park_bench_onnx.npy""")

				# using the PNDM scheduler by default
				_snake_case    :  str					=					OnnxStableDiffusionInpaintPipelineLegacy.from_pretrained(
				    """CompVis/stable-diffusion-v1-4"""				,		revision="""onnx"""				,		safety_checker=lowerCAmelCase				,		feature_extractor=lowerCAmelCase				,		provider=self.gpu_provider				,		sess_options=self.gpu_options				,		)
				pipe.set_progress_bar_config(disable=lowerCAmelCase)

				_snake_case    :  Dict					=					"""A red cat sitting on a park bench"""

				_snake_case    :  int					=					np.random.RandomState(0)
				_snake_case    :  Optional[Any]					=					pipe(
				    prompt=lowerCAmelCase				,		image=lowerCAmelCase				,		mask_image=lowerCAmelCase				,		strength=0.75				,		guidance_scale=7.5				,		num_inference_steps=15				,		generator=lowerCAmelCase				,		output_type="""np"""				,		)

				_snake_case    :  Optional[int]					=					output.images[0]

				assert image.shape == (512, 512, 3)
				assert np.abs(expected_image - image).max() < 1E-2





def       lowercase       (   SCREAMING_SNAKE_CASE__       :	int = 1_000				)  ->     int:
 _snake_case	,    _snake_case    :  str					=					1, 1
 _snake_case    :  List[Any]					=					2
 while True:
  _snake_case    :  Union[str, Any]					=					0
  _snake_case    :  int					=					fa + fa
  _snake_case	,    _snake_case    :  Union[str, Any]					=					fa, f
  index += 1
  for _ in str(SCREAMING_SNAKE_CASE__				):
   i += 1
  if i == n:
   break
 return index


if __name__ == "__main__":
  print(solution(int(str(input()).strip())))
