


'''simple docstring'''





import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible

class       __magic_name__	(     unittest.TestCase):


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





      '''simple docstring'''






      UpperCamelCase__					:    List[str]          =   [
          '''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      UpperCAmelCase__	(      self							:     List[str]			)  ->      List[str]:





      '''simple docstring'''






      UpperCamelCase__					:    str          =   [
          '''unet/diffusion_pytorch_model.bin''',
          '''unet/diffusion_pytorch_model.safetensors''',
      ]
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__			)			)


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





      '''simple docstring'''






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





      '''simple docstring'''






      UpperCamelCase__					:    Optional[Any]          =   [
          '''text_encoder/pytorch_model.bin''',
          '''text_encoder/model.safetensors''',
      ]
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     Optional[int]			)  ->      Dict:





      '''simple docstring'''






      UpperCamelCase__					:    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''',
          # Removed: 'text_encoder/model.safetensors',
          '''unet/diffusion_pytorch_model.bin''',
          '''unet/diffusion_pytorch_model.safetensors''',
      ]
      self.assertFalse(is_safetensors_compatible(lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     int			)  ->      Any:





      '''simple docstring'''






      UpperCamelCase__					:    Tuple          =   [
          '''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__					:    List[str]          =   '''fp16'''
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__							,	variant=lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     Dict			)  ->      int:





      '''simple docstring'''






      UpperCamelCase__					:    Optional[Any]          =   [
          '''unet/diffusion_pytorch_model.fp16.bin''',
          '''unet/diffusion_pytorch_model.fp16.safetensors''',
      ]
      UpperCamelCase__					:    Union[str, Any]          =   '''fp16'''
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__							,	variant=lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     List[str]			)  ->      Tuple:





      '''simple docstring'''






      UpperCamelCase__					:    Any          =   [
          '''unet/diffusion_pytorch_model.bin''',
          '''unet/diffusion_pytorch_model.safetensors''',
      ]
      UpperCamelCase__					:    Dict          =   '''fp16'''
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__							,	variant=lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     Tuple			)  ->      Tuple:





      '''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''',
          # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
      ]
      UpperCamelCase__					:    int          =   '''fp16'''
      self.assertFalse(is_safetensors_compatible(lowerCamelCase__							,	variant=lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     Optional[int]			)  ->      Tuple:





      '''simple docstring'''






      UpperCamelCase__					:    int          =   [
          '''text_encoder/pytorch_model.fp16.bin''',
          '''text_encoder/model.fp16.safetensors''',
      ]
      UpperCamelCase__					:    Optional[Any]          =   '''fp16'''
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__							,	variant=lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     int			)  ->      Optional[Any]:





      '''simple docstring'''






      UpperCamelCase__					:    str          =   [
          '''text_encoder/pytorch_model.bin''',
          '''text_encoder/model.safetensors''',
      ]
      UpperCamelCase__					:    Tuple          =   '''fp16'''
      self.assertTrue(is_safetensors_compatible(lowerCamelCase__							,	variant=lowerCamelCase__			)			)


     def      UpperCAmelCase__	(      self							:     Tuple			)  ->      int:





      '''simple docstring'''






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






from typing import TYPE_CHECKING

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


__UpperCamelCase       :       Dict						       =				{
    "configuration_mobilevit": ["MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MobileViTConfig", "MobileViTOnnxConfig"],
}

try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       str						       =				["MobileViTFeatureExtractor"]
       __UpperCamelCase       :       Optional[Any]						       =				["MobileViTImageProcessor"]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       Union[str, Any]						       =				[
           "MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "MobileViTForImageClassification",
           "MobileViTForSemanticSegmentation",
           "MobileViTModel",
           "MobileViTPreTrainedModel",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       Optional[int]						       =				[
           "TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "TFMobileViTForImageClassification",
           "TFMobileViTForSemanticSegmentation",
           "TFMobileViTModel",
           "TFMobileViTPreTrainedModel",
       ]

if TYPE_CHECKING:
       from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .feature_extraction_mobilevit import MobileViTFeatureExtractor
              from .image_processing_mobilevit import MobileViTImageProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_mobilevit import (
                  MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  MobileViTForImageClassification,
                  MobileViTForSemanticSegmentation,
                  MobileViTModel,
                  MobileViTPreTrainedModel,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_mobilevit import (
                  TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFMobileViTForImageClassification,
                  TFMobileViTForSemanticSegmentation,
                  TFMobileViTModel,
                  TFMobileViTPreTrainedModel,
              )


else:
       import sys

       __UpperCamelCase       :       str						       =				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


