The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Add batch size to EmptyLatentAudio.
comfyanonymousfdf37566ef7f
diff --git a/comfy_extras/nodes_audio.py b/comfy_extras/nodes_audio.pyindex 1c763f259..e5cc4dffe 100644--- a/comfy_extras/nodes_audio.py+++ b/comfy_extras/nodes_audio.py@@ -16,14 +16,15 @@ class EmptyLatentAudio:@classmethoddef INPUT_TYPES(s):- return {"required": {"seconds": ("FLOAT", {"default": 47.6, "min": 1.0, "max": 1000.0, "step": 0.1})}}+ return {"required": {"seconds": ("FLOAT", {"default": 47.6, "min": 1.0, "max": 1000.0, "step": 0.1}),+ "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096, "tooltip": "The number of latent images in the batch."}),+ }}RETURN_TYPES = ("LATENT",)FUNCTION = "generate"CATEGORY = "latent/audio"- def generate(self, seconds):- batch_size = 1+ def generate(self, seconds, batch_size):length = round((seconds * 44100 / 2048) / 2) * 2latent = torch.zeros([batch_size, 64, length], device=self.device)return ({"samples":latent, "type": "audio"}, )