class_docstr: The consistency decoder used with DALL-E 3.
  
  Examples:
      ```py
      >>> import torch
      >>> from diffusers import StableDiffusionPipeline, ConsistencyDecoderVAE
  
      >>> vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=torch.float16)
      >>> pipe = StableDiffusionPipeline.from_pretrained(
      ...     "runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=torch.float16
      ... ).to("cuda")
  
      >>> pipe("horse", generator=torch.manual_seed(0)).images
      ```
class_docstr_tok: ["The","consistency","decoder","used","with","DALL-E","3",".","Examples",":","``","`","py",">",">",">","import","torch",">",">",">","from","diffusers","import","StableDiffusionPipeline",",","ConsistencyDecoderVAE",">",">",">","vae","=","ConsistencyDecoderVAE.from_pretrained","(","``","openai\/consistency-decoder","''",",","torch_dtype=torch.float16",")",">",">",">","pipe","=","StableDiffusionPipeline.from_pretrained","(","...","``","runwayml\/stable-diffusion-v1-5","''",",","vae=vae",",","torch_dtype=torch.float16","...",")",".to","(","``","cuda","''",")",">",">",">","pipe","(","``","horse","''",",","generator=torch.manual_seed","(","0",")",")",".images","``","`"]
code: def decode(
      self,
      z: torch.FloatTensor,
      generator: Optional[torch.Generator] = None,
      return_dict: bool = True,
      num_inference_steps: int = 2,
  ) -> Union[DecoderOutput, Tuple[torch.FloatTensor]]:
      z = (z * self.config.scaling_factor - self.means) / self.stds
  
      scale_factor = 2 ** (len(self.config.block_out_channels) - 1)
      z = F.interpolate(z, mode="nearest", scale_factor=scale_factor)
  
      batch_size, _, height, width = z.shape
  
      self.decoder_scheduler.set_timesteps(
          num_inference_steps, device=self.device
      )
  
      x_t = self.decoder_scheduler.init_noise_sigma * randn_tensor(
          (batch_size, 3, height, width),
          generator=generator,
          dtype=z.dtype,
          device=z.device,
      )
  
      for t in self.decoder_scheduler.timesteps:
          model_input = torch.concat(
              [self.decoder_scheduler.scale_model_input(x_t, t), z],
              dim=1,
          )
          model_output = self.decoder_unet(model_input, t).sample[
              :, :3, :, :
          ]
          prev_sample = self.decoder_scheduler.step(
              model_output, t, x_t, generator
          ).prev_sample
          x_t = prev_sample
  
      x_0 = x_t
  
      if not return_dict:
          return (x_0,)
  
      return DecoderOutput(sample=x_0)
  
imports: from dataclasses import dataclass
  from typing import Dict, Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from torch import nn
  from ...configuration_utils import ConfigMixin, register_to_config
  from ...schedulers import ConsistencyDecoderScheduler
  from ...utils import BaseOutput
  from ...utils.accelerate_utils import apply_forward_hook
  from ...utils.torch_utils import randn_tensor
  from ..attention_processor import ADDED_KV_ATTENTION_PROCESSORS, CROSS_ATTENTION_PROCESSORS, AttentionProcessor, AttnAddedKVProcessor, AttnProcessor
  from ..modeling_utils import ModelMixin
  from ..unet_2d import UNet2DModel
  from .vae import DecoderOutput, DiagonalGaussianDistribution, Encoder
label_desc: Use image node_id 10 for calling the ConsistencyDecoderVAE obj's underlying member method code with example usage: obj.decode(z, generator, return_dict, num_inference_steps) and returns: DecoderOutput, x_0