AIHub Expose Frame
One frame out of a video editor's timeline, handed to your workflow
- IMAGE
- WIDTH
- HEIGHT
- FRAME_INDEX
- TOTAL_FRAMES
AIHub Expose Frame is the pack's answer to frame-by-frame video editing. Where AIHubExposeImage pulls a whole layer or canvas, this node asks the external editor for one specific frame of the video you're working on, then hands it to ComfyUI as a plain IMAGE tensor ready for img2img, an upscale, a ControlNet pass, whatever you do to a single frame before writing it back to the timeline.
It sits inside the same AIHub architecture as everything else in this pack: the value isn't fetched by typing in the web UI. An AIHub client - in this case something like a video editor plugin speaking the protocol over the pack's websocket on port 8111 - connects, tells the node which frame it means, uploads it, and the server injects the file path as a hidden input. Run it bare in the web UI and it'll complain about a missing local_file; that's the protocol working as designed, not a crash.
The inputs that matter
Two inputs do the real work:
- frame_index_type -
relative_to_current(default) orabsolute. Relative means the client's playhead position plus yourframe_indexoffset; absolute means the literal frame number in the video. If you're building "denoise 3 frames ahead of the playhead," relative is what you want; if you're doing "always fix frame 400," use absolute. - frame_index - the index itself. Handy detail from the tooltip: if it's out of bounds it clamps to the nearest valid frame rather than erroring. So requesting frame 9999 in a 120-frame clip quietly gives you frame 119. Worth knowing before you debug "why is it always the last frame."
Plus the usual protocol plumbing: id (unique, alphanumeric), label, tooltip, index (sort order), and optional - set true and a missing frame returns zeros instead of failing the run.
Outputs
You get IMAGE, plus the frame's WIDTH and HEIGHT and two genuinely useful ints: FRAME_INDEX (the actual, absolute frame you ended up with) and TOTAL_FRAMES (how long the video is). The README makes a point of this: the outputs are always positive absolute indices even if the client asked with a negative offset - which is exactly what you want when you're about to composite the result back into a timeline and need to know which slot it belongs in.
Install & gotchas
Install through ComfyUI Manager (search ComfyUI-aihub-workflow-exposer) or:
cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
then restart. No requirements.txt, no extra pip packages - it only uses what ComfyUI bundles. The ComfyUI/aihub/... folders should exist and the workflow needs an AIHubWorkflowController with a unique id.
Two traps worth naming. First: because out-of-bounds frames clamp silently, set your frame_index_type deliberately - a stray absolute on a node that meant "three frames from the playhead" will look fine and be subtly wrong. Second: this node is a single frame gateway. If you need a whole batch of frames as a tensor (say, for video-to-video generation or lora training), that's AIHubExposeImageBatch's job, not this node's. Expose Frame is for the frame-by-frame editing flow - one frame in, one frame out.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | exposed_frame | A unique custom ID for this workflow. |
| label | STRING | Frame | This is the label that will appear in the field. |
| tooltip | STRING | An optional tooltip | |
| frame_index_type | COMBO | relative_to_current | The index type of the frame |
| frame_index | INT | 0-100000–100000 | The index of the frame to expose, it gets affected by relative or absolute type, note that if out of bounds it will clamp to the nearest valid frame |
| index | INT | 0 | This value is used for sorting the input fields when displaying; lower values will appear first. |
| optional | BOOLEAN | false | If set to true, it will not raise an error if the frame is not found |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| WIDTH | INT | — |
| HEIGHT | INT | — |
| FRAME_INDEX | INT | — |
| TOTAL_FRAMES | INT | — |