This ComfyUI tutorial workflow lets you edit a single input video using natural language instructions powered by the GeminiVideoOmni node. The graph is straightforward: LoadVideo ingests your source clip, the Prompt Constructor subgraph (node id 331103d2-d660-4a88-abf0-1117dc46b2df) builds a well-formed prompt with the required duration and aspect ratio, GeminiVideoOmni sends the video plus prompt to the Gemini Omni Flash API, and the results are displayed with PreviewAny and saved with SaveVideo. A MarkdownNote in the canvas provides quick tips and reminders.
Technically, LoadVideo decodes frames and metadata, then the Prompt Constructor concatenates your natural language edit with explicit settings like "duration: 5s" and "aspect ratio: 9:16". GeminiVideoOmni uses these to guide the model: the aspect ratio determines the output canvas, and the duration constrains the target clip length. The model returns an edited clip that adheres to your instructions (e.g., background changes, mood/atmosphere adjustments, reframing), which you can quickly review in PreviewAny and export via SaveVideo. For best results, keep prompts concrete, always include duration and aspect ratio, and iterate in short passes.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run this workflow (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
const wf = await client.workflows.fromFile("workflow_api.json");
const job = await client.run(wf);
await job.getOutputs("<output-node-id>")[0].toFile("output.png");The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ














