class_docstr: Pipeline for text-to-image generation using Versatile Diffusion.
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
  implemented for all pipelines (downloading, saving, running on a particular device, etc.).
  
  Parameters:
      vqvae ([`VQModel`]):
          Vector-quantized (VQ) model to encode and decode images to and from latent representations.
      bert ([`LDMBertModel`]):
          Text-encoder model based on [`~transformers.BERT`].
      tokenizer ([`~transformers.BertTokenizer`]):
          A `BertTokenizer` to tokenize text.
      unet ([`UNet2DConditionModel`]):
          A `UNet2DConditionModel` to denoise the encoded image latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded image latents. Can be one of
          [`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
code: def remove_unused_weights(self):
      self.register_modules(text_unet=None)
  
imports: import inspect
  from typing import Callable, List, Optional, Union
  import torch
  import torch.utils.checkpoint
  from transformers import CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer
  from ...image_processor import VaeImageProcessor
  from ...models import AutoencoderKL, Transformer2DModel, UNet2DConditionModel
  from ...schedulers import KarrasDiffusionSchedulers
  from ...utils import deprecate, logging
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
  from .modeling_text_unet import UNetFlatConditionModel
label_desc: Use image node_id 3 for calling the VersatileDiffusionTextToImagePipeline obj's underlying member method code with example usage: obj.remove_unused_weights() without return types