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.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Blockout to film: prices that follow fal, H3's 2000-character prompt, a mist-pass switch and keyboard framing
Claude458b2a73cd5c
diff --git a/scripts/comfy/build-library.mjs b/scripts/comfy/build-library.mjsindex feaabed2..f510d0ea 100644--- a/scripts/comfy/build-library.mjs+++ b/scripts/comfy/build-library.mjs@@ -147,6 +147,8 @@ export const BINDING_KEYS = new Set(['windowStart', 'canvasWidth', 'canvasHeight', 'fieldWidth', 'fieldHeight', 'prefixFrom', 'prefixFrames', 'tileWidth', 'tileHeight', 'streaming', 'tileFrames',// The owner's SOTA image families (2026-10-31): Ideogram 4's sampling preset'preset',+ // Blockout to film: a near = dark depth pass (Blender's mist) inverted before VACE reads it+ 'invertDepth',]);// Sizes in GB: two decimals, and three where two would read 0 (a 4 MB DBS model), so no other entry's size changes.diff --git a/scripts/comfy/hand-built/video-blockout-wan22-fun-vace.json b/scripts/comfy/hand-built/video-blockout-wan22-fun-vace.jsonindex e4f44126..cc497935 100644--- a/scripts/comfy/hand-built/video-blockout-wan22-fun-vace.json+++ b/scripts/comfy/hand-built/video-blockout-wan22-fun-vace.json@@ -108,7 +108,7 @@0],"images.image1": [- "32",+ "43",0]},@@ -496,5 +496,46 @@"_meta": {"title": "SaveVideo"}+ },+ "41": {+ "class_type": "PrimitiveBoolean",+ "inputs": {+ "value": false+ },+ "_meta": {+ "title": "near is dark (a Blender mist pass): invert the depth"+ }+ },+ "42": {+ "class_type": "ImageInvert",+ "inputs": {+ "image": [+ "32",+ 0+ ]+ },+ "_meta": {+ "title": "ImageInvert"+ }+ },+ "43": {+ "class_type": "ComfySwitchNode",+ "inputs": {+ "switch": [+ "41",+ 0+ ],+ "on_false": [+ "32",+ 0+ ],+ "on_true": [+ "42",+ 0+ ]+ },+ "_meta": {+ "title": "the depth as near = bright"+ }}}diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjsindex c868fee1..bdfb7caa 100644--- a/scripts/comfy/library.spec.mjs+++ b/scripts/comfy/library.spec.mjs@@ -3000,6 +3000,7 @@ export const SPEC = [height: [b('3', 'height'), b('5', 'height'), b('34', 'height'), b('35', 'height'), b('15', 'height')],frames: [b('30', 'value')], fps: [b('26', 'fps')], seed: [b('22', 'noise_seed'), b('23', 'noise_seed')], steps: [b('22', 'steps'), b('23', 'steps')],cfg: [b('22', 'cfg'), b('23', 'cfg')], shift: [b('20', 'shift'), b('21', 'shift')], controlStrength: [b('15', 'strength')],+ invertDepth: [b('41', 'value')],},outputs: [{ node: '27', kind: 'video' }],limits: { maxWidth: 1280, maxHeight: 1280, dimensionMultiple: 16, maxFrames: 81, frameStep: 4 },@@ -3008,7 +3009,7 @@ export const SPEC = [notes:'Cinema\'s Blockout on your GPU: the browser renders the grey box and its depth (near = bright, as Depth Anything draws it) at 16 fps; video-segment-resample cuts the depth into 81-frame windows that overlap by one frame; ' +'qwen-image-edit-2511 draws the first frame from the grey box\'s first frame and up to two references; each window runs this graph with the first frame (window 1) or the last frame of the window before (frame-extract), then video-concat-encoded joins them. ' +- 'The same graph as video-restyle-wan22-fun-vace without Depth Anything 3: control frame 0 = the first frame (kept), frames 1..N-1 = the depth video as it is; the first frame is also the VACE reference. Lightx2v 4 steps. Silent (no audio input): sound comes afterwards (Sound for video). ' ++ 'The same graph as video-restyle-wan22-fun-vace without Depth Anything 3: control frame 0 = the first frame (kept), frames 1..N-1 = the depth video, near = bright (invertDepth: true runs it through ImageInvert first, for a near = dark pass such as Blender\'s mist; ComfySwitchNode picks); the first frame is also the VACE reference. Lightx2v 4 steps. Silent (no audio input): sound comes afterwards (Sound for video). ' +'A blockout uploaded without a depth pass runs video-restyle-wan22-fun-vace instead (Depth Anything 3 on the grey box).',},{diff --git a/scripts/comfy/validate-workflows.mjs b/scripts/comfy/validate-workflows.mjsindex 2a571f66..c63f021b 100644--- a/scripts/comfy/validate-workflows.mjs+++ b/scripts/comfy/validate-workflows.mjs@@ -86,6 +86,7 @@ function sampleValue(key, entry, uploads) {case 'fadeCurve': return uploads.wav;case 'skipPass2': return true; // switches: the non-default branch, so both values are known to passcase 'cutout': return false;+ case 'invertDepth': return true;case 'video': case 'video2': case 'video3': case 'video4': return uploads.mp4;case 'audio': case 'audio2': return uploads.wav;case 'tracks': {diff --git a/scripts/comfy/validation-state.json b/scripts/comfy/validation-state.jsonindex 30a83dfb..4e572dc3 100644--- a/scripts/comfy/validation-state.json+++ b/scripts/comfy/validation-state.json@@ -630,10 +630,10 @@"at": "2026-10-23T16:47:53.446Z"},"video-blockout-wan22-fun-vace": {- "sha256": "80b322a686c79d85d97fe5754a70ac45a582495d41526477db48a130abad150d",+ "sha256": "d7e914508ebebd63d524fea3b954618455d314cf4204ce9d4b737f2c02ca5ff7","validated": true,"error": null,- "at": "2026-11-01T14:55:37.596Z"+ "at": "2026-11-01T18:05:49.653Z"},"video-character-swap-h3": {"sha256": "37496982555a84ada4ccb22a155639d6ed8817b0cf0a868aa1497bd05c1c9de2",diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.pyindex 9665ed09..557f9ed4 100644--- a/scripts/gen-cloud-models.py+++ b/scripts/gen-cloud-models.py@@ -431,7 +431,15 @@ model("seedance-2-5", "Seedance 2.5", "ByteDance", "seedance", "video",("ref2v", "bytedance/seedance-2.5/reference-to-video"),("extend", "bytedance/seedance-2.5/reference-to-video", "fal", {"fixed": {"task": "extension"}, "videoArray": True}),("finalize", "bytedance/seedance-2.5/draft/complete")],- badges=["top", "audio", "new"], pricing=("second", 0.473, "720p"), defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"},+ # fal bills tokens: height × width × (seconds of input video + seconds out) × 24 / 1024, at $0.0214 per 1K tokens+ # (480p, 720p) or $0.0234 (1080p), times 0.6 when reference clips go in (fal's reference-to-video page, re-read+ # 2026-11-01; its sidebar's $0.473/s divides by 1000 where the formula says 1024). Per second of 16:9: 480p+ # 864×496, 720p 1280×720, 1080p 1920×1080; with clips, on the seconds in plus out (Pricing.clipInput, no floor).+ badges=["top", "audio", "new"],+ pricing=("second", 0.46224, "720p; 480p $0.21494, 1080p $1.13724. Reference clips bill their own seconds with the output, at 0.6 times the rate",+ {"byResolution": {"480p": 0.21494, "720p": 0.46224, "1080p": 1.13724},+ "clipInput": {"usd": 0.27734, "byResolution": {"480p": 0.12897, "720p": 0.27734, "1080p": 0.68234}, "plain": True}}),+ defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"},# fal's schema gives no count for 2.5's reference clips; Replicate's 2.5 schema says up to 10 (30 s in all), as the research found.options={"multiShot": {"mode": "prompt", "maxShots": 6}, "maxVideos": 10, "maxAudios": 10})# Kling 4.0 (research part 4, re-read 2026-11-01 when fal opened its API; build package nm10-kling-4): 3-30 s at 720p or@@ -580,12 +588,13 @@ model("minimax-h3-max-camera", "MiniMax H3 Max camera controls", "MiniMax", "hai# Blockout to film (package blockout-film; new-models-10.md §5): H3 Max renders a grey-box / previs animation (≤ 15 s,# ≤ 32 shots) with up to 8 reference stills; camera, blocking and timing come from the video. A hidden helper Cinema's# Blockout offers under its own name beside Seedance 2.5. Billed per second by resolution, at least 5 s a shot, plus a-# $0.50 processing fee a request (fal's page, read 2026-11-01). No sound.+# $0.50 processing fee a request (fal's page, read 2026-11-01). No sound. Without reference stills it draws up to 2 of its+# own (max_generated_reference_images, default 2), billed $0.10 each (generatedRefs).model("minimax-h3-max-3d", "MiniMax H3 Max 3D to video", "MiniMax", "hailuo", "video","A grey-box blockout from Blender or the browser, rendered as a finished shot from your reference stills",[("v2v", "minimax/h3-max/3d-to-video")], hidden=True, defaults={"resolution": "768P"},- pricing=("second", 0.08, "768P; 480P $0.05, 1080P $0.16; at least 5 s a shot; + $0.50 processing a request",- {"byResolution": {"480P": 0.05, "768P": 0.08, "1080P": 0.16}, "minSeconds": 5, "perRequest": 0.5}))+ pricing=("second", 0.08, "768P; 480P $0.05, 1080P $0.16; at least 5 s a shot; + $0.50 processing a request; + $0.10 for each reference it draws when given none (up to 2)",+ {"byResolution": {"480P": 0.05, "768P": 0.08, "1080P": 0.16}, "minSeconds": 5, "perRequest": 0.5, "generatedRefs": {"usd": 0.1, "count": 2}}))model("hailuo-2-3", "MiniMax Hailuo 2.3", "MiniMax", "hailuo", "video", "Expressive characters and dynamic action",[("t2v", "fal-ai/minimax/hailuo-2.3/pro/text-to-video"), ("i2v", "fal-ai/minimax/hailuo-2.3/pro/image-to-video")],pricing=("video", 0.49), defaults={"duration": 6}, fixed={"prompt_optimizer": True})diff --git a/src/components/cinema/blockout-builder.tsx b/src/components/cinema/blockout-builder.tsxindex 10b11967..5284611f 100644--- a/src/components/cinema/blockout-builder.tsx+++ b/src/components/cinema/blockout-builder.tsx@@ -17,9 +17,12 @@ import {PRIMS,blockoutSize,cameraAt,+ cameraKeyAt,emptyScene,newId,newPrim,+ primAt,+ withCameraKey,type BlockoutCameraKey,type BlockoutPrim,type BlockoutScene,@@ -80,7 +83,14 @@ function movePrim(s: BlockoutScene, id: string, position: Vec3, rotation: number};}+/**+ * A number typed in: each value in range goes in as it is typed, one out of range (a lens of "3" on the way to 35) waits+ * for the field to lose focus, then is brought into range.+ */function Field({ label, value, onChange, step = 0.1, min, max }: { label: string; value: number; onChange: (n: number) => void; step?: number; min?: number; max?: number }) {+ const [draft, setDraft] = useState<string | null>(null);+ const fits = (n: number) => (min === undefined || n >= min) && (max === undefined || n <= max);+ const inRange = (n: number) => Math.max(min ?? -Infinity, Math.min(max ?? Infinity, n));return (<label className="grid gap-1 text-[11.5px] text-muted-foreground">{label}@@ -90,10 +100,17 @@ function Field({ label, value, onChange, step = 0.1, min, max }: { label: stringstep={step}min={min}max={max}- value={Number.isFinite(value) ? r2(value) : 0}+ value={draft ?? (Number.isFinite(value) ? r2(value) : 0)}onChange={(e) => {- const n = Number(e.target.value);- if (Number.isFinite(n)) onChange(min !== undefined || max !== undefined ? Math.max(min ?? -Infinity, Math.min(max ?? Infinity, n)) : n);+ const text = e.target.value;+ setDraft(text);+ const n = Number(text);+ if (text.trim() !== "" && Number.isFinite(n) && fits(n)) onChange(n);+ }}+ onBlur={() => {+ const n = Number(draft);+ if (draft !== null && draft.trim() !== "" && Number.isFinite(n) && !fits(n)) onChange(inRange(n));+ setDraft(null);}}className="h-8 px-2 text-[13px] tabular-nums"/>@@ -199,6 +216,9 @@ export default function BlockoutBuilder({ initial, onClose, onDone }: BlockoutBuconst patch = (fn: (s: BlockoutScene) => BlockoutScene) => setScene((s) => fn(s));const prim = scene.prims.find((p) => p.id === selected) ?? null;+ const primPose = prim ? primAt(prim, t) : { position: [0, 0, 0] as Vec3, rotation: 0 };+ const camNow = cameraKeyAt(scene.camera, t);+ const camKeyed = scene.camera.some((k) => near(k.t, t));const updatePrim = (id: string, fn: (p: BlockoutPrim) => BlockoutPrim) => patch((s) => ({ ...s, prims: s.prims.map((p) => (p.id === id ? fn(p) : p)) }));const add = (kind: PrimKind, extra: Partial<BlockoutPrim> = {}) => {@@ -315,7 +335,7 @@ export default function BlockoutBuilder({ initial, onClose, onDone }: BlockoutBu</button></div><div ref={setStageEl} className="relative min-h-[26svh] flex-1 overflow-hidden">- <canvas ref={setCanvasEl} tabIndex={0} aria-label="Blockout 3D view: drag to orbit, scroll to zoom, click a piece to select it" className="absolute inset-0 size-full touch-none outline-none" />+ <canvas ref={setCanvasEl} tabIndex={0} aria-label="Blockout 3D view: drag to orbit, scroll to zoom, arrow keys to move the view, click a piece to select it" className="absolute inset-0 size-full touch-none outline-none" />{mode === "shot" && (<span className="pointer-events-none absolute top-2 left-2 rounded bg-black/55 px-1.5 py-0.5 font-mono text-[11px] text-white/90">{scene.aspect} · {Math.round(shotNow.lens)} mm · {fmt(t)}@@ -464,11 +484,17 @@ export default function BlockoutBuilder({ initial, onClose, onDone }: BlockoutBu</button>))}</div>- {!prim.keys?.length && (+ {!prim.keys?.length ? (<><Vec label="Position (m)" value={prim.position} onChange={(position) => updatePrim(prim.id, (p) => ({ ...p, position }))} /><Field label="Turn (°)" value={prim.rotation} step={5} onChange={(rotation) => updatePrim(prim.id, (p) => ({ ...p, rotation }))} /></>+ ) : (+ // A piece that moves: the fields show it at the playhead, and a change keys it there.+ <>+ <Vec label={`Position at ${fmt(t)} (m)`} value={primPose.position} onChange={(position) => setScene((sc) => movePrim(sc, prim.id, position, primPose.rotation, t))} />+ <Field label={`Turn at ${fmt(t)} (°)`} value={primPose.rotation} step={5} onChange={(rotation) => setScene((sc) => movePrim(sc, prim.id, primPose.position, rotation, t))} />+ </>)}<Vec label="Size (m)" value={prim.size} min={0.01} onChange={(size) => updatePrim(prim.id, (p) => ({ ...p, size }))} /><div className="space-y-1.5 rounded-lg bg-muted/60 p-2.5">@@ -517,6 +543,16 @@ export default function BlockoutBuilder({ initial, onClose, onDone }: BlockoutBu<Button size="sm" onClick={setCameraKey} className="w-full"><Camera className="size-3.5" /> Key the camera at {fmt(t)}</Button>+ <fieldset className="space-y-2 rounded-lg bg-muted/60 p-2.5">+ <legend className="sr-only">The camera at the playhead</legend>+ <p className="text-[12px] text-muted-foreground">{camKeyed ? `The camera key at ${fmt(t)}: type to change it.` : `The camera at ${fmt(t)}: type a value to key it here.`}</p>+ <Vec label="Camera (m)" value={camNow.position} onChange={(position) => patch((s) => withCameraKey(s, t, { position }))} />+ <Vec label="Looks at (m)" value={camNow.target} onChange={(target) => patch((s) => withCameraKey(s, t, { target }))} />+ <div className="grid grid-cols-2 gap-1.5">+ <Field label="Lens (mm)" value={camNow.lens} step={1} min={BLOCKOUT.lens.min} max={BLOCKOUT.lens.max} onChange={(lens) => patch((s) => withCameraKey(s, t, { lens }))} />+ <Field label="Shake (0–1)" value={camNow.shake} step={0.05} min={0} max={1} onChange={(shake) => patch((s) => withCameraKey(s, t, { shake }))} />+ </div>+ </fieldset><ul className="space-y-1" aria-label="Camera keys">{scene.camera.map((k, i) => (<li key={i} className="flex items-center gap-1.5 rounded-md bg-muted/60 px-2 py-1 text-[12.5px]">diff --git a/src/components/cinema/blockout-engine.ts b/src/components/cinema/blockout-engine.tsindex 35df2994..bfbe7222 100644--- a/src/components/cinema/blockout-engine.ts+++ b/src/components/cinema/blockout-engine.ts@@ -220,6 +220,8 @@ export class BlockoutEngine {this.orbit = new OrbitControls(this.view, canvas);this.orbit.target.set(0, 1, -4);this.orbit.enableDamping = false;+ // The arrow keys move the view while the canvas has focus (the Camera tab's fields frame it exactly).+ this.orbit.listenToKeyEvents(canvas);this.orbit.addEventListener("change", () => (this.dirty = true));this.gizmo = new TransformControls(this.view, canvas);this.gizmo.setSize(0.8);diff --git a/src/components/cinema/blockout-panel.tsx b/src/components/cinema/blockout-panel.tsxindex 8f33b04b..7cdf8ec6 100644--- a/src/components/cinema/blockout-panel.tsx+++ b/src/components/cinema/blockout-panel.tsx@@ -32,8 +32,14 @@ import { mediaDuration } from "./media";export interface BlockoutSource {video: string;depth?: string;+ /** The depth pass is near = dark (Blender's mist pass): the graph inverts it. */+ depthInvert?: boolean;firstFrame?: string;seconds: number;+ /** The browser couldn't read the upload's length: the server reads it from the file when it films. */+ unmeasured?: boolean;+ /** A WebM render or upload (Seedance 2.5 takes MP4 or MOV). */+ webm?: boolean;aspect?: string;from: "upload" | "build" | "scene";name?: string;@@ -111,8 +117,10 @@ export function blockoutInput(d: BlockoutDraft, engine: Engine, settings: Directblockout: {video: s?.video ?? "",...(s?.depth ? { depth: s.depth } : {}),+ ...(s?.depth && s.depthInvert ? { depthInvert: true } : {}),...(s?.firstFrame ? { firstFrame: s.firstFrame } : {}),seconds: s?.seconds ?? 0,+ ...(s?.webm ? { webm: true } : {}),beats: d.beats.map((b) => ({ id: b.id, start: b.start, label: b.label.trim() || "Beat", words: b.words })),refs: d.refs.filter((r) => r.url && !r.uploading).map((r) => ({ url: r.url, role: r.role, ...(r.name?.trim() ? { name: r.name.trim() } : {}) })),...(d.style.trim() ? { style: d.style.trim() } : {}),@@ -130,6 +138,9 @@ const MODEL_LINES: Record<string, string> = {const fmt = (n: number) => `${Math.round(n * 10) / 10} s`;+/** The longest prompt the box takes for a model with no limit of its own. */+const PROMPT_MAX = 60_000;+/** The frame shapes a blockout is filmed in: an upload takes the nearest to its own. */const SHAPES = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];@@ -198,6 +209,9 @@ export function BlockoutPanel(props: BlockoutPanelProps) {const resolutions = engine === "cloud" ? (getModel(draft.modelId)?.options.resolutions ?? []) : ["480p", "720p"];const resolution = draft.resolution && resolutions.some((r) => r.toLowerCase() === draft.resolution!.toLowerCase()) ? draft.resolution : (engine === "cloud" ? getModel(draft.modelId)?.defaults?.resolution : "480p");const seedance = engine === "cloud" && BLOCKOUT_SHOTS[draft.modelId]?.tag === "seedance";+ // H3 Max 3D to video takes a prompt of up to 2000 characters: the box stops there.+ const promptMax = engine === "cloud" ? (BLOCKOUT_SHOTS[draft.modelId]?.prompt ?? PROMPT_MAX) : PROMPT_MAX;+ const shownPrompt = engine === "cloud" ? (draft.prompt ?? compiled) : compiled;const uploadVideo = async (f: File, kind: "video" | "depth") => {if (f.size > 200 * 1024 * 1024) return toast.error("That file's over 200 MB. Try a smaller one.");@@ -207,11 +221,15 @@ export function BlockoutPanel(props: BlockoutPanelProps) {const [asset, length, aspect] = await Promise.all([uploadFile(f), mediaDuration(preview, "video").catch(() => NaN), clipShape(preview)]);URL.revokeObjectURL(preview);if (kind === "depth") return set({ source: draft.source ? { ...draft.source, depth: asset.url } : null });- const secs = Number.isFinite(length) && length > 0 ? Math.round(length * 100) / 100 : 8;+ const measured = Number.isFinite(length) && length > 0;+ // Not readable here (a MOV this browser can't play): a stand-in until filming, when the file's own length is used.+ const secs = measured ? Math.round(length * 100) / 100 : 8;if (secs > BLOCKOUT.maxSeconds) toast(`Blockouts run up to ${BLOCKOUT.maxSeconds} s: this one is ${fmt(secs)}, so its first ${BLOCKOUT.maxSeconds} s are used`);+ const webm = f.type === "video/webm" || /\.webm$/i.test(f.name);+ if (webm && engine === "cloud") toast("This is a WebM file: Seedance 2.5 takes MP4 or MOV. Export an MP4 from your 3D app, or film it on your GPU.");setDraft((d) => ({...d,- source: { video: asset.url, seconds: Math.min(BLOCKOUT.maxSeconds, secs), from: "upload", name: f.name, ...(aspect && { aspect }) },+ source: { video: asset.url, seconds: Math.min(BLOCKOUT.maxSeconds, secs), from: "upload", name: f.name, ...(aspect && { aspect }), ...(!measured && { unmeasured: true }), ...(webm && { webm: true }) },beats: d.beats.length ? d.beats.filter((b) => b.start < secs) : [{ id: nanoid(6), start: 0, label: "Opening", words: "" }],prompt: null,}));@@ -296,8 +314,9 @@ export function BlockoutPanel(props: BlockoutPanelProps) {{built ? "Built in your browser" : s.from === "scene" ? "From the 3D scene's fly path" : (s.name ?? "Uploaded render")}</p><p className="text-[12.5px] text-muted-foreground">- {fmt(seconds)}+ {s.unmeasured ? "Length read from the file when you film" : fmt(seconds)}{s.aspect ? ` · ${s.aspect}` : ""}+ {s.webm ? " · WebM" : ""}{s.depth ? " · with its depth" : engine === "open" ? " · no depth pass: Depth Anything 3 reads it on your GPU" : ""}</p><div className="flex flex-wrap gap-1.5">@@ -315,6 +334,17 @@ export function BlockoutPanel(props: BlockoutPanelProps) {<RotateCcw className="size-3.5" /> Start over</Button></div>+ {!built && (+ <div className="space-y-1 text-[12px] text-muted-foreground">+ <p>A depth pass guides your GPU: near is bright, far is dark, as wide as the render and just as long.</p>+ {s.depth && (+ <label className="flex items-center gap-1.5 text-foreground">+ <input type="checkbox" checked={!!s.depthInvert} onChange={(e) => set({ source: { ...s, depthInvert: e.target.checked } })} className="size-3.5 accent-primary" />+ Near is dark (Blender’s mist pass): invert it+ </label>+ )}+ </div>+ )}</div></div>)}@@ -534,13 +564,20 @@ export function BlockoutPanel(props: BlockoutPanelProps) {)}</div><Textarea- value={engine === "cloud" ? (draft.prompt ?? compiled) : compiled}+ value={shownPrompt}readOnly={engine !== "cloud"}- onChange={(e) => set({ prompt: e.target.value.slice(0, 60_000) })}+ onChange={(e) => set({ prompt: e.target.value.slice(0, promptMax) })}+ maxLength={promptMax}rows={9}className="font-mono text-[12px] leading-relaxed"aria-label="Compiled prompt"+ aria-describedby={promptMax < PROMPT_MAX ? "blockout-prompt-count" : undefined}/>+ {promptMax < PROMPT_MAX && (+ <p id="blockout-prompt-count" className={cn("text-right text-[11.5px] tabular-nums", shownPrompt.length > promptMax ? "text-destructive" : "text-muted-foreground")}>+ {shownPrompt.length} / {promptMax} characters+ </p>+ )}<p className="text-[12px] text-muted-foreground">{engine === "cloud" ? "Compiled from the beats, references and words above. Edit it freely: a film longer than one shot gets each shot's own beats instead." : "Each window gets the beats inside it, briefly: Wan follows the depth for everything else."}</p>@@ -572,6 +609,6 @@ export function BlockoutPanel(props: BlockoutPanelProps) {/** The draft after the builder hands back a render: the source, the scene, its beats (words kept). */export function withBuilt(d: BlockoutDraft, b: BuiltBlockout, scene: BlockoutScene): BlockoutDraft {- return { ...d, source: { video: b.video, depth: b.depth, firstFrame: b.firstFrame, seconds: b.seconds, aspect: b.aspect, from: "build" }, scene, beats: beatsForScene(scene, d.beats), prompt: null };+ return { ...d, source: { video: b.video, depth: b.depth, firstFrame: b.firstFrame, seconds: b.seconds, aspect: b.aspect, from: "build", ...(!b.type.includes("mp4") && { webm: true }) }, scene, beats: beatsForScene(scene, d.beats), prompt: null };}diff --git a/src/components/cinema/projects-view.tsx b/src/components/cinema/projects-view.tsxindex a3cf9b59..9a7b021b 100644--- a/src/components/cinema/projects-view.tsx+++ b/src/components/cinema/projects-view.tsx@@ -1,9 +1,9 @@"use client";-import { Clapperboard, Copy, ExternalLink, MoreHorizontal, Pin, PinOff, Plus, Settings2 } from "lucide-react";+import { Box, Clapperboard, Copy, ExternalLink, MoreHorizontal, Pin, PinOff, Plus, Settings2 } from "lucide-react";import Link from "next/link";-import { useRouter } from "next/navigation";-import { useState } from "react";+import { useRouter, useSearchParams } from "next/navigation";+import { Suspense, useCallback, useEffect, useState } from "react";import { PageShell } from "@/components/page-shell";import { PageHeader } from "@/components/page-shell";import { HadItemsScript, useHadItems } from "@/components/use-had-items";@@ -42,9 +42,9 @@ function Cover({ project, className }: { project: CinemaProject; className?: str);}-function ProjectCard({ project, onSettings }: { project: CinemaProject; onSettings: () => void }) {+function ProjectCard({ project, onSettings, query = "" }: { project: CinemaProject; onSettings: () => void; query?: string }) {const update = useUpdateProject(project.id);- const href = `/cinema/${project.id}`;+ const href = `/cinema/${project.id}${query}`;return (<div className="group/card relative animate-fade-up"><Link href={href} className="block rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-ring">@@ -103,6 +103,18 @@ function ProjectCard({ project, onSettings }: { project: CinemaProject; onSettin);}+/**+ * /cinema?blockout=1 (the GPU board's Blockout to film row): the list says to pick the project, and a project opened+ * or started from it opens Blockout to film. Read in its own Suspense boundary, so the rest of the list prerenders.+ */+function BlockoutQuery({ onBlockout }: { onBlockout: () => void }) {+ const on = useSearchParams().get("blockout") === "1";+ useEffect(() => {+ if (on) onBlockout();+ }, [on, onBlockout]);+ return null;+}+const GRID = "grid grid-cols-1 gap-x-5 gap-y-7 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";/**@@ -160,6 +172,9 @@ export function CinemaProjects() {const visitor = useIsVisitor();const onCreate = visitor ? undefined : () => setCreating(true);useHadItems("cinema-projects", data?.length);+ const [blockout, setBlockout] = useState(false);+ const markBlockout = useCallback(() => setBlockout(true), []);+ const query = blockout ? "?blockout=1" : "";return (<PageShell wide><PageHeader title="Cinema Studio" description="Direct films shot by shot: genre, camera, lens, palette and light, with characters and locations that stay the same.">@@ -169,6 +184,14 @@ export function CinemaProjects() {</Button>)}</PageHeader>+ <Suspense fallback={null}>+ <BlockoutQuery onBlockout={markBlockout} />+ </Suspense>+ {blockout && !!data?.length && (+ <p className="mb-5 flex items-center gap-2 rounded-xl bg-brand-faint px-3 py-2.5 text-[13px] text-brand-text">+ <Box className="size-4 shrink-0" /> Blockout to film: pick the project to film it in{onCreate ? ", or start a new one" : ""}.+ </p>+ )}{isLoading ? (// Both shapes are in the server's shell; the one this browser saw last time shows from the first paint.<div key="loading">@@ -189,7 +212,7 @@ export function CinemaProjects() {) : (<div key="cards" className={GRID}>{data.map((p) => (- <ProjectCard key={p.id} project={p} onSettings={() => setEditing(p)} />+ <ProjectCard key={p.id} project={p} onSettings={() => setEditing(p)} query={query} />))}<buttononClick={() => setCreating(true)}@@ -204,7 +227,7 @@ export function CinemaProjects() {onOpenChange={setCreating}onDone={(p) => {setCreating(false);- if (p) router.push(`/cinema/${p.id}`);+ if (p) router.push(`/cinema/${p.id}${query}`);}}/><ProjectDialogdiff --git a/src/components/cinema/scene-viewer.tsx b/src/components/cinema/scene-viewer.tsxindex 40525b31..e7e7d39e 100644--- a/src/components/cinema/scene-viewer.tsx+++ b/src/components/cinema/scene-viewer.tsx@@ -47,7 +47,8 @@ export interface SceneViewerProps {brief: string;onClose: () => void;/** Blockout to film: the path rendered through the scene (24 fps) handed to the composer as a blockout. */- onUseAsBlockout?: (b: { video: string; seconds: number; aspect: string; still: string }) => void;+ /** `type`: the render's own type ("video/mp4", or "video/webm" where the browser can't write MP4). */+ onUseAsBlockout?: (b: { video: string; seconds: number; aspect: string; still: string; type: string }) => void;}const SPEEDS = [@@ -383,7 +384,7 @@ export default function SceneViewer({ take, projectId, engine, onEngine, settingconst rec = await eng.recordPath(poses, { fps, mp4: true, onProgress: setProgress });setFilming("send");const asset = await uploadFile(new File([rec.render], `blockout-path.${rec.type.includes("mp4") ? "mp4" : "webm"}`, { type: rec.type }));- onUseAsBlockout({ video: asset.url, seconds: Math.round((frames / fps) * 100) / 100, aspect, still: take.still });+ onUseAsBlockout({ video: asset.url, seconds: Math.round((frames / fps) * 100) / 100, aspect, still: take.still, type: rec.type });} catch (e) {if ((e as Error).name !== "AbortError") toastError(e, "Couldn't render the path as a blockout");} finally {diff --git a/src/components/cinema/workspace.tsx b/src/components/cinema/workspace.tsxindex 716960d8..159b9bce 100644--- a/src/components/cinema/workspace.tsx+++ b/src/components/cinema/workspace.tsx@@ -40,6 +40,9 @@ import { SoulCastDialog, SoulLocationDialog } from "./soul-builders";import { BlockoutPanel, initialBlockout, withBuilt, type BlockoutDraft } from "./blockout-panel";import type { BlockoutScene } from "@/lib/blockout";+/** What a browser that can only write WebM is told: Seedance 2.5 takes MP4 or MOV reference clips. */+const WEBM_BLOCKOUT = "This browser saved the blockout as WebM, which Seedance 2.5 doesn't take: render it in Chrome or Edge, upload an MP4 from your 3D app, or film it on your GPU.";+/** The blockout builder (three.js) loads when it opens. */const BlockoutBuilder = dynamic(() => import("./blockout-builder"), {ssr: false,@@ -642,7 +645,7 @@ function Workspace({ data, items, loading }: { data: ProjectView; items: CinemaGonUseAsBlockout={(b) => {setBlockout((d) => ({...d,- source: { video: b.video, seconds: b.seconds, aspect: b.aspect, from: "scene" },+ source: { video: b.video, seconds: b.seconds, aspect: b.aspect, from: "scene", ...(!b.type.includes("mp4") && { webm: true }) },scene: null,beats: d.source?.from === "scene" && d.beats.length ? d.beats.filter((x) => x.start < b.seconds) : [{ id: "start", start: 0, label: "Opening", words: "" }],refs: d.refs.some((r) => r.url === b.still) ? d.refs : [{ id: "scene-still", url: b.still, role: "location" as const }, ...d.refs].slice(0, 8),@@ -650,6 +653,7 @@ function Workspace({ data, items, loading }: { data: ProjectView; items: CinemaG}));setOpenScene(null);setBlockoutOpen(true);+ if (!b.type.includes("mp4") && engine === "cloud") toast(WEBM_BLOCKOUT);}}/>)}@@ -677,7 +681,7 @@ function Workspace({ data, items, loading }: { data: ProjectView; items: CinemaGsetBlockout((d) => withBuilt(d, built, scene));setBuilder(null);setBlockoutOpen(true);- if (!built.type.includes("mp4") && engine === "cloud") toast("This browser saved the grey box as WebM. If the cloud model refuses it, render it in Chrome or Edge, or upload an MP4 from your 3D app.");+ if (!built.type.includes("mp4") && engine === "cloud") toast(WEBM_BLOCKOUT);}}/>)}diff --git a/src/lib/blockout.ts b/src/lib/blockout.tsindex bf72d11d..6b67e03d 100644--- a/src/lib/blockout.ts+++ b/src/lib/blockout.ts@@ -181,6 +181,34 @@ export function cameraAt(keys: readonly BlockoutCameraKey[], t: number): { posit};}+/**+ * The camera key at time t as the builder's number fields read it: the key there, or the camera's pose there with no+ * shake (between keys, eased).+ */+export function cameraKeyAt(keys: readonly BlockoutCameraKey[], t: number): BlockoutCameraKey {+ const hit = keys.find((k) => Math.abs(k.t - t) < 0.05);+ if (hit) return { ...hit, position: [...hit.position], target: [...hit.target] };+ const { position, target, lens } = cameraAt(keys.map((k) => ({ ...k, shake: 0 })), t);+ return { t: Math.round(t * 100) / 100, position, target, lens, shake: cameraAt(keys, t).shake };+}++/**+ * The scene with its camera key at time t changed (the builder's number fields, so the camera can be framed from the+ * keyboard): the key there, or a new one made from the camera's pose there. Unchanged when the keys are full.+ */+export function withCameraKey(s: BlockoutScene, t: number, patch: Partial<Omit<BlockoutCameraKey, "t">>): BlockoutScene {+ const base = cameraKeyAt(s.camera, t);+ const hit = s.camera.some((k) => Math.abs(k.t - t) < 0.05);+ if (!hit && s.camera.length >= BLOCKOUT.maxCameraKeys) return s;+ const key: BlockoutCameraKey = {+ ...base,+ ...patch,+ lens: clamp(patch.lens ?? base.lens, BLOCKOUT.lens.min, BLOCKOUT.lens.max),+ shake: clamp(patch.shake ?? base.shake, 0, 1),+ };+ return { ...s, camera: [...s.camera.filter((k) => Math.abs(k.t - t) >= 0.05), key].sort((a, b) => a.t - b.t) };+}+/** Vertical field of view (degrees) of a lens on a full-frame sensor cropped to `aspect` (width ÷ height). */export function lensVFov(lensMm: number, aspect: number): number {const h = 24;diff --git a/src/lib/catalog/cinema.ts b/src/lib/catalog/cinema.tsindex 2ff82b07..a7b2cab5 100644--- a/src/lib/catalog/cinema.ts+++ b/src/lib/catalog/cinema.ts@@ -1,4 +1,4 @@-import { BLOCKOUT, OPEN_FPS, beatsIn, blockoutFramePrompt, compileBlockoutPrompt, depthWindows, normalizeBeats, splitShots, windowsSeconds, type Beat, type BlockoutRef } from "@/lib/blockout";+import { BLOCKOUT, H3_INTENT_MAX, 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";@@ -249,12 +249,20 @@ export interface CinemaGenerateInput {export interface BlockoutRun {/** The grey-box render (uploaded from any 3D app, or rendered by Cinema's builder). */video: string;- /** Its depth pass, near = bright (the builder renders one at 16 fps; Blender's mist / Z pass works too). */+ /**+ * Its depth pass, near = bright (the builder renders one at 16 fps). Blender's mist pass is near = dark: invert it in+ * the compositor, or set depthInvert (the composer's "Near is dark") and the graph inverts it. A raw Z pass isn't+ * normalised to 0–1: map it to a mist-like range first.+ */depth?: string;+ /** The depth pass is near = dark (a Blender mist pass as it renders): the open engine inverts it before VACE reads it. */+ depthInvert?: boolean;/** Its first frame as a picture (the builder saves one): the open engine draws the film's first frame from it. */firstFrame?: string;- /** Seconds. */+ /** Seconds (the server reads them from the stored file's header where it can). */seconds: number;+ /** The blockout is WebM (a browser's fallback render): Seedance 2.5 takes MP4 or MOV only. The server reads it from the header. */+ webm?: boolean;/** Each beat's start (seconds), name and words; it runs to the next one (normalizeBeats). */beats: (Pick<Beat, "start" | "label"> & Partial<Beat>)[];refs: BlockoutRef[];@@ -2155,9 +2163,10 @@ export const BLOCKOUT_MODELS = {* clips of 1.8–30.2 s and makes 4–30 s (fal, read 2026-11-01; Cinema sends it 4 stills with clips); H3 Max 3D to video* reads up to 15 s and 8 stills and bills at least 5 s a shot.*/-export const BLOCKOUT_SHOTS: Record<string, { max: number; min: number; refs: number; tag: "seedance" | "h3" }> = {+export const BLOCKOUT_SHOTS: Record<string, { max: number; min: number; refs: number; tag: "seedance" | "h3"; prompt?: number }> = {"seedance-2-5": { max: 30, min: 4, refs: 4, tag: "seedance" },- "minimax-h3-max-3d": { max: 15, min: 2, refs: 8, tag: "h3" },+ // H3 bills at least 5 s a shot, so no shot is cut shorter; its prompt (Scene Intent) takes up to 2000 characters.+ "minimax-h3-max-3d": { max: 15, min: 5, refs: 8, tag: "h3", prompt: H3_INTENT_MAX },};/** The utilities a blockout's steps use, per engine. */@@ -2243,7 +2252,8 @@ function planBlockout(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlamodelId,op: "v2v",prompt: compileBlockoutPrompt({ beats: beatsIn(beats, w.start, w.end), refs, target: "open", ...words }),- params: { aspectRatio, resolution, duration: w.frames / OPEN_FPS, numOutputs: 1 },+ // A near = dark depth pass (Blender's mist) is inverted in the graph before VACE reads it.+ params: { aspectRatio, resolution, duration: w.frames / OPEN_FPS, numOutputs: 1, ...(depth && b?.depthInvert ? { extra: { invertDepth: true } } : {}) },chain: [{ slot: "video" }, { slot: "images", position: "first" }],},});@@ -2272,6 +2282,9 @@ function planBlockout(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlaconst resolution = offered.find((r) => r.toLowerCase() === input.resolution?.toLowerCase()) ?? model.defaults?.resolution;const aspectRatio = seedance ? (input.aspectRatio && model.options.aspectRatios?.includes(input.aspectRatio) ? input.aspectRatio : "auto") : undefined;const sound = seedance && input.audio !== false;+ const edited = input.prompt.trim();+ if (!many && lim.prompt && edited.length > lim.prompt) blocker ??= `${model.name} takes a prompt of up to ${lim.prompt} characters, and yours has ${edited.length}: shorten it, or go back to the compiled one`;+ if (seedance && b?.webm) blocker ??= `${model.name} takes MP4 or MOV blockouts, and this one is WebM: render it in Chrome or Edge, export an MP4 from your 3D app, or film it on your GPU`;// A later shot carries the last frame of the one before as one more still.const keep = many ? lim.refs - 1 : lim.refs;const used = refs.slice(0, keep);@@ -2281,6 +2294,12 @@ function planBlockout(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPla? `${model.name} follows the blockout as its reference video (@Video1)${used.length ? ` with your still${used.length > 1 ? `s as @Image1–@Image${used.length}` : " as @Image1"}` : ""}${sound ? ", sound on" : ""}`: `${model.name} renders the blockout from your stills; camera, blocking and timing come from the video. It makes no sound: add it afterwards with Sound for video`,);+ if (seedance) notes.push(`${model.name} bills the blockout's seconds with the film's, at 0.6 times its rate: the price counts both`);+ else {+ const gen = model.pricing?.generatedRefs;+ if (gen && !used.length) notes.push(`With no stills, ${model.name} draws up to ${gen.count} references of its own ($${gen.usd.toFixed(2)} each, in the price)${many ? " for the first shot" : ""}`);+ notes.push(`${model.name} bills each shot at least ${model.pricing?.minSeconds ?? lim.min} s, and counts every camera cut inside an uploaded render as a shot: a render with cuts costs more than shown`);+ }if (many) {notes.push(`The blockout is ${secs1(seconds)} s, longer than ${model.name}'s ${lim.max} s, so it is filmed as ${shots.length} shots cut at your markers (${shots.map((s) => `${secs1(s.start)}–${secs1(s.end)} s`).join(", ")}); each starts from the last frame of the one before, then they're joined`,@@ -2294,7 +2313,7 @@ function planBlockout(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlaif (seedance && duration - len > 0.6) notes.push(`${model.name} makes at least ${lim.min} s, so shot${part || " 1"} runs ${secs1(duration - len)} s past the blockout`);const prev = k > 0 ? used.length + 1 : undefined;const compiled = compileBlockoutPrompt({ beats: beatsIn(beats, shot.start, shot.end), refs: used, target: lim.tag, previousFrame: prev, sound, ...words });- const prompt = !many && input.prompt.trim() ? input.prompt.trim() : compiled;+ const prompt = !many && edited ? edited : compiled;const after: string[] = [];const chain: GenerationRequest["chain"] = [];let inputs: GenerationRequest["inputs"] = used.length ? { images: used.map((r) => r.url) } : undefined;@@ -2313,7 +2332,8 @@ function planBlockout(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPladuration,...(resolution ? { resolution } : {}),...(aspectRatio ? { aspectRatio } : {}),- ...(seedance ? { generateAudio: sound } : {}),+ // Seedance bills the reference clip's seconds with the film's (Pricing.clipInput): the blockout, or this shot's cut.+ ...(seedance ? { generateAudio: sound, clipSeconds: Math.round(len * 100) / 100 } : {}),};steps.push({key: `shot${k}`,diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.tsindex 0e95028f..de7e443c 100644--- a/src/lib/catalog/cloud-models.generated.ts+++ b/src/lib/catalog/cloud-models.generated.ts@@ -4412,8 +4412,22 @@ export const CLOUD_MODELS: ModelDef[] = [},"pricing": {"unit": "second",- "usd": 0.473,- "note": "720p"+ "usd": 0.46224,+ "note": "720p; 480p $0.21494, 1080p $1.13724. Reference clips bill their own seconds with the output, at 0.6 times the rate",+ "byResolution": {+ "480p": 0.21494,+ "720p": 0.46224,+ "1080p": 1.13724+ },+ "clipInput": {+ "usd": 0.27734,+ "byResolution": {+ "480p": 0.12897,+ "720p": 0.27734,+ "1080p": 0.68234+ },+ "plain": true+ }}},{@@ -7240,14 +7254,18 @@ export const CLOUD_MODELS: ModelDef[] = ["pricing": {"unit": "second","usd": 0.08,- "note": "768P; 480P $0.05, 1080P $0.16; at least 5 s a shot; + $0.50 processing a request",+ "note": "768P; 480P $0.05, 1080P $0.16; at least 5 s a shot; + $0.50 processing a request; + $0.10 for each reference it draws when given none (up to 2)","byResolution": {"480P": 0.05,"768P": 0.08,"1080P": 0.16},"minSeconds": 5,- "perRequest": 0.5+ "perRequest": 0.5,+ "generatedRefs": {+ "usd": 0.1,+ "count": 2+ }},"hidden": true},diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex 3bc83fb3..4e340ea5 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -445,6 +445,12 @@ export function planGeneration(// Reference clips and video elements on a model that bills them with the output (Kling 4.0, Pricing.clipInput): priced// at the least they bill (twice the output) until the server reads their length (params.clipSeconds).if (model.pricing?.clipInput && req.inputs?.videos?.length && params.clipSeconds === undefined) params = { ...params, clipSeconds: 0 };+ // A run with no reference images on a model that then draws its own (H3 Max 3D to video): priced at the most it draws.+ // A chained still (a hand-over frame) counts as one going in.+ const gen = model.pricing?.generatedRefs;+ const stills = !!req.inputs?.images?.length || !!req.chain?.some((c) => c.slot === "images");+ params = { ...params, drawnRefs: gen && !stills ? gen.count : undefined };+ if (params.drawnRefs === undefined) delete params.drawnRefs;// An edit's reference clips (beside the clip it edits; clip elements are counted on their own): Kling 4.0 takes 4.if (op === "v2v" || op === "video-swap" || op === "video-insert") {const asElements = params.elements?.filter((g) => g.video !== undefined).length ?? 0;@@ -906,10 +912,12 @@ export function clipBilling(model: Pick<ModelDef, "pricing" | "defaults">, paramconst rate = (res && (c.byResolution?.[res] ?? c.byResolution?.[res.toLowerCase()])) || c.usd;const source = params.sourceDuration && params.sourceDuration > 0 ? params.sourceDuration : undefined;const output = edit ? (source ?? params.duration ?? model.defaults?.duration ?? 5) : (params.duration ?? model.defaults?.duration ?? 5);- const refs = Math.max(0, params.clipSeconds ?? 0);- const guessed = edit ? !source : !refs;+ // Clips not read yet: on a model that bills them with no floor (Seedance 2.5), taken as long as the output until the+ // server reads their headers, rather than as nothing.+ const refs = Math.max(0, params.clipSeconds ?? 0) || (c.plain && !edit ? output : 0);+ const guessed = edit ? !source : !params.clipSeconds;const input = (edit ? (source ?? output) : 0) + refs;- return { input, output, billed: Math.max(input + output, 2 * output), rate, guessed };+ return { input, output, billed: c.plain ? input + output : Math.max(input + output, 2 * output), rate, guessed };}/**@@ -1047,5 +1055,6 @@ export function estimateCost(model: ModelDef, params: GenParams, jobs = 1, op?:if (params.generateAudio === false && model.options.audio === true && p.note?.includes("audio-off-half")) per /= 2;if (p.animationUsd && params.animation !== undefined && params.animation !== "") per += p.animationUsd;if (p.perRequest) per += p.perRequest;+ if (p.generatedRefs && params.drawnRefs) per += p.generatedRefs.usd * Math.min(params.drawnRefs, p.generatedRefs.count);return Math.round(per * jobs * 1000) / 1000;}diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex 188d1cc4..388b91fc 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -722,13 +722,20 @@ export interface Pricing {/*** A run with a clip going in (an edit's source, reference clips, video elements: Kling 4.0) bills this rate per second* of input plus output, at least twice the output (fal and Replicate: "2x output if input is shorter than output,- * otherwise input + output"), in place of `usd` / `byResolution`.+ * otherwise input + output"), in place of `usd` / `byResolution`. `plain`: billed on input + output with no floor+ * (fal's Seedance 2.5 reference-to-video: every second of a reference clip is billed with the output, at 0.6 times the+ * rate of a run without clips).*/- clipInput?: { usd: number; byResolution?: Record<string, number> };+ clipInput?: { usd: number; byResolution?: Record<string, number>; plain?: true };/** A fixed fee each request adds on top of its seconds (fal's H3 Max 3D to video: $0.50 processing). */perRequest?: number;/** The fewest seconds a per-second request bills (fal's H3 Max 3D to video: 5 s a shot). */minSeconds?: number;+ /**+ * A run sent no reference images draws up to `count` of its own, at `usd` each (fal's H3 Max 3D to video: up to 2 at+ * $0.10): priced at the most, through params.drawnRefs (set when the plan sees no images going in).+ */+ generatedRefs?: { usd: number; count: number };}/** A model's weights licence, as read in the research: information, never a gate (the owner's decision of 2026-10-27). */@@ -821,6 +828,8 @@ export interface GenParams {elements?: { images?: number[]; video?: number }[];/** Seconds of the reference clips that go in (Kling 4.0 bills them with the output: Pricing.clipInput). */clipSeconds?: number;+ /** References the provider draws itself because the run sends none (Pricing.generatedRefs); set by the plan. */+ drawnRefs?: number;multiShot?: "auto";/** Render a cheap draft first (Seedance 2.5 draft mode). */draft?: boolean;diff --git a/src/lib/composer.ts b/src/lib/composer.tsindex fcc6689a..fac8c719 100644--- a/src/lib/composer.ts+++ b/src/lib/composer.ts@@ -281,7 +281,7 @@ export function clipOutcome(// An edit billed on the seconds in and out (Kling 4.0): what's billed, before the total.const billing = duration && model.engine === "cloud" ? clipBilling(model, { ...params, sourceDuration: duration }, op, now) : undefined;if (billing) {- const twice = billing.input < billing.output ? " (at least twice the output)" : "";+ const twice = billing.billed > billing.input + billing.output + 1e-9 ? " (at least twice the output)" : "";return `${clipSeconds(billing.input)} in + ${clipSeconds(billing.output)} out: billed on ${clipSeconds(billing.billed)}${twice} at ${formatCost(billing.rate)}/s`;}return null;diff --git a/src/server/assist/studio-tools.ts b/src/server/assist/studio-tools.tsindex 889b9db0..81010ff9 100644--- a/src/server/assist/studio-tools.ts+++ b/src/server/assist/studio-tools.ts@@ -13,8 +13,7 @@ import type { ChainSlot, Engine, GenerationRequest, Operation } from "@/lib/cataimport { 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 { blockoutFromFile, cinemaContext } from "../cinema-generate";import { db } from "../db";import { chooseRoute, ConnectComfyError, createGenerations, outputKind, previewChained } from "../generations";import { isOffered } from "../model-access";@@ -158,8 +157,9 @@ const RestoreInput = z.object({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."),+ depth_invert: z.boolean().optional().describe("Your GPU: the depth pass is near = dark (Blender's mist pass as it renders): it is inverted before use."),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)."),+ seconds: z.number().min(2).max(60).optional().describe("The blockout's length (the file's own header wins where it can be read)."),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)@@ -176,7 +176,7 @@ const BlockoutInput = z.object({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."),+ 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 (MiniMax H3 Max 3D takes up to 2000 characters)."),});export type LayersToolInput = z.infer<typeof LayersInput>;@@ -710,7 +710,8 @@ const restoreVideo = defineTool({*/function blockoutSteps(i: BlockoutToolInput, ctx: ToolContext): PipelineStep[] {const engine = engineOf(ctx);- const seconds = i.seconds ?? videoLength(i.video);+ const read = blockoutFromFile({ video: i.video, seconds: i.seconds ?? 0 });+ const seconds = read.seconds;if (!seconds) throw new Error("Couldn't read the blockout's length: pass seconds");const plan = planCinema({@@ -725,8 +726,10 @@ function blockoutSteps(i: BlockoutToolInput, ctx: ToolContext): PipelineStep[] {blockout: {video: i.video,...(i.depth && { depth: i.depth }),+ ...(i.depth && i.depth_invert && { depthInvert: true }),...(i.first_frame && { firstFrame: i.first_frame }),seconds: Math.min(60, seconds),+ ...(read.webm && { webm: true }),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 }),diff --git a/src/server/cinema-generate.ts b/src/server/cinema-generate.tsindex c76c6872..01633cd4 100644--- a/src/server/cinema-generate.ts+++ b/src/server/cinema-generate.ts@@ -1,5 +1,6 @@import "server-only";import { nanoid } from "nanoid";+import { BLOCKOUT } from "@/lib/blockout";import { getModel } from "@/lib/catalog";import {SWATCH_PLACEHOLDER,@@ -11,6 +12,7 @@ import {type CinemaGenerateInput,type CinemaPlan,type CinemaStep,+ type BlockoutRun,type CinemaTakeInfo,type DirectorSettings,} from "@/lib/catalog/cinema";@@ -19,7 +21,7 @@ import { CinemaError, folderExists, getProject, recordTakes, spentUsd } from "./import { ConnectComfyError, createGenerations, previewGeneration } from "./generations";import { encodePng } from "./png";import { engineMode, getSetting } from "./settings";-import { saveFile } from "./storage";+import { saveFile, storedMedia } from "./storage";import { isOffered } from "./model-access";/**@@ -57,11 +59,29 @@ export function swatchUrl(hex: string[]): string {/** A generate request from the workspace: the brief always comes from the project, the Director settings unless sent. */export type CinemaRequest = Omit<CinemaGenerateInput, "settings" | "brief"> & { settings?: DirectorSettings };+/**+ * A blockout as its stored file says: the length from the file's header (the browser's measure only where the header+ * can't be read: a MOV it couldn't decode, a 40 s clip it read as 8, are filmed at their real length), and whether+ * it is WebM (Seedance 2.5 takes MP4 or MOV). Only the header is read; a file the asker may not use is left as sent+ * (its run is refused by the input checks).+ */+export function blockoutFromFile<T extends Pick<BlockoutRun, "video" | "seconds" | "webm">>(b: T): T & Pick<BlockoutRun, "webm"> {+ const info = b.video ? storedMedia(b.video, { allContainers: true })?.info : undefined;+ if (!info) return b;+ const len = info.videoDuration ?? info.duration;+ return {+ ...b,+ ...(len && len > 0 ? { seconds: Math.round(Math.min(BLOCKOUT.maxSeconds, len) * 100) / 100 } : {}),+ ...(info.container === "webm" ? { webm: true } : info.container === "mp4" ? { webm: false } : {}),+ };+}+/** The plan with this project's brief and (unless the request carries its own) Director settings. */export function planForProject(projectId: string, input: CinemaRequest): CinemaPlan {const project = getProject(projectId);if (!project) throw new CinemaError("Project not found", 404);- return planCinema({ ...input, settings: input.settings ?? project.director, brief: project.brief.body }, cinemaContext());+ const asked = input.action === "blockout" && input.blockout ? { ...input, blockout: blockoutFromFile(input.blockout) } : input;+ return planCinema({ ...asked, settings: input.settings ?? project.director, brief: project.brief.body }, cinemaContext());}type Preview = ReturnType<typeof previewGeneration>;@@ -110,9 +130,11 @@ export interface CinemaRunResult {* Plan, check every step and the project's cost cap, create the chained generations and record them* in the project (in `folderId`, the scene the user is looking at).*/-export function generateInProject(projectId: string, input: CinemaRequest, folderId: string | null = null): CinemaRunResult {+export function generateInProject(projectId: string, asked: CinemaRequest, folderId: string | null = null): CinemaRunResult {const project = getProject(projectId);if (!project) throw new CinemaError("Project not found", 404);+ // A blockout's take remembers the length its file says, as the plan films it.+ const input = asked.action === "blockout" && asked.blockout ? { ...asked, blockout: blockoutFromFile(asked.blockout) } : asked;const notes: string[] = [];// A scene deleted since the view loaded (the sidebar, another tab): file the takes at the root rather than lose them.let folder = folderId;diff --git a/src/server/cinema-schemas.ts b/src/server/cinema-schemas.tsindex 28b86418..78f091f0 100644--- a/src/server/cinema-schemas.ts+++ b/src/server/cinema-schemas.ts@@ -86,7 +86,9 @@ export const BlockoutSchema = z.object({video: FileRef,depth: FileRef.optional(),firstFrame: FileRef.optional(),+ depthInvert: z.boolean().optional(),seconds: z.number().min(BLOCKOUT.minSeconds).max(BLOCKOUT.maxSeconds),+ webm: z.boolean().optional(),beats: z.array(z.object({ id: z.string().max(40).optional(), start: z.number().min(0).max(BLOCKOUT.maxSeconds), end: z.number().min(0).max(BLOCKOUT.maxSeconds).optional(), label: z.string().trim().max(80), words: Words.default("") })).max(BLOCKOUT.maxMarkers)diff --git a/src/server/gpu/tools.ts b/src/server/gpu/tools.tsindex 0df3847e..8039deb4 100644--- a/src/server/gpu/tools.ts+++ b/src/server/gpu/tools.ts@@ -166,13 +166,16 @@ export const STUDIO_ROWS: StudioRowDef[] = [// 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.+ // rendered by the blockout graph and handed over on its last frame, then joined. An upload without a depth pass (the+ // usual Blender render) runs the restyle graph instead, which reads the depth with Depth Anything 3. The projects list+ // takes ?blockout=1 on to the project picked, which opens Blockout to film.{href: "/cinema?blockout=1",label: "Blockout to film",group: "Video",steps: [{ modelId: BLOCKOUT_MODELS.open, op: "v2v" },+ { modelId: BLOCKOUT_MODELS.openNoDepth, op: "v2v" },{ modelId: BLOCKOUT_MODELS.firstFrame, op: "edit" },{ modelId: "oss-segment", op: "trim" },{ modelId: "oss-extract-frame", op: "frame" },diff --git a/tests/blockout.test.ts b/tests/blockout.test.tsindex 2f398967..98ff9973 100644--- a/tests/blockout.test.ts+++ b/tests/blockout.test.ts@@ -1,3 +1,4 @@+import { execFileSync } from "node:child_process";import fs from "node:fs";import os from "node:os";import path from "node:path";@@ -38,6 +39,8 @@ const REFS: import("@/lib/blockout").BlockoutRef[] = [{ url: "/api/files/uploads/mara.png", role: "character", name: "Mara" },{ url: "/api/files/uploads/exterior.png", role: "exterior" },];+/** fal's Seedance 2.5 price: h × w × (input + output) × 24 / 1024 tokens at $0.0214 per 1K (1080p $0.0234), × 0.6 with a clip in. */+const seedanceUsd = (pixels: number, input: number, output: number, perK = 0.0214) => ((pixels * (input + output) * 24) / 1024 / 1000) * perK * (input > 0 ? 0.6 : 1);const exampleBeats = () => B.beatsFrom(B.EXAMPLE_SCENE.markers, B.EXAMPLE_SCENE.duration, B.EXAMPLE_WORDS);const ctx = { cloudAllowed: true };const film = (engine: "cloud" | "open", over: Partial<NonNullable<CinemaGenerateInput["blockout"]>> = {}, more: Partial<CinemaGenerateInput> = {}): CinemaGenerateInput => ({@@ -89,6 +92,26 @@ describe("the scene", () => {expect(B.aspectOf("nonsense")).toBeCloseTo(16 / 9);});+ it("frames the camera from the builder's number fields: the key at the playhead, or a new one from the pose there", () => {+ const s = B.emptyScene();+ s.camera = [+ { t: 0, position: [0, 1.6, 0], target: [0, 1.6, -5], lens: 24, shake: 0.4 },+ { t: 4, position: [0, 1.6, -4], target: [0, 1.6, -9], lens: 96, shake: 0.4 },+ ];+ // Between keys the fields read the eased pose with no shake in it.+ const mid = B.cameraKeyAt(s.camera, 2);+ expect(mid).toMatchObject({ t: 2, lens: expect.closeTo(48, 6), shake: expect.closeTo(0.4, 6) });+ expect(mid.position).toEqual([0, 1.6, -2]);+ const typed = B.withCameraKey(s, 2, { position: [1, 2, -2] });+ expect(typed.camera.map((k) => k.t)).toEqual([0, 2, 4]);+ expect(typed.camera[1]).toMatchObject({ position: [1, 2, -2], target: [0, 1.6, -7] });+ // A key already there is changed in place; a lens is kept in range.+ const again = B.withCameraKey(typed, 2.02, { lens: 5 });+ expect(again.camera).toHaveLength(3);+ expect(again.camera[1]).toMatchObject({ position: [1, 2, -2], lens: B.BLOCKOUT.lens.min });+ expect(B.withCameraKey({ ...s, camera: Array.from({ length: B.BLOCKOUT.maxCameraKeys }, (_, i) => ({ ...B.DEFAULT_CAMERA, t: i })) }, 0.5, { lens: 50 }).camera).toHaveLength(B.BLOCKOUT.maxCameraKeys);+ });+it("makes a caller's scene safe: numbers in range, lists capped, a camera always there", () => {const s = B.normalizeScene({ duration: 999, prims: [{ kind: "box", position: [1e9, NaN, 2], size: [-2, 1, 1] }, { kind: "rocket" }], markers: [{ t: 80, label: "" }], camera: [] });expect(s.duration).toBe(B.BLOCKOUT.maxSeconds);@@ -214,9 +237,14 @@ describe("planning a blockout", () => {expect(r.params).toMatchObject({ duration: 8, resolution: "720p", aspectRatio: "auto", generateAudio: true });expect(r.prompt).toContain("@Image2 is Mara");expect(r.prompt).toMatch(/Audio: Footsteps on concrete; A long door creak\./);- // Seedance 2.5 at 720p: 8 s × $0.473.- expect(plan.costUsd).toBeCloseTo(8 * 0.473, 3);+ // Seedance 2.5 bills the 8 s blockout with the 8 s film, at 0.6 times the rate (fal's formula).+ expect(r.params?.clipSeconds).toBe(8);+ expect(plan.costUsd).toBeCloseTo(seedanceUsd(1280 * 720, 8, 8), 2);expect(plan.notes.join(" ")).toMatch(/reference video \(@Video1\).*sound on/);+ expect(plan.notes.join(" ")).toMatch(/bills the blockout's seconds with the film's/);+ // Per resolution: 480p is 864 × 496, 1080p 1920 × 1080 at $0.0234 per 1K tokens.+ expect(planCinema(film("cloud", {}, { resolution: "480p" }), ctx).costUsd).toBeCloseTo(seedanceUsd(864 * 496, 8, 8), 2);+ expect(planCinema(film("cloud", {}, { resolution: "1080p" }), ctx).costUsd).toBeCloseTo(seedanceUsd(1920 * 1080, 8, 8, 0.0234), 2);});it("cloud: an edited prompt is sent as written, and the prompt the composer shows is the one it would send", () => {@@ -253,7 +281,12 @@ describe("planning a blockout", () => {expect(join.request).toMatchObject({ modelId: "join-clips", op: "concat" });expect(join.after).toEqual(["shot0", "shot1"]);expect(plan.notes.join(" ")).toMatch(/filmed as 2 shots cut at your markers \(0–26 s, 26–40 s\)/);- expect(plan.costUsd).toBeGreaterThan(40 * 0.473 - 0.01);+ // Each shot bills its cut with its film: 26 + 26 and 14 + 14 seconds at 720p, plus a few cents of cutting and joining.+ expect(shot0.request.params?.clipSeconds).toBe(26);+ expect(shot1.request.params?.clipSeconds).toBe(14);+ const films = seedanceUsd(1280 * 720, 26, 26) + seedanceUsd(1280 * 720, 14, 14);+ expect(plan.costUsd).toBeGreaterThan(films - 0.01);+ expect(plan.costUsd).toBeLessThan(films + 0.1);});it("cloud, H3 Max 3D to video: its own model, 15 s shots, up to 8 stills, no sound, and its processing fee in the price", () => {@@ -269,12 +302,43 @@ describe("planning a blockout", () => {expect(planCinema(film("cloud", { seconds: 3 }, { modelId: "minimax-h3-max-3d" }), ctx).costUsd).toBeCloseTo(5 * 0.08 + 0.5, 3);const long = planCinema(film("cloud", { seconds: 20 }, { modelId: "minimax-h3-max-3d" }), ctx);expect(long.steps.filter((s) => s.key.startsWith("shot")).map((s) => s.request.params?.duration)).toEqual([6, 14]);+ // No shot is cut under the 5 s H3 bills anyway: 16 s is 11 + 5, not 14 + 2.+ const sixteen = planCinema(film("cloud", { seconds: 16, beats: [{ start: 0, label: "All" }] }, { modelId: "minimax-h3-max-3d" }), ctx);+ expect(sixteen.steps.filter((s) => s.key.startsWith("shot")).map((s) => s.request.params?.duration)).toEqual([11, 5]);+ expect(plan.notes.join(" ")).toMatch(/at least 5 s, and counts every camera cut inside an uploaded render as a shot/);expect(long.steps.find((s) => s.key === "shot1")!.request.chain).toEqual([{ slot: "video", position: "first" },{ slot: "images", position: "last" },]);});+ it("cloud, H3 Max 3D to video: an edited prompt over 2000 characters is refused before it is sent", () => {+ const h3 = (prompt: string) => planCinema(film("cloud", { seconds: 10 }, { modelId: "minimax-h3-max-3d", prompt }), ctx);+ expect(h3("x".repeat(2000)).blocker).toBeUndefined();+ expect(h3("x".repeat(2000)).steps[0].request.prompt).toHaveLength(2000);+ expect(h3("x".repeat(5000)).blocker).toMatch(/up to 2000 characters, and yours has 5000/);+ // Seedance has no such limit, and a many-shot H3 film compiles each shot's own prompt.+ expect(planCinema(film("cloud", {}, { prompt: "x".repeat(5000) }), ctx).blocker).toBeUndefined();+ expect(planCinema(film("cloud", { seconds: 20 }, { modelId: "minimax-h3-max-3d", prompt: "x".repeat(5000) }), ctx).blocker).toBeUndefined();+ });++ it("cloud, H3 Max 3D to video: with no stills it draws two references of its own, priced", () => {+ const bare = planCinema(film("cloud", { seconds: 12, refs: [] }, { modelId: "minimax-h3-max-3d" }), ctx);+ expect(bare.costUsd).toBeCloseTo(12 * 0.08 + 0.5 + 2 * 0.1, 3);+ expect(bare.notes.join(" ")).toMatch(/With no stills, MiniMax H3 Max 3D to video draws up to 2 references of its own \(\$0\.10 each, in the price\)/);+ // A later shot carries the hand-over frame, so only the first draws its own.+ const two = planCinema(film("cloud", { seconds: 20, refs: [] }, { modelId: "minimax-h3-max-3d" }), ctx);+ expect(two.costUsd).toBeCloseTo(6 * 0.08 + 14 * 0.08 + 2 * 0.5 + 2 * 0.1, 1);+ const m = getModel("minimax-h3-max-3d")!;+ expect(estimateCost(m, { resolution: "768P", duration: 10, drawnRefs: 2 }, 1, "v2v")).toBeCloseTo(10 * 0.08 + 0.5 + 0.2, 3);+ });++ it("cloud: a WebM blockout is refused on Seedance 2.5, which takes MP4 or MOV", () => {+ expect(planCinema(film("cloud", { webm: true }), ctx).blocker).toMatch(/takes MP4 or MOV blockouts, and this one is WebM/);+ expect(planCinema(film("cloud", { webm: true, seconds: 12 }, { modelId: "minimax-h3-max-3d" }), ctx).blocker).toBeUndefined();+ expect(planCinema(film("open", { webm: true }), ctx).blocker).toBeUndefined();+ });+it("open: the first frame from the references, then depth windows chained by their last frame and joined, free", () => {const plan = planCinema(film("open", { depth: DEPTH, firstFrame: FRAME }), ctx);expect(plan.blocker).toBeUndefined();@@ -292,6 +356,12 @@ describe("planning a blockout", () => {expect(step("last0").request).toMatchObject({ modelId: "oss-extract-frame", op: "frame", chain: [{ slot: "video" }] });expect(step("join").request).toMatchObject({ modelId: "oss-join-encoded", op: "concat" });expect(plan.notes.join(" ")).toMatch(/not the dialogue or sound: add sound afterwards with Sound for video/);+ expect(step("win0").request.params?.extra).toBeUndefined();+ // A near = dark pass (Blender's mist) is inverted by the graph in every window.+ const mist = planCinema(film("open", { depth: DEPTH, firstFrame: FRAME, depthInvert: true }), ctx);+ for (const k of ["win0", "win1"]) expect(mist.steps.find((s) => s.key === k)!.request.params?.extra).toEqual({ invertDepth: true });+ // Without a depth pass there is nothing to invert.+ expect(planCinema(film("open", { depthInvert: true }), ctx).steps.find((s) => s.key === "win0")!.request.params?.extra).toBeUndefined();});it("open: an upload without depth reads it with Depth Anything 3 and cuts its own first frame", () => {@@ -350,6 +420,28 @@ describe("the hosted models and the graph", () => {expect(workflow["32"].inputs.image).toEqual(["3", 0]);expect(workflow["26"].inputs.audio).toBeUndefined();expect(Object.values(workflow).some((n) => /^DA3/.test(n.class_type))).toBe(false);+ // The depth goes to VACE through a switch: as it is by default, inverted for a near = dark pass.+ expect(workflow["33"].inputs["images.image1"]).toEqual(["43", 0]);+ expect(workflow["43"]).toMatchObject({ class_type: "ComfySwitchNode", inputs: { switch: ["41", 0], on_false: ["32", 0], on_true: ["42", 0] } });+ expect(workflow["42"]).toMatchObject({ class_type: "ImageInvert", inputs: { image: ["32", 0] } });+ expect(workflow["41"].inputs.value).toBe(false);+ const inverted = await prepareWorkflow(+ "video-blockout-wan22-fun-vace",+ { prompt: "She walks", images: ["first.png"], video: "mist.webm", aspectRatio: "16:9", resolution: "480p", duration: 81 / 16, extra: { invertDepth: true } },+ { generationId: "gen-c", op: "v2v", upload: async (_d, _t, name) => name },+ );+ expect(inverted.workflow["41"].inputs.value).toBe(true);+ });++ it("Seedance 2.5 is priced by fal's token formula: input and output seconds, 0.6 times with reference clips, per resolution", () => {+ const m = getModel("seedance-2-5")!;+ // fal's own worked examples (bytedance/seedance-2.5/reference-to-video, read 2026-11-01).+ expect(estimateCost(m, { duration: 10, resolution: "720p" }, 1, "ref2v")).toBeCloseTo(4.62, 2);+ expect(estimateCost(m, { duration: 10, resolution: "720p", clipSeconds: 8 }, 1, "ref2v")).toBeCloseTo(4.99, 2);+ expect(estimateCost(m, { duration: 30, resolution: "720p", clipSeconds: 10 }, 1, "ref2v")).toBeCloseTo(11.09, 2);+ // No floor: a short clip bills its own seconds, not twice the output.+ expect(estimateCost(m, { duration: 10, resolution: "480p", clipSeconds: 2 }, 1, "ref2v")).toBeCloseTo(seedanceUsd(864 * 496, 2, 10), 3);+ expect(estimateCost(m, { duration: 5, resolution: "1080p" }, 1, "t2v")).toBeCloseTo((1920 * 1080 * 5 * 24) / 1024 / 1000 * 0.0234, 3);});});@@ -374,6 +466,33 @@ describe("Cinema API: a blockout in demo mode", () => {expect(gens.getGeneration(out.items[0].id)!.provider).toBe("mock");});+ it("films an upload at the length its file says, and refuses a WebM blockout on Seedance 2.5", async () => {+ const p = cinema.createProject({ name: "Lengths" });+ const clip = (ext: "mp4" | "webm", seconds: number) => {+ const out = path.join(dir, `clip-${seconds}.${ext}`);+ const codec = ext === "mp4" ? ["-pix_fmt", "yuv420p", "-c:v", "libx264"] : ["-c:v", "libvpx", "-b:v", "200k"];+ execFileSync("ffmpeg", ["-v", "error", "-y", "-f", "lavfi", "-i", `testsrc=size=320x180:rate=24`, "-t", String(seconds), ...codec, out]);+ return saveFile({ data: fs.readFileSync(out), contentType: `video/${ext}`, name: `greybox.${ext}`, source: "upload" }).url;+ };+ // The browser said 8 s (a clip it couldn't read); the file is 40 s: two shots, and the take says 40.+ const long = clip("mp4", 40);+ const res = await generateRoute.POST(json({ input: film("cloud", { video: long, seconds: 8, beats: [{ start: 0, label: "All" }], refs: [] }) }), params(p.id));+ expect(res.status).toBe(201);+ const out = (await res.json()) as { items: { id: string; op: string }[] };+ expect(out.items.filter((g) => g.op === "ref2v")).toHaveLength(2);+ expect(cinema.listItems(p.id)[0].take?.blockout?.seconds).toBeCloseTo(40, 1);+ // Assist reads the same header.+ const tools = await import("@/server/assist/tools");+ expect(tools.planFor("blockout_film", { video: long, seconds: 8, beats: [{ start: 0, label: "All" }] }, { engine: "cloud" }).jobs.filter((j) => j.op === "ref2v")).toHaveLength(2);+ // A WebM file, whatever the browser said, is refused on Seedance 2.5 before anything runs.+ const webm = clip("webm", 3);+ const refused = await generateRoute.POST(json({ input: film("cloud", { video: webm, seconds: 3, refs: [] }) }), params(p.id));+ expect(refused.status).toBe(422);+ expect(((await refused.json()) as { error: string }).error).toMatch(/takes MP4 or MOV blockouts, and this one is WebM/);+ const h3 = await generateRoute.POST(json({ input: film("cloud", { video: webm, seconds: 3, refs: [] }, { modelId: "minimax-h3-max-3d" }) }), params(p.id));+ expect(h3.status).toBe(201);+ });+it("refuses a blockout from outside Fuobe's files, and one past 60 s", async () => {const p = cinema.createProject({ name: "Bad" });for (const bad of [{ video: "https://evil.test/x.mp4" }, { seconds: 61 }, { refs: [{ url: "/api/files/x.png", role: "villain" }] }]) {@@ -404,7 +523,8 @@ describe("Canvas, the GPU board, Assist and MCP", () => {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"]));+ // An upload without a depth pass runs the restyle graph (Depth Anything 3), so the row needs it too.+ expect(tool.workflows).toEqual(expect.arrayContaining(["video-blockout-wan22-fun-vace", "video-restyle-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({});});diff --git a/tests/e2e/cinema-blockout.mjs b/tests/e2e/cinema-blockout.mjsindex 2bef7ac3..81bc4e1b 100644--- a/tests/e2e/cinema-blockout.mjs+++ b/tests/e2e/cinema-blockout.mjs@@ -69,9 +69,10 @@ async function open(ctx, engine, query = "") {await ctx.addInitScript((e) => localStorage.setItem("fuobe.engine", e), engine);await hideDevBadge(ctx);const page = await ctx.newPage();- // The app sidebar's hydration mismatch on the open engine at desktop width is the base branch's (it shows on /cinema- // with no blockout at all, 2026-11-01); everything else counts.- page.on("pageerror", (e) => !/^Hydration failed/.test(e.message) && errors.push(e.message));+ // The app sidebar's hydration mismatch at desktop width (its Suspense fallback, ViewerRowPlaceholder) is the base+ // branch's: it shows on /image and on /cinema with no blockout at all (2026-11-01). Any other mismatch counts.+ const known = (m) => /^Hydration failed/.test(m) && /ViewerRowPlaceholder/.test(m) && !/Blockout/.test(m);+ page.on("pageerror", (e) => !known(e.message) && errors.push(e.message));await page.goto(`${app}/cinema/${project.id}${query}`, { waitUntil: "load", timeout: 120_000 });return page;}@@ -99,6 +100,13 @@ try {assert.ok(await builder.getByText(/Through the shot camera/).isVisible());await builder.getByRole("tab", { name: "Camera" }).click();assert.equal(await builder.getByRole("list", { name: "Camera keys" }).getByRole("listitem").count(), 3, "the example's three camera keys");+ step("frame the camera from the keyboard: a typed value keys it at the playhead");+ const camX = builder.getByRole("group", { name: "Camera (m)" }).getByLabel("x", { exact: true });+ await camX.fill("0.5");+ await camX.press("Tab");+ assert.equal(await builder.getByRole("list", { name: "Camera keys" }).getByRole("listitem").count(), 4, "a fourth key, typed");+ await builder.getByRole("button", { name: /^Remove the key at 1\.[23] s$/ }).click();+ assert.equal(await builder.getByRole("list", { name: "Camera keys" }).getByRole("listitem").count(), 3);await builder.getByRole("tab", { name: "Build" }).click();await builder.getByRole("button", { name: "Box", exact: true }).click();await builder.getByRole("tab", { name: "Piece" }).click();@@ -130,6 +138,12 @@ try {for (const h of ["Subject:", "Action:", "Camera:", "Style:", "Constraints:", "Audio:"]) assert.ok(prompt.includes(h), h);assert.match(prompt, /0\.0–4\.5s — Arrival: A woman walks slowly/);assert.match(await panel.getByText(/^≈ \$|Placeholder/).first().innerText(), /\$|Placeholder/);+ step("MiniMax H3 Max 3D: the prompt box stops at 2000 characters");+ await panel.getByRole("radio", { name: /MiniMax H3 Max 3D/ }).click();+ assert.equal(await panel.getByLabel("Compiled prompt").getAttribute("maxlength"), "2000");+ assert.match(await panel.locator("#blockout-prompt-count").innerText(), /\/ 2000 characters/);+ await panel.getByRole("radio", { name: /Seedance 2\.5/ }).click();+ assert.equal(await panel.locator("#blockout-prompt-count").count(), 0);await shoot(page, "1-panel-ready-1440-light");await noSideScroll(page, "the ready panel");await panel.getByRole("button", { name: "Film it" }).click();@@ -160,6 +174,13 @@ try {await panel.locator('input[type=file][accept^="video/"]').first().setInputFiles(clip);await panel.getByText("greybox.mp4").waitFor({ timeout: 60_000 });await panel.getByText(/no depth pass: Depth Anything 3 reads it on your GPU/).waitFor();+ step("a near = dark depth pass (Blender's mist), inverted");+ const mist = path.join(tmp, "mist.mp4");+ execFileSync("ffmpeg", ["-v", "error", "-y", "-f", "lavfi", "-i", "gradients=size=640x360:rate=16", "-t", "6", "-pix_fmt", "yuv420p", "-c:v", "libx264", mist]);+ await panel.locator('input[type=file][accept^="video/"]').nth(1).setInputFiles(mist);+ await panel.getByText(/with its depth/).waitFor({ timeout: 60_000 });+ assert.ok(await panel.getByText(/near is bright, far is dark/).isVisible());+ await panel.getByLabel(/Near is dark/).check();await panel.getByLabel("What happens in beat 1").fill("A man creeps along the wall.");await panel.getByRole("button", { name: "Beat", exact: true }).click();await panel.getByLabel("Beat 2 name").fill("Lights out");@@ -174,7 +195,22 @@ try {return list.length >= 4 && list;}, "the open engine's steps");const models = runs.map((g) => g.request.modelId);- for (const m of ["oss-extract-frame", "oss-qwen-edit", "oss-segment", "oss-wan22-vace-restyle"]) assert.ok(models.includes(m), m);+ for (const m of ["oss-extract-frame", "oss-qwen-edit", "oss-segment", "oss-wan22-vace-blockout"]) assert.ok(models.includes(m), m);+ const win = runs.find((g) => g.request.modelId === "oss-wan22-vace-blockout");+ assert.equal(win.request.params?.extra?.invertDepth, true, "the mist pass is inverted");+ await ctx.close();+ }+ {+ step("the GPU board's link: /cinema?blockout=1 asks for the project and opens Blockout to film in it");+ const ctx = await browser.newContext({ ...DESKTOP, colorScheme: "light" });+ await hideDevBadge(ctx);+ const page = await ctx.newPage();+ page.on("pageerror", (e) => !(/^Hydration failed/.test(e.message) && /ViewerRowPlaceholder/.test(e.message)) && errors.push(e.message));+ await page.goto(`${app}/cinema?blockout=1`, { waitUntil: "load", timeout: 120_000 });+ await page.getByText(/Blockout to film: pick the project to film it in/).waitFor({ timeout: 60_000 });+ await page.getByRole("link", { name: /Blockout check/ }).first().click();+ await page.getByRole("dialog", { name: "Blockout to film" }).waitFor({ timeout: 90_000 });+ assert.match(page.url(), /\?blockout=1$/);await ctx.close();}for (const scheme of ["light", "dark"]) {diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.jsonindex 8120c38e..7897da38 100644--- a/workflows/comfyui/manifest.json+++ b/workflows/comfyui/manifest.json@@ -13464,6 +13464,12 @@"input": "strength"}],+ "invertDepth": [+ {+ "node": "41",+ "input": "value"+ }+ ],"filenamePrefix": [{"node": "27",@@ -13536,7 +13542,7 @@"vramGb": 24,"license": "Apache-2.0 (Wan 2.2 Fun VACE, lightx2v)","validated": true,- "notes": "Cinema's Blockout on your GPU: the browser renders the grey box and its depth (near = bright, as Depth Anything draws it) at 16 fps; video-segment-resample cuts the depth into 81-frame windows that overlap by one frame; qwen-image-edit-2511 draws the first frame from the grey box's first frame and up to two references; each window runs this graph with the first frame (window 1) or the last frame of the window before (frame-extract), then video-concat-encoded joins them. The same graph as video-restyle-wan22-fun-vace without Depth Anything 3: control frame 0 = the first frame (kept), frames 1..N-1 = the depth video as it is; the first frame is also the VACE reference. Lightx2v 4 steps. Silent (no audio input): sound comes afterwards (Sound for video). A blockout uploaded without a depth pass runs video-restyle-wan22-fun-vace instead (Depth Anything 3 on the grey box)."+ "notes": "Cinema's Blockout on your GPU: the browser renders the grey box and its depth (near = bright, as Depth Anything draws it) at 16 fps; video-segment-resample cuts the depth into 81-frame windows that overlap by one frame; qwen-image-edit-2511 draws the first frame from the grey box's first frame and up to two references; each window runs this graph with the first frame (window 1) or the last frame of the window before (frame-extract), then video-concat-encoded joins them. The same graph as video-restyle-wan22-fun-vace without Depth Anything 3: control frame 0 = the first frame (kept), frames 1..N-1 = the depth video, near = bright (invertDepth: true runs it through ImageInvert first, for a near = dark pass such as Blender's mist; ComfySwitchNode picks); the first frame is also the VACE reference. Lightx2v 4 steps. Silent (no audio input): sound comes afterwards (Sound for video). A blockout uploaded without a depth pass runs video-restyle-wan22-fun-vace instead (Depth Anything 3 on the grey box)."},{"id": "mixed-media-zimage-frames",diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.jsonindex d92c1009..029e561c 100644--- a/workflows/comfyui/requirements.json+++ b/workflows/comfyui/requirements.json@@ -1,6 +1,6 @@{"v": 1,- "hash": "95903a5b63f80115e93c98541542a1dc592c86908cd759f868507bb2c15d8761",+ "hash": "05635e7d1cc68c79ce550e0cadbfb49fcad04c69fc7686fda65220c2b7870d4c","comfyui": {"min":"0.42.0","testedCommit":"5841c187"},"folders": ["audio_encoders","background_removal","checkpoints","clip_vision","dbs","diffusion_models","facerestore_models","foley","frame_interpolation","geometry_estimation","insightface","latent_upscale_models","loras","mmaudio","model_patches","optical_flow","text_encoders","thinksound","upscale_models","vae"],"sentinels": ["AILab_Qwen3ASRSubtitle","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","CFGOverride","ClothesSegment","ComfyMathExpression","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3SLAAttention","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","Ideogram4Scheduler","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","QwenImage21Cache","RIFE VFI","RMBG","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader"],@@ -356,7 +356,7 @@"video-append-endcard": {"core":["AudioConcat","ComfyMathExpression","ConcatenateVideo","CreateVideo","EmptyAudio","ImageScale","LoadAudio","LoadImage","LoadVideo","PrimitiveFloat","PrimitiveInt","RepeatImageBatch","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},"video-bg-remove-birefnet": {"core":["CreateVideo","GetVideoComponents","InvertMask","JoinImageWithAlpha","LoadBackgroundRemovalModel","LoadVideo","MaskToImage","RemoveBackground","SaveVideo","SaveWEBM"],"packs":{},"files":["background_removal/birefnet.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},"video-bg-remove-sam3": {"core":["CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","GetVideoComponents","InvertMask","JoinImageWithAlpha","LoadVideo","MaskToImage","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","SaveWEBM"],"packs":{},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[],"validated":true},- "video-blockout-wan22-fun-vace": {"core":["BatchImagesNode","CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","GetVideoComponents","ImageFromBatch","ImageScale","ImageToMask","KSamplerAdvanced","LoadImage","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveInt","RepeatImageBatch","SaveVideo","SolidMask","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanVaceToVideo"],"packs":{},"files":["diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},+ "video-blockout-wan22-fun-vace": {"core":["BatchImagesNode","CLIPLoader","CLIPTextEncode","ComfyMathExpression","ComfySwitchNode","CreateVideo","GetVideoComponents","ImageFromBatch","ImageInvert","ImageScale","ImageToMask","KSamplerAdvanced","LoadImage","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveBoolean","PrimitiveInt","RepeatImageBatch","SaveVideo","SolidMask","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanVaceToVideo"],"packs":{},"files":["diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},"video-character-swap-h3": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","ImageFromBatch","ImageScale","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3SigmaShift","ModelAttentionBackend","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","SelectCLIPDevice","UNETLoader","VAELoader","Video Slice"],"packs":{"h3_character_swap":["H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/h3_character_swap_v1.5.safetensors","loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":["loras/h3_character_swap_pro4500_1000.safetensors"],"vramGb":24,"isolated":false,"firstRun":[]},"video-character-swap-h3-relay": {"core":["BasicScheduler","CFGGuider","CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EndLoop","GetImageSize","ImageFromBatch","KSamplerSelect","LTXVSeparateAVLatent","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3AddGuide","MiniMaxH3ReferenceToVideo","MiniMaxH3SigmaShift","ModelAttentionBackend","RandomNoise","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SamplerCustomAdvanced","SaveVideo","SelectCLIPDevice","StartLoop","UNETLoader","VAEDecode","VAEEncode","VAELoader","Video Slice"],"packs":{"h3-relay":["H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/h3_character_swap_v1.5.safetensors","loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":["loras/h3_character_swap_pro4500_1000.safetensors"],"vramGb":24,"isolated":false,"firstRun":[]},"video-character-swap-h3-segment": {"core":["BasicScheduler","CFGGuider","CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EndLoop","GetImageSize","GetVideoComponents","ImageFromBatch","ImageScale","KSamplerSelect","LTXVSeparateAVLatent","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3AddGuide","MiniMaxH3ReferenceToVideo","MiniMaxH3SigmaShift","ModelAttentionBackend","RandomNoise","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SamplerCustomAdvanced","SaveVideo","SelectCLIPDevice","StartLoop","UNETLoader","VAEDecode","VAEEncode","VAELoader","Video Slice"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_VideoCombine"],"h3-relay":["H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/h3_character_swap_v1.5.safetensors","loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":["loras/h3_character_swap_pro4500_1000.safetensors"],"vramGb":24,"isolated":false,"firstRun":[]},diff --git a/workflows/comfyui/video-blockout-wan22-fun-vace.json b/workflows/comfyui/video-blockout-wan22-fun-vace.jsonindex c57e1f3c..5dd5184a 100644--- a/workflows/comfyui/video-blockout-wan22-fun-vace.json+++ b/workflows/comfyui/video-blockout-wan22-fun-vace.json@@ -398,7 +398,7 @@0],"images.image1": [- "32",+ "43",0]},@@ -496,5 +496,46 @@"_meta": {"title": "ImageToMask"}+ },+ "41": {+ "class_type": "PrimitiveBoolean",+ "inputs": {+ "value": false+ },+ "_meta": {+ "title": "near is dark (a Blender mist pass): invert the depth"+ }+ },+ "42": {+ "class_type": "ImageInvert",+ "inputs": {+ "image": [+ "32",+ 0+ ]+ },+ "_meta": {+ "title": "ImageInvert"+ }+ },+ "43": {+ "class_type": "ComfySwitchNode",+ "inputs": {+ "switch": [+ "41",+ 0+ ],+ "on_false": [+ "32",+ 0+ ],+ "on_true": [+ "42",+ 0+ ]+ },+ "_meta": {+ "title": "the depth as near = bright"+ }}}