Nodes/ComfyUI-Logic/🎞️ Compose Video
ComfyUI Node

🎞️ Compose Video

Turn your frames back into a real VIDEO object

By playboy-dongan·Created 6 months ago·Updated 6 months ago· 0
🎞️ Compose Video
  • images
  • audio
  • video
fps24.00

The 🎞️ Compose Video node answers a question every video workflow eventually hits: you've got an IMAGE tensor - a sequence of frames, maybe from a generation pass or from Decompose Video in this same pack - and you want it to be a video: something you can save, preview, or feed to a video-savvy node. It takes images, a frame rate, and optionally audio, and hands back a native ComfyUI VIDEO object on the video output.

The important framing here is that this is a container node, not an encoder. It builds the video as a structured object - VideoComponents(images=..., audio=..., frame_rate=...) - using ComfyUI's own newer comfy_api video types. The actual pixel encoding to H.264 or whatever you're saving happens downstream when you attach a save or preview node that knows how to consume a VIDEO. The README mentions H.264 support, and that's accurate for the downstream encoding path, but don't expect a .mp4 file to pop out of this node by itself - it produces the object, and you save it from there.

Inputs you'll actually touch: images (an IMAGE tensor, required - the frames, in order), fps (FLOAT, 1–120, default 24), and audio (optional, wildcard). The audio input expects the standard ComfyUI audio dict - a waveform tensor plus a sample_rate - which is exactly what the pack's Decompose Video node outputs, so the natural workflow is Decompose → process frames → Compose with the original audio carried through. The two video nodes in this pack are designed as a round-trip pair, and it shows.

Output: one video output of type VIDEO, plus a UI readout in the header showing resolution, duration, fps, and whether audio made it in. That "frames × fps = duration" math is worth checking before you save - if you intended 10 seconds at 24fps you need 240 frames, and the node will happily tell you you have 0.2 seconds instead of complaining.

Two operational things to know. First, this node is married to a recent ComfyUI: it imports from comfy_api.latest and comfy_api.input_impl, the newer backend APIs. If you're on an old ComfyUI and this node throws an import error at startup, the fix is updating ComfyUI, not the pack. Second, like the rest of the pack it always re-runs (IS_CHANGED → NaN) and is an output node, so it forces its frame-producing chain to execute each run - normal for a video tail, just know the cost.

The ecosystem context: core ComfyUI has been building out native video support, and this pack leans on that rather than inventing its own file format - which is the right call and means the VIDEO output should interoperate with any node that speaks ComfyUI's native VIDEO type. If you've used the older approach of writing frames to a temp folder and stitching with an external tool, this is the modern, in-graph version.

Where it shines is the round-trip: Decompose a video, run each frame through a processor (upscaler, fixer, interpolation), and Compose it back - audio preserved, timing preserved, all inside the graph. If your goal is "take a video, modify it, hand it back as a video," this is the closing half of that loop.

Install is pack-level:

cd ComfyUI/custom_nodes
git clone https://github.com/playboy-dongan/ComfyUI-Logic-nodes

or ComfyUI Manager → "ComfyUI-Logic-nodes" → restart. No models to download; the one requirement is a current enough ComfyUI for the comfy_api video types.

Category⚡ Logic/🎬 Video

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
fpsFLOAT24.001–120
audioopt*

Outputs (1)

NameTypeDescription
videoVIDEO