code: def encode_embedding_init_text(self, init_text, nvpt):
      embedding_layer = self.wrapped.transformer.text_model.embeddings
      ids = self.wrapped.tokenizer(
          init_text,
          max_length=nvpt,
          return_tensors="pt",
          add_special_tokens=False,
      )["input_ids"]
      embedded = embedding_layer.token_embedding.wrapped(
          ids.to(embedding_layer.token_embedding.wrapped.weight.device)
      ).squeeze(0)
  
      return embedded
  
imports: import math
  from collections import namedtuple
  import torch
  from modules import prompt_parser, devices, sd_hijack
  from modules.shared import opts
label_desc: Use image node_id 4 for calling the FrozenCLIPEmbedderWithCustomWords obj's underlying member method code with example usage: obj.encode_embedding_init_text(init_text, nvpt) and returns: embedded