



'''simple docstring'''

import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible

class 							a__( unittest.TestCase     ):






			def 						_lowercase  (     self						)							->							Optional[int]:
					snake_case__	     =[
					    '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 						_lowercase  (     self						)							->							Optional[int]:
					snake_case__	     =[
					    'unet/diffusion_pytorch_model.bin',
					    'unet/diffusion_pytorch_model.safetensors',
					]
					self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						)						)






			def 						_lowercase  (     self						)							->							Tuple:
					snake_case__	     =[
					    '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 						_lowercase  (     self						)							->							Tuple:
					snake_case__	     =[
					    'text_encoder/pytorch_model.bin',
					    'text_encoder/model.safetensors',
					]
					self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						)						)






			def 						_lowercase  (     self						)							->							Optional[int]:
					snake_case__	     =[
					    '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 						_lowercase  (     self						)							->							Any:
					snake_case__	     =[
					    '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',
					]
					snake_case__	     ='fp16'
					self.assertTrue(is_safetensors_compatible(_UpperCAmelCase					,   variant=_UpperCAmelCase						)						)






			def 						_lowercase  (     self						)							->							int:
					snake_case__	     =[
					    'unet/diffusion_pytorch_model.fp16.bin',
					    'unet/diffusion_pytorch_model.fp16.safetensors',
					]
					snake_case__	     ='fp16'
					self.assertTrue(is_safetensors_compatible(_UpperCAmelCase					,   variant=_UpperCAmelCase						)						)






			def 						_lowercase  (     self						)							->							Dict:
					# pass variant but use the non-variant filenames
					snake_case__	     =[
					    'unet/diffusion_pytorch_model.bin',
					    'unet/diffusion_pytorch_model.safetensors',
					]
					snake_case__	     ='fp16'
					self.assertTrue(is_safetensors_compatible(_UpperCAmelCase					,   variant=_UpperCAmelCase						)						)






			def 						_lowercase  (     self						)							->							int:
					snake_case__	     =[
					    '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',
					]
					snake_case__	     ='fp16'
					self.assertFalse(is_safetensors_compatible(_UpperCAmelCase					,   variant=_UpperCAmelCase						)						)






			def 						_lowercase  (     self						)							->							Union[str, Any]:
					snake_case__	     =[
					    'text_encoder/pytorch_model.fp16.bin',
					    'text_encoder/model.fp16.safetensors',
					]
					snake_case__	     ='fp16'
					self.assertTrue(is_safetensors_compatible(_UpperCAmelCase					,   variant=_UpperCAmelCase						)						)






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






			def 						_lowercase  (     self						)							->							Tuple:
					snake_case__	     =[
					    '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',
					]
					snake_case__	     ='fp16'
					self.assertFalse(is_safetensors_compatible(_UpperCAmelCase					,   variant=_UpperCAmelCase						)						)









'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import _LazyModule


SCREAMING_SNAKE_CASE__     :						Dict	=  {'''tokenization_wav2vec2_phoneme''': ['''Wav2Vec2PhonemeCTCTokenizer''']}


if TYPE_CHECKING:
			from .tokenization_wavaveca_phoneme import WavaVecaPhonemeCTCTokenizer
else:
			import sys

			SCREAMING_SNAKE_CASE__     :						Dict	=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




