Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Use temporal downscale to make empty audio latent nodes more reusable. (#13975)

comfyanonymousa4382e056e34
diff --git a/comfy/latent_formats.py b/comfy/latent_formats.py
index d527eec4a..6e37080bb 100644
--- a/comfy/latent_formats.py
+++ b/comfy/latent_formats.py
@@ -150,6 +150,7 @@ class SD3(LatentFormat):
class StableAudio1(LatentFormat):
latent_channels = 64
latent_dimensions = 1
+ temporal_downscale_ratio = 2048
class Flux(SD3):
latent_channels = 16
@@ -766,6 +767,7 @@ class ACEAudio(LatentFormat):
class ACEAudio15(LatentFormat):
latent_channels = 64
latent_dimensions = 1
+ temporal_downscale_ratio = 1764
class ChromaRadiance(LatentFormat):
latent_channels = 3
diff --git a/comfy_extras/nodes_ace.py b/comfy_extras/nodes_ace.py
index affcf3b71..247d9ae8a 100644
--- a/comfy_extras/nodes_ace.py
+++ b/comfy_extras/nodes_ace.py
@@ -104,7 +104,7 @@ class EmptyAceStep15LatentAudio(IO.ComfyNode):
def execute(cls, seconds, batch_size) -> IO.NodeOutput:
length = round((seconds * 48000 / 1920))
latent = torch.zeros([batch_size, 64, length], device=comfy.model_management.intermediate_device(), dtype=comfy.model_management.intermediate_dtype())
- return IO.NodeOutput({"samples": latent, "type": "audio"})
+ return IO.NodeOutput({"samples": latent, "type": "audio", "downscale_ratio_temporal": 1764})
class ReferenceAudio(IO.ComfyNode):
@classmethod
diff --git a/comfy_extras/nodes_audio.py b/comfy_extras/nodes_audio.py
index fcc1c34d5..2d6b3c7ea 100644
--- a/comfy_extras/nodes_audio.py
+++ b/comfy_extras/nodes_audio.py
@@ -33,7 +33,7 @@ class EmptyLatentAudio(IO.ComfyNode):
def execute(cls, seconds, batch_size) -> IO.NodeOutput:
length = round((seconds * 44100 / 2048) / 2) * 2
latent = torch.zeros([batch_size, 64, length], device=comfy.model_management.intermediate_device())
- return IO.NodeOutput({"samples":latent, "type": "audio"})
+ return IO.NodeOutput({"samples": latent, "type": "audio", "downscale_ratio_temporal": 2048})
generate = execute # TODO: remove