
import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible







class 							lowerCAmelCase__   ( unittest.TestCase						):

						def 			A_					(      self					)       ->   Optional[int]:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """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(A_					)					)

						def 			A_					(      self					)       ->   Optional[Any]:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """unet/diffusion_pytorch_model.bin""",
								    """unet/diffusion_pytorch_model.safetensors""",
								]
								self.assertTrue(is_safetensors_compatible(A_					)					)

						def 			A_					(      self					)       ->   Optional[int]:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """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(A_					)					)

						def 			A_					(      self					)       ->   Tuple:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """text_encoder/pytorch_model.bin""",
								    """text_encoder/model.safetensors""",
								]
								self.assertTrue(is_safetensors_compatible(A_					)					)

						def 			A_					(      self					)       ->   int:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """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(A_					)					)

						def 			A_					(      self					)       ->   Optional[int]:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """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         =						"""fp16"""
								self.assertTrue(is_safetensors_compatible(A_							,				variant=A_					)					)

						def 			A_					(      self					)       ->   int:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """unet/diffusion_pytorch_model.fp16.bin""",
								    """unet/diffusion_pytorch_model.fp16.safetensors""",
								]
								_UpperCamelCase         =						"""fp16"""
								self.assertTrue(is_safetensors_compatible(A_							,				variant=A_					)					)

						def 			A_					(      self					)       ->   Union[str, Any]:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """unet/diffusion_pytorch_model.bin""",
								    """unet/diffusion_pytorch_model.safetensors""",
								]
								_UpperCamelCase         =						"""fp16"""
								self.assertTrue(is_safetensors_compatible(A_							,				variant=A_					)					)

						def 			A_					(      self					)       ->   List[str]:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """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         =						"""fp16"""
								self.assertFalse(is_safetensors_compatible(A_							,				variant=A_					)					)

						def 			A_					(      self					)       ->   Tuple:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """text_encoder/pytorch_model.fp16.bin""",
								    """text_encoder/model.fp16.safetensors""",
								]
								_UpperCamelCase         =						"""fp16"""
								self.assertTrue(is_safetensors_compatible(A_							,				variant=A_					)					)

						def 			A_					(      self					)       ->   Any:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """text_encoder/pytorch_model.bin""",
								    """text_encoder/model.safetensors""",
								]
								_UpperCamelCase         =						"""fp16"""
								self.assertTrue(is_safetensors_compatible(A_							,				variant=A_					)					)







						def 			A_					(      self					)       ->   Tuple:


								'''simple docstring'''

								_UpperCamelCase         =						[
								    """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         =						"""fp16"""
								self.assertFalse(is_safetensors_compatible(A_							,				variant=A_					)					)







"""simple docstring"""




def       a_ (	lowercase__ :str,			lowercase__ :int     ):
			return [sentence[i : i + ngram_size] for i in range(len(lowercase__     ) - ngram_size + 1     )]


if __name__ == "__main__":
					from doctest import testmod

					testmod()




