class_docstr: A UNetModel that conditions on text with an encoding transformer.
  
  Expects an extra kwarg `tokens` of text.
  
  :param text_ctx: number of text tokens to expect.
  :param xf_width: width of the transformer.
  :param xf_layers: depth of the transformer.
  :param xf_heads: heads in the transformer.
  :param xf_final_ln: use a LayerNorm after the output layer.
  :param tokenizer: the text tokenizer for sampling/vocab size.
code: def forward(self, x, timesteps, tokens=None, mask=None):
      hs = []
      emb = self.time_embed(
          timestep_embedding(timesteps, self.model_channels)
      )
      if self.xf_width:
          text_outputs = self.get_text_emb(tokens, mask)
          xf_proj, xf_out = (
              text_outputs["xf_proj"],
              text_outputs["xf_out"],
          )
          emb = emb + xf_proj.to(emb)
      else:
          xf_out = None
      h = x.type(self.dtype)
      for module in self.input_blocks:
          h = module(h, emb, xf_out)
          hs.append(h)
      h = self.middle_block(h, emb, xf_out)
      for module in self.output_blocks:
          h = th.cat([h, hs.pop()], dim=1)
          h = module(h, emb, xf_out)
      h = h.type(x.dtype)
      h = self.out(h)
      return h
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from .nn import timestep_embedding
  from .unet import UNetModel
  from .xf import LayerNorm, Transformer, convert_module_to_f16
label_desc: Use image node_id 5 for calling the Text2ImUNet obj's underlying member method code with example usage: obj.forward(x, timesteps, tokens, mask) and returns: h