Move audio nodes out of _for_testing.

This commit is contained in:
comfyanonymous 2024-07-07 09:22:32 -04:00
parent 2dc84d1444
commit 628f0b8ebc
1 changed files with 5 additions and 6 deletions

View File

@ -19,7 +19,7 @@ class EmptyLatentAudio:
RETURN_TYPES = ("LATENT",)
FUNCTION = "generate"
CATEGORY = "_for_testing/audio"
CATEGORY = "latent/audio"
def generate(self, seconds):
batch_size = 1
@ -34,7 +34,7 @@ class VAEEncodeAudio:
RETURN_TYPES = ("LATENT",)
FUNCTION = "encode"
CATEGORY = "_for_testing/audio"
CATEGORY = "latent/audio"
def encode(self, vae, audio):
sample_rate = audio["sample_rate"]
@ -53,7 +53,7 @@ class VAEDecodeAudio:
RETURN_TYPES = ("AUDIO",)
FUNCTION = "decode"
CATEGORY = "_for_testing/audio"
CATEGORY = "latent/audio"
def decode(self, vae, samples):
audio = vae.decode(samples["samples"]).movedim(-1, 1)
@ -132,7 +132,7 @@ class SaveAudio:
OUTPUT_NODE = True
CATEGORY = "_for_testing/audio"
CATEGORY = "audio"
def save_audio(self, audio, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None):
filename_prefix += self.prefix_append
@ -195,7 +195,7 @@ class LoadAudio:
]
return {"required": {"audio": (sorted(files), {"audio_upload": True})}}
CATEGORY = "_for_testing/audio"
CATEGORY = "audio"
RETURN_TYPES = ("AUDIO", )
FUNCTION = "load"
@ -203,7 +203,6 @@ class LoadAudio:
def load(self, audio):
audio_path = folder_paths.get_annotated_filepath(audio)
waveform, sample_rate = torchaudio.load(audio_path)
multiplier = 1.0
audio = {"waveform": waveform.unsqueeze(0), "sample_rate": sample_rate}
return (audio, )