class_docstr: A UNetModel that conditions on text with a pretrained text encoder in CLIP.
  
  :param text_ctx: number of text tokens to expect.
  :param xf_width: width of the transformer.
  :param clip_emb_mult: #extra tokens by projecting clip text feature.
  :param clip_emb_type: type of condition (here, we fix clip image feature).
  :param clip_emb_drop: dropout rato of clip image feature for cfg.
class_docstr_tok: ["A","UNetModel","that","conditions","on","text","with","a","pretrained","text","encoder","in","CLIP",".",":","param","text_ctx",":","number","of","text","tokens","to","expect",".",":","param","xf_width",":","width","of","the","transformer",".",":","param","clip_emb_mult",":","#","extra","tokens","by","projecting","clip","text","feature",".",":","param","clip_emb_type",":","type","of","condition","(","here",",","we","fix","clip","image","feature",")",".",":","param","clip_emb_drop",":","dropout","rato","of","clip","image","feature","for","cfg","."]
code: def forward(
      self,
      x,
      timesteps,
      txt_feat=None,
      txt_feat_seq=None,
      mask=None,
      y=None,
  ):
      bsz = x.shape[0]
      hs = []
      emb = self.time_embed(
          timestep_embedding(timesteps, self.model_channels)
      )
      emb = emb + self.clip_emb(y)
  
      xf_out = self.text_seq_proj(txt_feat_seq)
      xf_out = xf_out.permute(0, 2, 1)
      emb = emb + self.text_feat_proj(txt_feat)
      xf_out = th.cat(
          [
              self.clip_tok_proj(y).reshape(
                  bsz, -1, self.clip_emb_mult
              ),
              xf_out,
          ],
          dim=2,
      )
      mask = F.pad(mask, (self.clip_emb_mult, 0), value=True)
      mask = th.where(mask, 0.0, float("-inf"))
  
      h = x
      for module in self.input_blocks:
          h = module(h, emb, xf_out, mask=mask)
          hs.append(h)
      h = self.middle_block(h, emb, xf_out, mask=mask)
      for module in self.output_blocks:
          h = th.cat([h, hs.pop()], dim=1)
          h = module(h, emb, xf_out, mask=mask)
      h = self.out(h)
  
      return h
  
imports: import math
  from abc import abstractmethod
  import torch
  import torch.nn
  import torch.nn.functional
  from .nn import avg_pool_nd, conv_nd, linear, normalization, timestep_embedding, zero_module
  from .xf import LayerNorm
label_desc: Use image node_id 3 for calling the PLMImUNet obj's underlying member method code with example usage: obj.forward(x, timesteps, txt_feat, txt_feat_seq, mask, y) and returns: h