The 'Moonvalley: Motion Transfer' workflow is designed to seamlessly transfer motion from one video to another using ComfyUI. This workflow leverages the Moonvalley video generation model, which specializes in capturing and replicating intricate motion details. The core of the process involves the 'MoonvalleyVideo2VideoNode', which applies the motion dynamics from a reference video onto a target video. This is particularly useful for animators and video editors who want to imbue static scenes with dynamic motion without the need for extensive manual animation.
Technically, the workflow begins by loading a reference video using the 'LoadVideo' node. This video should be at least 5 seconds long to ensure sufficient motion data is captured. The 'MoonvalleyVideo2VideoNode' then analyzes the motion patterns and applies them to the target video. Finally, the 'SaveVideo' node is used to export the newly animated video. The inclusion of 'MarkdownNote' nodes provides in-line documentation and notes, making the workflow easy to follow and modify. This process is efficient and produces high-quality results, making it a valuable tool for creative professionals.
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















