The AIrt MAchIne workflow in ComfyUI is designed to transform a static image into a dynamic, looping AI-generated video. This process begins with the user uploading an image, which serves as the foundation for the video. The workflow utilizes a language model to generate five unique prompts based on the initial image, ensuring that each video iteration is distinct and creative. These prompts guide the generation of images and short video clips, which are then seamlessly stitched together to form a continuous loop. This is achieved through a series of nodes, including the ImageResizeKJv2 for resizing images, and the VHS_VideoCombine for merging clips into a cohesive video.
Technically, the workflow leverages models like Wan2.2 and Z-Image-Turbo, which are known for their efficient image and video generation capabilities. Custom nodes such as comfyui-kjnodes and comfyui-videohelpersuite are employed to enhance the workflow's functionality, allowing for sophisticated video editing and prompt generation. The integration of these components makes the workflow particularly useful for artists and content creators looking to produce unique, AI-driven video content from static images. Additionally, users have the option to bypass certain nodes, such as the 'Save frames' and 'Save videos' groups, if they only wish to output the final combined video, offering flexibility in the workflow's application.
API
從程式碼使用此工作流
每個 Comfy 工作流都是一個 JSON 圖。下方的 payload 就是此工作流,與 ComfyUI 執行時完全相同 — 你可以從此 URL 取得、放入版本控制,或在 ComfyUI 載入並逐節點執行。
使用 Comfy SDK 以 TypeScript 或 Python 執行。相同程式碼可用於 Comfy Cloud 或你自架的 ComfyUI — 只需更改 base URL。
// Install (beta)
npm i @comfyorg/sdk
// Run "AIrt MAchIne" (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_mjm_airt_machIne_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("94", "image", asset); // LoadImage
const job = await client.run(wf);
await job.getOutputs("161")[0].toFile("output.png"); // SaveImageSDK 需使用 API 格式的工作流:請在 ComfyUI 開啟此工作流,並使用 檔案 → 匯出工作流(API)。
常見問題














