class_docstr: Base generative model with convenient generation API.
  
  Args:
      name (str): name of the model.
      compression_model (CompressionModel): Compression model
          used to map audio to invertible discrete representations.
      lm (LMModel): Language model over discrete representations.
      max_duration (float, optional): maximum duration the model can produce,
          otherwise, inferred from the training params.
docstr: Prepare model inputs.
  
  Args:
      descriptions (list of str): A list of strings used as text conditioning.
      prompt (torch.Tensor): A batch of waveforms used for continuation.
docstr_tok: ["Prepare","model","inputs",".","Args",":","descriptions","(","list","of","str",")",":","A","list","of","strings","used","as","text","conditioning",".","prompt","(","torch.Tensor",")",":","A","batch","of","waveforms","used","for","continuation","."]
code: def _prepare_tokens_and_attributes(
      self,
      descriptions: tp.Sequence[tp.Optional[str]],
      prompt: tp.Optional[torch.Tensor],
  ) -> tp.Tuple[
      tp.List[ConditioningAttributes], tp.Optional[torch.Tensor]
  ]:
      """Prepare model inputs.
  
      Args:
          descriptions (list of str): A list of strings used as text conditioning.
          prompt (torch.Tensor): A batch of waveforms used for continuation.
      """
      attributes = [
          ConditioningAttributes(text={"description": description})
          for description in descriptions
      ]
  
      if prompt is not None:
          if descriptions is not None:
              assert len(descriptions) == len(
                  prompt
              ), "Prompt and nb. descriptions doesn't match"
          prompt = prompt.to(self.device)
          prompt_tokens, scale = self.compression_model.encode(prompt)
          assert scale is None
      else:
          prompt_tokens = None
      return attributes, prompt_tokens
  
imports: from abc import ABC, abstractmethod
  import typing
  import omegaconf
  import torch
  from .encodec import CompressionModel
  from .lm import LMModel
  from .builders import get_wrapped_compression_model
  from ..data.audio_utils import convert_audio
  from ..modules.conditioners import ConditioningAttributes
  from ..utils.autocast import TorchAutocast
label_desc: Use image node_id 8 for calling the BaseGenModel obj's underlying member method code with example usage: obj._prepare_tokens_and_attributes(descriptions, prompt) and returns: attributes,  prompt_tokens