
from ..utils import DummyObject, requires_backends
class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[int]	,     *__lowercase							:					List[str]	,     **__lowercase							:					Optional[int]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[str]	,     *__lowercase							:					Dict	,     **__lowercase							:					Tuple						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					str	,     *__lowercase							:					Any	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[str]	,     *__lowercase							:					str	,     **__lowercase							:					List[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Tuple	,     *__lowercase							:					Any	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					str	,     *__lowercase							:					List[str]	,     **__lowercase							:					List[str]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					List[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Any	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Any						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					Union[str, Any]	,     **__lowercase							:					Tuple						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					int	,     **__lowercase							:					Any						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					str	,     **__lowercase							:					List[str]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					Union[str, Any]	,     **__lowercase							:					Optional[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					List[str]	,     **__lowercase							:					Tuple						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					Tuple	,     **__lowercase							:					Any						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					List[str]	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[int]	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Tuple						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Tuple	,     *__lowercase							:					Dict	,     **__lowercase							:					Optional[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					Union[str, Any]	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					str	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[int]	,     *__lowercase							:					str	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					str	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[str]	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					List[str]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Tuple	,     *__lowercase							:					List[str]	,     **__lowercase							:					str						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					str	,     **__lowercase							:					Any						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					int	,     *__lowercase							:					List[Any]	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					Any	,     **__lowercase							:					Any						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Any	,     *__lowercase							:					str	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[str]	,     *__lowercase							:					Any	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Tuple	,     *__lowercase							:					int	,     **__lowercase							:					List[str]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					Tuple	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Any	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Optional[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					int	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					Any	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					List[str]	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					str	,     **__lowercase							:					List[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[str]	,     *__lowercase							:					Any	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Any	,     *__lowercase							:					Any	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					str	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					List[Any]	,     **__lowercase							:					Optional[int]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					Dict	,     **__lowercase							:					List[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					Optional[int]	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					Any	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					Tuple	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					int	,     *__lowercase							:					Dict	,     **__lowercase							:					List[Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Tuple	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					List[str]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					Union[str, Any]	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[int]	,     *__lowercase							:					Dict	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					str	,     *__lowercase							:					int	,     **__lowercase							:					str						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Any	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Dict						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					List[str]	,     **__lowercase							:					Optional[int]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					List[str]	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					str	,     **__lowercase							:					Tuple						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					List[Any]	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Union[str, Any]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					int	,     *__lowercase							:					int	,     **__lowercase							:					Any						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					int	,     *__lowercase							:					Any	,     **__lowercase							:					int						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Union[str, Any]	,     *__lowercase							:					Optional[Any]	,     **__lowercase							:					Tuple						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Dict	,     *__lowercase							:					str	,     **__lowercase							:					List[str]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)







class 		UpperCAmelCase       (    metaclass=UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       ['''tokenizers''']






						def __init__(						self							:					Optional[Any]	,     *__lowercase							:					List[Any]	,     **__lowercase							:					Optional[int]						):






							"""simple docstring"""






							requires_backends(self	,     ["tokenizers"]						)






import torch

from diffusers import EulerAncestralDiscreteScheduler
from diffusers.utils import torch_device

from .test_schedulers import SchedulerCommonTest
class 		UpperCAmelCase       (    UpperCAmelCase__      ):







						'''simple docstring'''





						lowerCAmelCase_							=       (EulerAncestralDiscreteScheduler,)
						lowerCAmelCase_							=       10






						def 	snake_case__						(						self							:					Tuple	,     **__lowercase							:					int						):






							"""simple docstring"""






							snake_case_		   =					{
							    "num_train_timesteps": 11_00,
							    "beta_start": 0.0001,
							    "beta_end": 0.02,
							    "beta_schedule": "linear",
							}

							config.update(**__lowercase						)
							return config






						def 	snake_case__						(						self							:					Union[str, Any]						):






							"""simple docstring"""






							for timesteps in [10, 50, 1_00, 10_00]:
								self.check_over_configs(num_train_timesteps=__lowercase						)






						def 	snake_case__						(						self							:					List[str]						):






							"""simple docstring"""






							for beta_start, beta_end in zip([0.0_0001, 0.0001, 0.001]	,     [0.0002, 0.002, 0.02]						):
								self.check_over_configs(beta_start=__lowercase	,     beta_end=__lowercase						)






						def 	snake_case__						(						self							:					List[str]						):






							"""simple docstring"""






							for schedule in ["linear", "scaled_linear"]:
								self.check_over_configs(beta_schedule=__lowercase						)






						def 	snake_case__						(						self							:					Union[str, Any]						):






							"""simple docstring"""






							for prediction_type in ["epsilon", "v_prediction"]:
								self.check_over_configs(prediction_type=__lowercase						)






						def 	snake_case__						(						self							:					Optional[Any]						):






							"""simple docstring"""






							snake_case_		   =					self.scheduler_classes[0]
							snake_case_		   =					self.get_scheduler_config()
							snake_case_		   =					scheduler_class(**__lowercase						)

							scheduler.set_timesteps(self.num_inference_steps						)

							snake_case_		   =					torch.manual_seed(0						)

							snake_case_		   =					self.dummy_model()
							snake_case_		   =					self.dummy_sample_deter * scheduler.init_noise_sigma.cpu()
							snake_case_		   =					sample.to(__lowercase						)

							for i, t in enumerate(scheduler.timesteps						):
								snake_case_		   =					scheduler.scale_model_input(__lowercase	,     __lowercase						)

								snake_case_		   =					model(__lowercase	,     __lowercase						)

								snake_case_		   =					scheduler.step(__lowercase	,     __lowercase	,     __lowercase	,     generator=__lowercase						)
								snake_case_		   =					output.prev_sample

							snake_case_		   =					torch.sum(torch.abs(__lowercase						)						)
							snake_case_		   =					torch.mean(torch.abs(__lowercase						)						)

							assert abs(result_sum.item() - 152.3192						) < 1E-2
							assert abs(result_mean.item() - 0.1983						) < 1E-3






						def 	snake_case__						(						self							:					List[Any]						):






							"""simple docstring"""






							snake_case_		   =					self.scheduler_classes[0]
							snake_case_		   =					self.get_scheduler_config(prediction_type="v_prediction"						)
							snake_case_		   =					scheduler_class(**__lowercase						)

							scheduler.set_timesteps(self.num_inference_steps						)

							snake_case_		   =					torch.manual_seed(0						)

							snake_case_		   =					self.dummy_model()
							snake_case_		   =					self.dummy_sample_deter * scheduler.init_noise_sigma
							snake_case_		   =					sample.to(__lowercase						)

							for i, t in enumerate(scheduler.timesteps						):
								snake_case_		   =					scheduler.scale_model_input(__lowercase	,     __lowercase						)

								snake_case_		   =					model(__lowercase	,     __lowercase						)

								snake_case_		   =					scheduler.step(__lowercase	,     __lowercase	,     __lowercase	,     generator=__lowercase						)
								snake_case_		   =					output.prev_sample

							snake_case_		   =					torch.sum(torch.abs(__lowercase						)						)
							snake_case_		   =					torch.mean(torch.abs(__lowercase						)						)

							assert abs(result_sum.item() - 108.4439						) < 1E-2
							assert abs(result_mean.item() - 0.1412						) < 1E-3






						def 	snake_case__						(						self							:					Optional[int]						):






							"""simple docstring"""






							snake_case_		   =					self.scheduler_classes[0]
							snake_case_		   =					self.get_scheduler_config()
							snake_case_		   =					scheduler_class(**__lowercase						)

							scheduler.set_timesteps(self.num_inference_steps	,     device=__lowercase						)
							snake_case_		   =					torch.manual_seed(0						)

							snake_case_		   =					self.dummy_model()
							snake_case_		   =					self.dummy_sample_deter * scheduler.init_noise_sigma.cpu()
							snake_case_		   =					sample.to(__lowercase						)

							for t in scheduler.timesteps:
								snake_case_		   =					scheduler.scale_model_input(__lowercase	,     __lowercase						)

								snake_case_		   =					model(__lowercase	,     __lowercase						)

								snake_case_		   =					scheduler.step(__lowercase	,     __lowercase	,     __lowercase	,     generator=__lowercase						)
								snake_case_		   =					output.prev_sample

							snake_case_		   =					torch.sum(torch.abs(__lowercase						)						)
							snake_case_		   =					torch.mean(torch.abs(__lowercase						)						)

							assert abs(result_sum.item() - 152.3192						) < 1E-2
							assert abs(result_mean.item() - 0.1983						) < 1E-3
