




'''simple docstring'''



def 			SCREAMING_SNAKE_CASE_			(							__A    :			str  )			->			str:
   return "".join(chr(ord(__A  ) - 32  ) if "a" <= char <= "z" else char for char in word  )


if __name__ == "__main__":
 from doctest import testmod

 testmod()







'''simple docstring'''



import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible







class 		lowercase_   (			unittest.TestCase       ):


   """simple docstring"""

   def 							lowerCAmelCase_      (   self :     List[Any]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "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(__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Dict   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "unet/diffusion_pytorch_model.bin",
          "unet/diffusion_pytorch_model.safetensors",
      ]
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Tuple   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "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(__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     List[str]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "text_encoder/pytorch_model.bin",
          "text_encoder/model.safetensors",
      ]
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     int   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "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(__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Optional[int]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "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",
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Any   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "unet/diffusion_pytorch_model.fp16.bin",
          "unet/diffusion_pytorch_model.fp16.safetensors",
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Tuple   ):

      """simple docstring"""
      # pass variant but use the non-variant filenames
      _SCREAMING_SNAKE_CASE	=				[
          "unet/diffusion_pytorch_model.bin",
          "unet/diffusion_pytorch_model.safetensors",
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     int   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "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',
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertFalse(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Dict   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "text_encoder/pytorch_model.fp16.bin",
          "text_encoder/model.fp16.safetensors",
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     str   ):

      """simple docstring"""
      # pass variant but use the non-variant filenames
      _SCREAMING_SNAKE_CASE	=				[
          "text_encoder/pytorch_model.bin",
          "text_encoder/model.safetensors",
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertTrue(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )



   def 							lowerCAmelCase_      (   self :     Optional[Any]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				[
          "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",
      ]
      _SCREAMING_SNAKE_CASE	=				"fp16"
      self.assertFalse(is_safetensors_compatible(__lowerCamelCase  ,				variant=__lowerCamelCase   )   )

