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 __init__(
      self,
      notes_encoder: SpectrogramNotesEncoder,
      continuous_encoder: SpectrogramContEncoder,
      decoder: T5FilmDecoder,
      scheduler: DDPMScheduler,
      melgan: OnnxRuntimeModel if is_onnx_available() else Any,
  ) -> None:
      super().__init__()
  
      # From MELGAN
      self.min_value = math.log(1e-5)  # Matches MelGAN training.
      self.max_value = 4.0  # Largest value for most examples
      self.n_dims = 128
  
      self.register_modules(
          notes_encoder=notes_encoder,
          continuous_encoder=continuous_encoder,
          decoder=decoder,
          scheduler=scheduler,
          melgan=melgan,
      )
  
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 1 to create a new SpectrogramDiffusionPipeline object from inherited base classes: DiffusionPipeline with example: obj = SpectrogramDiffusionPipeline(notes_encoder, continuous_encoder, decoder, scheduler, melgan)