"""simple docstring"""







import unittest

import torch

from diffusers import DDIMScheduler, TextToVideoZeroPipeline
from diffusers.utils import load_pt, require_torch_gpu, slow

from ..test_pipelines_common import assert_mean_pixel_difference






@slow
@require_torch_gpu
class      _SCREAMING_SNAKE_CASE							(			unittest.TestCase				):



   '''simple docstring'''



   def    _A				(	self	):


      '''simple docstring'''

      __lowerCamelCase    		=					'runwayml/stable-diffusion-v1-5'
      __lowerCamelCase    		=					TextToVideoZeroPipeline.from_pretrained(_SCREAMING_SNAKE_CASE ,				torch_dtype=torch.floataa	).to('cuda'	)
      __lowerCamelCase    		=					DDIMScheduler.from_config(pipe.scheduler.config	)
      __lowerCamelCase    		=					torch.Generator(device='cuda'	).manual_seed(0	)

      __lowerCamelCase    		=					'A bear is playing a guitar on Times Square'
      __lowerCamelCase    		=					pipe(prompt=_SCREAMING_SNAKE_CASE ,				generator=_SCREAMING_SNAKE_CASE	).images

      __lowerCamelCase    		=					load_pt(
          'https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/text-to-video/A bear is playing a guitar on Times Square.pt'	)

      assert_mean_pixel_difference(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	)










def 	_lowerCamelCase  (		A_  :	Union[str, Any]							,  A_  :	Optional[int]      )			->			Dict:

   '''simple docstring'''






   if len(str(A_      )      ) == 1 or len(str(A_      )      ) == 1:
      return a * b

   UpperCamelCase__ :			Any 						=max(len(str(A_      )      )							,  len(str(A_      )      )      )
   UpperCamelCase__ :			Optional[int] 						=ma // 2

   UpperCamelCase__						,	UpperCamelCase__ :			Dict 						=divmod(A_							,  1_0**ma      )
   UpperCamelCase__						,	UpperCamelCase__ :			Union[str, Any] 						=divmod(A_							,  1_0**ma      )

   UpperCamelCase__ :			List[Any] 						=karatsuba(A_							,  A_      )
   UpperCamelCase__ :			Dict 						=karatsuba((aa + aa)							,  (ba + ba)      )
   UpperCamelCase__ :			Optional[int] 						=karatsuba(A_							,  A_      )

   return (z * 1_0 ** (2 * ma)) + ((y - z - x) * 1_0 ** (ma)) + (x)
def 	_lowerCamelCase  (		)			->			Any:

   '''simple docstring'''






   print(karatsuba(1_5_4_6_3							,  2_3_4_8_9      )      )


if __name__ == "__main__":
     main()

