


'''simple docstring'''



import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible





class    UpperCAmelCase_  (unittest.TestCase  ):





    """simple docstring"""






    def       lowercase_				(							self	)				->     Tuple:
         __lowerCamelCase   :	Tuple								=		[
             'safety_checker/pytorch_model.bin',
             'safety_checker/model.safetensors',
             'vae/diffusion_pytorch_model.bin',
             'vae/diffusion_pytorch_model.safetensors',
             'text_encoder/pytorch_model.bin',
             'text_encoder/model.safetensors',
             'unet/diffusion_pytorch_model.bin',
             'unet/diffusion_pytorch_model.safetensors',
         ]
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Optional[int]:
         __lowerCamelCase   :	Tuple								=		[
             'unet/diffusion_pytorch_model.bin',
             'unet/diffusion_pytorch_model.safetensors',
         ]
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     List[Any]:
         __lowerCamelCase   :	List[str]								=		[
             'safety_checker/pytorch_model.bin',
             'safety_checker/model.safetensors',
             'vae/diffusion_pytorch_model.bin',
             'vae/diffusion_pytorch_model.safetensors',
             'text_encoder/pytorch_model.bin',
             'text_encoder/model.safetensors',
             'unet/diffusion_pytorch_model.bin',
             # Removed: 'unet/diffusion_pytorch_model.safetensors',
         ]
         self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Dict:
         __lowerCamelCase   :	str								=		[
             'text_encoder/pytorch_model.bin',
             'text_encoder/model.safetensors',
         ]
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     List[Any]:
         __lowerCamelCase   :	Union[str, Any]								=		[
             'safety_checker/pytorch_model.bin',
             'safety_checker/model.safetensors',
             'vae/diffusion_pytorch_model.bin',
             'vae/diffusion_pytorch_model.safetensors',
             'text_encoder/pytorch_model.bin',
             # Removed: 'text_encoder/model.safetensors',
             'unet/diffusion_pytorch_model.bin',
             'unet/diffusion_pytorch_model.safetensors',
         ]
         self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Dict:
         __lowerCamelCase   :	Any								=		[
             'safety_checker/pytorch_model.fp16.bin',
             'safety_checker/model.fp16.safetensors',
             'vae/diffusion_pytorch_model.fp16.bin',
             'vae/diffusion_pytorch_model.fp16.safetensors',
             'text_encoder/pytorch_model.fp16.bin',
             'text_encoder/model.fp16.safetensors',
             'unet/diffusion_pytorch_model.fp16.bin',
             'unet/diffusion_pytorch_model.fp16.safetensors',
         ]
         __lowerCamelCase   :	List[Any]								=		'fp16'
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Optional[Any]:
         __lowerCamelCase   :	Any								=		[
             'unet/diffusion_pytorch_model.fp16.bin',
             'unet/diffusion_pytorch_model.fp16.safetensors',
         ]
         __lowerCamelCase   :	Union[str, Any]								=		'fp16'
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     str:
         # pass variant but use the non-variant filenames
         __lowerCamelCase   :	str								=		[
             'unet/diffusion_pytorch_model.bin',
             'unet/diffusion_pytorch_model.safetensors',
         ]
         __lowerCamelCase   :	Optional[Any]								=		'fp16'
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Tuple:
         __lowerCamelCase   :	Dict								=		[
             'safety_checker/pytorch_model.fp16.bin',
             'safety_checker/model.fp16.safetensors',
             'vae/diffusion_pytorch_model.fp16.bin',
             'vae/diffusion_pytorch_model.fp16.safetensors',
             'text_encoder/pytorch_model.fp16.bin',
             'text_encoder/model.fp16.safetensors',
             'unet/diffusion_pytorch_model.fp16.bin',
             # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
         ]
         __lowerCamelCase   :	Optional[int]								=		'fp16'
         self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Optional[int]:
         __lowerCamelCase   :	int								=		[
             'text_encoder/pytorch_model.fp16.bin',
             'text_encoder/model.fp16.safetensors',
         ]
         __lowerCamelCase   :	Union[str, Any]								=		'fp16'
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     List[str]:
         # pass variant but use the non-variant filenames
         __lowerCamelCase   :	List[str]								=		[
             'text_encoder/pytorch_model.bin',
             'text_encoder/model.safetensors',
         ]
         __lowerCamelCase   :	int								=		'fp16'
         self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)







    def       lowercase_				(							self	)				->     Tuple:
         __lowerCamelCase   :	List[Any]								=		[
             'safety_checker/pytorch_model.fp16.bin',
             'safety_checker/model.fp16.safetensors',
             'vae/diffusion_pytorch_model.fp16.bin',
             'vae/diffusion_pytorch_model.fp16.safetensors',
             'text_encoder/pytorch_model.fp16.bin',
             # 'text_encoder/model.fp16.safetensors',
             'unet/diffusion_pytorch_model.fp16.bin',
             'unet/diffusion_pytorch_model.fp16.safetensors',
         ]
         __lowerCamelCase   :	str								=		'fp16'
         self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,     variant=SCREAMING_SNAKE_CASE_	)	)










'''simple docstring'''



from numpy import exp, pi, sqrt



def 			UpperCAmelCase__					(	UpperCAmelCase_    :				Optional[int]      ,    UpperCAmelCase_    :				float = 0.0      ,    UpperCAmelCase_    :				float = 1.0							)     ->		int:
     return 1 / sqrt(2 * pi * sigma**2							) * exp(-((x - mu) ** 2) / (2 * sigma**2)							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()






