code: 
  
  
  
  
  
  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     __a						(					unittest.TestCase ):
  
  
  
  
  
  
  
   def       __lowercase      (	self      :     Optional[Any]		):
  
  
        '''simple docstring'''
  
  
  
  
  
  
        UpperCamelCase__    :     Optional[Any]        =						"runwayml/stable-diffusion-v1-5"
        UpperCamelCase__    :     int        =						TextToVideoZeroPipeline.from_pretrained(SCREAMING_SNAKE_CASE							,     torch_dtype=torch.floataa		).to("cuda"		)
        UpperCamelCase__    :     List[str]        =						DDIMScheduler.from_config(pipe.scheduler.config		)
        UpperCamelCase__    :     Optional[Any]        =						torch.Generator(device="cuda"		).manual_seed(0		)
  
        UpperCamelCase__    :     Any        =						"A bear is playing a guitar on Times Square"
        UpperCamelCase__    :     Any        =						pipe(prompt=SCREAMING_SNAKE_CASE							,     generator=SCREAMING_SNAKE_CASE		).images
  
        UpperCamelCase__    :     Union[str, Any]        =						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		)
style_context: 
  
  
  
  
  
  
  from __future__ import annotations
  
  
  
  
  
  
  
  def 	SCREAMING_SNAKE_CASE							(      __lowerCAmelCase    )				->			list[int]:
       assert (
           isinstance(__lowerCAmelCase      ,					__lowerCAmelCase    ) and mask > 0
       ), f'mask needs to be positive integer, your input {mask}'
       UpperCamelCase__    :     Any        =						[]
       UpperCamelCase__    :     int        =						mask
  
       while submask:
            all_submasks.append(__lowerCAmelCase    )
            UpperCamelCase__    :     List[str]        =						(submask - 1) & mask
  
       return all_submasks
  
  
  if __name__ == "__main__":
   import doctest
  
   doctest.testmod()