The report raises a scheduling problem
Hugging Face’s November 27 Trainium3 and LTX-2.5 report describes a film assembled from named shots. A from reference uses another shot’s ending frames; a to reference uses another shot’s opening frames. The referenced shot must be generated before the shot that needs its frames.
That is a useful distinction for application code: the order in which an audience watches scenes need not be the order in which a worker prepares them. The author’s repository already orders dependent shots before rendering. Our independent teaching fixture isolates a smaller contract: inspect named-shot dependencies, produce a deterministic plan and stop when the plan cannot be resolved.
Three shots produce two different orders
Our sample manifest lists lead, payoff and tail in playback order. The invented subject is an amber marble and a wooden ramp. lead contains to: {shot: payoff, frames: 9}; tail contains from: {shot: payoff, frames: 9}. These abbreviated field descriptions refer to the exact downloadable JSON. They are our own sample, not a generated film or a claim about what a model would draw.
payoff has no predecessor, so it can be prepared first. Both lead and tail wait for payoff. Once that dependency is available, the planner keeps their original list order. The resulting generation order is payoff, lead, tail; playback remains lead, payoff, tail. Preserve both arrays. Replacing the edit order with the generation order would change the story even though the dependency calculation itself succeeded.
Run the dependency calculation without a video stack
Save shot-dependency-plan.mjs and samplemanifest.json in the same directory. With Node.js 22 available, run node shot-dependency-plan.mjs samplemanifest.json. The command reads the local JSON and prints playbackOrder, generationOrder and dependencies. For the supplied manifest, lead and tail each list payoff as their predecessor; payoff lists none. The fixture imports only Node built-ins and performs no network, model or media operations.
The planner first validates names and references, then repeatedly takes shots whose predecessors are complete. A ready group retains manifest order, so ties have an explicit policy. Here, complete means that the dry-run planner has placed a name in its output. A real worker would need a separate completion event after usable media exists; reading this plan must not mark a render job finished.
Make broken references and cycles visible
Codorc executed the owned fixture with Node v22.23.2 on November 28. All seven local cases passed: the worked from/to example, an unknown predecessor, duplicate names, a self-reference, a two-shot cycle, stable ordering among ready shots and rejection of an image-only reference outside this fixture’s contract. The worked case also checked that planning left its input unchanged. These are planner checks, not video-generation results.
An unknown name returns E_UNKNOWN instead of becoming an implicit extra task. Repeated names return E_DUPLICATE, and a direct self-reference returns E_SELF. When unresolved shots remain but none can become ready, E_CYCLE identifies the blocked group. That group can include a shot waiting behind a cycle, so it is not a claimed minimal cycle trace. The command exits unsuccessfully on these errors, allowing a caller to stop before scheduling work.
A valid plan still needs a rendering contract
The fixture accepts only references to named shots. Image and video inputs are outside its contract, and it does not validate prompts, frame counts, file availability, trimming or model limits. The sample’s nine-frame values are retained as input data; this planner does not prove that a renderer can use them. Review the actual renderer’s schema and checks before translating the plan into calls.
For an integration, keep an artifact record for each completed shot: which request produced it, where it is stored and which dependent work consumed it. Treat failed generation as a failed dependency instead of releasing its children. If a selected take changes, review the shots that used its frames before reusing their outputs. These remain proposed rendering behaviors. The impact fixture below reports graph reachability; it does not inspect, invalidate, delete or regenerate media or cached artifacts.
Which takes are affected when payoff changes?
The added impactmanifest.json keeps lead, payoff and tail, then adds an independent establishing shot. Save the original planner, shot-dependency-impact.mjs and this manifest together. Running node shot-dependency-impact.mjs impactmanifest.json payoff returns affectedShots [lead,payoff,tail] and unaffectedShots [establishing], both in playback order. The declared changed shot itself is included; the calculation follows consumers rather than their upstream sources. With lead as the last argument, affectedShots contains only lead.
Codorc ran ten local cases with Node v22.23.2 on November 29, covering these examples, multi-hop and diamond paths, independent branches, multiple declared changes, empty or unknown or duplicated changed-name lists, invalid graphs and unchanged inputs. The calculation uses declared names and the current graph. It does not establish that any frame changed, inspect the selected take’s provenance or confirm a cache hit. An unaffected shot still needs its own artifact and input checks before reuse.
Six concrete boundaries for an integration
The example makes the dependency relationship executable while leaving the expensive and application-specific work separate. Before connecting it to a renderer, preserve the following boundaries in code review and in the job record:
- Keep lead, payoff, tail as the sample’s playback order and payoff, lead, tail as its generation order.
- Resolve every from/to shot name against the manifest before creating a render job.
- Choose and retain a deterministic policy for shots that become ready together.
- Stop on unknown names, duplicates, self-references or unresolved cycles; retain the exact error.
- Mark a rendering dependency complete only after the required media artifact is actually available.
- Validate frame and media requirements separately, and review downstream outputs when a source take changes.
Event dates identify the announcement or milestone covered. Publication dates show when this article first appeared on Codorc.



