class_docstr: Pipeline for text-guided image inpainting using Kandinsky2.1
  
  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","text-guided","image","inpainting","using","Kandinsky2.1","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
      )
      self._warn_has_been_called = False
  
imports: from copy import deepcopy
  from typing import Callable, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  import torch.nn.functional
  from packaging import version
  from PIL import Image
  from ...None import __version__
  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 KandinskyV22InpaintPipeline object from inherited base classes: DiffusionPipeline with example: obj = KandinskyV22InpaintPipeline(unet, scheduler, movq)