



import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible



class        lowerCAmelCase__					(  unittest.TestCase       ):


				def __UpperCamelCase						(							self      :  List[str]       )		->     Any:
											A      						=    [
											    '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(__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  str       )		->     List[Any]:
											A      						=    [
											    'unet/diffusion_pytorch_model.bin',
											    'unet/diffusion_pytorch_model.safetensors',
											]
											self.assertTrue(is_safetensors_compatible(__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  Any       )		->     Tuple:
											A      						=    [
											    '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(__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  Dict       )		->     Any:
											A      						=    [
											    'text_encoder/pytorch_model.bin',
											    'text_encoder/model.safetensors',
											]
											self.assertTrue(is_safetensors_compatible(__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  Optional[int]       )		->     List[str]:
											A      						=    [
											    '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(__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  List[str]       )		->     List[str]:
											A      						=    [
											    '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      						=    'fp16'
											self.assertTrue(is_safetensors_compatible(__UpperCamelCase						, variant=__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  Optional[Any]       )		->     Optional[Any]:
											A      						=    [
											    'unet/diffusion_pytorch_model.fp16.bin',
											    'unet/diffusion_pytorch_model.fp16.safetensors',
											]
											A      						=    'fp16'
											self.assertTrue(is_safetensors_compatible(__UpperCamelCase						, variant=__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  int       )		->     Optional[int]:
											# pass variant but use the non-variant filenames
											A      						=    [
											    'unet/diffusion_pytorch_model.bin',
											    'unet/diffusion_pytorch_model.safetensors',
											]
											A      						=    'fp16'
											self.assertTrue(is_safetensors_compatible(__UpperCamelCase						, variant=__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  Any       )		->     List[str]:
											A      						=    [
											    '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      						=    'fp16'
											self.assertFalse(is_safetensors_compatible(__UpperCamelCase						, variant=__UpperCamelCase       )       )


				def __UpperCamelCase						(							self      :  Optional[Any]       )		->     Optional[int]:
											A      						=    [
											    'text_encoder/pytorch_model.fp16.bin',
											    'text_encoder/model.fp16.safetensors',
											]
											A      						=    'fp16'
											self.assertTrue(is_safetensors_compatible(__UpperCamelCase						, variant=__UpperCamelCase       )       )


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


				def __UpperCamelCase						(							self      :  List[str]       )		->     Optional[Any]:
											A      						=    [
											    '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      						=    'fp16'
											self.assertFalse(is_safetensors_compatible(__UpperCamelCase						, variant=__UpperCamelCase       )       )





'''simple docstring'''






from ..utils import DummyObject, requires_backends






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Optional[Any]     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Tuple     ,							*__lowerCamelCase     :					str     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Any     ,							*__lowerCamelCase     :					Dict     ,							**__lowerCamelCase     :					List[str]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					int     ,							*__lowerCamelCase     :					str     ,							**__lowerCamelCase     :					Union[str, Any]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Optional[Any]     ,							*__lowerCamelCase     :					List[str]     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Optional[Any]     ,							*__lowerCamelCase     :					Optional[Any]     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					List[str]     ,							*__lowerCamelCase     :					str     ,							**__lowerCamelCase     :					str			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Union[str, Any]     ,							*__lowerCamelCase     :					str     ,							**__lowerCamelCase     :					str			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Any     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Optional[Any]     ,							*__lowerCamelCase     :					Optional[Any]     ,							**__lowerCamelCase     :					str			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					str     ,							*__lowerCamelCase     :					Dict     ,							**__lowerCamelCase     :					int			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Optional[Any]     ,							*__lowerCamelCase     :					Union[str, Any]     ,							**__lowerCamelCase     :					Union[str, Any]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Optional[int]     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					Optional[Any]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					List[Any]     ,							*__lowerCamelCase     :					Dict     ,							**__lowerCamelCase     :					int			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Tuple     ,							*__lowerCamelCase     :					List[str]     ,							**__lowerCamelCase     :					str			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					List[Any]     ,							*__lowerCamelCase     :					Dict     ,							**__lowerCamelCase     :					Union[str, Any]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Any     ,							*__lowerCamelCase     :					Union[str, Any]     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					List[Any]     ,							*__lowerCamelCase     :					Optional[Any]     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Dict     ,							*__lowerCamelCase     :					Union[str, Any]     ,							**__lowerCamelCase     :					Any			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					List[Any]     ,							*__lowerCamelCase     :					Optional[int]     ,							**__lowerCamelCase     :					List[str]			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Union[str, Any]     ,							*__lowerCamelCase     :					str     ,							**__lowerCamelCase     :					Any			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Tuple     ,							*__lowerCamelCase     :					Union[str, Any]     ,							**__lowerCamelCase     :					Dict			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					List[Any]     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					List[Any]			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					int     ,							*__lowerCamelCase     :					Union[str, Any]     ,							**__lowerCamelCase     :					str			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Union[str, Any]     ,							*__lowerCamelCase     :					Optional[Any]     ,							**__lowerCamelCase     :					int			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Any     ,							*__lowerCamelCase     :					List[str]     ,							**__lowerCamelCase     :					int			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					List[str]     ,							*__lowerCamelCase     :					Optional[Any]     ,							**__lowerCamelCase     :					List[str]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Union[str, Any]     ,							*__lowerCamelCase     :					Optional[Any]     ,							**__lowerCamelCase     :					List[Any]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Any     ,							*__lowerCamelCase     :					Optional[int]     ,							**__lowerCamelCase     :					int			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					str     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					List[Any]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Optional[Any]     ,							*__lowerCamelCase     :					Union[str, Any]     ,							**__lowerCamelCase     :					Union[str, Any]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Union[str, Any]     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					Optional[Any]			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					str     ,							*__lowerCamelCase     :					Dict     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					Union[str, Any]     ,							*__lowerCamelCase     :					List[Any]     ,							**__lowerCamelCase     :					Optional[int]			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Optional[int]     ,							*__lowerCamelCase     :					Tuple     ,							**__lowerCamelCase     :					Tuple			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Dict     ,							*__lowerCamelCase     :					Dict     ,							**__lowerCamelCase     :					Optional[Any]			):
           requires_backends(cls     ,							['flax']			)






class        lowercase_      (						metaclass=lowerCAmelCase_							):
     A_											=			["flax"]





     def __init__(     self     :					str     ,							*__lowerCamelCase     :					int     ,							**__lowerCamelCase     :					Dict			):
           requires_backends(self     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					List[str]     ,							*__lowerCamelCase     :					Optional[int]     ,							**__lowerCamelCase     :					Tuple			):
           requires_backends(cls     ,							['flax']			)





     @classmethod
     def 			_lowerCAmelCase      (     cls     :					Dict     ,							*__lowerCamelCase     :					Optional[int]     ,							**__lowerCamelCase     :					Optional[Any]			):
           requires_backends(cls     ,							['flax']			)
