Nodes/ComfyUI_MieNodes/Mie Loop Collect Audio ๐Ÿ‘
ComfyUI Node

Mie Loop Collect Audio ๐Ÿ‘

Gather one audio clip per loop pass

By MieMieeeeeยทCreated 2 years agoยทUpdated 28 days agoยท 225
Mie Loop Collect Audio ๐Ÿ‘
  • loop_ctx
  • audio
  • loop_ctx
โ—„offload_to_diskfalseโ–บ
โ—„offload_dirโ–บ

The audio counterpart to MieLoopCollectImage. MieLoopCollectAudio accumulates one audio clip per loop iteration into the loop context, so that once the loop is done you can pull the whole set out with MieLoopFinalizeAudio.

Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under the ๐Ÿ‘ Loop submenu.

Why you'd reach for it

ComfyUI has grown a real audio side - TTS, music generation, sound effects - and those workflows hit the same wall as image ones: you often want to generate several clips in a run rather than one. Maybe you're rendering a line of dialogue per prompt in a list, or sweeping a generation parameter to compare takes. Loop over your inputs with MieLoopStart, generate a clip each pass, and drop it into MieLoopCollectAudio to build up the set.

How it works

Each iteration, you feed this pass's audio in and the node appends it to the accumulator carried inside the loop_ctx. The context flows on, growing pass by pass. When MieLoopEnd signals done, MieLoopFinalizeAudio reads the accumulator and emits the collected audio. Collect appends; Finalize delivers.

The inputs and outputs that matter

  • loop_ctx (MIE_LOOP_CTX) - the loop context.
  • audio (AUDIO) - this iteration's clip to collect.
  • offload_to_disk (BOOLEAN, default false) - write collected clips to disk instead of holding them in memory. Audio is lighter than images, but long or high-sample-rate clips over many passes still add up; flip this on for big runs.
  • offload_dir (STRING, default empty) - where the offloaded clips land. Empty uses the default; set a path to control it.
  • Output loop_ctx - the context with this clip added, passed onward.

Installing it

ComfyUI Manager โ†’ search ComfyUI-MieNodes โ†’ install โ†’ restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes

then restart. No model downloads or heavy dependencies for the loop nodes. Under ๐Ÿ‘ MieNodes โ†’ ๐Ÿ‘ Loop.

Common issues

Empty result at the end. The clips live in the loop_ctx. If the context chain breaks between Collect and MieLoopFinalizeAudio, you finalize nothing. Keep loop_ctx threaded all the way through.

Sample-rate or channel mismatches. If your passes produce clips at different sample rates or channel counts, combining them downstream can get messy. Normalize your audio format before collecting if you want a clean, consistent set out the other end.

Memory on very long runs. Same story as images - turn on offload_to_disk if you're collecting a lot.

Category๐Ÿ‘ MieNodes/๐Ÿ‘ Loop

Inputs (4)

NameTypeDefaultDescription
loop_ctxMIE_LOOP_CTXโ€”
audioAUDIOโ€”
offload_to_diskoptBOOLEANfalseโ€”
offload_diroptSTRINGโ€”

Outputs (1)

NameTypeDescription
loop_ctxMIE_LOOP_CTXโ€”