


"""simple docstring"""




import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible




class 			__snake_case   (unittest.TestCase  ):




							def   __a   (     self:    List[str]   ):
										__lowerCamelCase          =      [
										    """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(A_   )   )




							def   __a   (     self:    str   ):
										__lowerCamelCase          =      [
										    """unet/diffusion_pytorch_model.bin""",
										    """unet/diffusion_pytorch_model.safetensors""",
										]
										self.assertTrue(is_safetensors_compatible(A_   )   )




							def   __a   (     self:    List[str]   ):
										__lowerCamelCase          =      [
										    """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(A_   )   )




							def   __a   (     self:    Tuple   ):
										__lowerCamelCase          =      [
										    """text_encoder/pytorch_model.bin""",
										    """text_encoder/model.safetensors""",
										]
										self.assertTrue(is_safetensors_compatible(A_   )   )




							def   __a   (     self:    str   ):
										__lowerCamelCase          =      [
										    """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(A_   )   )




							def   __a   (     self:    str   ):
										__lowerCamelCase          =      [
										    """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          =      """fp16"""
										self.assertTrue(is_safetensors_compatible(A_     ,							variant=A_   )   )




							def   __a   (     self:    int   ):
										__lowerCamelCase          =      [
										    """unet/diffusion_pytorch_model.fp16.bin""",
										    """unet/diffusion_pytorch_model.fp16.safetensors""",
										]
										__lowerCamelCase          =      """fp16"""
										self.assertTrue(is_safetensors_compatible(A_     ,							variant=A_   )   )




							def   __a   (     self:    Any   ):
										# pass variant but use the non-variant filenames
										__lowerCamelCase          =      [
										    """unet/diffusion_pytorch_model.bin""",
										    """unet/diffusion_pytorch_model.safetensors""",
										]
										__lowerCamelCase          =      """fp16"""
										self.assertTrue(is_safetensors_compatible(A_     ,							variant=A_   )   )




							def   __a   (     self:    Dict   ):
										__lowerCamelCase          =      [
										    """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          =      """fp16"""
										self.assertFalse(is_safetensors_compatible(A_     ,							variant=A_   )   )




							def   __a   (     self:    List[str]   ):
										__lowerCamelCase          =      [
										    """text_encoder/pytorch_model.fp16.bin""",
										    """text_encoder/model.fp16.safetensors""",
										]
										__lowerCamelCase          =      """fp16"""
										self.assertTrue(is_safetensors_compatible(A_     ,							variant=A_   )   )




							def   __a   (     self:    List[Any]   ):
										# pass variant but use the non-variant filenames
										__lowerCamelCase          =      [
										    """text_encoder/pytorch_model.bin""",
										    """text_encoder/model.safetensors""",
										]
										__lowerCamelCase          =      """fp16"""
										self.assertTrue(is_safetensors_compatible(A_     ,							variant=A_   )   )




							def   __a   (     self:    int   ):
										__lowerCamelCase          =      [
										    """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          =      """fp16"""
										self.assertFalse(is_safetensors_compatible(A_     ,							variant=A_   )   )








"""simple docstring"""




from __future__ import annotations





def       a_ (	lowercase__ :list[float]     ):
			if len(lowercase__     ) < 2:
						raise ValueError("""Monogons and Digons are not polygons in the Euclidean space"""     )
			if any(i <= 0 for i in nums     ):
						raise ValueError("""All values must be greater than 0"""     )
			__lowerCamelCase          =      nums.copy()
			copy_nums.sort()
			return copy_nums[-1] < sum(copy_nums[:-1]     )


if __name__ == "__main__":
					import doctest

					doctest.testmod()




