



'''simple docstring'''

import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible

class       __magic_name__		(       unittest.TestCase  ):







							def 				__lowercase     (				self   :			Any						):
									_a	: 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(_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			str						):
									_a	: Union[str, Any]								=				[
									    'unet/diffusion_pytorch_model.bin',
									    'unet/diffusion_pytorch_model.safetensors',
									]
									self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			List[str]						):
									_a	: 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(_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			Optional[int]						):
									_a	: List[Any]								=				[
									    'text_encoder/pytorch_model.bin',
									    'text_encoder/model.safetensors',
									]
									self.assertTrue(is_safetensors_compatible(_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			Union[str, Any]						):
									_a	: 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(_UpperCAmelCase						)						)







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







							def 				__lowercase     (				self   :			Tuple						):
									_a	: str								=				[
									    'unet/diffusion_pytorch_model.fp16.bin',
									    'unet/diffusion_pytorch_model.fp16.safetensors',
									]
									_a	: str								=				'fp16'
									self.assertTrue(is_safetensors_compatible(_UpperCAmelCase      ,variant=_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			Optional[int]						):
									# pass variant but use the non-variant filenames
									_a	: Tuple								=				[
									    'unet/diffusion_pytorch_model.bin',
									    'unet/diffusion_pytorch_model.safetensors',
									]
									_a	: List[Any]								=				'fp16'
									self.assertTrue(is_safetensors_compatible(_UpperCAmelCase      ,variant=_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			List[Any]						):
									_a	: 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',
									    # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
									]
									_a	: Any								=				'fp16'
									self.assertFalse(is_safetensors_compatible(_UpperCAmelCase      ,variant=_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			Optional[int]						):
									_a	: str								=				[
									    'text_encoder/pytorch_model.fp16.bin',
									    'text_encoder/model.fp16.safetensors',
									]
									_a	: str								=				'fp16'
									self.assertTrue(is_safetensors_compatible(_UpperCAmelCase      ,variant=_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			Union[str, Any]						):
									# pass variant but use the non-variant filenames
									_a	: int								=				[
									    'text_encoder/pytorch_model.bin',
									    'text_encoder/model.safetensors',
									]
									_a	: Optional[Any]								=				'fp16'
									self.assertTrue(is_safetensors_compatible(_UpperCAmelCase      ,variant=_UpperCAmelCase						)						)







							def 				__lowercase     (				self   :			Union[str, Any]						):
									_a	: 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',
									]
									_a	: List[str]								=				'fp16'
									self.assertFalse(is_safetensors_compatible(_UpperCAmelCase      ,variant=_UpperCAmelCase						)						)









'''simple docstring'''

import warnings

from ...utils import logging
from .image_processing_glpn import GLPNImageProcessor


__lowerCAmelCase		     =  logging.get_logger(__name__)

class       __magic_name__		(       _UpperCamelCase  ):







							def __init__(				self   :			Optional[int]      ,*_UpperCAmelCase   :			List[Any]      ,**_UpperCAmelCase   :			Union[str, Any]						):
									warnings.warn(
									    'The class GLPNFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'
									    ' use GLPNImageProcessor instead.'      ,_UpperCAmelCase      ,)
									super().__init__(*_UpperCAmelCase      ,**_UpperCAmelCase						)




