




'''simple docstring'''





class     UpperCamelCase					:



  def __init__( self   ):







      '''simple docstring'''


      _a							:       Dict       					=			[]
      _a							:       Optional[int]       					=			0
      _a							:       List[Any]       					=			0



  def __str__( self   ):







      '''simple docstring'''


      _a							:       Union[str, Any]       					=			"""<""" + str(self.entries   )[1:-1] + """>"""
      return printed



  def 						a_       ( self		,    __lowerCAmelCase   ):







      '''simple docstring'''


      self.entries.append(__lowerCAmelCase   )
      _a							:       int       					=			self.length + 1



  def 						a_       ( self   ):







      '''simple docstring'''


      _a							:       Optional[Any]       					=			self.length - 1
      _a							:       str       					=			self.entries[self.front]
      # self.front-=1
      # self.entries = self.entries[self.front:]
      _a							:       Tuple       					=			self.entries[1:]
      return dequeued



  def 						a_       ( self		,    __lowerCAmelCase   ):







      '''simple docstring'''


      for _ in range(__lowerCAmelCase   ):
          self.put(self.get()   )



  def 						a_       ( self   ):







      '''simple docstring'''


      return self.entries[0]



  def 						a_       ( self   ):







      '''simple docstring'''


      return self.length








'''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 						a_       ( self   ):







      '''simple docstring'''


      _a							:       List[Any]       					=			"""runwayml/stable-diffusion-v1-5"""
      _a							:       Tuple       					=			TextToVideoZeroPipeline.from_pretrained(__lowerCAmelCase		,    torch_dtype=torch.floataa   ).to("""cuda"""   )
      _a							:       Dict       					=			DDIMScheduler.from_config(pipe.scheduler.config   )
      _a							:       int       					=			torch.Generator(device="""cuda"""   ).manual_seed(0   )

      _a							:       Union[str, Any]       					=			"""A bear is playing a guitar on Times Square"""
      _a							:       List[Any]       					=			pipe(prompt=__lowerCAmelCase		,    generator=__lowerCAmelCase   ).images

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


