






"""simple docstring"""







import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible





class   UpperCamelCase_ (       unittest.TestCase  ):



  def 		UpperCamelCase_				(      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(UpperCAmelCase_				)				)



  def 		UpperCamelCase_				(      self				)			->			Tuple:



         """simple docstring"""





         UpperCAmelCase	    =			[
             'unet/diffusion_pytorch_model.bin',
             'unet/diffusion_pytorch_model.safetensors',
         ]
         self.assertTrue(is_safetensors_compatible(UpperCAmelCase_				)				)



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



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



         """simple docstring"""





         UpperCAmelCase	    =			[
             'text_encoder/pytorch_model.bin',
             'text_encoder/model.safetensors',
         ]
         self.assertTrue(is_safetensors_compatible(UpperCAmelCase_				)				)



  def 		UpperCamelCase_				(      self				)			->			List[Any]:



         """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(UpperCAmelCase_				)				)



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



         """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(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)



  def 		UpperCamelCase_				(      self				)			->			str:



         """simple docstring"""





         UpperCAmelCase	    =			[
             'unet/diffusion_pytorch_model.fp16.bin',
             'unet/diffusion_pytorch_model.fp16.safetensors',
         ]
         UpperCAmelCase	    =			'fp16'
         self.assertTrue(is_safetensors_compatible(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)



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



         """simple docstring"""





         UpperCAmelCase	    =			[
             'unet/diffusion_pytorch_model.bin',
             'unet/diffusion_pytorch_model.safetensors',
         ]
         UpperCAmelCase	    =			'fp16'
         self.assertTrue(is_safetensors_compatible(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)



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



         """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(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)



  def 		UpperCamelCase_				(      self				)			->			int:



         """simple docstring"""





         UpperCAmelCase	    =			[
             'text_encoder/pytorch_model.fp16.bin',
             'text_encoder/model.fp16.safetensors',
         ]
         UpperCAmelCase	    =			'fp16'
         self.assertTrue(is_safetensors_compatible(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)



  def 		UpperCamelCase_				(      self				)			->			Any:



         """simple docstring"""





         UpperCAmelCase	    =			[
             'text_encoder/pytorch_model.bin',
             'text_encoder/model.safetensors',
         ]
         UpperCAmelCase	    =			'fp16'
         self.assertTrue(is_safetensors_compatible(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)



  def 		UpperCamelCase_				(      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',
             'unet/diffusion_pytorch_model.fp16.safetensors',
         ]
         UpperCAmelCase	    =			'fp16'
         self.assertFalse(is_safetensors_compatible(UpperCAmelCase_ ,		variant=UpperCAmelCase_				)				)








"""simple docstring"""







import random
from typing import Any






def       _lowerCAmelCase       (      lowerCAmelCase		):







       '''simple docstring'''
       for _ in range(len(lowerCAmelCase		)		):
              UpperCAmelCase	    =			random.randint(0	,      len(lowerCAmelCase		) - 1		)
              UpperCAmelCase	    =			random.randint(0	,      len(lowerCAmelCase		) - 1		)
              UpperCAmelCase    ,       UpperCAmelCase	    =			data[b], data[a]
       return data


if __name__ == "__main__":
 lowerCAmelCase_	:    Tuple            =      [0, 1, 2, 3, 4, 5, 6, 7]
 lowerCAmelCase_	:    List[str]            =      ['''python''', '''says''', '''hello''', '''!''']
 print('''Fisher-Yates Shuffle:''')
 print('''List''', integers, strings)
 print('''FY Shuffle''', fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))
