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 decode(self, encodings_and_masks, input_tokens, noise_time):
      timesteps = noise_time
      if not torch.is_tensor(timesteps):
          timesteps = torch.tensor(
              [timesteps], dtype=torch.long, device=input_tokens.device
          )
      elif torch.is_tensor(timesteps) and len(timesteps.shape) == 0:
          timesteps = timesteps[None].to(input_tokens.device)
  
      # broadcast to batch dimension in a way that's compatible with ONNX/Core ML
      timesteps = timesteps * torch.ones(
          input_tokens.shape[0],
          dtype=timesteps.dtype,
          device=timesteps.device,
      )
  
      logits = self.decoder(
          encodings_and_masks=encodings_and_masks,
          decoder_input_tokens=input_tokens,
          decoder_noise_time=timesteps,
      )
      return logits
  
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 5 for calling the SpectrogramDiffusionPipeline obj's underlying member method code with example usage: obj.decode(encodings_and_masks, input_tokens, noise_time) and returns: logits