Model releases come monthly. The engine is built so a new image or video model is a new workflow file, not a new release of the engine.
Workflows are data, bound by name
All image and video generation runs through ComfyUI. Four logical workflows (t2i, still, lipsync, i2v, plus an optional upscale) are each a pair of files. <name>.api.json is a graph exported from ComfyUI with Save (API Format), using local open-weight nodes or paid cloud API nodes. <name>.bindings.json maps the pipeline's logical parameters onto node inputs in that graph.
{
"workflow": "ltx_lipsync.api.json",
"inputs": {
"positive_prompt": [{"node": "6", "field": "text"}],
"image": [{"node": "20", "field": "image"}],
"audio": [{"node": "21", "field": "audio"}],
"seed": [{"node": "30", "field": "noise_seed"}],
"num_frames": [{"node": "40", "field": "length"}],
"fps": [{"node": "41", "field": "frame_rate"},
{"node": "50", "field": "fps"}]
},
"required": ["positive_prompt", "image", "audio", "seed", "num_frames"],
"output": {"node": "50", "extensions": [".mp4"]}
}- A parameter with no binding is ignored, so one caller serves workflows with different capabilities. A parameter listed in
requiredmust have a binding and a value or rendering fails. - One parameter can drive several inputs, as
fpsdoes above. mvd validatereports bindings that point at a missing node or input, and detects a workflow exported in UI format instead of API format.- Paid API keys never need to live in a graph file: strings in
bindings.defaultsexpand${ENV_VAR}, limited toMVD_*,COMFY_*and names you allow explicitly.
A ComfyUI client that is careful with GPU time
- Retries happen only for connection failures before a job is dispatched,
429and503. A read timeout or a500is never retried blind, because that could queue a duplicate GPU job. - Jobs are polled via
/history(interval and timeout are configurable), which works across local, LAN and hosted HTTP proxies, with best-effort live step progress over WebSocket when it is available. POST /freeunloads models between the still phase and the video phase.- Uploads go into a per-project subfolder, so concurrent runs do not overwrite each other. Downloads stream to a temporary file, reject unsafe paths and are capped at 512 MiB before an atomic rename.
- Optional endpoints (
/free,/object_info,HEAD /view) degrade gracefully across ComfyUI versions, which is what “version-agnostic” means in practice. - A failed job names the failing nodes. A rejected job counts as a retry attempt; an unreachable server stops the run without using one.
Any language model, or none
Providers are Anthropic, OpenAI, Gemini, Ollama and any OpenAI-compatible server. Every call goes through one client that requests structured JSON, strips reasoning blocks, validates the reply against the target schema, and on failure sends the validation error back once and asks for a correction. A reply truncated at the token limit fails immediately with guidance rather than looping.
- Four kinds of call: the visual bible (once), shot direction (batched), vision checks after each attempt, and prompt rewrites on retry.
- Images are re-encoded as JPEG with a longest side of 1,024 px before sending.
- Billing or quota exhaustion fails fast without wasted retries. After three consecutive unavailable errors the vision checks are switched off and recorded as skipped, rather than failing every shot.
- Adding a provider means subclassing one backend class and registering it.
Where your audio goes
This is determined entirely by the services you configure. The table is the engine's behavior; each row is something you can verify in the code.
| Step | Runs where | What leaves the machine |
|---|---|---|
| Beat, bar, vocal and loudness analysis | Local, CPU | Nothing. mvd analyze needs no network. |
| Stem separation and lyric transcription | Local (Demucs, faster-whisper) | Nothing. |
| Planning (visual bible, shot direction) | Your chosen LLM | Lyrics, style brief, section list and measured musical features, as text. A compact MP3 of the mix is attached only when the backend is audio-capable, such as Gemini. |
| Vision checks and prompt rewrites | Your chosen LLM | Still images, sampled video frames and reference sheets. No audio. |
| Image and video generation | Your ComfyUI endpoint | Prompts and reference images; vocal slices go to lip-sync workflows. Local or LAN ComfyUI keeps these on your network. |
With a local Ollama model and a local ComfyUI, nothing leaves the machine. With llm.enabled: false, there is no language-model traffic at all.
Hardening
- Path containment: project paths reject absolute paths and any traversal outside the project root. Workflow graph paths in bindings files get the same check.
- Safe identifiers: shot, wardrobe and reference IDs are validated against a strict pattern at the model boundary, so neither an LLM reply nor a hand-edited manifest can read or write outside the project folder.
- Secrets: the guided
mvd setupcan save keys to an owner-only (0600), gitignored project.env. It is read with symlink protection and a size cap, only for allowlisted keys, and never copied into the process environment; shell exports always take precedence. - Output safety:
mvd assemblevalidates the output path before rendering and refuses to overwrite project state or clips;mvd clean --deleteis limited strictly to generation files underassets/. - MCP over HTTP checks Host, Origin and bearer token at the header stage, enforces a total read deadline, and drains rejected bodies.
Embeddable by design
mvdis a thin front end overmvdirector.api: one function per pipeline stage, returning data instead of printing, and raisingMVDErrorsubclasses for expected failures.- Progress is an event stream.
generatetakes an observer callback and emits aRunEventfor every phase, attempt, pass and exhaustion; a service persists and fans that out instead of parsing logs. - Three interfaces let a service wrap the engine without forking it:
StateStore(state, writer lock, project identity),AssetStorage(pulling and pushing the workspace to durable storage) andComfyEndpointProvider(which endpoint serves a stage, so a custom provider can lease a GPU pod per shot). mvd mcpis a zero-dependency Model Context Protocol server (stdio, or Streamable HTTP for driving a remote GPU box from a laptop agent) with a bundled agent skill, so a coding or director agent can run the whole pipeline.
Frequently asked questions
- Does my unreleased audio get uploaded to third-party AI training servers?
- In open-source mvdirector, beat analysis, stem separation, and transcription run locally with zero network calls, and you choose every ComfyUI and LLM endpoint. In SongFilm Studio, raw audio is kept out of third-party AI calls by default, with dedicated private deployments on Enterprise workspaces.
- How does mvdirector avoid duplicate GPU charges on timeouts?
- The ComfyUI client only retries connection failures before dispatch, 429, and 503 responses. Read timeouts and 500 errors are never retried blindly so a second identical GPU job is not queued.
- Can an AI coding or director agent run mvdirector programmatically?
- Yes. mvdirector ships both a typed Python library API (mvdirector.api) and a zero-dependency Model Context Protocol server (mvd mcp) over stdio or Streamable HTTP.