class_docstr: Pipeline for image-to-image generation using Kandinsky
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
  library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)
  
  Args:
      scheduler ([`DDIMScheduler`]):
          A scheduler to be used in combination with `unet` to generate image latents.
      unet ([`UNet2DConditionModel`]):
          Conditional U-Net architecture to denoise the image embedding.
      movq ([`VQModel`]):
          MoVQ Decoder to generate the image from the latents.
class_docstr_tok: ["Pipeline","for","image-to-image","generation","using","Kandinsky","This","model","inherits","from","[","`","DiffusionPipeline","`","]",".","Check","the","superclass","documentation","for","the","generic","methods","the","library","implements","for","all","the","pipelines","(","such","as","downloading","or","saving",",","running","on","a","particular","device",",","etc",".",")","Args",":","scheduler","(","[","`","DDIMScheduler","`","]",")",":","A","scheduler","to","be","used","in","combination","with","`","unet","`","to","generate","image","latents",".","unet","(","[","`","UNet2DConditionModel","`","]",")",":","Conditional","U-Net","architecture","to","denoise","the","image","embedding",".","movq","(","[","`","VQModel","`","]",")",":","MoVQ","Decoder","to","generate","the","image","from","the","latents","."]
code: def __init__(
      self,
      unet: UNet2DConditionModel,
      scheduler: DDPMScheduler,
      movq: VQModel,
  ):
      super().__init__()
  
      self.register_modules(
          unet=unet,
          scheduler=scheduler,
          movq=movq,
      )
      self.movq_scale_factor = 2 ** (
          len(self.movq.config.block_out_channels) - 1
      )
  
file_path: diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet_img2img.py
imports: from typing import Callable, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  from PIL import Image
  from ...models import UNet2DConditionModel, VQModel
  from ...schedulers import DDPMScheduler
  from ...utils import logging
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
label_desc: Use image node_id 1 to create a new KandinskyV22ControlnetImg2ImgPipeline object from inherited base classes: DiffusionPipeline with example: obj = KandinskyV22ControlnetImg2ImgPipeline(unet, scheduler, movq)