
'''simple docstring'''
import torch

from diffusers import DiffusionPipeline


class       _lowerCAmelCase   (   __snake_case				):







							'''simple docstring'''

							def __init__(self  ,  UpperCAmelCase  ,  UpperCAmelCase  )					->       Optional[int]:
														super().__init__()

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





							def __call__(self  )					->       Dict:
														_snake_case       =  torch.randn(
														    (1, self.unet.config.in_channels, self.unet.config.sample_size, self.unet.config.sample_size)  ,  )
														_snake_case       =  1

														_snake_case       =  self.unet(UpperCAmelCase  ,  UpperCAmelCase  ).sample
														_snake_case       =  self.scheduler.step(UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ).prev_sample

														_snake_case       =  scheduler_output - scheduler_output + torch.ones_like(UpperCAmelCase  )

														return result

'''simple docstring'''
from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
				if not (is_transformers_available() and is_torch_available()):
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
				from .multicontrolnet import MultiControlNetModel
				from .pipeline_controlnet import StableDiffusionControlNetPipeline
				from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
				from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
				from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline