Haiper Keyframe Conditioning
Pin your frames in time and let Haiper fill the motion
- frame_1
- frame_2
- frame_3
- frame_4
- frame_5
- frame_6
- output_video_path
This is the node that makes the pack interesting. Where the other Haiper nodes give you a prompt and hope, Keyframe Conditioning is the filmmaker's node: you hand it two to six images, tell it which frame numbers in the video each one should land on, and Haiper animates the in-between. Your first image is the opening shot, your last is the ending, and the model invents everything that happens in the middle while hitting your keyframes exactly.
Think of it as the low-effort version of the character-consistency fight everyone has with local video. Instead of wrestling ControlNets and LoRAs to keep a face stable across a clip, you just pin the frames you care about and let the cloud model interpolate. It's the same "generate once, then edit/pin" instinct that's been reshaping the ecosystem, just with a paid API doing the heavy lifting.
How it works
The node base64-encodes every image you feed in, pairs them with the frame indices you specify, and POSTs the lot to Haiper's afc (animated frame conditioning) endpoint. It then polls every 20 seconds until the job succeeds and downloads the watermark-free MP4. Blocking, cloud-side, same as the rest of the pack - your queue is occupied for a couple of minutes.
Two structural rules come straight from the API, and they're where people get burned:
- The number of frames you wire in must equal the number of indices in
frame_indices_str, or the node raisesSource Images need to align with the length of Frame Indicesbefore anything is even sent. - Indices must be in ascending order and within range: 0–31 for a 4-second clip, 0–47 for 6 seconds. The default,
"0, 31", matches the defaultdurationof 4.
Also note image_width and image_height default to 1280×720 - your input images need to match those dimensions, so resize before you wire them in.
The inputs that matter
frame_1andframe_2(IMAGE) - required, your start and end.frame_3throughframe_6are optional mid-keyframes.frame_indices_str- a comma-separated list like0, 15, 31telling Haiper where in time each frame sits.duration- default 4; 4 and 6 are the documented values, and 4 is the safer place to start.prompt/negative_prompt- defaultsa smooth consecutive videoandbad, slow. They describe the filler motion between your pins;bad, slowas a negative gives you a hint about the default failure mode.seed- -1 for random, set to reproduce.is_public- False by default, keeping generations private to your account.
The single output, output_video_path, is a STRING path to a temp MP4. Wire it into VHS_LoadVideoPath (ComfyUI-VideoHelperSuite) to preview, and VHS_VideoCombine to save somewhere permanent.
Install
You need an API key from haiper.ai/haiper-api with prepaid credit - Haiper won't accept API calls on a zero-balance account. Then:
cd ComfyUI/custom_nodes
git clone https://github.com/Haiper-ai/ComfyUI-HaiperAI-API.git
cd ComfyUI-HaiperAI-API
pip install -r requirements.txt
Set HAIPER_KEY in the .env file in that folder (it ships with a placeholder), then restart ComfyUI - the key is read at import. Manager users: search "Haiper" or "ComfyUI-HaiperAI-API"; the README's "ComfyUI-HaiperAI-AP" search string is missing a letter. No model files, no heavy dependencies.
Common issues
Besides the frame-count mismatch and out-of-range indices above, the usual suspects apply: a placeholder or un-restarted key, no credits, and the temp-directory trap (output vanishes on reboot unless you save it via VHS_VideoCombine). One tip if your clip looks jumpy: fewer, well-chosen keyframes beat more loosely-placed ones - the model earns its keep on the interpolation.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_1 | IMAGE | — | |
| frame_2 | IMAGE | — | |
| frame_indices_str | STRING | 0, 31 | — |
| image_width | INT | 1280 | — |
| image_height | INT | 720 | — |
| is_public | BOOLEAN | false | — |
| prompt | STRING | a smooth consecutive video | — |
| negative_prompt | STRING | bad, slow | — |
| seed | INT | -1 | — |
| duration | INT | 4 | — |
| frame_3opt | IMAGE | — | |
| frame_4opt | IMAGE | — | |
| frame_5opt | IMAGE | — | |
| frame_6opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_video_path | STRING | — |