Nodes/ComfyUI-VideoHelperSuite/Prune Outputs πŸŽ₯πŸ…₯πŸ…—πŸ…’
ComfyUI Node Runs on cloud

Prune Outputs πŸŽ₯πŸ…₯πŸ…—πŸ…’

Auto-delete the junk files Video Combine leaves behind

By KosinkadinkΒ·Created 3 years agoΒ·Updated 3 months agoΒ· 1,727
Prune Outputs πŸŽ₯πŸ…₯πŸ…—πŸ…’
  • filenames
    β—„optionsβ–Ύβ–Ί

    Video Combine doesn't just write your final video - it also drops a few extra files along the way. A version without audio (an intermediate step in muxing sound in), a first-frame PNG thumbnail, that sort of thing. Harmless, but if you're rendering a lot of clips they pile up and clutter your output folder. Prune Outputs automates cleaning them up: connect it to a Video Combine and it deletes the leftover files you don't want, keeping only the real output. It's from Kosinkadink's VideoHelperSuite.

    This is housekeeping, and whether you need it depends on your workflow. Rendering one video at a time, the extra files are noise you can ignore. Running a batch pipeline that produces hundreds of outputs, or feeding a downstream step that would otherwise pick up the wrong file, it's worth wiring in.

    How it works

    Video Combine emits a VHS_FILENAMES bundle listing every file it created. Prune Outputs reads that bundle and deletes the ones matching your chosen category. It's an output node - it doesn't produce anything downstream, it just performs the deletion as a side effect when the graph runs.

    The inputs and options that matter

    • filenames - the VHS_FILENAMES connection from the Video Combine whose leftovers you want cleaned.
    • options - how aggressive to be:
      • Intermediate - delete files that were only needed for intermediate processing, like the no-audio version created while muxing audio. The safe choice.
      • Intermediate and Utility - also delete utility files that aren't the final output, including the first-frame PNG. Cleaner, but you lose the thumbnail.

    There are no outputs - it's a terminal cleanup node.

    How to install it

    ComfyUI Manager: search ComfyUI-VideoHelperSuite, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite
    

    then restart. No model downloads.

    Common issues & troubleshooting

    It deleted a file I wanted. "Intermediate and Utility" removes the first-frame PNG too - if you use that thumbnail, switch to plain "Intermediate," which only clears the genuinely throwaway files.

    Using it with Select Filename breaks. This is the documented conflict: if a Select Filename node is in the same graph, execution order between it and Prune is undefined, and Prune generally runs first. Select Filename can then return a path to a file Prune already deleted. Keep Select Filename pointed at the final output (index -1), which Prune preserves, not an intermediate it removes.

    Nothing got deleted. Make sure filenames is actually wired from a Video Combine, and that Combine ran and produced the intermediate files in the first place - if there was no audio to mux, there may be no no-audio intermediate to prune.

    CategoryVideo Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’

    Inputs (2)

    NameTypeDefaultDescription
    filenamesVHS_FILENAMESβ€”
    optionsCOMBO2 options: Intermediate, Intermediate and Utility

    Outputs (0)

    No outputs