This workflow demonstrates MiniMax H3’s reference-to-video generation in ComfyUI: you provide a text prompt plus up to nine reference images, three short reference videos, and three audio clips, and the model produces a single MP4 with native stereo audio in one pass. The MiniMaxH3ReferenceToVideo node is the core, fusing multi-modal context (identity, motion, camera, style, and voice) with your prompt to synthesize a ~15s clip at up to 2K resolution and 24fps.

Under the hood, the Switch Model and Settings group loads the MiniMax H3 model stack via UNETLoader and CLIPLoader, while KSamplerSelect, BasicScheduler, SamplerCustomAdvanced, and BasicGuider manage sampling behavior (seeded by RandomNoise for reproducibility). ResolutionSelector sets a 16:9 size aligned to multiples of 32, and ComfyMathExpression with PrimitiveFloat handles derived values like frame count from duration and fps. After generation, VAELoader provides both video and audio VAEs; VAEDecode reconstructs frames from video latents and VAEDecodeAudio reconstructs stereo waveforms. CreateVideo multiplexes frames and audio, and SaveVideo writes the final MP4. This makes the workflow practical for character-consistent animation, style-guided motion, and audio-synced content without separate TTS or sound design steps.

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.

46a303cbccf9.json
Fetching workflow JSON…

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

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates