





'''simple docstring'''




import torch

from diffusers import DiffusionPipeline


class 					SCREAMING_SNAKE_CASE       (a__				):


     def __init__(		self		,      _UpperCAmelCase		,      _UpperCAmelCase):

          '''simple docstring'''






          super().__init__()

          self.register_modules(unet=_UpperCAmelCase		,      scheduler=_UpperCAmelCase)


     def __call__(		self):

          '''simple docstring'''






          __A		:					int						=			torch.randn(
              (1, self.unet.config.in_channels, self.unet.config.sample_size, self.unet.config.sample_size)		,      )
          __A		:					Dict						=			1

          __A		:					int						=			self.unet(_UpperCAmelCase		,      _UpperCAmelCase).sample
          __A		:					Any						=			self.scheduler.step(_UpperCAmelCase		,      _UpperCAmelCase		,      _UpperCAmelCase).prev_sample

          __A		:					int						=			scheduler_output - scheduler_output + torch.ones_like(_UpperCAmelCase)

          return result






'''simple docstring'''




def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					int					,				__snake_case    :					int     )	->	float:
     __A		:					Dict						=			(num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff)
     # formula for sum of series
     return total






def 			_lowerCAmelCase     (    )	->	Union[str, Any]:
     print(sum_of_series(1					,				1					,				10     )     )


if __name__ == "__main__":
  import doctest

  doctest.testmod()