class_docstr: Pipeline for unconditional audio generation.
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
  implemented for all pipelines (downloading, saving, running on a particular device, etc.).
  
  Args:
      notes_encoder ([`SpectrogramNotesEncoder`]):
      continuous_encoder ([`SpectrogramContEncoder`]):
      decoder ([`T5FilmDecoder`]):
          A [`T5FilmDecoder`] to denoise the encoded audio latents.
      scheduler ([`DDPMScheduler`]):
          A scheduler to be used in combination with `decoder` to denoise the encoded audio latents.
      melgan ([`OnnxRuntimeModel`]):
class_docstr_tok: ["Pipeline","for","unconditional","audio","generation",".","This","model","inherits","from","[","`","DiffusionPipeline","`","]",".","Check","the","superclass","documentation","for","the","generic","methods","implemented","for","all","pipelines","(","downloading",",","saving",",","running","on","a","particular","device",",","etc.",")",".","Args",":","notes_encoder","(","[","`","SpectrogramNotesEncoder","`","]",")",":","continuous_encoder","(","[","`","SpectrogramContEncoder","`","]",")",":","decoder","(","[","`","T5FilmDecoder","`","]",")",":","A","[","`","T5FilmDecoder","`","]","to","denoise","the","encoded","audio","latents",".","scheduler","(","[","`","DDPMScheduler","`","]",")",":","A","scheduler","to","be","used","in","combination","with","`","decoder","`","to","denoise","the","encoded","audio","latents",".","melgan","(","[","`","OnnxRuntimeModel","`","]",")",":"]
code: def encode(self, input_tokens, continuous_inputs, continuous_mask):
      tokens_mask = input_tokens > 0
      tokens_encoded, tokens_mask = self.notes_encoder(
          encoder_input_tokens=input_tokens,
          encoder_inputs_mask=tokens_mask,
      )
  
      continuous_encoded, continuous_mask = self.continuous_encoder(
          encoder_inputs=continuous_inputs,
          encoder_inputs_mask=continuous_mask,
      )
  
      return [
          (tokens_encoded, tokens_mask),
          (continuous_encoded, continuous_mask),
      ]
  
file_path: llmga/llmga/diffusers/src/diffusers/pipelines/spectrogram_diffusion/pipeline_spectrogram_diffusion.py
imports: import math
  from typing import Any, Callable, List, Optional, Tuple, Union
  import numpy
  import torch
  from ...models import T5FilmDecoder
  from ...schedulers import DDPMScheduler
  from ...utils import is_onnx_available, logging
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
  from .continous_encoder import SpectrogramContEncoder
  from .notes_encoder import SpectrogramNotesEncoder
label_desc: Use image node_id 4 for calling the SpectrogramDiffusionPipeline obj's underlying member method code with example usage: obj.encode(input_tokens, continuous_inputs, continuous_mask) and returns: list