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					):



	"""simple docstring"""



	def __lowerCAmelCase      (   self       ):
		_lowercase   ="runwayml/stable-diffusion-v1-5"
		_lowercase   =TextToVideoZeroPipeline.from_pretrained(lowerCAmelCase_       ,  torch_dtype=torch.floataa       ).to("cuda"       )
		_lowercase   =DDIMScheduler.from_config(pipe.scheduler.config       )
		_lowercase   =torch.Generator(device="cuda"       ).manual_seed(0       )

		_lowercase   ="A bear is playing a guitar on Times Square"
		_lowercase   =pipe(prompt=lowerCAmelCase_       ,  generator=lowerCAmelCase_       ).images

		_lowercase   =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_       )





def 	__lowerCamelCase							(				)      ->       Dict:
	_lowercase   =1

	while True:
		if (
		    sorted(str(__a		)		)
		    == sorted(str(2 * i		)		)
		    == sorted(str(3 * i		)		)
		    == sorted(str(4 * i		)		)
		    == sorted(str(5 * i		)		)
		    == sorted(str(6 * i		)		)
		):
			return i

		i += 1


if __name__ == "__main__":
						print(solution())




