
'''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'''




import itertools





def 	_UpperCAmelCase       (				_UpperCamelCase       :      int = 1_00_00_00  )      -> int:
    A_      =  [1]

    for i in itertools.count(len(_UpperCamelCase  )  ):
        A_      =  0
        for j in itertools.count(1  ):
            A_      =  -1 if j % 2 == 0 else +1
            A_      =  (j * j * 3 - j) // 2
            if index > i:
                break
            item += partitions[i - index] * sign
            item %= number
            index += j
            if index > i:
                break
            item += partitions[i - index] * sign
            item %= number

        if item == 0:
            return i
        partitions.append(_UpperCamelCase  )

    return 0


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  print(F"""{solution() = }""")






