


import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible







class 		_snake_case  (      unittest.TestCase							):




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:int 							=       [
           '''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        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:str 							=       [
           '''unet/diffusion_pytorch_model.bin''',
           '''unet/diffusion_pytorch_model.safetensors''',
       ]
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						: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''',
           # Removed: 'unet/diffusion_pytorch_model.safetensors',
       ]
       self.assertFalse(is_safetensors_compatible(_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Union[str, Any] 							=       [
           '''text_encoder/pytorch_model.bin''',
           '''text_encoder/model.safetensors''',
       ]
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Dict 							=       [
           '''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        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Optional[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''',
       ]
       a						:Optional[int] 							=       '''fp16'''
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Any 							=       [
           '''unet/diffusion_pytorch_model.fp16.bin''',
           '''unet/diffusion_pytorch_model.fp16.safetensors''',
       ]
       a						:List[Any] 							=       '''fp16'''
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       # pass variant but use the non-variant filenames
       a						:List[str] 							=       [
           '''unet/diffusion_pytorch_model.bin''',
           '''unet/diffusion_pytorch_model.safetensors''',
       ]
       a						:Optional[int] 							=       '''fp16'''
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Optional[int] 							=       [
           '''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',
       ]
       a						:List[str] 							=       '''fp16'''
       self.assertFalse(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:List[Any] 							=       [
           '''text_encoder/pytorch_model.fp16.bin''',
           '''text_encoder/model.fp16.safetensors''',
       ]
       a						:Any 							=       '''fp16'''
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       # pass variant but use the non-variant filenames
       a						:Optional[Any] 							=       [
           '''text_encoder/pytorch_model.bin''',
           '''text_encoder/model.safetensors''',
       ]
       a						:Union[str, Any] 							=       '''fp16'''
       self.assertTrue(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						: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''',
           '''unet/diffusion_pytorch_model.fp16.safetensors''',
       ]
       a						:Optional[Any] 							=       '''fp16'''
       self.assertFalse(is_safetensors_compatible(_lowerCamelCase					,  variant=_lowerCamelCase    )    )













"""simple docstring"""


import re



def 					lowerCAmelCase				(    __UpperCamelCase ):




  """simple docstring"""







  return [char.split() for char in re.split(r'''[^ a-z A-Z 0-9 \s]'''		,       str_ )]



def 					lowerCAmelCase				(    __UpperCamelCase ):




  """simple docstring"""







  __A									= split_input(str_ )
  return "".join(
      [''''''.join([char.capitalize() for char in sub_str] ) for sub_str in string_split] )



def 					lowerCAmelCase				(    __UpperCamelCase		,       __UpperCamelCase		,       __UpperCamelCase ):




  """simple docstring"""







  try:
    __A									= split_input(__UpperCamelCase )
    if upper:
      __A									= ''''''.join(
          [
              separator.join([char.upper() for char in sub_str] )
              for sub_str in string_split
          ] )
    else:
      __A									= ''''''.join(
          [
              separator.join([char.lower() for char in sub_str] )
              for sub_str in string_split
          ] )
    return res_str
  except IndexError:
    return "not valid string"



def 					lowerCAmelCase				(    __UpperCamelCase ):




  """simple docstring"""







  return to_simple_case(__UpperCamelCase )



def 					lowerCAmelCase				(    __UpperCamelCase ):




  """simple docstring"""







  try:
    __A									= to_simple_case(__UpperCamelCase )
    return res_str[0].lower() + res_str[1:]
  except IndexError:
    return "not valid string"



def 					lowerCAmelCase				(    __UpperCamelCase		,       __UpperCamelCase ):




  """simple docstring"""







  return to_complex_case(__UpperCamelCase		,       __UpperCamelCase		,       '''_''' )



def 					lowerCAmelCase				(    __UpperCamelCase		,       __UpperCamelCase ):




  """simple docstring"""







  return to_complex_case(__UpperCamelCase		,       __UpperCamelCase		,       '''-''' )


if __name__ == "__main__":
       __import__('doctest').testmod()




