The Multi-Keyframe Video Stitching workflow in ComfyUI is designed to transform a series of static images into a fluid video sequence. Utilizing six key frames, this workflow automatically generates the transitional frames needed to create a seamless video. At the core of this process is the Wan2.2 model, which excels at interpreting motion between images to ensure smooth transitions. The workflow begins with the LoadImage and ImageBatch nodes, which prepare the key frames for processing. The intermediate nodes, such as 11ac0cb0-38fb-41d4-9a55-7c44422b2516 and 1c5f4533-5d1e-4449-97ca-9027b9ea9c11, handle the interpolation of frames by predicting and filling in the motion paths. Finally, the CreateVideo and SaveVideo nodes compile the frames into a cohesive video file.

This workflow is particularly useful for creators looking to produce animations or video content from still images without requiring extensive manual editing. By automating the interpolation process, it saves time and ensures consistency in the motion between frames. The use of advanced nodes and the Wan2.2 model allows for high-quality video output that maintains the integrity of the original images while providing a natural flow of motion.

API

從程式碼使用此工作流

每個 Comfy 工作流都是一個 JSON 圖。下方的 payload 就是此工作流,與 ComfyUI 執行時完全相同 — 你可以從此 URL 取得、放入版本控制,或在 ComfyUI 載入並逐節點執行。

templates-6-key-frames.json
正在取得工作流 JSON…

使用 Comfy SDK 以 TypeScript 或 Python 執行。相同程式碼可用於 Comfy Cloud 或你自架的 ComfyUI — 只需更改 base URL。

// Install (beta)
npm i @comfyorg/sdk

// Run "多關鍵幀影片銜接" (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });

// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("templates-6-key-frames_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("62", "image", asset); // LoadImage

const job = await client.run(wf);
await job.getOutputs("146")[0].toFile("output.png"); // SaveVideo

SDK 需使用 API 格式的工作流:請在 ComfyUI 開啟此工作流,並使用 檔案 → 匯出工作流(API)。

Comfy Cloud API 存取需有 API 金鑰的方案。

常見問題

常見問題

查看所有工作流
Showing 30 of 30 templates