Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Blockout to film: the Canvas template, the GPU board's row, Assist and MCP's blockout_film, and the research re-read

Claude458610b8fb12
diff --git a/docs/research/new-models-10.json b/docs/research/new-models-10.json
index f8709afe..ff3a04fb 100644
--- a/docs/research/new-models-10.json
+++ b/docs/research/new-models-10.json
@@ -391,8 +391,9 @@
"comfy": "no",
"released": "2026-09-16",
"url": "https://fal.ai/models/minimax/h3-max/3d-to-video",
- "inFuobe": false,
- "confirmed": true
+ "inFuobe": true,
+ "confirmed": true,
+ "notes": "Re-read 2026-11-01 (fal OpenAPI): video_url (a Blender / previs render, up to 15 s and 32 shots), prompt (scene intent, at most 2000 characters), reference_image_urls (up to 8), max_generated_reference_images (1-8, default 2, only without references), resolution 480P / 768P / 1080P (default 768P), enable_safety_checker. Output as long as the input; no audio. $0.05 / $0.08 / $0.16 a second by resolution, at least 5 s a shot, + $0.50 processing a request. In Fuobe since package blockout-film: Cinema's Blockout, Canvas, Assist (hidden helper minimax-h3-max-3d)."
},
{
"name": "SolarRenderer (H3 structure-to-video LoRAs)",
@@ -404,7 +405,8 @@
"released": "2026-10-13",
"url": "https://huggingface.co/Enderfga/SolarRenderer",
"inFuobe": false,
- "confirmed": true
+ "confirmed": true,
+ "notes": "Re-read 2026-11-01 at the primary sources. Model card (huggingface.co/Enderfga/SolarRenderer): LoRAs for MiniMax-H3's Ref2VA transformer that render a structure video (grey box, semantic map, skeleton, depth, body mesh, sketch) with an optional first frame and a prompt: solarrenderer_control_lora, solarrenderer_4step_lora and block-causal twins of both (rank 384), 4 steps, 1344x768 or 768x1344 at 24 fps, 158 frames (about 3.5 min on one GPU); weights under the MiniMax H3 Community License (excludes the EU, the UK, Korea and the US), code Apache-2.0; the card itself ships Python scripts, no ComfyUI graph. ComfyUI: smthemex/ComfyUI-SolarRenderer (Apache-2.0, 3 commits, git clone only, not in the Manager; nodes SolarRendererConditioning and SolarRendererSampler; LoRA mirror huggingface.co/smthem/SolarRenderer) on core MiniMax H3. The comfyui-wiki line 'custom nodes + 3 workflows' is the community pack, not Enderfga's release. Not built yet (blockout-film): it needs the pack and the H3 Ref2VA base on a GPU; the open engine's Blockout runs Wan 2.2 Fun VACE on the blockout's depth meanwhile. Next: install the pack on a GPU box, pin it in packs.json and the LoRAs in model-pins.json, and A/B it against the VACE windows."
},
{
"name": "MiniMax H3 Fun ControlNet Union 2.0",
diff --git a/src/components/canvas/canvas-context.tsx b/src/components/canvas/canvas-context.tsx
index cad23fcf..40cc8b40 100644
--- a/src/components/canvas/canvas-context.tsx
+++ b/src/components/canvas/canvas-context.tsx
@@ -34,6 +34,7 @@ import {
Waves,
ZoomIn,
type LucideIcon,
+ Box,
} from "lucide-react";
import { createContext, useContext, useMemo, useSyncExternalStore } from "react";
import {
@@ -77,6 +78,8 @@ export const ICONS: Record<string, LucideIcon> = {
UserRound,
Languages,
Table,
+ // Blockout to film
+ Box,
// Effects 2.0 chains (src/lib/catalog/canvas.ts EFFECT_CHAINS)
Swords,
Feather,
diff --git a/src/lib/blockout.ts b/src/lib/blockout.ts
index ae733c53..bf72d11d 100644
--- a/src/lib/blockout.ts
+++ b/src/lib/blockout.ts
@@ -531,6 +531,20 @@ function cap(text: string, max: number): string {
return (at > max * 0.6 ? cut.slice(0, at + 1) : cut.slice(0, max - 1) + "…").trim();
}
+/** The words that turn the grey box's first frame into the film's (Qwen-Image-Edit: picture 1 is the grey box). */
+export function blockoutFramePrompt(refs: readonly Pick<BlockoutRef, "role" | "name">[], style?: string): string {
+ const roles = refs.map((r, k) => `picture ${k + 2} is ${r.role === "character" ? "the person the mannequin becomes" : r.role === "style" ? "the look (its colour and light only)" : r.role === "prop" ? "a prop a box stands for" : `the ${r.role === "location" ? "place" : r.role}`}${r.name?.trim() ? ` (${r.name.trim()})` : ""}`);
+ return [
+ "Turn picture 1, a grey-box 3D blockout frame, into a finished photographic film frame.",
+ "Keep its exact camera, framing, perspective, layout and the figure's pose; the grey boxes become the real set and the mannequin becomes a real person.",
+ roles.length ? `${roles.join("; ")}.`.replace(/^p/, "P") : "",
+ sentence(style ?? ""),
+ "No grey geometry, no mannequin, no text.",
+ ]
+ .filter(Boolean)
+ .join(" ");
+}
+
/** The beats inside a stretch of the blockout, clipped to it and timed from its start (a shot's own clock). */
export function beatsIn(beats: readonly Beat[], start: number, end: number): Beat[] {
return beats
diff --git a/src/lib/catalog/canvas.ts b/src/lib/catalog/canvas.ts
index 4c723f4e..92fb72ea 100644
--- a/src/lib/catalog/canvas.ts
+++ b/src/lib/catalog/canvas.ts
@@ -8,6 +8,7 @@
* the server (POST /api/canvases/:id/run) plan a graph exactly the same way.
*/
import type { CanvasComment, CanvasGroup, CanvasPage, CanvasShape } from "./canvas-board";
+import { EXAMPLE_SCENE, EXAMPLE_WORDS, beatsFrom, blockoutFramePrompt, compileBlockoutPrompt, type BlockoutRef } from "@/lib/blockout";
import { getModel, getPreset, MODELS, supportsOp } from "./index";
import { dualEngine, onEngine, runsOn } from "./engines";
import { chainedWaitMessage, keyframeChain } from "./keyframes";
@@ -548,6 +549,8 @@ export function inputPorts(n: Pick<CanvasNode, "type" | "data">): PortDef[] {
const ids = new Set(ops.flatMap((op) => OP_PORTS[op] ?? []));
// Start & end frames: shown on image-to-video models that can take an end frame.
if (ops.includes("i2v") && (model?.options.endFrame || (model && supportsOp(model, "flf2v")))) ids.add("endImage");
+ // Reference clips: on reference-to-video models that take them (Seedance 2.5's @Video1, as Cinema's Blockout sends it).
+ if (ops.includes("ref2v") && (model?.options.maxVideos ?? 0) > 0) ids.add("videos");
// A cloned voice only where the model clones voices (Text to speech and Change voice always show it, and say
// which models clone when a voice is connected to one that doesn't).
if (ids.has("voice") && model && !model.options.voiceClone && n.type !== "tts" && n.type !== "voice-change") ids.delete("voice");
@@ -1782,6 +1785,71 @@ const ROW = 500;
/** A video node with its clip is taller (four inputs, prompt, settings, result). */
const FILM_ROW = 620;
+/**
+ * "Blockout → film" (package blockout-film), as Cinema's Blockout runs a one-shot blockout: in the cloud the grey box goes
+ * to Seedance 2.5 as its reference clip (@Video1) with three stills and the compiled prompt (the corridor example's
+ * beats); on your GPU the grey box's first frame is drawn from the stills, then the blockout's depth (near = bright)
+ * drives Wan 2.2 Fun VACE for one 81-frame window. Cinema's Blockout builds blockouts and chains longer ones.
+ */
+const BLOCKOUT_REFS: Pick<BlockoutRef, "role" | "name">[] = [{ role: "interior" }, { role: "character" }, { role: "exterior" }];
+const BLOCKOUT_BEATS = () => beatsFrom(EXAMPLE_SCENE.markers, EXAMPLE_SCENE.duration, EXAMPLE_WORDS);
+const BLOCKOUT_STYLE = "Low-key horror, cold torchlight, 35 mm film grain";
+const BLOCKOUT_CLOUD = tpl(
+ [
+ { id: "blockout", type: "video-input", x: 0, y: 0, data: { label: "Blockout (grey-box render)" } },
+ { id: "interior", type: "image-input", x: 0, y: 340, data: { label: "Interior" } },
+ { id: "character", type: "image-input", x: 0, y: 640, data: { label: "Character" } },
+ { id: "exterior", type: "image-input", x: 0, y: 940, data: { label: "Exterior" } },
+ {
+ id: "beats",
+ type: "prompt",
+ x: COL,
+ y: 0,
+ width: 420,
+ data: {
+ label: "Beats (Subject · Action · Camera · Style · No)",
+ text: compileBlockoutPrompt({ beats: BLOCKOUT_BEATS(), refs: BLOCKOUT_REFS, target: "seedance", style: BLOCKOUT_STYLE, sound: true, audio: ["Footsteps on concrete", "A long door creak", "Low room tone"], avoid: ["jump cuts", "text on screen", "extra people"] }),
+ },
+ },
+ { id: "film", type: "model", x: COL * 2 + 80, y: 280, data: { mediaKind: "video", label: "Film", op: "ref2v", params: { aspectRatio: "16:9", duration: 8, resolution: "720p", generateAudio: true } }, models: { cloud: "seedance-2-5", open: "seedance-2-5" } },
+ { id: "out", type: "output", x: COL * 3 + 120, y: 320, data: { label: "Film" } },
+ ],
+ [
+ ["blockout", "film", "videos"],
+ ["interior", "film", "images"],
+ ["character", "film", "images"],
+ ["exterior", "film", "images"],
+ ["beats", "film", "prompt"],
+ ["film", "out"],
+ ],
+);
+const BLOCKOUT_OPEN = tpl(
+ [
+ { id: "first", type: "image-input", x: 0, y: 0, data: { label: "Blockout's first frame" } },
+ { id: "interior", type: "image-input", x: 0, y: 320, data: { label: "Interior" } },
+ { id: "character", type: "image-input", x: 0, y: 620, data: { label: "Character" } },
+ { id: "depth", type: "video-input", x: COL, y: 620, data: { label: "Blockout depth (near = bright)" } },
+ { id: "look", type: "model", x: COL, y: 0, data: { mediaKind: "image", label: "First frame from the stills", op: "edit", prompt: blockoutFramePrompt(BLOCKOUT_REFS.slice(0, 2), BLOCKOUT_STYLE) }, models: { cloud: "oss-qwen-edit", open: "oss-qwen-edit" } },
+ {
+ id: "film",
+ type: "model",
+ x: COL * 2 + 40,
+ y: 260,
+ data: { mediaKind: "video", label: "Film (one 5 s window)", op: "v2v", prompt: compileBlockoutPrompt({ beats: BLOCKOUT_BEATS().filter((b) => b.start < 5), refs: BLOCKOUT_REFS, target: "open", style: BLOCKOUT_STYLE }), params: { aspectRatio: "16:9", duration: 5, resolution: "480p" } },
+ models: { cloud: "oss-wan22-vace-blockout", open: "oss-wan22-vace-blockout" },
+ },
+ { id: "out", type: "output", x: COL * 3 + 80, y: 300, data: { label: "Film" } },
+ ],
+ [
+ ["first", "look", "images"],
+ ["interior", "look", "images"],
+ ["character", "look", "images"],
+ ["look", "film", "images"],
+ ["depth", "film", "video"],
+ ["film", "out"],
+ ],
+);
+
export const CANVAS_TEMPLATES: CanvasTemplate[] = [
{
id: "image-animate",
@@ -1953,6 +2021,14 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [
],
),
},
+ {
+ id: "blockout-film",
+ name: "Blockout → film",
+ description: "A grey-box blockout sets the camera and timing; reference stills and timed beats say what it becomes",
+ icon: "Box",
+ hue: 210,
+ build: (engine) => (engine === "cloud" ? BLOCKOUT_CLOUD(engine) : BLOCKOUT_OPEN(engine)),
+ },
{
id: "clips-film",
name: "Clips → one film",
diff --git a/src/lib/catalog/cinema.ts b/src/lib/catalog/cinema.ts
index 533b38a5..796b1552 100644
--- a/src/lib/catalog/cinema.ts
+++ b/src/lib/catalog/cinema.ts
@@ -1,4 +1,4 @@
-import { BLOCKOUT, OPEN_FPS, beatsIn, compileBlockoutPrompt, depthWindows, normalizeBeats, splitShots, windowsSeconds, type Beat, type BlockoutRef } from "@/lib/blockout";
+import { BLOCKOUT, OPEN_FPS, beatsIn, blockoutFramePrompt, compileBlockoutPrompt, depthWindows, normalizeBeats, splitShots, windowsSeconds, type Beat, type BlockoutRef } from "@/lib/blockout";
import { DEFAULT_MOTION, PATH_FPS, PATH_FRAMES, normalizeKeys, toH3MaxTrajectory, type CameraKey } from "@/lib/camera-path";
import { APERTURE, LENS, anglesNote, poseWords, recomposePrompt, type ScenePose } from "@/lib/scene3d";
import { getModel, getPreset } from "./index";
@@ -2170,20 +2170,6 @@ export const BLOCKOUT_FIRST = "Add a blockout first: upload a grey-box render or
const secs1 = (n: number) => `${Math.round(n * 10) / 10}`;
-/** The words that turn the grey box's first frame into the film's (Qwen-Image-Edit: picture 1 is the grey box). */
-export function blockoutFramePrompt(refs: readonly BlockoutRef[], style?: string): string {
- const roles = refs.map((r, k) => `picture ${k + 2} is ${r.role === "character" ? "the person the mannequin becomes" : r.role === "style" ? "the look (its colour and light only)" : r.role === "prop" ? "a prop a box stands for" : `the ${r.role === "location" ? "place" : r.role}`}${r.name?.trim() ? ` (${r.name.trim()})` : ""}`);
- return [
- "Turn picture 1, a grey-box 3D blockout frame, into a finished photographic film frame.",
- "Keep its exact camera, framing, perspective, layout and the figure's pose; the grey boxes become the real set and the mannequin becomes a real person.",
- roles.length ? `${roles.join("; ")}.`.replace(/^p/, "P") : "",
- tidy(style) ? `${tidy(style)}.` : "",
- "No grey geometry, no mannequin, no text.",
- ]
- .filter(Boolean)
- .join(" ");
-}
-
/**
* Film a blockout. Cloud: one call when it fits the model (Seedance 2.5: 30 s, H3 Max 3D: 15 s), else shots cut at the
* beat markers, each with its own stretch of the blockout (a trim), its beats timed from its start and the last frame of
diff --git a/src/server/assist/studio-tools.ts b/src/server/assist/studio-tools.ts
index 1024b79e..faa80f44 100644
--- a/src/server/assist/studio-tools.ts
+++ b/src/server/assist/studio-tools.ts
@@ -10,7 +10,10 @@ import { offlineRestorePrompt, RESTORE, restoreNegative } from "@/lib/catalog/re
import { SHORTS_MODELS } from "@/lib/catalog/shorts";
import type { ChainSlot, Engine, GenerationRequest, Operation } from "@/lib/catalog/types";
import { TOOL_MODELS } from "@/lib/layers";
+import { planCinema } from "@/lib/catalog/cinema";
import { createPipeline, type PipelineStep } from "../chains";
+import { cinemaContext } from "../cinema-generate";
+import { videoLength } from "../dub";
import { db } from "../db";
import { chooseRoute, ConnectComfyError, createGenerations, outputKind, previewChained } from "../generations";
import { engineMode } from "../settings";
@@ -144,7 +147,32 @@ const RestoreInput = z.object({
resolution: z.enum(["720p", "1080p"]).optional().describe("Cloud size (default 720p)."),
});
+const BlockoutInput = z.object({
+ video: ref.describe("The grey-box blockout: a render from Blender, Unreal, Cinema 4D… (MP4 or MOV for the cloud), 2–60 s. It sets the camera, blocking and timing."),
+ depth: ref.optional().describe("Your GPU: the blockout's depth pass (near = bright). Without it Depth Anything 3 reads the depth from the grey box."),
+ first_frame: ref.optional().describe("Your GPU: the blockout's first frame as a picture (else it is cut from the video)."),
+ seconds: z.number().min(2).max(60).optional().describe("The blockout's length (read from the file when left out)."),
+ beats: z
+ .array(z.object({ start: z.number().min(0).max(60).describe("Seconds into the blockout where this beat starts."), label: z.string().max(80).describe("A short name: 'Arrival', 'Lights out', 'Door kicked'."), words: z.string().max(600).optional().describe("What happens: who does what, what we hear.") }))
+ .max(24)
+ .describe("The beats in order: each runs to the next one's start (the first starts at 0)."),
+ references: z
+ .array(z.object({ url: ref, role: z.enum(["interior", "exterior", "location", "character", "prop", "style"]).describe("What it is for: the room, the outside, the place, who the mannequin becomes, a prop, or only the look."), name: z.string().max(60).optional() }))
+ .max(8)
+ .optional()
+ .describe("Reference stills (Seedance 2.5 takes 4 with the clip, H3 Max 3D 8, your GPU's first frame 2)."),
+ style: z.string().max(600).optional().describe("The look: 'low-key horror, cold torchlight, 35 mm grain'."),
+ sounds: z.array(z.string().max(120)).max(12).optional().describe("What is heard, one sound each (Seedance 2.5 makes sound; the others are silent)."),
+ avoid: z.array(z.string().max(120)).max(16).optional().describe("What must not happen or be seen."),
+ constraints: z.string().max(600).optional().describe("Extra rules: 'she never looks at the camera'."),
+ model: z.enum(["seedance-2-5", "minimax-h3-max-3d"]).optional().describe("Cloud: Seedance 2.5 (default, with sound, 30 s a shot) or MiniMax H3 Max 3D to video (8 stills, silent, 15 s a shot)."),
+ resolution: z.string().max(10).optional().describe("Cloud quality: Seedance 480p / 720p / 1080p, H3 Max 480P / 768P / 1080P; your GPU 480p or 720p."),
+ audio: z.boolean().optional().describe("Seedance 2.5: make sound (default true)."),
+ prompt: z.string().max(60_000).optional().describe("Cloud, a one-shot film: the whole prompt as written, instead of the one compiled from the beats."),
+});
+
export type LayersToolInput = z.infer<typeof LayersInput>;
+export type BlockoutToolInput = z.infer<typeof BlockoutInput>;
export type RestoreToolInput = z.infer<typeof RestoreInput>;
export type RestyleToolInput = z.infer<typeof RestyleInput>;
export type DubToolInput = z.infer<typeof DubInput>;
@@ -668,7 +696,71 @@ const restoreVideo = defineTool({
},
});
-export const STUDIO_TOOLS = [splitLayers, restyleFootage, dubVideo, facelessEpisode, createAds, addCaptions, restoreVideo];
+/**
+ * Blockout to film (package blockout-film): Cinema's Blockout plan (src/lib/catalog/cinema.ts planBlockout), run as a
+ * pipeline in the Library: one call or shots cut at the beats and joined in the cloud, 81-frame depth windows on the GPU.
+ */
+function blockoutSteps(i: BlockoutToolInput, ctx: ToolContext): PipelineStep[] {
+ const engine = engineOf(ctx);
+ const seconds = i.seconds ?? videoLength(i.video);
+ if (!seconds) throw new Error("Couldn't read the blockout's length: pass seconds");
+ const plan = planCinema(
+ {
+ engine,
+ mode: "video",
+ action: "blockout",
+ ...(engine === "cloud" && i.model ? { modelId: i.model } : {}),
+ prompt: engine === "cloud" ? (i.prompt ?? "") : "",
+ settings: {},
+ ...(i.resolution && { resolution: i.resolution }),
+ audio: i.audio !== false,
+ blockout: {
+ video: i.video,
+ ...(i.depth && { depth: i.depth }),
+ ...(i.first_frame && { firstFrame: i.first_frame }),
+ seconds: Math.min(60, seconds),
+ beats: i.beats.map((b) => ({ start: b.start, label: b.label, words: b.words ?? "" })),
+ refs: (i.references ?? []).map((r) => ({ url: r.url, role: r.role, ...(r.name && { name: r.name }) })),
+ ...(i.style && { style: i.style }),
+ ...(i.constraints && { constraints: i.constraints }),
+ ...(i.sounds?.length && { sounds: i.sounds }),
+ ...(i.avoid?.length && { avoid: i.avoid }),
+ },
+ },
+ cinemaContext(),
+ );
+ if (plan.blocker) throw new Error(plan.blocker);
+ return plan.steps.map((s) => ({ key: s.key, request: { ...s.request, feature: "cinema-blockout" }, ...(s.after?.length && { after: s.after }) }));
+}
+
+const blockoutFilm = defineTool({
+ name: "blockout_film",
+ description:
+ "Film a grey-box 3D blockout (a render from Blender or any 3D app: boxes and mannequins that set the camera path, framing, blocking and timing) as a finished shot, from reference stills and timed beats — Fuobe's Blockout to film (Cinema Studio → Blockout). " +
+ "The prompt is compiled in sections (Subject with each still's role, Action as 'a–b s — beat: …', Camera, Style, Constraints, Audio, No). In the cloud Seedance 2.5 follows the blockout as its reference clip with sound (or MiniMax H3 Max 3D to video, silent); a blockout longer than one call is cut at the beats into shots that hand over their last frame, then joined. " +
+ "On your GPU Wan 2.2 Fun VACE follows the blockout's depth from a first frame drawn from the stills, in 5 s windows chained and joined: free, silent (add sound with Sound for video). Gated by the same approval card as generate.",
+ schema: BlockoutInput,
+ gated: true,
+ title: (i) => `Blockout to film: ${i.beats[0]?.label ?? "film"}`.slice(0, 80),
+ plan: (i, ctx) => {
+ try {
+ return planSteps("blockout_film", blockoutSteps(i, ctx));
+ } catch (e) {
+ return [{ tool: "blockout_film", modelId: "blockout", modelName: "Blockout to film", kind: "video", op: "ref2v", prompt: "Blockout to film", count: 0, costUsd: 0, demo: false, atomic: true, error: (e as Error).message }];
+ }
+ },
+ async run(i, ctx) {
+ let steps: PipelineStep[];
+ try {
+ steps = blockoutSteps(i, ctx);
+ } catch (e) {
+ return { content: JSON.stringify({ error: (e as Error).message }), isError: true };
+ }
+ return startPipeline("Blockout to film", steps, `Blockout to film: ${i.beats.map((b) => b.label).join(", ")}`.slice(0, 200));
+ },
+});
+
+export const STUDIO_TOOLS = [splitLayers, restyleFootage, dubVideo, facelessEpisode, createAds, addCaptions, restoreVideo, blockoutFilm];
/** For tests: the fallback pipelines, as they would be created. */
-export const fallbackSteps = { restore: restoreSteps, layers: layerSteps, restyle: restyleSteps, dub: dubSteps, faceless: facelessSteps, captions: captionSteps, ads: adRequests };
+export const fallbackSteps = { restore: restoreSteps, layers: layerSteps, restyle: restyleSteps, dub: dubSteps, faceless: facelessSteps, captions: captionSteps, ads: adRequests, blockout: blockoutSteps };
diff --git a/src/server/gpu/tools.ts b/src/server/gpu/tools.ts
index 6f19d618..9973e9c7 100644
--- a/src/server/gpu/tools.ts
+++ b/src/server/gpu/tools.ts
@@ -3,7 +3,7 @@ import { SPLIT_MODEL } from "@/lib/av/split";
import { REMOVE_DIALOGUE_MODELS } from "@/lib/av/remove-dialogue";
import { getModel, getPreset, MODELS, modelsFor, PRESETS } from "@/lib/catalog";
import { graphLoras } from "@/lib/catalog/character-swap";
-import { PATH_MODELS } from "@/lib/catalog/cinema";
+import { BLOCKOUT_MODELS, PATH_MODELS } from "@/lib/catalog/cinema";
import { dualEngine, onEngine, runsOn } from "@/lib/catalog/engines";
import { FRAMES_MODELS } from "@/lib/catalog/keyframes";
import { REMOVE_TOOLS } from "@/lib/catalog/remove-object";
@@ -164,6 +164,20 @@ export const STUDIO_ROWS: StudioRowDef[] = [
{ href: "/character-swap", label: "Character swap", group: "Video", workflows: [STUDIO_WORKFLOWS.mask, STUDIO_WORKFLOWS.segment] },
// Cinema's 3D scene films a still along a keyframed camera path (N7-5).
{ href: "/cinema", label: "Fly path", group: "Video", steps: [{ modelId: PATH_MODELS.open, op: "camera-path" }] },
+ // Cinema's Blockout to film on your GPU: the first frame from the references, the depth cut into windows, each window
+ // rendered by the blockout graph and handed over on its last frame, then joined.
+ {
+ href: "/cinema?blockout=1",
+ label: "Blockout to film",
+ group: "Video",
+ steps: [
+ { modelId: BLOCKOUT_MODELS.open, op: "v2v" },
+ { modelId: BLOCKOUT_MODELS.firstFrame, op: "edit" },
+ { modelId: "oss-segment", op: "trim" },
+ { modelId: "oss-extract-frame", op: "frame" },
+ { modelId: "oss-join-encoded", op: "concat" },
+ ],
+ },
// The turnaround (N7-6): Frames mode's start/end-frame clips joined into one film, with the sides it has no picture of
// drawn first by the Angles app (src/lib/catalog/turnaround.ts).
{
diff --git a/tests/assist-context.test.ts b/tests/assist-context.test.ts
index ad4e5732..91842733 100644
--- a/tests/assist-context.test.ts
+++ b/tests/assist-context.test.ts
@@ -361,6 +361,10 @@ describe("studio tools", () => {
create_ads: [{ brief: "oat milk for runners" }, { brief: "oat milk", product_image: image, count: 2, aspect_ratios: ["1:1", "9:16"] }],
add_captions: [{ video }, { video, translate_to: "Spanish" }],
restore_video: [{ video }, { video, prompt: "a harbour in the 1930s, natural colour", reference: image }],
+ blockout_film: [
+ { video, seconds: 8, beats: [{ start: 0, label: "Arrival", words: "She walks in." }] },
+ { video, seconds: 40, beats: [{ start: 0, label: "Arrival" }, { start: 20, label: "Lights out" }], references: [{ url: image, role: "character", name: "Mara" }], model: "minimax-h3-max-3d", sounds: ["Footsteps"] },
+ ],
};
it("every studio tool plans without errors on both engines in demo mode", () => {
diff --git a/tests/blockout.test.ts b/tests/blockout.test.ts
index e8797193..2f398967 100644
--- a/tests/blockout.test.ts
+++ b/tests/blockout.test.ts
@@ -21,7 +21,7 @@ const { getModel } = await import("@/lib/catalog");
const { buildPayload } = await import("@/lib/catalog/payload");
const { estimateCost } = await import("@/lib/catalog/plan");
const { prepareWorkflow } = await import("@/server/providers/comfyui");
-const { BLOCKOUT_FIRST, BLOCKOUT_MODELS, blockoutFramePrompt, blockoutPrompt, planCinema } = await import("@/lib/catalog/cinema");
+const { BLOCKOUT_FIRST, BLOCKOUT_MODELS, blockoutPrompt, planCinema } = await import("@/lib/catalog/cinema");
const B = await import("@/lib/blockout");
beforeAll(() => {
@@ -157,7 +157,7 @@ describe("beats and the prompt", () => {
expect(B.roleFor({ category: "prop" })).toBe("prop");
expect(B.roleFor(undefined)).toBe("location");
for (const r of B.REF_ROLES) expect(B.roleSentence({ role: r.id }, "@Image1")).toMatch(/^@Image1 is /);
- expect(blockoutFramePrompt(REFS.slice(0, 2), "Cold light")).toContain("Picture 2 is the interior; picture 3 is the person the mannequin becomes (Mara). Cold light.");
+ expect(B.blockoutFramePrompt(REFS.slice(0, 2), "Cold light")).toContain("Picture 2 is the interior; picture 3 is the person the mannequin becomes (Mara). Cold light.");
});
it("clips beats to a shot and times them from its start", () => {
@@ -382,3 +382,48 @@ describe("Cinema API: a blockout in demo mode", () => {
}
});
});
+
+describe("Canvas, the GPU board, Assist and MCP", () => {
+ it("Canvas's Blockout → film template: Seedance 2.5 with the blockout as a clip in the cloud, the depth graph on your GPU", async () => {
+ const { getTemplate, planCanvas, inputPorts } = await import("@/lib/catalog/canvas");
+ const t = getTemplate("blockout-film")!;
+ const cloud = t.build("cloud");
+ const film = cloud.nodes.find((n) => n.id === "film")!;
+ expect(film.data).toMatchObject({ modelId: "seedance-2-5", op: "ref2v" });
+ expect(inputPorts(film).map((p) => p.id)).toContain("videos");
+ expect(String(cloud.nodes.find((n) => n.id === "beats")!.data.text)).toContain("@Video1 is a grey-box 3D blockout");
+ const open = t.build("open");
+ expect(open.nodes.find((n) => n.id === "film")!.data).toMatchObject({ modelId: "oss-wan22-vace-blockout", op: "v2v" });
+ const plan = planCanvas(open, { engineMode: "open" });
+ expect(plan.costUsd).toBe(0);
+ for (const e of plan.errors) expect(e.message).toMatch(/^(Add (an image|a video) to|Waiting on)/);
+ });
+
+ it("the GPU board has a Blockout to film row on graphs the requirement index knows", async () => {
+ const { STUDIO_ROWS, studioTool } = await import("@/server/gpu/tools");
+ const row = STUDIO_ROWS.find((r) => r.href === "/cinema?blockout=1")!;
+ expect(row).toMatchObject({ label: "Blockout to film", group: "Video" });
+ const tool = studioTool(row)!;
+ expect(tool.workflows).toEqual(expect.arrayContaining(["video-blockout-wan22-fun-vace", "video-segment-resample", "frame-extract", "video-concat-encoded"]));
+ const req = JSON.parse(fs.readFileSync("workflows/comfyui/requirements.json", "utf8")) as { workflows: Record<string, { packs: Record<string, unknown> }> };
+ expect(req.workflows["video-blockout-wan22-fun-vace"].packs).toEqual({});
+ });
+
+ it("Assist and MCP's blockout_film plans Cinema's steps and runs them as a pipeline in demo mode", async () => {
+ const tools = await import("@/server/assist/tools");
+ const video = upload("blockout.png");
+ const args = { video, seconds: 8, beats: [{ start: 0, label: "Arrival", words: "She walks in." }, { start: 4.5, label: "The door opens" }] };
+ const cloud = tools.planFor("blockout_film", args, { engine: "cloud" });
+ expect(cloud.jobs).toMatchObject([{ tool: "blockout_film", modelId: "seedance-2-5", op: "ref2v" }]);
+ const open = tools.planFor("blockout_film", args, { engine: "open" });
+ expect(open.jobs.map((j) => j.modelId)).toEqual(["oss-extract-frame", "oss-qwen-edit", "oss-segment", "oss-wan22-vace-restyle", "oss-extract-frame", "oss-segment", "oss-wan22-vace-restyle", "oss-join-encoded"]);
+ expect(open.jobs.every((j) => j.costUsd === 0)).toBe(true);
+ const out = await tools.executeTool("blockout_film", args, { engine: "cloud" });
+ expect(out.isError).toBeFalsy();
+ const body = JSON.parse(String(out.content)) as { results: string[] };
+ expect(gens.getGeneration(body.results[0])!.feature).toBe("cinema-blockout");
+ const bad = await tools.executeTool("blockout_film", { video: "/api/files/uploads/nowhere.mp4", beats: [] }, { engine: "cloud" });
+ expect(bad.isError).toBe(true);
+ expect(String(bad.content)).toMatch(/pass seconds/);
+ });
+});
diff --git a/tests/public-signup-tools.test.ts b/tests/public-signup-tools.test.ts
index a58a8fed..587f662e 100644
--- a/tests/public-signup-tools.test.ts
+++ b/tests/public-signup-tools.test.ts
@@ -298,6 +298,7 @@ describe("the GPU pre-flight board lists PR #15's tools like main's studios", ()
"/audio/split": { label: "Split soundtrack", group: "Audio", workflows: ["separate-soundtrack-dbs"] },
"/video-tools/remove-dialogue": { label: "Remove dialogue", group: "Video tools", workflows: ["separate-soundtrack-dbs", "video-mux-audio"] },
"/cinema": { label: "Fly path", group: "Video", workflows: ["wan21-i2v-uni3c-path"] },
+ "/cinema?blockout=1": { label: "Blockout to film", group: "Video", workflows: ["video-blockout-wan22-fun-vace", "qwen-image-edit-2511-multi", "video-segment-resample", "frame-extract", "video-concat-encoded"] },
"/character-sheet": { label: "Turnaround", group: "Video", workflows: ["wan22-flf2v-14b", "qwen-image-edit-2511-multi"], loras: ["qwen-image-edit-2511-multiple-angles-lora.safetensors"] },
};
for (const [href, w] of Object.entries(want)) {
diff --git a/tests/template-covers.test.ts b/tests/template-covers.test.ts
index 09f774c7..25aa0dd8 100644
--- a/tests/template-covers.test.ts
+++ b/tests/template-covers.test.ts
@@ -99,7 +99,7 @@ describe("the template covers manifest", () => {
lines.push(` ${JSON.stringify(key)}: ${JSON.stringify(gen.slimEntry(key, { poster: e.poster, ...(e.video && { video: e.video }), ...(e.at && { at: e.at }), ...(e.frames && { frames: e.frames }) }))}`);
}
}
- expect(lines).toHaveLength(228);
+ expect(lines).toHaveLength(229);
const text = `{\n${lines.join(",\n")}\n}`;
expect(text.length).toBeLessThan(36_000);
expect(gzipSync(text).length).toBeLessThan(8_000);