






import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible







class 				UpperCAmelCase_  (		unittest.TestCase		):




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




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




     def   __UpperCAmelCase  (				self		):
          UpperCAmelCase__      :  Any				      =			[
              """text_encoder/pytorch_model.bin""",
              """text_encoder/model.safetensors""",
          ]
          self.assertTrue(is_safetensors_compatible(_lowerCAmelCase		)		)




     def   __UpperCAmelCase  (				self		):
          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		):
          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.assertTrue(is_safetensors_compatible(_lowerCAmelCase	,						variant=_lowerCAmelCase		)		)




     def   __UpperCAmelCase  (				self		):
          UpperCAmelCase__      :  Any				      =			[
              """unet/diffusion_pytorch_model.fp16.bin""",
              """unet/diffusion_pytorch_model.fp16.safetensors""",
          ]
          UpperCAmelCase__      :  Dict				      =			"""fp16"""
          self.assertTrue(is_safetensors_compatible(_lowerCAmelCase	,						variant=_lowerCAmelCase		)		)




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




     def   __UpperCAmelCase  (				self		):
          UpperCAmelCase__      :  List[str]				      =			[
              """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__      :  Union[str, Any]				      =			"""fp16"""
          self.assertFalse(is_safetensors_compatible(_lowerCAmelCase	,						variant=_lowerCAmelCase		)		)




     def   __UpperCAmelCase  (				self		):
          UpperCAmelCase__      :  List[str]				      =			[
              """text_encoder/pytorch_model.fp16.bin""",
              """text_encoder/model.fp16.safetensors""",
          ]
          UpperCAmelCase__      :  Any				      =			"""fp16"""
          self.assertTrue(is_safetensors_compatible(_lowerCAmelCase	,						variant=_lowerCAmelCase		)		)




     def   __UpperCAmelCase  (				self		):
          # pass variant but use the non-variant filenames
          UpperCAmelCase__      :  List[Any]				      =			[
              """text_encoder/pytorch_model.bin""",
              """text_encoder/model.safetensors""",
          ]
          UpperCAmelCase__      :  Union[str, Any]				      =			"""fp16"""
          self.assertTrue(is_safetensors_compatible(_lowerCAmelCase	,						variant=_lowerCAmelCase		)		)




     def   __UpperCAmelCase  (				self		):
          UpperCAmelCase__      :  List[str]				      =			[
              """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__      :  int				      =			"""fp16"""
          self.assertFalse(is_safetensors_compatible(_lowerCAmelCase	,						variant=_lowerCAmelCase		)		)









import warnings

from ...utils import logging
from .image_processing_yolos import YolosImageProcessor


UpperCamelCase__		 =     logging.get_logger(__name__)

class     __snake_case    (				snake_case__  ):
       """simple docstring"""







       def __init__(		self      , *_UpperCamelCase      , **_UpperCamelCase   )      ->							None:






              """simple docstring"""


              warnings.warn(
                  """The class YolosFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
                  """ use YolosImageProcessor instead."""      , _UpperCamelCase      , )
              super().__init__(*_UpperCamelCase      , **_UpperCamelCase   )

