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







		"""simple docstring"""

		def 			lowerCAmelCase							(			self							: Any			)	-> Dict:






				"""simple docstring"""







				snake_case     :					List[str]     =	'''runwayml/stable-diffusion-v1-5'''
				snake_case     :					str     =	TextToVideoZeroPipeline.from_pretrained(lowerCamelCase_     ,  torch_dtype=torch.floataa			).to('''cuda'''			)
				snake_case     :					str     =	DDIMScheduler.from_config(pipe.scheduler.config			)
				snake_case     :					Optional[int]     =	torch.Generator(device='''cuda'''			).manual_seed(0			)

				snake_case     :					Optional[int]     =	'''A bear is playing a guitar on Times Square'''
				snake_case     :					int     =	pipe(prompt=lowerCamelCase_     ,  generator=lowerCamelCase_			).images

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




'''simple docstring'''
def       _UpperCamelCase	(					)     ->       int:


		'''simple docstring'''


		for a in range(300 ):
				for b in range(a + 1   ,					400 ):
						for c in range(b + 1   ,					500 ):
								if (a + b + c) == 1000 and (a**2) + (b**2) == (c**2):
										return a * b * c

		return -1




def       _UpperCamelCase	(					)     ->       int:


		'''simple docstring'''


		for a in range(300 ):
				for b in range(400 ):
						snake_case     :					Dict     =	1000 - a - b
						if a < b < c and (a**2) + (b**2) == (c**2):
								return a * b * c

		return -1




def       _UpperCamelCase	(					)     ->       None:


		'''simple docstring'''


		import timeit

		print(
		    timeit.timeit('''solution()'''   ,					setup='''from __main__ import solution'''   ,					number=1000 ) )
		print(
		    timeit.timeit(
		        '''solution_fast()'''   ,					setup='''from __main__ import solution_fast'''   ,					number=1000 ) )


if __name__ == "__main__":
						print(f"{solution() = }")


