-
-
DirectorGraph — one brief in, a finished film out. Six Wan r2v shots, Qwen-VL inspected, no manual edits.
-
Live on Alibaba Cloud: the Autumn Path master completed all six pipeline stages — 89% mean QC, 100% acceptance, $3.43 of a $15 cap.
-
Judge proof cockpit: all six shots accepted on attempt one, scored 85–92% by Qwen-VL against their own contracts.
-
Qwen compiles the brief into a typed StoryIR: locked continuity rules, a six-beat dramatic rail, and characters locked by wardrobe.
-
The final verified cut, beside a live agent trace showing every production decision — inspection, acceptance, and assembly.
-
The evidence ledger: 24s accepted, zero rejected seconds, 16,357 tokens, and a $3.00 repair reserve that was never needed.
-
Every shot is a typed contract — objective, renderer, duration, salience, and threshold. Salience routes S03 to 1080P, the rest to 720P.
Inspiration
Video models make clips. They don't make films.
Ask any text-to-video model for six shots of the same character and you get six different people. The coat changes colour, the light jumps, the story doesn't hold. Everyone solves this by hand — a human watches every clip, decides what's good, re-prompts what isn't. That human is the actual showrunner. The model is just a camera.
I wanted to find out whether that judgment could be written down. Not "make it prettier" — an actual machine-readable contract per shot, checked by a model that never saw the prompt, with a budget it isn't allowed to exceed.
What it does
DirectorGraph takes one creative brief and returns a finished short film — without manual shot editing or replacement in the production pipeline.
- Qwen compiles the brief into a typed StoryIR: beats, characters locked with visual invariants, and a machine-readable Shot Contract for every planned clip (what must be in frame, camera plan, continuity rules).
- A salience router allocates the budget — character-bound shots route to Wan r2v; high-salience shots can receive 1080p and additional attempts when the cap permits; background shots stay cheaper.
- Wan renders each shot; Qwen-VL then inspects every clip against its own contract and scores it across narrative, identity, continuity, camera, motion, dialogue and safety.
- Failed shots are repaired or regenerated in isolation — only the failing shot and its dependencies re-render; accepted shots stay sealed, so the film is never re-rendered wholesale.
- The Picture Editor assembles only accepted footage with FFmpeg, deterministically, with captions.
The deployed demo — Autumn Path — is six Wan r2v shots, all accepted on attempt one (0.85–0.92), zero local fallback, at an estimated $3.43 against a $15 cap. Every number ships as committed evidence.
How we built it
Backend: Python + FastAPI, PostgreSQL, a leased worker with idempotent task checkpoints so a restarted production resumes from accepted work instead of re-spending its budget. Frontend: React + TypeScript, built as a judge-facing proof cockpit rather than a media player — the contract trail is the product, the video is the artifact.
Every model call routes through Qwen Cloud: Qwen for story, Qwen-VL for inspection, Wan for image and video, HappyHorse for edit, Qwen-TTS for voice.
Deployed on Alibaba Cloud ECS (Docker Compose behind Caddy, with nginx serving the React frontend) with media on OSS. There's a capped judge mode: a server-side access code unlocks a real live production run inside a hard spend cap, without exposing provider credentials.
The design rule throughout: every claim on screen must be derived from stored data. No hardcoded PASS states, no floored counters, no fabricated scores.
Challenges we ran into
The inspector was silently throwing away its own work. Qwen-VL was returning full seven-dimension breakdowns with written evidence — and a response-coercion path was discarding all of it, storing an empty array. Nothing crashed. Runs still passed, because the acceptance gate had quietly degraded to a single score. It was a smoke detector with dead batteries: the house never burned down, so nobody noticed. Fixing it meant the breakdowns started counting for the first time — which immediately surfaced two more bugs hiding behind the silence.
A rubric that couldn't be satisfied. Contracts carry a dialogue line delivered as voice-over — but the inspector judges a still frame. A frame can't show a spoken line, so the dialogue dimension became a coin flip: one run failed a shot for text burned into the frame (a real defect), the next failed a different shot for text not being visible. Fixed at the rubric layer: dialogue is audio, so score it on whether readable text was wrongly burned in.
Prose vetoing arithmetic. After wiring violations into the gate, a shot scoring 0.85 with every dimension above threshold got repair-looped because the model wrote a note about slight motion blur on a foot. Now structured signals gate; prose informs.
Honest failure is still failure. One capped run died with Live spend reservation refused: projected $2.41 would consume protected repair reserve $0.60. Correct behaviour — but a $3 cap left no room for even one legitimate repair. Raised to $5: base run plus two repair cycles, still bounded.
The tempting shortcut I didn't take. The flagship's sealed verdicts predate the dimensions fix. I could have re-inspected and backfilled — but fresh runs produced pass/fail variance, so persisting them would have meant either overwriting a shipped film's verdicts with contradictory ones, or re-rolling until the numbers looked good. Both are fabrication. The sealed records stay as recorded, with a disclosure line in the UI, and every new inspection captures the full breakdown.
Accomplishments that we're proud of
- A real film generated end to end, with a contract trail you can audit — not a reel of cherry-picked clips.
- 6/6 shots accepted on first attempt, 0.85–0.92, zero local fallback, on a live deployment.
- Budget governance that actually refuses — it fail-closed on its own protected reserve rather than overspending.
- A capped judge mode that lets a reviewer generate their own film, inside a spend cap, without ever touching provider credentials.
- Every displayed metric traces to stored data. The bugs I found were mostly my own UI flattering itself — a fabricated counter, hardcoded PASS states, a mislabeled metric — and removing them mattered more than adding features.
What we learned
A quality gate you can't see is a quality gate you don't have. The inspector "worked" for weeks while discarding its own evidence, because nothing failed loudly.
Restoring a silenced signal is a breaking change. The moment inspection results started counting, every downstream consumer had to face reality. The new bugs weren't regressions — they were latent, held up by the thing that was broken.
Judgment is the hard part, not generation. Rendering a beautiful clip is now easy. Deciding whether it belongs in this film, against this contract, within this budget — that's the engineering.
Fail-closed beats fail-quiet. Every failure in this project was honest: refused spend reservations, rejected shots, blocked writes. Each one was diagnosable in minutes. The one bug that cost real time was the one that silently succeeded.
What's next for DirectorGraph
- Per-dimension repair targeting — repair only the failed dimension instead of regenerating that shot's entire clip.
- Multi-take selection — render N candidates for high-salience shots, let Qwen-VL pick the winner, still under cap.
- Continuity across productions — reuse locked characters as a persistent cast between films.
- Cost reconciliation — replace the transparent internal rate card with real billing exports for a true spend ledger.
Built With
- ai-agents
- alibaba-cloud
- alibaba-cloud-ecs
- alibaba-cloud-oss
- alibaba-model-studio
- caddy
- dashscope
- docker
- docker-compose
- fastapi
- ffmpeg
- happyhorse
- mcp
- multimodal-ai
- postgresql
- pydantic
- python
- qwen
- qwen-tts
- qwen-vl
- react
- sqlalchemy
- typescript
- video-generation
- wan
Log in or sign up for Devpost to join the conversation.