
'''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 			UpperCamelCase__	(     unittest.TestCase):






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







       '''simple docstring'''



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

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

       __A													=      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(_A						,					_A      )








'''simple docstring'''





def 							snake_case				(		UpperCAmelCase						)->      int:







      """simple docstring"""
      if not isinstance(UpperCAmelCase   ,	UpperCAmelCase						):
            raise ValueError('double_factorial() only accepts integral values'						)
      if num < 0:
            raise ValueError('double_factorial() not defined for negative values'						)
      __A													=      1
      for i in range(UpperCAmelCase   ,	0   ,	-2						):
            value *= i
      return value


if __name__ == "__main__":
 import doctest

 doctest.testmod()






