Add To Playlist (mtb)
Building a running video playlist across queue runs
MTB Nodes is one of those grab-bag utility packs - batch tools, color tools, debug tools, and a handful of odds and ends like this one - from melMass, a developer who's on the short list of people the ComfyUI custom-node community actually names when asked who builds this stuff (right up there with kijai, rgthree, and ltdrdata). Add To Playlist is a small, unglamorous corner of that grab bag: it's an output node for stitching a series of separately-rendered videos into one running playlist, without you having to track filenames yourself.
What it's for
Think about a workflow you queue repeatedly - once per shot, once per variation, once per loop iteration of a batch job. Each run produces a video file. Add To Playlist sits at the end of that chain and appends the current run's output to a playlist manifest, so after ten queue presses you have one file listing all ten outputs in order, instead of ten loose files you have to hunt down and sequence by hand later. It's the kind of node you don't think about until you're three hours into a batch render and realize you have no way to play the results back in order.
The inputs that matter
There's no media type in the required inputs - no IMAGE or VIDEO socket. That's consistent with a pattern a few mtb nodes use (the pack's own Debug node calls it out directly): dynamic inputs, where you connect a wire and ComfyUI grows a new input slot for you rather than the node declaring a fixed socket up front. The four fields that are declared are all configuration:
playlist_name(defaultplaylist_{index:04d}) - a filename template. That{index:04d}is a zero-padded format string, the same trick ComfyUI's own Save Image node uses, so entries land asplaylist_0000,playlist_0001, and so on automatically.index- which entry number this run is. Bump it manually or drive it from a counter node if you want a stable, repeatable sequence rather than relying on autoincrement.persistant_playlist(yes, spelled that way in the node) - keep appending to the same playlist across ComfyUI restarts instead of starting fresh.relative_paths- write entries as relative paths instead of absolute ones, which matters if you're going to move the output folder or share the playlist file alongside the videos.
It's an output node (is_output_node: true) with no outputs of its own - it's a sink, meant to be the last thing in a chain, not something you keep building on.
Installing it
Through ComfyUI Manager: search MTB Nodes (or comfy_mtb) and install. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
Restart ComfyUI afterward either way.
Where people get burned
MTB is a big pack, and it doesn't fail loudly when one node can't import - it logs a line like [comfy_mtb] Some nodes (N) could not be loaded. This can be ignored, but go to http://127.0.0.1:8188/mtb and keeps the rest of the pack running. That's a real behavior other users have hit and confirmed in the wild, so if Add To Playlist (or any other mtb node) is missing from your node search after installing, don't assume the whole install is broken - check that console line, or the /mtb status page while ComfyUI is running, before reinstalling anything. It'll usually point straight at a missing Python dependency rather than a mystery.
Beyond that, the two settings worth double-checking before a long batch: persistant_playlist off means a fresh restart quietly starts a new playlist, and if two runs land on the same index without a counter driving it, one entry silently overwrites the other.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| relative_paths | BOOLEAN | false | — |
| persistant_playlist | BOOLEAN | false | — |
| playlist_name | STRING | playlist_{index:04d} | — |
| index | INT | 0 | — |
Outputs (0)
No outputs