
"""simple docstring"""







import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible



class 		UpperCAmelCase_						(unittest.TestCase    ):
 """simple docstring"""




 def 	a   (			self							:			Union[str, Any]			)->       Any:



      """simple docstring"""

      UpperCAmelCase_    :     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""",
          """text_encoder/model.safetensors""",
          """unet/diffusion_pytorch_model.bin""",
          """unet/diffusion_pytorch_model.safetensors""",
      ]
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase			)			)




 def 	a   (			self							:			Tuple			)->       Union[str, Any]:



      """simple docstring"""

      UpperCAmelCase_    :     Tuple            =	[
          """unet/diffusion_pytorch_model.bin""",
          """unet/diffusion_pytorch_model.safetensors""",
      ]
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase			)			)




 def 	a   (			self							:			int			)->       Optional[int]:



      """simple docstring"""

      UpperCAmelCase_    :     Optional[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""",
          # Removed: 'unet/diffusion_pytorch_model.safetensors',
      ]
      self.assertFalse(is_safetensors_compatible(__lowerCAmelCase			)			)




 def 	a   (			self							:			List[Any]			)->       List[str]:



      """simple docstring"""

      UpperCAmelCase_    :     Optional[Any]            =	[
          """text_encoder/pytorch_model.bin""",
          """text_encoder/model.safetensors""",
      ]
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase			)			)




 def 	a   (			self							:			Optional[int]			)->       Optional[int]:



      """simple docstring"""

      UpperCAmelCase_    :     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(__lowerCAmelCase			)			)




 def 	a   (			self							:			List[Any]			)->       List[Any]:



      """simple docstring"""

      UpperCAmelCase_    :     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""",
      ]
      UpperCAmelCase_    :     Optional[Any]            =	"""fp16"""
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)




 def 	a   (			self							:			Tuple			)->       List[Any]:



      """simple docstring"""

      UpperCAmelCase_    :     Any            =	[
          """unet/diffusion_pytorch_model.fp16.bin""",
          """unet/diffusion_pytorch_model.fp16.safetensors""",
      ]
      UpperCAmelCase_    :     Any            =	"""fp16"""
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)




 def 	a   (			self							:			Union[str, Any]			)->       int:



      """simple docstring"""

      UpperCAmelCase_    :     List[str]            =	[
          """unet/diffusion_pytorch_model.bin""",
          """unet/diffusion_pytorch_model.safetensors""",
      ]
      UpperCAmelCase_    :     Tuple            =	"""fp16"""
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)




 def 	a   (			self							:			List[str]			)->       Optional[Any]:



      """simple docstring"""

      UpperCAmelCase_    :     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',
      ]
      UpperCAmelCase_    :     Optional[int]            =	"""fp16"""
      self.assertFalse(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)




 def 	a   (			self							:			List[str]			)->       Union[str, Any]:



      """simple docstring"""

      UpperCAmelCase_    :     Tuple            =	[
          """text_encoder/pytorch_model.fp16.bin""",
          """text_encoder/model.fp16.safetensors""",
      ]
      UpperCAmelCase_    :     Dict            =	"""fp16"""
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)




 def 	a   (			self							:			int			)->       Dict:



      """simple docstring"""

      UpperCAmelCase_    :     str            =	[
          """text_encoder/pytorch_model.bin""",
          """text_encoder/model.safetensors""",
      ]
      UpperCAmelCase_    :     List[str]            =	"""fp16"""
      self.assertTrue(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)






 def 	a   (			self							:			List[Any]			)->       Any:



      """simple docstring"""

      UpperCAmelCase_    :     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""",
      ]
      UpperCAmelCase_    :     Optional[int]            =	"""fp16"""
      self.assertFalse(is_safetensors_compatible(__lowerCAmelCase  , variant=__lowerCAmelCase			)			)


"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


UpperCAmelCase__			=    {"""configuration_vit_mae""": ["""VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTMAEConfig"""]}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """ViTMAEForPreTraining""",
        """ViTMAELayer""",
        """ViTMAEModel""",
        """ViTMAEPreTrainedModel""",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """TFViTMAEForPreTraining""",
        """TFViTMAEModel""",
        """TFViTMAEPreTrainedModel""",
    ]

if TYPE_CHECKING:
    from .configuration_vit_mae import VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMAEConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_vit_mae import (
            VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST,
            ViTMAEForPreTraining,
            ViTMAELayer,
            ViTMAEModel,
            ViTMAEPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_vit_mae import TFViTMAEForPreTraining, TFViTMAEModel, TFViTMAEPreTrainedModel


else:
    import sys

    UpperCAmelCase__			=    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
