





'''simple docstring'''


import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible

class  lowerCAmelCase_		(		unittest.TestCase		):




 def 				_snake_case (						self		)     ->				Union[str, Any]:
     _lowerCAmelCase						      =   [
         "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 				_snake_case (						self		)     ->				Union[str, Any]:
     _lowerCAmelCase						      =   [
         "unet/diffusion_pytorch_model.bin",
         "unet/diffusion_pytorch_model.safetensors",
     ]
     self.assertTrue(is_safetensors_compatible(_lowerCAmelCase		)		)




 def 				_snake_case (						self		)     ->				Optional[int]:
     _lowerCAmelCase						      =   [
         "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 				_snake_case (						self		)     ->				Union[str, Any]:
     _lowerCAmelCase						      =   [
         "text_encoder/pytorch_model.bin",
         "text_encoder/model.safetensors",
     ]
     self.assertTrue(is_safetensors_compatible(_lowerCAmelCase		)		)




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




 def 				_snake_case (						self		)     ->				Union[str, Any]:
     _lowerCAmelCase						      =   [
         "unet/diffusion_pytorch_model.fp16.bin",
         "unet/diffusion_pytorch_model.fp16.safetensors",
     ]
     _lowerCAmelCase						      =   "fp16"
     self.assertTrue(is_safetensors_compatible(_lowerCAmelCase      ,  variant=_lowerCAmelCase		)		)




 def 				_snake_case (						self		)     ->				Any:
     # pass variant but use the non-variant filenames
     _lowerCAmelCase						      =   [
         "unet/diffusion_pytorch_model.bin",
         "unet/diffusion_pytorch_model.safetensors",
     ]
     _lowerCAmelCase						      =   "fp16"
     self.assertTrue(is_safetensors_compatible(_lowerCAmelCase      ,  variant=_lowerCAmelCase		)		)




 def 				_snake_case (						self		)     ->				Dict:
     _lowerCAmelCase						      =   [
         "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',
     ]
     _lowerCAmelCase						      =   "fp16"
     self.assertFalse(is_safetensors_compatible(_lowerCAmelCase      ,  variant=_lowerCAmelCase		)		)




 def 				_snake_case (						self		)     ->				Optional[Any]:
     _lowerCAmelCase						      =   [
         "text_encoder/pytorch_model.fp16.bin",
         "text_encoder/model.fp16.safetensors",
     ]
     _lowerCAmelCase						      =   "fp16"
     self.assertTrue(is_safetensors_compatible(_lowerCAmelCase      ,  variant=_lowerCAmelCase		)		)




 def 				_snake_case (						self		)     ->				int:
     # pass variant but use the non-variant filenames
     _lowerCAmelCase						      =   [
         "text_encoder/pytorch_model.bin",
         "text_encoder/model.safetensors",
     ]
     _lowerCAmelCase						      =   "fp16"
     self.assertTrue(is_safetensors_compatible(_lowerCAmelCase      ,  variant=_lowerCAmelCase		)		)





 def 				_snake_case (						self		)     ->				Optional[Any]:
     _lowerCAmelCase						      =   [
         "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",
     ]
     _lowerCAmelCase						      =   "fp16"
     self.assertFalse(is_safetensors_compatible(_lowerCAmelCase      ,  variant=_lowerCAmelCase		)		)









'''simple docstring'''


from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_SCREAMING_SNAKE_CASE									=				{
    "configuration_mctct": ["MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MCTCTConfig"],
    "feature_extraction_mctct": ["MCTCTFeatureExtractor"],
    "processing_mctct": ["MCTCTProcessor"],
}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _SCREAMING_SNAKE_CASE									=				[
           "MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "MCTCTForCTC",
           "MCTCTModel",
           "MCTCTPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
       from .feature_extraction_mctct import MCTCTFeatureExtractor
       from .processing_mctct import MCTCTProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
       import sys

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


