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.

Fix bug with SaveAudio node with --gpu-only

comfyanonymousf836e6934684
diff --git a/comfy_extras/nodes_audio.py b/comfy_extras/nodes_audio.py
index 64d241e98..6f0e26365 100644
--- a/comfy_extras/nodes_audio.py
+++ b/comfy_extras/nodes_audio.py
@@ -147,7 +147,7 @@ class SaveAudio:
for x in extra_pnginfo:
metadata[x] = json.dumps(extra_pnginfo[x])
- for (batch_number, waveform) in enumerate(audio["waveform"]):
+ for (batch_number, waveform) in enumerate(audio["waveform"].cpu()):
filename_with_batch_num = filename.replace("%batch_num%", str(batch_number))
file = f"{filename_with_batch_num}_{counter:05}_.flac"