Nodes/ComfyUI-aihub-workflow-exposer/AIHub Action New Frames
ComfyUI Node

AIHub Action New Frames

Turning a batch of generated images into frames inside the video you're editing

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Action New Frames
  • images
  • IMAGE
actionREPLACE
namenew image batch
insert_index-1
insert_actionREPLACE
file_name

AIHub Action New Frames is how an AI video workflow gets its results back onto the editing timeline. You hand it an IMAGE batch - frames out of a video model, a frame-interpolation pass, or an img2vid pipeline - and it tells the client app to use those images as frames in the video being worked on, at a specific spot. It's the video-editing cousin of AIHub Action New Image Batch: same file handling, plus one extra event that says "these are frames, place them at this index."

As with everything in otavanopisto's ComfyUI-aihub-workflow-exposer, this only means something when an external client is driving the workflow. The pack is a bridge - expose nodes pull data in from the app, action nodes push results back over a dedicated websocket (port 8111). New Frames is very much in the "push back" camp.

How it works

Under the hood it literally calls the New Image Batch action first: it streams each image as a PNG over the aihub websocket under a NEW_IMAGE event, building the batch file. Then it fires a second event, USE_AS_FRAMES, carrying the count, the insert_index, and the insert_action. That second message is what flips the client from "these are stills" to "these are video frames." The separation is deliberate - the batch needs to exist as files before the client can reason about where to place them.

The inputs that matter

  • images (required) - the IMAGE batch tensor. Frames out, in order.
  • insert_index - where the frames go, pythonically. -1 (the default) means insert at the end; negative indexes count back from the end; any other integer is an absolute frame position. If you're replacing a middle chunk of a video, set this to the first frame you're overwriting.
  • insert_action - REPLACE or APPEND. This is about the frames themselves: replace scrubs over existing frames at the insertion point, append pushes existing frames forward to make room.
  • action - the file-level REPLACE/APPEND for how the batch files are stored on the client. Don't confuse the two "action" fields - one is about the files, one is about the video timeline.
  • name / file_name - base names for the numbered frame files (a number gets appended to each).

It outputs the IMAGE batch back, so you can chain something after it if you really want, but it's an output node at heart - its job is the side effect.

Installing it

ComfyUI Manager (search "ComfyUI-aihub-workflow-exposer"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
# restart ComfyUI

No extra dependencies or model files - it uses ComfyUI's own torch/PIL stack.

Where people get burned

The classic failure is confusing action and insert_action and then wondering why frames vanished instead of shifting. action governs file storage; insert_action governs the timeline. Also remember this is a bridge node: in the stock UI, no frames "appear" anywhere, because the frames are going to the client over the pack's websocket. If your client isn't connected, this node is a silent no-op - check the connection before you suspect the node.

Categoryaihub/actions

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
actionCOMBOREPLACEThis is a file level action for file storage, if append is selected, the images will be added to existing ones, if replace is selected, existing images will be replaced
nameSTRINGnew image batchThe name of the images to be used as filenames, a number will be added to each image to make it unique
insert_indexINT-1-2147483648–2147483647The starting index for the frames, where to place them, negative indexes are allowed to insert at the end
insert_actionCOMBOREPLACEThe action to execute on the video frames themselves that are being worked on
file_nameoptSTRINGThe filename to use as base extension included, if not given the name value will be used with a .png extension

Outputs (1)

NameTypeDescription
IMAGEIMAGE