

'''simple docstring'''



from __future__ import annotations

from functools import lru_cache
from math import ceil

__snake_case :	List[Any]      						=			100

__snake_case :	List[Any]      						=			set(range(3, NUM_PRIMES, 2))
primes.add(2)
__snake_case :	Optional[int]      						=			42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
		if prime not in primes:
				continue
		primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))
@lru_cache(maxsize=100       )
def 						__lowerCamelCase       (   __snake_case     :		int       )       ->							Any:






						"""simple docstring"""





						if number_to_partition < 0:
												return set()
						elif number_to_partition == 0:
												return {1}

						A__     :   set[int]      =set()
						A__     :   int
						A__     :   int

						for prime in primes:
												if prime > number_to_partition:
																		continue
												for sub in partition(number_to_partition - prime       ):
																		ret.add(sub * prime       )

						return ret
def 						__lowerCamelCase       (   __snake_case     :		int = 5_000       )       ->							str:






						"""simple docstring"""





						for number_to_partition in range(1,		snake_case__       ):
												if len(partition(snake_case__       )       ) > number_unique_partitions:
																		return number_to_partition
						return None


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







"""simple docstring"""


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 					lowercase(     unittest.TestCase ):







 '''simple docstring'''





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




   '''simple docstring'''



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


 @property
 def  UpperCamelCase_   (				self:		int		):




   '''simple docstring'''



   _snake_case							:		Any								=  ort.SessionOptions()
   _snake_case							:		Union[str, Any]								=  False
   return options


 def  UpperCamelCase_   (				self:		List[Any]		):




   '''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							:		Union[str, Any]								=  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							:		Optional[Any]								=  OnnxStableDiffusionInpaintPipelineLegacy.from_pretrained(
       """CompVis/stable-diffusion-v1-4""",      revision="""onnx""",      safety_checker=a_,      feature_extractor=a_,      provider=self.gpu_provider,      sess_options=self.gpu_options,      )
   pipe.set_progress_bar_config(disable=a_		)

   _snake_case							:		Optional[Any]								=  """A red cat sitting on a park bench"""

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

   _snake_case							:		Dict								=  output.images[0]

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


