code: def run_model_torch(
      model,
      inputs,
      CONFIG,
      truncated,
      speaker_id=None,
      style_mel=None,
      speaker_embeddings=None,
  ):
      if "tacotron" in CONFIG.model.lower():
          if CONFIG.use_gst:
              (
                  decoder_output,
                  postnet_output,
                  alignments,
                  stop_tokens,
              ) = model.inference(
                  inputs,
                  style_mel=style_mel,
                  speaker_ids=speaker_id,
                  speaker_embeddings=speaker_embeddings,
              )
          else:
              if truncated:
                  (
                      decoder_output,
                      postnet_output,
                      alignments,
                      stop_tokens,
                  ) = model.inference_truncated(
                      inputs,
                      speaker_ids=speaker_id,
                      speaker_embeddings=speaker_embeddings,
                  )
              else:
                  (
                      decoder_output,
                      postnet_output,
                      alignments,
                      stop_tokens,
                  ) = model.inference(
                      inputs,
                      speaker_ids=speaker_id,
                      speaker_embeddings=speaker_embeddings,
                  )
      elif "glow" in CONFIG.model.lower():
          inputs_lengths = torch.tensor(inputs.shape[1:2]).to(
              inputs.device
          )  # pylint: disable=not-callable
          if hasattr(model, "module"):
              # distributed model
              (
                  postnet_output,
                  _,
                  _,
                  _,
                  alignments,
                  _,
                  _,
              ) = model.module.inference(
                  inputs,
                  inputs_lengths,
                  g=speaker_id
                  if speaker_id is not None
                  else speaker_embeddings,
              )
          else:
              (
                  postnet_output,
                  _,
                  _,
                  _,
                  alignments,
                  _,
                  _,
              ) = model.inference(
                  inputs,
                  inputs_lengths,
                  g=speaker_id
                  if speaker_id is not None
                  else speaker_embeddings,
              )
          postnet_output = postnet_output.permute(0, 2, 1)
          # these only belong to tacotron models.
          decoder_output = None
          stop_tokens = None
      elif "speedy_speech" in CONFIG.model.lower():
          inputs_lengths = torch.tensor(inputs.shape[1:2]).to(
              inputs.device
          )  # pylint: disable=not-callable
          if hasattr(model, "module"):
              # distributed model
              postnet_output, alignments = model.module.inference(
                  inputs,
                  inputs_lengths,
                  g=speaker_id
                  if speaker_id is not None
                  else speaker_embeddings,
              )
          else:
              postnet_output, alignments = model.inference(
                  inputs,
                  inputs_lengths,
                  g=speaker_id
                  if speaker_id is not None
                  else speaker_embeddings,
              )
          postnet_output = postnet_output.permute(0, 2, 1)
          # these only belong to tacotron models.
          decoder_output = None
          stop_tokens = None
      return decoder_output, postnet_output, alignments, stop_tokens
  
file_path: TTS/TTS/tts/utils/synthesis.py
imports: import pkg_resources
  import torch
  import numpy
  from .text import text_to_sequence, phoneme_to_sequence
label_desc: Use image node_id 5 for calling a global function with example usage: run_model_torch(model, inputs, CONFIG, truncated, speaker_id, style_mel, speaker_embeddings) and returns: decoder_output,  postnet_output,  alignments,  stop_tokens