🎬 Kling Omni: Start/End Frame
First frame, last frame — and Kling Omni does the boring part in between
- first_frame
- end_frame
- images
- audio
- fps
Start/end frame is the most controllable trick in text-to-video, and it's exactly what this node does: you give Kling's Omni model a first frame, optionally a last frame, and it invents everything in between. For a beginner this is the difference between "I hoped the camera would move" and "the shot opens on her face and ends on the door closing." If you've spent an afternoon fighting a local video model for frame consistency, this node exists because Kling already solved that part for you - at a price, since it's a paid API call, not a local one.
The name is a small lie you should know going in: KlingFirstEndFrame doesn't load any model, doesn't touch your VRAM, and needs no weights. It's a wrapper around Kling AI's kling-video-o1 cloud model, the same closed model you'd use in Kling's own app. The pack just turns it into a standard ComfyUI node.
Where it fits. Imagine you already have a still you love from a local Flux or SDXL gen and want it to become the opening of a clip. Or you want a specific closing shot - the character reaching the door, the camera landing on a landscape. Feed in those two anchors, write a prompt for what happens between them, and Kling fills the middle. That's the whole appeal: consistent bookends, unpredictable (but usually good) motion.
How it works
Under the hood the node does three things, and the middle one is why setup is fiddly. First it base64-encodes your first and end frames and sends them to Kling's /v1/videos/omni-video endpoint, tagged first_frame and end_frame in the image list. Then it polls the task until it succeeds or times out - 600 seconds by default, rendered as a progress bar in the console. Finally it downloads the finished mp4, decodes it to a tensor, pulls out the audio track with ffmpeg, and hands you frames, audio, and fps.
The inputs that matter
Most of the node is obvious. The few you'll actually set:
first_frame(IMAGE) - the anchor. Required.end_frame(IMAGE, optional) - the destination. This is the control that makes the node worth installing; leave it empty and you've got plain image-to-video.prompt(multiline) - describe the motion between the two frames.duration- 5, 7, or 10 seconds.seed- set it to reproduce a result; the node randomizes it otherwise.
model only offers kling-video-o1 right now, so don't overthink it.
Outputs and what they wire into
images(IMAGE) - the generated frames. Send these to a preview node or a video saver like VHS.audio(AUDIO) - the clip's soundtrack, already extracted. Route it to an audio-save or combine node if you want to keep it.fps(FLOAT) - the frame rate of the returned clip. Feed it into your video-save node's fps input so playback timing is right.
Install and the config wall
Install is standard. In ComfyUI Manager search "ComfyUI-KLingAI-OmniVideo", or run:
cd ComfyUI/custom_nodes
git clone https://github.com/starsFriday/ComfyUI-KLingAI-OmniVideo.git
cd ComfyUI-KLingAI-OmniVideo
pip install -r requirements.txt
Then restart. The requirements are oss2, requests, pyjwt, imageio[ffmpeg], numpy, torch - plus ffmpeg on your PATH for audio extraction.
But the easy part is install. The pack is useless until you create config.ini in the pack folder with two sets of keys: your Kling API access/secret keys (from klingai.kuaishou.com/api) and Aliyun OSS keys (a RAM sub-account with read/write on the bucket). The OSS bucket must be public-read or fronted by a CDN, because Kling's servers fetch your uploaded frames from it. Yes, you need an Aliyun OSS bucket just to feed images to a video API. That's the one genuine annoyance of this pack, and the source of most of its failure modes. You can also set the same values as environment variables (KLINGAI_API_ACCESS_KEY, OSS_ACCESS_KEY_ID, and friends) instead of the file.
Common issues
- "Task failed" - keys are wrong, or your Kling account balance is gone. Check
config.inifirst. - Black output or download errors - the bucket isn't actually public-read, so Kling couldn't fetch your frames.
- API rejects your input - videos must be ≤10s and each side within 720–2560px.
- No audio returned - ffmpeg isn't on PATH.
One more thing worth saying: this is an unofficial MIT wrapper that holds your API keys and phones home by design. That's normal for API-node packs, and this one is small and open-source - just don't install random forks of it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| first_frame | IMAGE | — | |
| prompt | STRING | — | |
| duration | COMBO | 3 options: 5, 7, 10 | |
| model | COMBO | kling-video-o1 | 1 options: kling-video-o1 |
| seed | INT | 85714351333450010000–18446744073709550000 | — |
| end_frameopt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| audio | AUDIO | — |
| fps | FLOAT | — |