Nodes/ComfyUI-HaiperAI-API/Haiper Keyframe Conditioning
ComfyUI Node

Haiper Keyframe Conditioning

Pin your frames in time and let Haiper fill the motion

By Haiper-ai·Created 2 years ago·Updated 2 years ago· 14
Haiper Keyframe Conditioning
  • frame_1
  • frame_2
  • frame_3
  • frame_4
  • frame_5
  • frame_6
  • output_video_path
frame_indices_str0, 31
image_width1280
image_height720
is_publicfalse
prompta smooth consecutive video
negative_promptbad, slow
seed-1
duration4

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 raises Source Images need to align with the length of Frame Indices before 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 default duration of 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_1 and frame_2 (IMAGE) - required, your start and end. frame_3 through frame_6 are optional mid-keyframes.
  • frame_indices_str - a comma-separated list like 0, 15, 31 telling 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 - defaults a smooth consecutive video and bad, slow. They describe the filler motion between your pins; bad, slow as 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.

Categoryhaiper

Inputs (14)

NameTypeDefaultDescription
frame_1IMAGE
frame_2IMAGE
frame_indices_strSTRING0, 31
image_widthINT1280
image_heightINT720
is_publicBOOLEANfalse
promptSTRINGa smooth consecutive video
negative_promptSTRINGbad, slow
seedINT-1
durationINT4
frame_3optIMAGE
frame_4optIMAGE
frame_5optIMAGE
frame_6optIMAGE

Outputs (1)

NameTypeDescription
output_video_pathSTRING