


"""simple docstring"""






import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible




class 							A_      (       unittest.TestCase ):


  def 							_lowercase					(			self:						List[str]    ):







     '''simple docstring'''







     _lowerCamelCase   :				Optional[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",
         "unet/diffusion_pytorch_model.safetensors",
     ]
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Union[str, Any]    ):







     '''simple docstring'''







     _lowerCamelCase   :				Any							=     [
         "unet/diffusion_pytorch_model.bin",
         "unet/diffusion_pytorch_model.safetensors",
     ]
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						List[str]    ):







     '''simple docstring'''







     _lowerCamelCase   :				Optional[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",
         # Removed: 'unet/diffusion_pytorch_model.safetensors',
     ]
     self.assertFalse(is_safetensors_compatible(__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						int    ):







     '''simple docstring'''







     _lowerCamelCase   :				Tuple							=     [
         "text_encoder/pytorch_model.bin",
         "text_encoder/model.safetensors",
     ]
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Optional[Any]    ):







     '''simple docstring'''







     _lowerCamelCase   :				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(__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Optional[int]    ):







     '''simple docstring'''







     _lowerCamelCase   :				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",
     ]
     _lowerCamelCase   :				Tuple							=     "fp16"
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Optional[int]    ):







     '''simple docstring'''







     _lowerCamelCase   :				Any							=     [
         "unet/diffusion_pytorch_model.fp16.bin",
         "unet/diffusion_pytorch_model.fp16.safetensors",
     ]
     _lowerCamelCase   :				str							=     "fp16"
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						List[Any]    ):







     '''simple docstring'''







     _lowerCamelCase   :				str							=     [
         "unet/diffusion_pytorch_model.bin",
         "unet/diffusion_pytorch_model.safetensors",
     ]
     _lowerCamelCase   :				Union[str, Any]							=     "fp16"
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Tuple    ):







     '''simple docstring'''







     _lowerCamelCase   :				Optional[int]							=     [
         "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',
     ]
     _lowerCamelCase   :				Union[str, Any]							=     "fp16"
     self.assertFalse(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Any    ):







     '''simple docstring'''







     _lowerCamelCase   :				List[str]							=     [
         "text_encoder/pytorch_model.fp16.bin",
         "text_encoder/model.fp16.safetensors",
     ]
     _lowerCamelCase   :				Dict							=     "fp16"
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )


  def 							_lowercase					(			self:						Optional[Any]    ):







     '''simple docstring'''







     _lowerCamelCase   :				Tuple							=     [
         "text_encoder/pytorch_model.bin",
         "text_encoder/model.safetensors",
     ]
     _lowerCamelCase   :				List[Any]							=     "fp16"
     self.assertTrue(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )






  def 							_lowercase					(			self:						List[str]    ):







     '''simple docstring'''







     _lowerCamelCase   :				Tuple							=     [
         "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",
     ]
     _lowerCamelCase   :				str							=     "fp16"
     self.assertFalse(is_safetensors_compatible(__lowerCAmelCase							,variant=__lowerCAmelCase    )    )
'''simple docstring'''

from __future__ import annotations







def __UpperCamelCase( _A       :					list[int]	,      _A       :					int	,      _A       :					int	,      _A       :					int     ):
   '''simple docstring'''
   if (direction == 1 and array[indexa] > array[indexa]) or (
       direction == 0 and array[indexa] < array[indexa]
   ):
      UpperCAmelCase__					,   UpperCAmelCase__				:					Union[str, Any] 					=	array[indexa], array[indexa]







def __UpperCamelCase( _A       :					list[int]	,      _A       :					int	,      _A       :					int	,      _A       :					int     ):
   '''simple docstring'''
   if length > 1:
      UpperCAmelCase__				:					List[Any] 					=	int(length / 2     )
      for i in range(_A	,      low + middle     ):
         comp_and_swap(_A	,      _A	,      i + middle	,      _A     )
      bitonic_merge(_A	,      _A	,      _A	,      _A     )
      bitonic_merge(_A	,      low + middle	,      _A	,      _A     )







def __UpperCamelCase( _A       :					list[int]	,      _A       :					int	,      _A       :					int	,      _A       :					int     ):
   '''simple docstring'''
   if length > 1:
      UpperCAmelCase__				:					Optional[int] 					=	int(length / 2     )
      bitonic_sort(_A	,      _A	,      _A	,      1     )
      bitonic_sort(_A	,      low + middle	,      _A	,      0     )
      bitonic_merge(_A	,      _A	,      _A	,      _A     )


if __name__ == "__main__":
  UpperCamelCase__  :						Dict					=      input('Enter numbers separated by a comma:\n').strip()
  UpperCamelCase__  :						Tuple					=      [int(item.strip()) for item in user_input.split(',')]

  bitonic_sort(unsorted, 0, len(unsorted), 1)
  print('\nSorted array in ascending order is: ', end='')
  print(*unsorted, sep=', ')

  bitonic_merge(unsorted, 0, len(unsorted), 0)
  print('Sorted array in descending order is: ', end='')
  print(*unsorted, sep=', ')




