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
Merge branch 'r4/video-finish' into claude/fuobe-parity-4
Claude896c39bf0604
diff --cc scripts/comfy/build-library.mjsindex 2919c2b4,a595fd99..44716a7d--- a/scripts/comfy/build-library.mjs+++ b/scripts/comfy/build-library.mjs@@@ -86,8 -86,8 +86,10 @@@ const NUMERIC_DEFAULT_KEYS =// comfyui-oss-4 additions'maskGrow', 'supersample', 'zoomStart', 'zoomEnd', 'panStartX', 'panStartY', 'panEndX', 'panEndY', 'easeInOut', 'chunkFrames','crossfade', 'headroomDb', 'peakNits', 'resolutionLevel', 'fovX', 'decimation', 'numGaussians', 'orbitFrames', 'frameWidth',+ // round 4 (engine seams)+ 'filterSpeckle', 'colorPrecision',+ // round 4 (r4/video-finish)+ 'every', 'slowdown', 'shortSide',];export const BINDING_KEYS = new Set(['prompt', 'negativePrompt', 'image', 'image2', 'image3', 'image4', 'mask', 'endImage', 'video', 'audio',@@@ -110,10 -110,8 +112,12 @@@'maskPrompt', 'maskGrow', 'skipPass2', 'supersample', 'zoomStart', 'zoomEnd', 'panStartX', 'panStartY', 'panEndX', 'panEndY','easeInOut', 'chunkFrames', 'crossfade', 'headroomDb', 'fadeCurve', 'format', 'profile', 'peakNits', 'resolutionLevel', 'fovX','decimation', 'cutout', 'numGaussians', 'splatFormat', 'orbitFrames', 'frameWidth',+ // round 4 (engine seams, see library.spec.mjs header)+ 'curveMode', 'filterSpeckle', 'colorPrecision',+ // remove-object package (round 4)+ 'colormap', 'sideBySide',+ // round 4 (r4/video-finish): FPS Boost to exact targets, chunked upscaling, HDR10 (PQ)+ 'every', 'slowdown', 'shortSide', 'colorSpace',]);const readJson = (p, fallback) => (fs.existsSync(p) ? JSON.parse(fs.readFileSync(p, 'utf8')) : fallback);diff --cc scripts/comfy/library.spec.mjsindex 1fdb8bbd,a2bf7b94..e664c35b--- a/scripts/comfy/library.spec.mjs+++ b/scripts/comfy/library.spec.mjs@@@ -73,16 -73,16 +73,22 @@@// cutout, numGaussians, splatFormat (TripoSplat: BiRefNet cut-out on/off, number of Gaussians, ply | ksplat | spz)// orbitFrames (TripoSplat orbit preview length in frames)// frameWidth (reference brief: width the clip's frames are scaled to, px)+// Keys added with round 4 (engine seams):+// curveMode, filterSpeckle, colorPrecision (VTracer: spline | polygon | none curves, specks dropped (px), colour precision bits)+// Keys added by the remove-object package (round 4):+// colormap* (Video Depth Anything's colour map: gray | inferno; params.colormap grayscale → gray)+// sideBySide (depth maps: the original clip next to the depth map)+ // Keys added with the round-4 video-finish workflows (FPS Boost, chunked upscaling, HDR formats). * = the provider fills it:+ // every* (FPS Boost: keep every n-th interpolated frame; source fps x multiplier / every = the target)+ // slowdown* (FPS Boost: slow-motion factor, params.slowdown; the output fps is divided by it)+ // shortSide* (chunked upscalers: the output's shorter edge in px, params.resolution: 1080p -> 1080)+ // colorSpace* (SDR to HDR: CreateVideo color space, "HDR" = BT.2020 HLG, "HDR PQ" = BT.2020 PQ (HDR10): params.format)// Output fields beyond {node, kind}: stem ("voice" | "background"), role ("cues" | "transcript" | "language" |// "sheet" | "tiles" | "layers" | "first-frame" | "turntable" | "lines" | "frame" | "frames" | "scene" | "depth" | "splat" |-// "brief"). Entry fields: worker "isolated" (needs its own ComfyUI, see README), expand "captions" (the provider writes one+// "brief" | "mask" (a painted eraser's last tracked frame, white = the object) | "cutout" | "matte" (a matte graph's transparent+// and black-and-white videos: params.matteOutput keeps one)). Entry fields: worker "isolated" (needs its own ComfyUI, see README), expand "captions" (the provider writes one- // segment per caption cue before submitting).+ // segment per caption cue before submitting), optionalModels (files a model control can pick instead of the graph's own,+ // listed in the manifest with optional: true so missing-model help can name their download).import fs from 'node:fs';@@@ -2886,25 -2876,101 +2900,122 @@@ export const SPEC ='startFrame = frames skipped at 24 fps, frameWidth = 384 px wide (about 0.7 GB of frames for 720, inferred). In ComfyUI v0.41 only the Gemma 4 and MiniMax text encoders read a video input ' +'(the Qwen3.5 encoder ignores it). Same model file as speech-translate-gemma4 (no new download). Whether Gemma 4 E4B takes 30 s of audio in one call is unverified. Validated by /prompt only.',},+ // ---- round 4 (engine seams): vectorize -------------------------------------------+ {+ id: 'image-vectorize-vtracer',+ title: 'Image to SVG: VTracer traces the colours into stacked vector shapes (no model)',+ capability: 'vectorize',+ handBuilt: 'hand-built/image-vectorize-vtracer.json',+ bindings: {+ image: [b('1', 'image')],+ curveMode: [b('2', 'mode')],+ filterSpeckle: [b('2', 'filter_speckle')],+ colorPrecision: [b('2', 'color_precision')],+ filenamePrefix: [b('4', 'filename_prefix')],+ },+ outputs: [{ node: '4', kind: 'image' }],+ vramGb: 0,+ license: 'MIT (VTracer, ComfyUI-ToSVG); the pack also imports PyMuPDF (AGPL-3.0) for its SVG-to-image node, which this graph doesn\'t use',+ notes:+ 'The open side of Recraft Vectorize / fal image2svg (the Vectorize app). ComfyUI-ToSVG\'s colour VTracer node (stacked layers, spline curves; curveMode polygon gives straight edges) ' ++ 'returns the SVG as text, TS_SVGStringToSVGBytesIO wraps it and core SaveSVGNode writes fuobe/<id>_*.svg (reported under "images", so the provider collects it as an image output). ' ++ 'filterSpeckle drops specks up to that many pixels, colorPrecision (1-8 bits per channel) sets how many colours are kept. Best on logos, icons and flat art; photos give very many paths. Runs on CPU in about a second.',+ },++ // ---- round 4 (r4/video-finish): FPS Boost to exact targets, chunked upscaling and export, HDR EXR ------------------+ {+ id: 'interpolate-rife-fps',+ title: 'FPS Boost and slow motion to an exact frame rate: interpolate by m, keep every n-th frame (core FrameInterpolate)',+ capability: 'interpolate',+ handBuilt: 'hand-built/interpolate-rife-fps.json',+ bindings: {+ video: [b('1', 'file')], checkpoint: [b('5', 'model_name')], multiplier: [b('6', 'value')], every: [b('8', 'value')], slowdown: [b('10', 'value')],+ },+ outputs: [{ node: '13', kind: 'video' }],+ defaults: { checkpoint: 'rife_v4.26.safetensors' },+ // oss-rife's Model control: FILM for large motion.+ optionalModels: ['film_net_fp16.safetensors'],+ limits: { maxMultiplier: 16 },+ vramGb: 2,+ license: 'RIFE 4.26 and FILM weights from Comfy-Org/frame_interpolation (MIT / Apache-2.0); VideoHelperSuite (GPL-3.0 code) for Select Every Nth',+ notes:+ 'Higgsfield\'s FPS Boost targets (24 / 30 / 60 / 90 / 120 fps) and slow motion on the open engine. The provider picks m (multiplier, 2-16) and n (every) from the clip\'s own frame rate (its header) so that ' ++ 'source fps x m / n = target x slowdown (src/lib/av/fps.ts: 24 -> 30 m5 n4, 24 -> 60 m5 n2, 24 -> 90 m15 n4, 24 -> 120 m5, 30 -> 60 m2, 60 -> 90 m3 n2, 60 -> 120 m2; a target the source rate is a whole multiple of (60 -> 30: m1 n2) only drops frames, ' ++ 'and then the provider links FrameInterpolate out; other lower targets still interpolate (30 -> 24: m4 n5)). The output fps is computed in the graph from the decoded frame rate (source fps x m / (n x slowdown)); m and n need the header\'s rate, so the provider refuses a clip without one rather than guess. ' ++ 'The last frame is held once more before interpolating, so the clip keeps its length (N frames become N x m + 1, about one output frame longer than the source) instead of losing a source frame. ' ++ 'slowdown > 1 stretches the clip (2 = twice as long); the provider then drops the sound link (it would no longer match). checkpoint film_net_fp16.safetensors runs FILM (better on large motion, about 31x slower on CPU). ' ++ 'Holds the whole interpolated clip in memory (the source frames, their copy with the last frame held, and source frames x m; the selection is a view): the provider refuses clips that need more than half the server\'s RAM. ' ++ 'Ran here through Fuobe (CPU, a random-weight RIFE file standing in for the weights): 24 fps 2 s 320x180 -> 60 fps = 121 frames, 2.017 s (m 5, n 2); 25 fps 3 s with sound -> 30 fps at 2x slow motion = 181 frames, 6.03 s, no sound track; 30 fps 2 s with sound -> 24 fps = 49 frames, 2.04 s, sound kept (m 4, n 5).',+ },+ {+ id: 'upscale-video-esrgan-chunked',+ title: 'Video Upscale (Real-ESRGAN 4x) in passes of a few frames: memory stays flat whatever the length (VHS meta-batch)',+ capability: 'upscale-video',+ handBuilt: 'hand-built/upscale-video-esrgan-chunked.json',+ bindings: {+ video: [b('1', 'video')], framesPerBatch: [b('2', 'frames_per_batch')], upscaleModel: [b('3', 'model_name')], shortSide: [b('5', 'resize_type.shorter_size')],+ },+ outputs: [{ node: '7', kind: 'video' }],+ defaults: { shortSide: 1080 },+ limits: { maxWidth: 3840, maxHeight: 3840 },+ vramGb: 4,+ license: 'Real-ESRGAN weights (BSD-3-Clause); VideoHelperSuite GPL-3.0 code',+ notes:+ 'R4-38: upscale-video-esrgan decodes the whole film (about 38 GB of float frames for 30 s at 480p before the 4x model). This one decodes framesPerBatch frames per pass (VHS_BatchManager re-queues the prompt ' ++ 'until the clip is done, as mixed-media-zimage-frames does), upscales them with the model (tiled), scales them so the shorter edge is shortSide px (params.resolution: 1080p -> 1080, the shape kept) and pipes them ' ++ 'into one ffmpeg H.264 encode that stays open across passes; the last pass writes the file with the source\'s sound at the source frame rate. The provider follows the passes by their filename prefix. ' ++ 'framesPerBatch: the provider sizes it from the clip\'s header so a pass holds about 1.5 GB of frames (16 by default). Any spandrel model in models/upscale_models works as upscaleModel (x2 / x4). ' ++ 'Ran here (CPU, a random-weight x4 ESRGAN file standing in for the weights): 30 s 256x144 25 fps with sound -> 1920x1080, 750 frames, AAC, 47 passes of 16 frames in 417 s, ComfyUI\'s RSS peaked 0.87 GB above idle (upscale-video-esrgan on 10 s of the same clip, 4x to 1024x576 only, peaked 3.0 GB above idle); through Fuobe a silent 2 s 24 fps clip -> 1280x720, 48 frames, no audio link.',+ },+ {+ id: 'upscale-video-seedvr2-chunked',+ title: 'Video Upscale / Restore (SeedVR2 3B int8) in passes of 4n+1 frames: memory stays flat (VHS meta-batch)',+ capability: 'upscale-video',+ handBuilt: 'hand-built/upscale-video-seedvr2-chunked.json',+ bindings: {+ video: [b('1', 'video')], framesPerBatch: [b('2', 'frames_per_batch')], shortSide: [b('3', 'resize_type.shorter_size')], seed: [b('9', 'seed')],+ },+ outputs: [{ node: '13', kind: 'video' }],+ defaults: { shortSide: 1080 },+ limits: { maxWidth: 3840, maxHeight: 3840 },+ vramGb: 16,+ license: 'SeedVR2 (Apache-2.0); VideoHelperSuite GPL-3.0 code',+ notes:+ 'The native SeedVR2 nodes of upscale-video-seedvr2 (same files, same settings) run on framesPerBatch frames per pass (33 by default; SeedVR2 pads a pass to 4n+1 frames and crops the padding back) and the ' ++ 'passes are piped into one H.264 encode with the source\'s sound, so a long clip no longer needs the whole film in memory (the template is capped at 20 s). The frames are first scaled so the shorter edge is ' ++ 'shortSide px. Each pass is restored on its own: there is no temporal context across a pass boundary, so a seam every framesPerBatch frames is possible (not measured: no GPU here). Validated by /prompt only.',+ },+ {+ id: 'video-export-pro-chunked',+ title: 'Pro codec export in passes (ProRes 422 HQ / 4444, H.265 10-bit, FFV1, H.264): memory stays flat (VHS meta-batch)',+ capability: 'export-video',+ handBuilt: 'hand-built/video-export-pro-chunked.json',+ bindings: { video: [b('1', 'video')], framesPerBatch: [b('2', 'frames_per_batch')], format: [b('4', 'format')], profile: [b('4', 'profile')] },+ outputs: [{ node: '4', kind: 'video' }],+ defaults: { format: 'video/ProRes', profile: 'hq' },+ vramGb: 0,+ license: 'n/a (no model; VideoHelperSuite GPL-3.0 code and the system ffmpeg\'s prores_ks / libx265 / ffv1 / libx264 encoders)',+ notes:+ 'video-export-pro with VHS_LoadVideo decoding framesPerBatch frames per pass (64 by default) into one VHS_VideoCombine encode that stays open across passes, at the source frame rate, with the source\'s sound: ' ++ 'the export Fuobe\'s Export mode runs (video-export-pro decodes the whole clip). Same params.format mapping (prores_422_hq -> video/ProRes + hq, prores_4444 -> + 4444, h265_10bit -> video/h265-mp4 (yuv420p10le), ' ++ 'ffv1 -> video/ffv1-mkv, h264 -> video/h264-mp4; exr -> video-export-exr). VHS lists only <prefix>_00001-audio.<ext> when the clip has sound, <prefix>_00001.<ext> otherwise, on the last pass. ' ++ 'Caveat: VHS\'s ProRes "hq" profile leaves the pixel format to prores_ks, which picks yuv444p10le for the RGB frames, so "ProRes 422 HQ" is the HQ profile (apch) carrying 4:4:4 10-bit samples ' ++ '(FFmpeg decodes it; a strict 4:2:2 file needs a VHS format with -pix_fmt yuv422p10le, which would be a change to the node pack). The same holds for video-export-pro. ' ++ 'Ran here (CPU, r4/video-finish, 3 s 320x180 25 fps clip with sound): ProRes apch / yuv444p10le / PCM and H.265 Main 10 yuv420p10le with AAC; on a silent 2 s 24 fps clip FFV1 gbrap16le .mkv, 48 of 48 frames; each ffprobe-checked.',+ },+ {+ id: 'video-sdr-to-hdr-exr',+ title: 'SDR to HDR as OpenEXR frames (scene-linear Rec.2020, half float) plus a 10-bit HLG preview (core, no model)',+ capability: 'sdr-to-hdr',+ handBuilt: 'hand-built/video-sdr-to-hdr-exr.json',+ bindings: { video: [b('1', 'file')], peakNits: [b('3', 'algorithm.target_luminance')] },+ outputs: [{ node: '6', kind: 'video', role: 'preview' }, { node: '4', kind: 'image', role: 'frames' }],+ vramGb: 0,+ license: 'n/a (no model; ComfyUI core)',+ notes:+ 'params.format exr of the sdr-to-hdr operation (Higgsfield\'s "EXR 16-bit: uncompressed frame sequence for compositing"). The same ImageSDRToHDR expansion as video-sdr-to-hdr; SaveImageAdvanced writes each ' ++ 'frame as a half-float EXR with input_color_space HDR, i.e. the inverse HLG curve: scene-linear light in Rec.2020 primaries, highlights above 1.0 kept. Node 6 saves the 10-bit HLG MP4 with the clip\'s sound as ' ++ 'the result to watch (role preview); the provider zips the frames (role frames) onto it as meta.artifacts.exr. Decodes the whole clip: RAM grows with the length (the provider refuses what the server can\'t hold). ' ++ 'Ran here through Fuobe (CPU, 2 s 160x96 30 fps clip with sound): 60 half-float EXR frames zipped onto an H.264 High 10 HLG (arib-std-b67, bt2020) preview with AAC.',+ },];diff --cc scripts/comfy/validation-state.jsonindex da072c0e,5e2b32c8..c6642980--- a/scripts/comfy/validation-state.json+++ b/scripts/comfy/validation-state.json@@@ -203,6 -197,12 +203,12 @@@"error": null,"at": "2026-10-23T00:12:15.716Z"},+ "interpolate-rife-fps": {+ "sha256": "ae2495e1eacc960f6d6b95beae519e4ba1c8017a3143c835cdd77613a365721e",+ "validated": true,+ "error": null,- "at": "2026-10-23T01:07:05.668Z"++ "at": "2026-10-23T22:48:21.986Z"+ },"interpolate-rife-vfi": {"sha256": "bec30ae2655d256ad465f02fb5249b7a6ec08c57cd3d6ca2f5425428f1f6f95c","validated": true,@@@ -497,12 -497,24 +503,24 @@@"error": null,"at": "2026-10-16T20:57:26.837Z"},+ "upscale-video-esrgan-chunked": {+ "sha256": "23ca663fd29770482d2c018f97f02966f4540e279e87c2ddf44647f345628cc3",+ "validated": true,+ "error": null,- "at": "2026-10-23T01:07:05.820Z"++ "at": "2026-10-23T22:48:22.275Z"+ },"upscale-video-seedvr2": {"sha256": "42f7ef1d6ab68d53f96a704037fc443fd207b790562da473c747f9f6e14c34fc","validated": true,"error": null,"at": "2026-10-16T20:57:26.825Z"},+ "upscale-video-seedvr2-chunked": {+ "sha256": "c24dd08377b79410406355b72b5b11945f0c1e419ab1bd49228ee31e6b4ac3af",+ "validated": true,+ "error": null,- "at": "2026-10-23T01:07:06.161Z"++ "at": "2026-10-23T22:48:25.649Z"+ },"v2a-hunyuan-foley": {"sha256": "2b6f39b10c3d7bfdef30257682a207b7b89af5f246c38c5aa782de7b3b496359","validated": true,@@@ -603,13 -615,13 +621,13 @@@"sha256": "667f8b59d931311b5081e2407ef53aee0b39a36007cf838ba18b64d5d2681bdc","validated": true,"error": null,- "at": "2026-10-23T00:12:20.436Z"+ "at": "2026-10-23T04:45:42.666Z"},"video-export-exr": {- "sha256": "59de86f898829c9ed60d059d038e3a5b3f5df8fdd675a76579eacaae1526c6a8",+ "sha256": "76efcb75b5995707dc326254ae73cdc806f12714c7543f70511f74f62fd8ca49","validated": true,"error": null,- "at": "2026-10-23T00:12:21.270Z"- "at": "2026-10-23T01:07:05.398Z"++ "at": "2026-10-23T22:48:20.813Z"},"video-export-pro": {"sha256": "94b6ad366376bad9348ddd79e137b012bed54184e7d269cb66952cee5c1d6ca4",@@@ -617,6 -629,12 +635,12 @@@"error": null,"at": "2026-10-23T00:12:21.253Z"},+ "video-export-pro-chunked": {+ "sha256": "dce6e5904a85f48e12c30aa0750934f017bb09237026bd4698c29da2126ab562",+ "validated": true,+ "error": null,- "at": "2026-10-23T01:07:06.349Z"++ "at": "2026-10-23T22:48:26.054Z"+ },"video-extend-wan22-fun-vace": {"sha256": "c6e30d4d5acf5d3d97c59fe02194e4b80fc21278ea0e946547060b80efd70ae0","validated": true,@@@ -675,7 -693,13 +699,13 @@@"sha256": "f51f27af77dd2f61d51553241b15f6b5af14e6c06ff3342b24e810dff3e87f93","validated": true,"error": null,- "at": "2026-10-23T00:12:21.261Z"- "at": "2026-10-23T01:07:05.200Z"++ "at": "2026-10-23T22:48:17.397Z"+ },+ "video-sdr-to-hdr-exr": {+ "sha256": "76b2183fbe97e482526797aa054dae20fc6ca4ee793c245e6957476dc9fa9572",+ "validated": true,+ "error": null,- "at": "2026-10-23T01:07:06.513Z"++ "at": "2026-10-23T22:48:27.080Z"},"video-segment-resample": {"sha256": "957899bf0bd99a4bf9e2407a6149392eccc2ee6d8338088809992025e4d4b45d",diff --cc src/app/api/generations/route.tsindex d032b8ae,d937ded5..d78e48fa--- a/src/app/api/generations/route.ts+++ b/src/app/api/generations/route.ts@@@ -1,7 -1,8 +1,8 @@@import { connection } from "next/server";import { z } from "zod";- import { OPERATION_LABELS } from "@/lib/catalog/types";+ import { FORMAT_INFO } from "@/lib/av/formats";-import type { VideoFormat } from "@/lib/catalog/types";-import { createGenerations, listGenerations } from "@/server/generations";++import { OPERATION_LABELS, type VideoFormat } from "@/lib/catalog/types";+import { createGenerations, listGenerations, outputKind, previewGeneration } from "@/server/generations";import { ensureTrashPurge, listOptionsFrom } from "@/server/library";import { SignatureSchema } from "@/server/palettes";diff --cc src/app/api/status/route.tsindex 32140239,844838ce..5bc0820c--- a/src/app/api/status/route.ts+++ b/src/app/api/status/route.ts@@@ -1,10 -1,9 +1,10 @@@import { connection } from "next/server";import { PROVIDERS } from "@/server/providers";- import { probeComfy } from "@/server/providers/comfyui";+ import { comfyRam, probeComfy } from "@/server/providers/comfyui";-import { getSetting } from "@/server/settings";+import { nothingConnected, type EngineModeName } from "@/lib/connections";+import { getSetting, setSetting } from "@/server/settings";-/** Which providers are usable right now — drives badges and the demo-mode banner. */+/** Which providers are usable right now — drives badges, the demo-mode notice and Home's first-run guide. */export async function GET() {await connection();const comfy = await probeComfy(true);@@@ -11,17 -11,10 +12,18 @@@const providers = Object.fromEntries(Object.values(PROVIDERS).map((p) => [p.id,- { label: p.label, configured: p.id === "comfyui" ? comfy : p.id === "mock" ? true : p.isConfigured() },+ // ComfyUI's RAM: the composer checks the tools that hold a whole clip against it before Generate.+ { label: p.label, configured: p.id === "comfyui" ? comfy : p.id === "mock" ? true : p.isConfigured(), ...(p.id === "comfyui" && ram ? { ramBytes: ram } : {}) },]),);+ const engineMode = getSetting("engineMode") as EngineModeName;+ // The first time something this engine mode generates with is connected, the first-run guide has+ // done its job: remember it, so a ComfyUI that is offline one morning doesn't bring "Get started" back.+ let onboarded = getSetting("onboarded") === "1";+ if (!onboarded && !nothingConnected({ providers, engineMode })) {+ setSetting("onboarded", "1");+ onboarded = true;+ }return Response.json({providers,demoMode: getSetting("demoMode"),diff --cc src/components/home-view.tsxindex 0bf42169,19e46588..6037e25f--- a/src/components/home-view.tsx+++ b/src/components/home-view.tsx@@@ -53,16 -47,16 +53,16 @@@ interface Counts/** Tool tiles. Append one entry per new destination (the grid holds five per row on wide screens). */const tools = (c: Counts) => [- { href: "/cinema", label: "Cinema Studio", desc: "Direct a film shot by shot", icon: Clapperboard, hue: 330 },- { href: "/motions", label: "Camera motions", desc: `${c.motions} director moves`, icon: Film, hue: 280 },- { href: "/effects", label: "Effects", desc: `${c.effects} viral VFX`, icon: Sparkles, hue: 20 },- { href: "/apps", label: "Apps", desc: `${c.apps} one-click tools`, icon: Wand2, hue: 200 },- { href: "/storyboard", label: "Storyboard", desc: "One idea, consistent frames", icon: GalleryHorizontal, hue: 100 },- { href: "/canvas", label: "Canvas", desc: "Chain steps into a flow", icon: Network, hue: 260 },- { href: "/lipsync", label: "Lipsync", desc: "Talking avatars", icon: Mic2, hue: 150 },- { href: "/elements", label: "Elements", desc: "@ characters, places, props", icon: ScanFace, hue: 320 },- { href: "/upscale", label: "Upscale", desc: "Video, FPS, HDR & images", icon: ZoomIn, hue: 240 },- { href: "/audio", label: "Audio", desc: "Voice, SFX, music", icon: AudioLines, hue: 60 },+ { href: "/cinema", label: "Cinema Studio", desc: "Direct a film shot by shot", icon: Clapperboard },+ { href: "/motions", label: "Camera motions", desc: `${c.motions} director moves`, icon: Film },+ { href: "/effects", label: "Effects", desc: `${c.effects} viral VFX`, icon: Sparkles },+ { href: "/apps", label: "Apps", desc: `${c.apps} one-click tools`, icon: Wand2 },+ { href: "/storyboard", label: "Storyboard", desc: "One idea, consistent frames", icon: GalleryHorizontal },+ { href: "/canvas", label: "Canvas", desc: "Chain steps into a flow", icon: Network },+ { href: "/lipsync", label: "Lipsync", desc: "Talking avatars", icon: Mic2 },+ { href: "/elements", label: "Elements", desc: "@ characters, places, props", icon: ScanFace },- { href: "/upscale", label: "Upscale", desc: "Images & video", icon: ZoomIn },++ { href: "/upscale", label: "Upscale", desc: "Video, FPS, HDR & images", icon: ZoomIn },+ { href: "/audio", label: "Audio", desc: "Voice, SFX, music", icon: AudioLines },];/** The latest results as a compact strip of square thumbnails; a tap opens the viewer. */diff --cc src/components/studio/composer.tsxindex 2ead5e7d,09a273c3..30295193--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@@ -2,18 -2,19 +2,20 @@@import { ArrowUp, AtSign, Loader2, Sparkles, X } from "lucide-react";import dynamic from "next/dynamic";+ import Link from "next/link";import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";+import { flushSync } from "react-dom";import { toast } from "sonner";import { Button } from "@/components/ui/button";import { Kbd } from "@/components/ui/kbd";import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";import { estimateCost, planGeneration, routesFor } from "@/lib/catalog/plan";- import type { GenerationRequest, MediaKind, ModelDef, Operation, Preset } from "@/lib/catalog/types";- import { enhance, useCreateGeneration, useElements, useEngine, useHydrated, useStatus } from "@/lib/api";+ import type { GenerationRequest, MediaKind, ModelDef, Operation, Preset, VideoFormat } from "@/lib/catalog/types";+ import { formatsOf } from "@/lib/av/formats";+ import { enhance, useClipFacts, useCreateGeneration, useElements, useEngine, useHydrated, useStatus } from "@/lib/api";import { applyMentions, type StudioElement } from "@/lib/catalog/elements";import { applySketch, stripMotionPaths } from "@/lib/catalog/sketch";- import { blockerFor, blockerLine, costLabel, filterModels, firstMissingSlot, namedImageSlots, needsMask, PLACEHOLDER, promptShown, pushRecent, settingsShape, startStep } from "@/lib/composer";-import { blockerFor, clipBlocker, clipOutcome, costLabel, filterModels, firstMissingSlot, namedImageSlots, PLACEHOLDER, pushRecent, settingsShape, showsPrompt } from "@/lib/composer";++import { blockerFor, blockerLine, clipBlocker, clipOutcome, costLabel, filterModels, firstMissingSlot, namedImageSlots, needsMask, PLACEHOLDER, pushRecent, settingsShape, showsPrompt, startStep } from "@/lib/composer";import { formatCost } from "@/lib/format";import { cn } from "@/lib/utils";import { AttachMenu } from "./attach-menu";@@@ -117,15 -118,10 +119,15 @@@ function pulseSlot(root: HTMLElement |);}+/** An empty attachment tile's upload button (focus it, or click it from a toast action to open the file picker). */+function slotButton(root: HTMLElement | null, key: string) {+ return root?.querySelector<HTMLButtonElement>(`[data-slot-key="${key}"] button[aria-label$=": upload"]`) ?? null;+}+export function Composer({ docked }: { docked: boolean }) {- const { config, draft, setDraft, setSlot } = useStudio();+ const { config, draft: typed, setDraft, setSlot } = useStudio();const catalog = useCatalog();- const [engine, setEngine] = useEngine();+ const [engine, setEngine, engineMode] = useEngine();const create = useCreateGeneration();const [enhancing, setEnhancing] = useState(false);const [focused, setFocused] = useState(false);@@@ -732,26 -715,30 +773,50 @@@</TooltipContent></Tooltip></div>+ <div aria-live="polite">+ {line && blocker && (+ // Focused from the keyboard, it stays (the composer unfolding must not hide what has the focus).+ <p className={cn("px-2 text-[12px] text-muted-foreground", line === "touch" && "[@media(hover:hover)]:hidden [@media(hover:hover)]:focus-within:block")}>+ {blockerSlot ? (+ <button+ type="button"+ // A mouse press would focus the composer and unfold it under the pointer before the click lands.+ onMouseDown={(e) => e.preventDefault()}+ onClick={() => openBlocked(blockerSlot)}+ className="inline-flex min-h-6 items-center text-left underline decoration-border-strong underline-offset-2 hover:text-foreground hover:decoration-current"+ >+ {blocker.message}+ </button>+ ) : (+ <span className="inline-flex min-h-6 items-center">{blocker.message}</span>+ )}+ </p>+ )}+ </div>+ {outcome && (+ <p className="px-2 pt-1 text-[12px] text-muted-foreground tabular-nums" aria-live="polite">+ {outcome}+ </p>+ )}+ {comfyMissing && (+ <div role="note" className="mx-1 mt-2 space-y-1 rounded-xl border border-dashed px-3 py-2 text-[12px] leading-snug text-muted-foreground">+ <p>+ {engineMode === "cloud"+ ? "This install runs paid cloud APIs only (Settings → Engine mode), and no cloud API re-encodes a finished clip: export formats are written by ComfyUI on your own machine."+ : config.comfyOnly!.note}{" "}+ <Link href="/settings" className="font-medium text-brand-text underline-offset-2 hover:underline">+ Open Settings+ </Link>+ </p>+ {alternative && alternativeHref && engineMode !== "open" && (+ <p>+ <Link href={alternativeHref} onClick={() => setEngine("cloud")} className="font-medium text-brand-text underline-offset-2 hover:underline">+ {alternative.label}+ </Link>+ </p>+ )}+ </div>+ )}{sketched.note && <p className="px-2 pt-1 text-[12px] text-muted-foreground">{sketched.note}</p>}{signed.notes.length > 0 && <p className="px-2 pt-1 text-[12px] text-muted-foreground">{signed.notes.join(" · ")}</p>}{model && op && model.options.endFrame === undefined && draft.slots.endImage?.ref && (diff --cc src/components/studio/mode-switch-studio.tsxindex f7570577,05e7f2eb..12217850--- a/src/components/studio/mode-switch-studio.tsx+++ b/src/components/studio/mode-switch-studio.tsx@@@ -5,10 -5,11 +5,12 @@@ importAUDIO_STUDIO,DIALOGUE_STUDIO,FOLEY_STUDIO,+ FPS_BOOST_STUDIO,JOIN_CLIPS_STUDIO,MUSIC_STUDIO,+ SDR_TO_HDR_STUDIO,SFX_STUDIO,+ TRANSCRIBE_STUDIO,TRANSLATE_STUDIO,UPSCALE_STUDIO,VIDEO_COLOR_MATCH_STUDIO,diff --cc src/components/studio/result-media.tsxindex 17835632,2d9b1d35..ac1f576f--- a/src/components/studio/result-media.tsx+++ b/src/components/studio/result-media.tsx@@@ -1,9 -1,11 +1,11 @@@"use client";- import { AudioLines, Box, FileText, Layers } from "lucide-react";+ import { AudioLines, Box, FileText, Film, Layers } from "lucide-react";import { createElement, useEffect, useState } from "react";- import type { Generation, OutputFile } from "@/lib/catalog/types";- import { cuesOf, cueTime, isLayered, layerInfo, modelPreview, textOf, videoPoster } from "@/lib/output-actions";+ import { FORMAT_INFO } from "@/lib/av/formats";+ import type { Generation, OutputFile, VideoFormat } from "@/lib/catalog/types";+ import { extensionOf } from "@/lib/library";-import { cuesOf, cueTime, editOnlyFormat, isLayered, layerInfo, modelPreview, textOf } from "@/lib/output-actions";++import { cuesOf, cueTime, editOnlyFormat, isLayered, layerInfo, modelPreview, textOf, videoPoster } from "@/lib/output-actions";import { cn } from "@/lib/utils";/** Any result as a tile picture: image, video (plays on hover), audio, text card, 3D preview. */@@@ -13,11 -15,9 +15,11 @@@ export function MediaThumb(className,autoPlay,fit,+ tag,+ inset,}: {output: OutputFile;- /** The generation it belongs to (3D models show a sibling turntable or poster; a clip, its start frame as poster). */- /** The generation it belongs to (3D models show a sibling turntable or poster; pro exports a file card). */++ /** The generation it belongs to (3D models show a sibling turntable or poster; a clip, its start frame as poster; pro exports a file card). */g?: Pick<Generation, "outputs"> & Partial<Pick<Generation, "op" | "request">>;className?: string;autoPlay?: boolean;@@@ -30,24 -26,9 +32,10 @@@}) {const object = fit ? "object-contain" : "object-cover";if (output.kind === "video") {+ const pro = editOnlyFormat(g, output);+ if (pro) return <VideoFileCard output={output} format={pro} className={className} />;- return <TileVideo output={output} autoPlay={autoPlay} className={cn("size-full", object, className)} />;+ // With a poster the clip isn't fetched until it plays (a grid of clips no longer loads every one's metadata).- const poster = videoPoster(g, output);- return (- <video- src={`${output.url}#t=0.1`}- poster={poster}- muted- loop- playsInline- preload={poster ? "none" : "metadata"}- autoPlay={autoPlay}- onMouseEnter={(e) => void e.currentTarget.play().catch(() => {})}- onMouseLeave={(e) => {- if (!autoPlay) e.currentTarget.pause();- }}- className={cn("size-full", object, className)}- />- );++ return <TileVideo output={output} poster={videoPoster(g, output)} autoPlay={autoPlay} className={cn("size-full", object, className)} />;}if (output.kind === "audio") {return (@@@ -79,6 -60,42 +67,43 @@@return <img src={output.url} alt="" loading="lazy" decoding="async" className={cn("size-full", object, className)} />;}+ /** A muted tile video that plays on hover; a file card when the browser can't decode it (a 10-bit or HEVC file). */-function TileVideo({ output, autoPlay, className }: { output: OutputFile; autoPlay?: boolean; className?: string }) {++function TileVideo({ output, poster, autoPlay, className }: { output: OutputFile; poster?: string; autoPlay?: boolean; className?: string }) {+ const [failed, setFailed] = useState(false);+ if (failed) return <VideoFileCard output={output} className={className} />;+ return (+ <video+ src={`${output.url}#t=0.1`}++ poster={poster}+ muted+ loop+ playsInline- preload="metadata"++ preload={poster ? "none" : "metadata"}+ autoPlay={autoPlay}+ onError={() => setFailed(true)}+ onMouseEnter={(e) => void e.currentTarget.play().catch(() => {})}+ onMouseLeave={(e) => {+ if (!autoPlay) e.currentTarget.pause();+ }}+ className={className}+ />+ );+ }++ /** A video the browser doesn't play (ProRes, FFV1, some 10-bit files) as what it is: a file for an editor or player. */+ export function VideoFileCard({ output, format, className }: { output: Pick<OutputFile, "url" | "kind">; format?: VideoFormat; className?: string }) {+ const info = format ? FORMAT_INFO[format] : undefined;+ return (+ <div className={cn("flex size-full flex-col items-center justify-center gap-1.5 bg-muted p-4 text-center text-muted-foreground", className)}>+ <Film className="size-7" aria-hidden />+ <span className="text-[13px] font-medium text-foreground">{info?.label ?? "Video file"}</span>+ <span className="max-w-56 text-[12px] leading-snug">+ .{extensionOf(output)} · {info ? "made for your editor; browsers don't play it. Download it to use it" : "this browser can't play it here. Download it to watch"}+ </span>+ </div>+ );+ }+/** A 56 px thumbnail for list rows: media where it reads at that size, an icon where it doesn't. */export function SmallThumb({ g, output }: { g: Generation; output: OutputFile }) {if (output.kind === "audio" || output.kind === "text") {diff --cc src/components/studio/settings-panel.tsxindex d7847960,c5c6dc2e..c2a3e1d3--- a/src/components/studio/settings-panel.tsx+++ b/src/components/studio/settings-panel.tsx@@@ -1,15 -1,14 +1,16 @@@"use client";import { ChevronDown, Loader2, Shuffle, SlidersHorizontal, Sparkles, Wand2 } from "lucide-react";-import { useId, useState } from "react";+import { useId, useMemo, useState } from "react";import { Button } from "@/components/ui/button";import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";import { Switch } from "@/components/ui/switch";- import { OPERATION_LABELS, type GenParams, type ModelDef, type Operation } from "@/lib/catalog/types";- import { colormapLabel, durationLabel, hiddenChanges, MATTE_OUTPUT_LABELS, settingsSummary, videoToolNote, type SettingsShape } from "@/lib/composer";+ import { FORMAT_INFO } from "@/lib/av/formats";+ import { OPERATION_LABELS, type GenParams, type ModelDef, type Operation, type VideoFormat } from "@/lib/catalog/types";-import { durationLabel, formatOf, hiddenChanges, settingsSummary, type SettingsShape } from "@/lib/composer";++import { colormapLabel, durationLabel, formatOf, hiddenChanges, MATTE_OUTPUT_LABELS, settingsSummary, videoToolNote, type SettingsShape } from "@/lib/composer";import { ratioValue } from "@/lib/format";+import { matchSpokenLanguage, spokenLanguageName, spokenLanguageOptions } from "@/lib/speech-languages";import { cn } from "@/lib/utils";import { SliderControls } from "./audio-controls";import { Chip } from "./chip";diff --cc src/components/studio/viewer.tsxindex a6a649aa,7cb7c8cb..d414adff--- a/src/components/studio/viewer.tsx+++ b/src/components/studio/viewer.tsx@@@ -11,20 -12,17 +11,20 @@@ import { Sheet, SheetContent, SheetDescimport { OPERATION_LABELS, type Generation, type OutputFile } from "@/lib/catalog/types";import { formatCost, timeAgo } from "@/lib/format";import { trashDaysLeft, userTitle } from "@/lib/library";- import { isLayered, layerInfo, outputActions, type OutputAction } from "@/lib/output-actions";+ import { editOnlyFormat, isLayered, layerInfo, outputActions, type OutputAction } from "@/lib/output-actions";import { cn } from "@/lib/utils";+import { copyWithToast } from "@/lib/clipboard";import { CompareSlider } from "./compare-slider";import { ACTION_ICONS, downloadUrl, SaveElementForm, useActionRunner } from "./result-actions";- import { LayersStack, ModelViewer, TextReader } from "./result-media";+ import { LayersStack, ModelViewer, TextReader, VideoFileCard } from "./result-media";+import { ReviewSelect } from "@/components/library/review";-function Row({ label, value, mono }: { label: string; value?: React.ReactNode; mono?: boolean }) {+/** One line of the details; `center` lines the label up with a control (the Review picker) instead of a text value's first line. */+function Row({ label, value, mono, center }: { label: string; value?: React.ReactNode; mono?: boolean; center?: boolean }) {if (value === undefined || value === null || value === "") return null;return (- <div className="flex justify-between gap-4 py-1.5 text-[13px]">+ <div className={cn("flex justify-between gap-4 py-1.5 text-[13px]", center && "items-center")}><span className="text-muted-foreground">{label}</span><span className={cn("min-w-0 text-right break-words", mono && "font-mono")}>{value}</span></div>diff --cc src/components/workflows-view.tsxindex af21263e,bd6b1142..940b030e--- a/src/components/workflows-view.tsx+++ b/src/components/workflows-view.tsx@@@ -69,10 -70,10 +70,10 @@@ function WorkflowCard({ wf, usedBy }:<li key={m.file} className="flex min-w-0 items-center gap-2">{m.present === true ? (<CheckCircle2 className="size-3.5 shrink-0 text-success" aria-label="Installed" />- ) : m.present === false ? (+ ) : m.present === false && !m.optional ? (<CircleAlert className="size-3.5 shrink-0 text-warning" aria-label="Missing" />) : (- <Circle className="size-3.5 shrink-0 text-subtle-foreground" aria-label="Unknown" />+ <Circle className="size-3.5 shrink-0 text-muted-foreground" aria-label="Unknown" />)}<span className="min-w-0 truncate font-mono" title={m.file}>{m.file}diff --cc src/lib/catalog/models.tsindex b9ba0840,ee6e458b..4ade24e8--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@@ -1,7 -1,7 +1,8 @@@import { CLOUD_MODELS } from "./cloud-models.generated";import { HIGGSFIELD_MODELS, HIGGSFIELD_ROUTES } from "./higgsfield-models.generated";import { pricingAt } from "./plan";+ import { DEFAULT_FPS_TARGET, FPS_TARGETS, SLOW_MOTION } from "@/lib/av/fps";+import { ASR_LANGUAGES, WHISPER_LANGUAGES } from "../speech-languages";import { LAST_FRAME_CHAIN, type ModelDef, type ModelRoute, type Operation } from "./types";/*diff --cc src/lib/catalog/payload.tsindex 17533268,108f6331..7d4e678e--- a/src/lib/catalog/payload.ts+++ b/src/lib/catalog/payload.ts@@@ -1,5 -1,6 +1,6 @@@import { readTimeline, timelineTracks } from "@/lib/av/timeline";+ import { upscaleFactorFor } from "@/lib/av/upscale";-import { OPERATION_OUTPUT, type DurationField, type EnumField, type FieldMap, type GenInput, type MediaKind, type Operation, type PixelPoint } from "./types";+import { OPERATION_OUTPUT, type DurationField, type EnumField, type FieldMap, type GenInput, type MatteOutput, type MediaKind, type Operation, type PixelPoint } from "./types";function enumValue(field: string | EnumField, value: string): [string, unknown] {if (typeof field === "string") return [field, value];diff --cc src/lib/catalog/types.tsindex e7e40732,c6588bc7..0df76e99--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@@ -219,15 -219,11 +219,17 @@@ export const OPERATION_OUTPUT: Record<O/*** Video codecs and containers an export or HDR job can write (params.format): H.264 MP4, 10-bit H.265* MP4, ProRes 422 HQ or 4444 in a .mov, lossless FFV1 in a .mkv, or a 16-bit EXR frame sequence.+ * The open engine's HDR is also written as 10-bit H.264 in BT.2020 with the HLG or PQ (HDR10) curve+ * (core ComfyUI has no H.265 encoder).*/- export type VideoFormat = "h264" | "h265_10bit" | "prores_422_hq" | "prores_4444" | "ffv1" | "exr";+ export type VideoFormat = "h264" | "h265_10bit" | "prores_422_hq" | "prores_4444" | "ffv1" | "exr" | "hlg_10bit" | "pq_10bit";+/** What Remove background makes: the subject on a transparent background, or its black-and-white alpha mask. */+export type MatteOutput = "cutout" | "matte";++/** Depth map colour maps, in Higgsfield's order (grayscale first: every depth model draws it). */+export const COLORMAPS = ["grayscale", "turbo", "inferno", "magma", "viridis"] as const;+/** A point on a picture in its own pixels (the first frame of a video). Negative points mark what to keep. */export interface PixelPoint {x: number;@@@ -490,14 -490,13 +503,21 @@@ export interface ModelOptionsrequires?: { images?: number; prompt?: boolean; mask?: boolean; points?: boolean; msg: string };/** Output formats it can write (params.format: SDR to HDR, export). */formats?: VideoFormat[];+ /** Depth maps: the colour maps it draws (params.colormap; see COLORMAPS). Unset = grayscale only. */+ colormaps?: string[];+ /** Depth maps: it can put the original clip next to the depth map (params.sideBySide). */+ sideBySide?: boolean;+ /** Remove background: what it can make (params.matteOutput), its default first. Unset = the cut-out. */+ matteOutputs?: MatteOutput[];+ /** Remove background keeps only what you name (SAM): words, or points clicked on the first frame, are needed. */+ keepsNamed?: boolean;+ /**+ * Frame rates it can reach (params.targetFps): FPS Boost's 24–120, an upscaler's 24 / 30 / 60. Without a+ * default target (`defaults.targetFps`) the clip's own frame rate is the first choice ("Original").+ */+ fpsTargets?: number[];+ /** Slow-motion factors it takes (params.slowdown; 1 = the clip's speed). */+ slowdowns?: number[];}export interface Pricing {diff --cc src/lib/comfy.tsindex c7bec4ed,d2ae7028..64ec0408--- a/src/lib/comfy.ts+++ b/src/lib/comfy.ts@@@ -60,8 -61,7 +62,9 @@@ export interface ManifestOutput/*** What a text, image or 3D output is: timed caption cues, a plain transcript, the detected language, layers, a grid's sheet or tiles…* Round 4: OCR "lines" (JSON, boxes 0–1000) and the "frame" the model saw, an EXR sequence's "frames", a whole-"scene" GLB and its- * "depth" map, a Gaussian "splat", a reference video's style "brief". A "preview" is the clip shown for an EXR export (the frames ride along zipped).+ * "depth" map, a Gaussian "splat", a reference video's style "brief"; a painted eraser's last tracked "mask" (handed to the next- * window), and a matte graph's "cutout" (transparent video) and "matte" (black and white) videos.++ * window), and a matte graph's "cutout" (transparent video) and "matte" (black and white) videos. A "preview" is the clip shown++ * for an EXR export (the frames ride along zipped).*/role?:| "cues"@@@ -79,9 -79,7 +82,10 @@@| "depth"| "splat"| "brief"+ | "mask"+ | "cutout"- | "matte";++ | "matte"+ | "preview";}export interface ManifestWorkflow {@@@ -525,6 -523,90 +529,58 @@@ export function bypassReference(wf: Comreturn out;}+ /**+ * Take a node out of the graph: whatever read its first output reads `input`'s link instead (FPS Boost+ * without interpolation: Select Every Nth takes the frames straight). Nodes nothing reads any more (its+ * model loader, its constants) go too, except output nodes (`keep`). Unchanged when `input` isn't a link.+ */+ export function bypassNode(wf: ComfyWorkflow, nodeId: string, input: string, keep: string[] = []): ComfyWorkflow {+ const src = wf[nodeId]?.inputs[input];+ if (!isLinkValue(src)) return wf;+ const out = cloneWorkflow(wf);+ for (const n of Object.values(out)) for (const [k, v] of Object.entries(n.inputs)) if (isLinkValue(v) && v[0] === nodeId) n.inputs[k] = [...src];+ delete out[nodeId];+ return dropUnused(out, keep);+ }++ /** Remove nodes whose outputs nothing reads, over and over, keeping the output nodes `keep`. */+ export function dropUnused(wf: ComfyWorkflow, keep: string[]): ComfyWorkflow {+ const out = cloneWorkflow(wf);+ for (;;) {+ const read = new Set(Object.values(out).flatMap((n) => Object.values(n.inputs).filter(isLinkValue).map((v) => v[0])));+ const gone = Object.keys(out).filter((id) => !read.has(id) && !keep.includes(id));+ if (!gone.length) return out;+ for (const id of gone) delete out[id];+ }+ }++ /**+ * VHS meta-batch graphs: tag each job's VHS_BatchManager with an input of its own. ComfyUI caches a node+ * whose inputs didn't change, so without it a job right after a failed or canceled meta-batch reuses the+ * stale manager and silently loses frames (checked on the CPU server: 32 of 48 frames). VHS keeps inputs+ * it doesn't declare (it adds its own "requeue" the same way).+ */+ export function tagMetaBatch(wf: ComfyWorkflow, job: string): ComfyWorkflow {+ if (!Object.values(wf).some((n) => n.class_type === "VHS_BatchManager")) return wf;+ const out = cloneWorkflow(wf);+ for (const n of Object.values(out)) if (n.class_type === "VHS_BatchManager") n.inputs.job = job;+ return out;+ }++ /**+ * A clip with no sound: VHS_LoadVideo fails ("failed to extract audio") once its audio output is read, so+ * the links from that output (VHS_VideoCombine.audio) are dropped. Only for clips whose header says so.+ */+ export function dropVhsAudio(wf: ComfyWorkflow): ComfyWorkflow {+ const loaders = new Set(Object.entries(wf).filter(([, n]) => n.class_type === "VHS_LoadVideo").map(([id]) => id));+ if (!loaders.size) return wf;+ const out = cloneWorkflow(wf);+ for (const n of Object.values(out)) {+ const a = n.inputs.audio;+ if (isLinkValue(a) && loaders.has(a[0]) && a[1] === 2) delete n.inputs.audio;+ }+ return out;+ }--/** Languages ComfyUI-QwenASR's subtitle node accepts (besides "auto"), by ISO 639 code. */-const ASR_LANGUAGES: Record<string, string> = {- zh: "Chinese", en: "English", yue: "Cantonese", ar: "Arabic", de: "German", fr: "French", es: "Spanish", pt: "Portuguese",- id: "Indonesian", it: "Italian", ko: "Korean", ru: "Russian", th: "Thai", vi: "Vietnamese", ja: "Japanese", tr: "Turkish",- hi: "Hindi", ms: "Malay", nl: "Dutch", sv: "Swedish", da: "Danish", fi: "Finnish", pl: "Polish", cs: "Czech", fil: "Filipino",- tl: "Filipino", fa: "Persian", el: "Greek", hu: "Hungarian", mk: "Macedonian", ro: "Romanian",-};--/**- * Whisper's 100 languages (openai-whisper tokenizer.LANGUAGES), code → name. ComfyUI-Whisper's language combo- * offers the same names with a capital first letter ("Haitian creole", "Tagalog").- */-const WHISPER_LANGUAGES: Record<string, string> = Object.fromEntries(- (- "en english,zh chinese,de german,es spanish,ru russian,ko korean,fr french,ja japanese,pt portuguese,tr turkish,pl polish,ca catalan," +- "nl dutch,ar arabic,sv swedish,it italian,id indonesian,hi hindi,fi finnish,vi vietnamese,he hebrew,uk ukrainian,el greek,ms malay," +- "cs czech,ro romanian,da danish,hu hungarian,ta tamil,no norwegian,th thai,ur urdu,hr croatian,bg bulgarian,lt lithuanian,la latin," +- "mi maori,ml malayalam,cy welsh,sk slovak,te telugu,fa persian,lv latvian,bn bengali,sr serbian,az azerbaijani,sl slovenian,kn kannada," +- "et estonian,mk macedonian,br breton,eu basque,is icelandic,hy armenian,ne nepali,mn mongolian,bs bosnian,kk kazakh,sq albanian," +- "sw swahili,gl galician,mr marathi,pa punjabi,si sinhala,km khmer,sn shona,yo yoruba,so somali,af afrikaans,oc occitan,ka georgian," +- "be belarusian,tg tajik,sd sindhi,gu gujarati,am amharic,yi yiddish,lo lao,uz uzbek,fo faroese,ht haitian creole,ps pashto,tk turkmen," +- "nn nynorsk,mt maltese,sa sanskrit,lb luxembourgish,my myanmar,bo tibetan,tl tagalog,mg malagasy,as assamese,tt tatar,haw hawaiian," +- "ln lingala,ha hausa,ba bashkir,jw javanese,su sundanese,yue cantonese"- )- .split(",")- .map((pair) => {- const i = pair.indexOf(" ");- const name = pair.slice(i + 1);- return [pair.slice(0, i), name.charAt(0).toUpperCase() + name.slice(1)];- }),-);/** Codes people use that Whisper spells differently. */const WHISPER_ALIASES: Record<string, string> = { fil: "tl", jv: "jw", iw: "he", nb: "no", zh_hans: "zh" };diff --cc src/lib/composer.tsindex f8681b42,aef5e7ab..5b825a06--- a/src/lib/composer.ts+++ b/src/lib/composer.ts@@@ -3,8 -3,11 +3,12 @@@* blocker messages, attachment placement and model-picker grouping. No catalog import here, so* nothing in this file pulls the model list into the browser bundle.*/- import { COLORMAPS, type Engine, type GenParams, type InputSlot, type MatteOutput, type MediaKind, type ModelDef, type Operation, type Preset } from "./catalog/types";+ import { FORMAT_INFO } from "./av/formats";+ import { fpsPlan, fpsSummary } from "./av/fps";+ import { targetShortEdge, upscaledSize, upscaleFactorFor, upscaleTier } from "./av/upscale";+ import { wholeClipProblem, wholeClipTool } from "./av/video-finish";-import type { Engine, GenParams, InputSlot, MediaKind, ModelDef, Operation, VideoFormat } from "./catalog/types";++import { COLORMAPS, type Engine, type GenParams, type InputSlot, type MatteOutput, type MediaKind, type ModelDef, type Operation, type Preset, type VideoFormat } from "./catalog/types";+import { spokenLanguageName } from "./speech-languages";// ---------------------------------------------------------------------------// Settings summary ("16:9 · 720p · 5s · ×1")@@@ -30,14 -33,12 +34,20 @@@ export interface SettingsShapeenhance: boolean;sliders: boolean;negativePrompt: boolean;+ /** The spoken languages a transcriber can be told (unset = it detects): the "Spoken language" picker. */+ sourceLanguages: string[] | null;+ /** Remove background: the cut-out or its alpha mask, as far as the model makes them (one is still shown, with a note). */+ matteOutput: MatteOutput[] | null;+ /** Depth maps: the colour maps the model draws (grayscale alone is still shown, with where the others are). */+ colormap: string[] | null;+ /** Depth maps: the original clip next to the map. */+ sideBySide: boolean;+ /** Frame rates to reach (FPS Boost, upscalers): `original` adds the clip's own rate as the first choice. */+ fps: { values: number[]; original: boolean } | null;+ /** Slow-motion factors (1 = off). */+ slowdown: number[] | null;+ /** Output formats (SDR to HDR, export): the model's, or every format the studio's models write. */+ formats: VideoFormat[] | null;}/**@@@ -52,12 -53,12 +62,14 @@@ export function settingsShapeshowPrompt: boolean,params: GenParams = {},studioOps: Operation[] = [],+ studioFormats?: VideoFormat[],): SettingsShape {const o = model?.options ?? {};+ const formats = studioFormats?.length ? studioFormats : o.formats;const many = <T,>(xs: T[] | undefined) => (xs && xs.length > 1 ? xs : null);const single = op ? SINGLE_TAKE.has(op) : studioOps.length > 0 && studioOps.every((x) => SINGLE_TAKE.has(x));+ // The operation, or the studio's only one before anything is attached (Video tools → Depth map).+ const is = (x: Operation) => op === x || (!op && studioOps.length > 0 && studioOps.every((y) => y === x));return {aspect: op === "i2v" || op === "flf2v" ? null : many(o.aspectRatios),resolution: many(o.resolutions),@@@ -69,10 -70,9 +81,13 @@@enhance: showPrompt,sliders: !!o.sliders?.length,negativePrompt: !!o.negativePrompt,+ sourceLanguages: o.sourceLanguages?.length ? o.sourceLanguages : null,+ matteOutput: is("bg-remove-video") && model ? (o.matteOutputs ?? ["cutout"]) : null,+ colormap: is("depth-video") && model ? (o.colormaps ?? ["grayscale"]) : null,+ sideBySide: is("depth-video") && !!o.sideBySide,+ fps: o.fpsTargets?.length ? { values: o.fpsTargets, original: model?.defaults?.targetFps === undefined } : null,+ slowdown: many(o.slowdowns),+ formats: formats && formats.length > 0 ? formats : null,};}@@@ -118,12 -91,17 +133,22 @@@ export function settingsSummary(shape:if (shape.multiShot && !params.shots && params.multiShot === "auto") parts.push("Multi-shot");if (shape.draft && params.draft) parts.push("Draft");if (shape.audio && params.generateAudio === false) parts.push("No audio");+ if (shape.fps) {+ const fps = params.targetFps ?? d.targetFps;+ if (fps) parts.push(`${fps} fps`);+ else if (!shape.fps.original) parts.push(`${shape.fps.values[0]} fps`);+ }+ if (shape.slowdown && (params.slowdown ?? 1) > 1) parts.push(`${params.slowdown}× slow`);+ if (shape.formats) {+ const f = formatOf(params, model, shape.formats);+ if (f) parts.push(FORMAT_INFO[f]?.short ?? f);+ }if (shape.enhance && params.enhancePrompt) parts.push("Enhance");+ // Detecting the language is the default, so only a picked one is worth a word.+ if (shape.sourceLanguages && params.sourceLanguage) parts.push(spokenLanguageName(params.sourceLanguage));+ if (shape.matteOutput) parts.push(MATTE_OUTPUT_LABELS[params.matteOutput && shape.matteOutput.includes(params.matteOutput) ? params.matteOutput : shape.matteOutput[0]]);+ if (shape.colormap) parts.push(colormapLabel(params.colormap ?? shape.colormap[0]));+ if (shape.sideBySide && params.sideBySide) parts.push("Side by side");return parts;}diff --cc src/lib/output-actions.tsindex 3c34c3cf,2222b7c8..e15dcf86--- a/src/lib/output-actions.ts+++ b/src/lib/output-actions.ts@@@ -94,19 -86,27 +95,29 @@@ export function outputActions(g: Generalink("reference", "Use as reference", `/image?ref=${q(o.url)}`);link("grade", "Color grade", `/color-grade?image=${q(o.url)}`);link("layers", "Open in Layers", layersHref(g, o.url));+ link("genjutsu", "Animate with Genjutsu", `/genjutsu?mode=motion&image=${q(o.url)}`);out.push({ id: "save-character", label: "Save as character", placement: "menu" });break;- case "video":+ case "video": {link("extend", "Extend", `/extend?video=${q(o.url)}`, "primary");- out.push(file, { id: "favorite", label: g.favorite ? "Unfavorite" : "Favorite", placement: "bar" });+ out.push(file);+ // An HDR or export job's EXR frames ride along on its preview clip (meta.artifacts.exr): a stored zip, or+ // the provider's own link when it couldn't be kept (unreachable when the job finished; it expires).+ const exr = (o.meta?.artifacts as Record<string, unknown> | undefined)?.exr;+ if (typeof exr === "string" && /^(\/api\/files\/|https?:\/\/)/.test(exr)) {+ const zip = name.replace(/\.[^.]+$/, "-exr.zip");+ const stored = exr.startsWith("/api/files/");+ out.push({ id: "download-exr", label: stored ? "Download EXR frames (.zip)" : "Download EXR frames (.zip, provider link)", placement: "bar", href: stored ? downloadHref(exr, zip) : exr, download: zip });+ }+ out.push({ id: "favorite", label: g.favorite ? "Unfavorite" : "Favorite", placement: "bar" });link("reframe", "Reframe", `/reframe?video=${q(o.url)}`);link("lipsync", "Lipsync", `/lipsync?video=${q(o.url)}`);link("upscale", "Upscale", `/upscale/video?video=${q(o.url)}`);link("add-sound", "Add sound", `/audio/video?video=${q(o.url)}`);link("grade", "Color grade", `/color-grade?video=${q(o.url)}`);+ link("genjutsu", "Use in Genjutsu", `/genjutsu?video=${q(o.url)}`);break;+ }case "audio":link("lipsync", "Lipsync", `/lipsync?audio=${q(o.url)}`, "primary");out.push(file, { id: "favorite", label: g.favorite ? "Unfavorite" : "Favorite", placement: "bar" });@@@ -231,20 -197,20 +242,34 @@@ export function isLayered(g: Pick<Generreturn (g.op === "layers" || g.op === "text-layers" || g.outputs.some((o) => !!(o.meta && ("layer" in o.meta || "z" in o.meta)))) && g.outputs.length > 1;}+/**+ * A still for a clip's tile, shown before it loads (and where the browser can't decode it): the+ * output's own meta.poster / thumbnail, else, for a clip made from a start frame (image-to-video,+ * start + end frame), that frame. Undefined when there's nothing better than the clip's first frame.+ */+export function videoPoster(g: Partial<Pick<Generation, "op" | "request">> | undefined, o: Pick<OutputFile, "kind" | "meta">): string | undefined {+ if (o.kind !== "video") return undefined;+ const m = (o.meta ?? {}) as Record<string, unknown>;+ const own = ["poster", "thumbnail"].map((k) => m[k]).find((v): v is string => typeof v === "string" && v.length > 0);+ if (own) return own;+ if (g?.op !== "i2v" && g?.op !== "flf2v") return undefined;+ return g.request?.inputs?.images?.[0] || undefined;+}++ /**+ * A pro export browsers don't play (ProRes in a .mov, FFV1 in a .mkv): its tile is a file card, not a black+ * player. Judged by the request (an export or HDR job's format) and the file's extension.+ */+ export function editOnlyFormat(g: Partial<Pick<Generation, "op" | "request">> | undefined, o: Pick<OutputFile, "url" | "kind">): VideoFormat | undefined {+ if (o.kind !== "video") return undefined;+ const ext = extensionOf(o);+ if (ext === "mkv") return "ffv1";+ const f = g?.request?.params?.format;+ // A demo run's placeholder is a plain .mp4, whatever the format asked for.+ if ((g?.op === "export-video" || g?.op === "sdr-to-hdr") && ext === "mov" && (f === "prores_422_hq" || f === "prores_4444")) return f;+ return undefined;+ }+/** A 3D model's still and turntable: meta.poster / meta.preview, meta.video / meta.turntable, or a sibling output. */export function modelPreview(g: Pick<Generation, "outputs">, o: OutputFile): { poster?: string; video?: string } {const m = (o.meta ?? {}) as Record<string, unknown>;diff --cc src/server/generations.tsindex 18fcf7d1,3803ded2..e0f41078--- a/src/server/generations.ts+++ b/src/server/generations.ts@@@ -7,9 -7,8 +7,10 @@@ import { applyMentions } from "@/lib/caimport { withSignatureWords } from "@/lib/catalog/palettes";import { applySketch, stripMotionPaths } from "@/lib/catalog/sketch";import { cueText, type Cue } from "@/lib/cues";+import { HELPER_FEATURES, HELPER_SUFFIX, isReviewStatus, type AssetUse, type ReviewFilter } from "@/lib/library";+ import { upscaleTier } from "@/lib/av/upscale";import { estimateCost, planGeneration, routesFor } from "@/lib/catalog/plan";+import { keepMatte } from "@/lib/catalog/payload";import {LAST_FRAME_CHAIN,OPERATION_OUTPUT,@@@ -713,8 -623,21 +716,21 @@@ async function submitconst prep = async (ref?: string) => {if (!ref) return undefined;const f = await readRef(ref);- return adapter.prepareFile(f.data, f.contentType, f.name);+ return adapter.prepareFile(f.data, f.contentType, f.name, route);};+ // The input clip's header (size, frame rate, length): upscalers that take a factor and frame-count routes read it.+ let source: Pick<GenInput, "sourceSize" | "sourceFps" | "sourceDuration"> = {};+ const prepVideo = async (ref?: string) => {+ if (!ref) return undefined;+ const f = await readRef(ref);+ const facts = mediaFacts(f.data);+ source = {+ ...(facts.width && facts.height ? { sourceSize: { width: facts.width, height: facts.height } } : {}),+ ...(facts.fps ? { sourceFps: facts.fps } : {}),+ ...(facts.duration ? { sourceDuration: facts.duration } : {}),+ };+ return adapter.prepareFile(f.data, f.contentType, f.name);+ };const prepMask = async (ref?: string) => {if (!ref) return undefined;const f = await readRef(ref);diff --cc src/server/providers/comfyui.tsindex fb409a0e,5230198b..20742cdb--- a/src/server/providers/comfyui.ts+++ b/src/server/providers/comfyui.ts@@@ -28,15 -31,17 +31,19 @@@ importtype ManifestOutput,type ManifestWorkflow,} from "@/lib/comfy";+ import { fpsPlan } from "@/lib/av/fps";import { expandTimelineWorkflow, readTimeline } from "@/lib/av/timeline";+ import { exportValues, exrWorkflow, framesPerPass, hdrColorSpace, upscaleShortSide, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";import { guessKind } from "@/lib/catalog/payload";-import type { GenInput, MediaKind, Operation } from "@/lib/catalog/types";+import { getMaker, makerPrompt, OPEN_TARGET_PROBLEM, swapTarget } from "@/lib/catalog/genjutsu";+import { CLICK_OPEN_PROBLEM, HAND_OFF, REMOVE_SCENE, targetPhrase } from "@/lib/catalog/remove-object";+import type { GenInput, MediaKind, ModelRoute, Operation } from "@/lib/catalog/types";import { probeMedia, type MediaInfo } from "@/lib/media-probe";-import { getSetting } from "../settings";+import { getSetting, isCandidate, savedSetting } from "../settings";import { decodePng, encodePng } from "../png";- import { readRef } from "../storage";+ import { probeWebm } from "../webm-probe";+ import { adoptFile, readRef, scratchDir } from "../storage";+ import { zipToFile } from "../zip";import { ProviderError, type ProviderAdapter, type RemoteOutput } from "./types";export const WORKFLOW_DIR = path.join(process.cwd(), "workflows", "comfyui");@@@ -784,28 -831,38 +935,60 @@@ async function followMetaBatch(prefix:return null;}+/** Upload a file to a worker's input folder; returns the name LoadImage / LoadAudio / LoadVideo take there. */+async function uploadTo(worker: ComfyWorker, data: Buffer, contentType: string, name: string): Promise<string> {+ const form = new FormData();+ const ext = name.includes(".") ? name.split(".").pop() : contentType.split("/")[1];+ form.append("image", new Blob([new Uint8Array(data)], { type: contentType }), `fuobe_${nanoid(8)}.${ext}`);+ form.append("type", "input");+ form.append("overwrite", "true");+ const res = await comfyFetch("/upload/image", { method: "POST", body: form }, worker);+ if (!res.ok) {+ const text = await res.text().catch(() => "");+ throw worker === "isolated" ? isolatedAnswer("an upload", res.status, reasonOf(text)) : new ProviderError(`ComfyUI upload failed: ${res.status} ${text}`);+ }+ const j = (await res.json()) as { name: string; subfolder?: string };+ const uploaded = j.subfolder ? `${j.subfolder}/${j.name}` : j.name;+ // Remember a clip's / track's header facts (length, size, fps, audio) for prepareWorkflow.- if (MEDIA_FILE.test(contentType) || MEDIA_EXT.test(name)) {- const info = probeMedia(data);++ if (MEDIA_FILE.test(contentType) || MEDIA_EXT.test(name) || /\.(webm|mkv)$/i.test(name)) {++ const info = probeMedia(data) ?? webmInfo(data);+ if (info) rememberMedia(uploaded, info);+ }+ return uploaded;+}++ type QueueEntry = unknown[];-const postJson = (p: string, body: unknown) =>- comfyFetch(p, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) }).catch(() => undefined);++const postJson = (p: string, body: unknown, worker: ComfyWorker = "main") =>++ comfyFetch(p, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) }, worker).catch(() => undefined);++ /**+ * Take a job off ComfyUI: delete its pending prompts and interrupt the one running. A meta-batch job is+ * every prompt carrying its filename prefix (VHS re-queues each pass under a new id with a negative queue+ * number, so the pending pass would run first). Returns whether any prompt of the job was still there.+ */-async function stopPrompts(externalId: string | undefined, prefix: string | undefined): Promise<boolean> {++async function stopPrompts(externalId: string | undefined, prefix: string | undefined, worker: ComfyWorker = "main"): Promise<boolean> {+ const ours = (q: QueueEntry) => (!!externalId && q[1] === externalId) || (!!prefix && promptHasPrefix(q[2], prefix));+ // Always delete the job's own id, even when the queue can't be read.- if (externalId) await postJson("/queue", { delete: [externalId] });- const queue = await comfyJson<{ queue_running?: QueueEntry[]; queue_pending?: QueueEntry[] }>("/queue").catch(() => undefined);++ if (externalId) await postJson("/queue", { delete: [externalId] }, worker);++ const queue = await comfyJson<{ queue_running?: QueueEntry[]; queue_pending?: QueueEntry[] }>("/queue", worker).catch(() => undefined);+ if (!queue) return false;+ const pending = (queue.queue_pending ?? []).filter(ours).map((q) => String(q[1]));- if (pending.length) await postJson("/queue", { delete: pending });++ if (pending.length) await postJson("/queue", { delete: pending }, worker);+ const running = (queue.queue_running ?? []).filter(ours);- for (const q of running) await postJson("/interrupt", { prompt_id: String(q[1]) });++ for (const q of running) await postJson("/interrupt", { prompt_id: String(q[1]) }, worker);+ return pending.length + running.length > 0;+ }++ /** Cancel tries for a meta-batch job after the first: a pass that was already saving when interrupted can still queue the next one. */+ export const CANCEL_SWEEPS = { tries: 5, everyMs: 1000 };+-async function sweepPasses(prefix: string): Promise<void> {++async function sweepPasses(prefix: string, worker: ComfyWorker = "main"): Promise<void> {+ for (let i = 0; i < CANCEL_SWEEPS.tries; i++) {+ await new Promise((r) => setTimeout(r, CANCEL_SWEEPS.everyMs));- if (!(await stopPrompts(undefined, prefix).catch(() => false))) return;++ if (!(await stopPrompts(undefined, prefix, worker).catch(() => false))) return;+ }+ }+export const comfyProvider: ProviderAdapter = {id: "comfyui",label: "ComfyUI",@@@ -845,14 -910,12 +1028,14 @@@if (!res.ok || !body.prompt_id) {// A node class the server doesn't have: name the pack to install (opt-in packs like ComfyUI-Whisper).const packs = manifest.customNodes.map((c) => c.name);+ const where = worker === "isolated" ? "the isolated ComfyUI worker" : "your ComfyUI";const missingPack =- body.error?.type === "missing_node_type" && packs.length ? `This workflow needs the ${packs.join(" + ")} node pack${packs.length > 1 ? "s" : ""} on your ComfyUI (see scripts/comfy/README.md)` : undefined;+ body.error?.type === "missing_node_type" && packs.length ? `This workflow needs the ${packs.join(" + ")} node pack${packs.length > 1 ? "s" : ""} on ${where} (see scripts/comfy/README.md)` : undefined;const detail = body.node_errors && Object.keys(body.node_errors as object).length ? explainComfyError(body.node_errors, { ...manifest, models: [...manifest.models, ...(input.loras ?? []).map((l) => ({ file: l.file, folder: "loras", url: l.url }))] }) : (missingPack ?? body.error?.message);+ if (!detail && !res.ok && worker === "isolated") throw isolatedAnswer("the prompt", res.status);throw new ProviderError(detail ?? `ComfyUI /prompt failed (${res.status})`, res.status);}- return { externalId: body.prompt_id, meta: { ...meta, ...(worker === "isolated" && { worker }) }, payload: wf };- return { externalId: body.prompt_id, meta: { ...meta, generationId }, payload: wf };++ return { externalId: body.prompt_id, meta: { ...meta, generationId, ...(worker === "isolated" && { worker }) }, payload: wf };},async poll({ externalId, meta }) {@@@ -915,34 -982,23 +1103,34 @@@},async cancel({ externalId, meta }) {- const worker: ComfyWorker = meta.worker === "isolated" ? "isolated" : "main";++ const worker: ComfyWorker = meta?.worker === "isolated" ? "isolated" : "main";forget(externalId);- const post = (path: string, body: unknown) => comfyFetch(path, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) }, worker);- await post("/queue", { delete: [externalId] }).catch(() => {});- const q = (await comfyJson<{ queue_running?: unknown[][] }>("/queue", worker).catch(() => ({}))) as { queue_running?: unknown[][] };- if (q.queue_running?.some((r) => r[1] === externalId)) await post("/interrupt", { prompt_id: externalId }).catch(() => {});+ // A meta-batch job's later passes have prompt ids of their own (and jump the queue): find them by prefix.+ const prefix = meta?.metaBatch && typeof meta.prefix === "string" ? meta.prefix : undefined;- const found = await stopPrompts(externalId, prefix);- if (prefix && found) void sweepPasses(prefix);++ const found = await stopPrompts(externalId, prefix, worker);++ if (prefix && found) void sweepPasses(prefix, worker);},- async test() {- try {- const res = await comfyFetch("/system_stats");- if (!res.ok) return { ok: false, detail: `HTTP ${res.status}` };+ async test(opts) {+ const describe = async (worker: ComfyWorker) => {+ const res = await comfyFetch("/system_stats", {}, worker);+ if (!res.ok) throw new ProviderError(`HTTP ${res.status}`);const s = (await res.json()) as { system?: { comfyui_version?: string }; devices?: { name?: string; vram_total?: number }[] };const dev = s.devices?.[0];- return {- ok: true,- detail: `ComfyUI ${s.system?.comfyui_version ?? ""} · ${dev?.name ?? "unknown device"}${dev?.vram_total ? ` · ${(dev.vram_total / 2 ** 30).toFixed(0)} GB` : ""}`,- };+ return `ComfyUI ${s.system?.comfyui_version ?? ""} · ${dev?.name ?? "unknown device"}${dev?.vram_total ? ` · ${(dev.vram_total / 2 ** 30).toFixed(0)} GB` : ""}`;+ };+ // Checking the isolated worker's address: that worker answers, or it isn't connected (the main+ // server's state is the main address's test).+ if (opts?.focus === "comfyIsolatedUrl") {+ if (!baseUrl("isolated")) return { ok: false, detail: "No isolated worker address set" };+ return describe("isolated").then(+ (d) => ({ ok: true, detail: `isolated worker: ${d}` }),+ (e: Error) => ({ ok: false, detail: /^HTTP \d/.test(e.message) ? `The isolated worker at ${baseUrl("isolated")} answered ${e.message}` : e.message }),+ );+ }+ let detail: string;+ try {+ detail = await describe("main");} catch (e) {return { ok: false, detail: (e as Error).message };}diff --cc src/server/shorts.tsindex dc10d075,fa4d9ed1..95b79246--- a/src/server/shorts.ts+++ b/src/server/shorts.ts@@@ -82,28 -75,7 +75,12 @@@ export async function probeSource(url:} catch {throw new ShortsError("That clip is gone — upload it again", 404);}+ return sourceInfo(data);+}++/** What a clip's bytes say (the header readers behind probeSource). */+export function sourceInfo(data: Buffer): SourceInfo {- let info: MediaInfo | null = null;- try {- info = probeMedia(data);- } catch {- info = null;- }- if (!info) {- const webm = probeWebm(data);- return webm ? { duration: webm.duration, width: webm.width, height: webm.height, fps: webm.fps, hasAudio: webm.hasAudio } : {};- }- return {- duration: info.videoDuration ?? info.duration,- width: info.width,- height: info.height,- fps: info.fps,- hasAudio: info.hasAudio,- };+ return mediaFacts(data);}// ---------------------------------------------------------------------------diff --cc tests/comfy-library-4.test.tsindex 105312ab,840def84..ea0af6eb--- a/tests/comfy-library-4.test.ts+++ b/tests/comfy-library-4.test.ts@@@ -54,9 -54,7 +55,9 @@@ const ROUND4: Record<string, { capabili/** Loaders whose input is an upload: every one must be a binding, or the graph points at a researcher's file. */const MEDIA: Record<string, string> = { LoadImage: "image", LoadImageMask: "image", LoadVideo: "file", VHS_LoadVideo: "video", LoadAudio: "audio", VHS_LoadAudioUpload: "audio" };const ROLES: NonNullable<ManifestOutput["role"]>[] = [- "cues", "transcript", "language", "layers", "sheet", "tiles", "first-frame", "turntable", "lines", "frame", "frames", "scene", "depth", "splat", "brief",+ "cues", "transcript", "language", "layers", "sheet", "tiles", "first-frame", "turntable", "lines", "frame", "frames", "scene", "depth", "splat", "brief", "preview",+ // remove-object package: the painted eraser's hand-off mask, the matte graphs' two videos.+ "mask", "cutout", "matte",];describe("round-4 ComfyUI workflows", () => {diff --cc workflows/comfyui/manifest.jsonindex 49e2828a,6b503c0c..940b0a1e--- a/workflows/comfyui/manifest.json+++ b/workflows/comfyui/manifest.json@@@ -1,6 -1,6 +1,6 @@@{"version": 1,- "generatedAt": "2026-10-23T16:47:52.036Z",- "generatedAt": "2026-10-23T19:14:00.584Z",++ "generatedAt": "2026-10-23T22:48:01.569Z","comfyuiCommit": "fc04da91b2ab12f99e4716371a7e4f98ac982597","comfyuiVersion": "0.41.0","workflowTemplatesVersion": "0.11.86",@@@ -13325,66 -13292,353 +13341,414 @@@"validated": true,"notes": "Content Factory \"Use as reference\": the clip's frames AND sound go into one TextGenerate call and come back as a JSON style brief (role brief): format, hook, pacing, shots, visual_style, animation_style, narration, music, captions, topic_ideas (5). The instruction forbids copying the reference's people, logos or exact words. Strip ``` fences before parsing. VHS_LoadVideo resamples to 24 fps (fixed: TextGenerate assumes 24 fps and keeps every 24th frame, i.e. 1 fps, each capped at 70 soft tokens); frames = the frame cap at 24 fps (720 = the first 30 s), startFrame = frames skipped at 24 fps, frameWidth = 384 px wide (about 0.7 GB of frames for 720, inferred). In ComfyUI v0.41 only the Gemma 4 and MiniMax text encoders read a video input (the Qwen3.5 encoder ignores it). Same model file as speech-translate-gemma4 (no new download). Whether Gemma 4 E4B takes 30 s of audio in one call is unverified. Validated by /prompt only."},+ {+ "id": "image-vectorize-vtracer",+ "title": "Image to SVG: VTracer traces the colours into stacked vector shapes (no model)",+ "capability": "vectorize",+ "file": "image-vectorize-vtracer.json",+ "source": "hand-built (scripts/comfy/hand-built/image-vectorize-vtracer.json)",+ "bindings": {+ "image": [+ {+ "node": "1",+ "input": "image"+ }+ ],+ "curveMode": [+ {+ "node": "2",+ "input": "mode"+ }+ ],+ "filterSpeckle": [+ {+ "node": "2",+ "input": "filter_speckle"+ }+ ],+ "colorPrecision": [+ {+ "node": "2",+ "input": "color_precision"+ }+ ],+ "filenamePrefix": [+ {+ "node": "4",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "4",+ "kind": "image"+ }+ ],+ "defaults": {+ "filterSpeckle": 4,+ "colorPrecision": 6+ },+ "limits": {},+ "models": [],+ "customNodes": [+ {+ "name": "ComfyUI-ToSVG",+ "repo": "https://github.com/Yanick112/ComfyUI-ToSVG"+ }+ ],+ "vramGb": 0,+ "license": "MIT (VTracer, ComfyUI-ToSVG); the pack also imports PyMuPDF (AGPL-3.0) for its SVG-to-image node, which this graph doesn't use",+ "validated": true,+ "notes": "The open side of Recraft Vectorize / fal image2svg (the Vectorize app). ComfyUI-ToSVG's colour VTracer node (stacked layers, spline curves; curveMode polygon gives straight edges) returns the SVG as text, TS_SVGStringToSVGBytesIO wraps it and core SaveSVGNode writes fuobe/<id>_*.svg (reported under \"images\", so the provider collects it as an image output). filterSpeckle drops specks up to that many pixels, colorPrecision (1-8 bits per channel) sets how many colours are kept. Best on logos, icons and flat art; photos give very many paths. Runs on CPU in about a second."++ },+ {+ "id": "interpolate-rife-fps",+ "title": "FPS Boost and slow motion to an exact frame rate: interpolate by m, keep every n-th frame (core FrameInterpolate)",+ "capability": "interpolate",+ "file": "interpolate-rife-fps.json",+ "source": "hand-built (scripts/comfy/hand-built/interpolate-rife-fps.json)",+ "bindings": {+ "video": [+ {+ "node": "1",+ "input": "file"+ }+ ],+ "checkpoint": [+ {+ "node": "5",+ "input": "model_name"+ }+ ],+ "multiplier": [+ {+ "node": "6",+ "input": "value"+ }+ ],+ "every": [+ {+ "node": "8",+ "input": "value"+ }+ ],+ "slowdown": [+ {+ "node": "10",+ "input": "value"+ }+ ],+ "filenamePrefix": [+ {+ "node": "13",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "13",+ "kind": "video"+ }+ ],+ "defaults": {+ "multiplier": 2,+ "every": 1,+ "slowdown": 1,+ "checkpoint": "rife_v4.26.safetensors"+ },+ "limits": {+ "maxMultiplier": 16+ },+ "models": [+ {+ "file": "rife_v4.26.safetensors",+ "folder": "frame_interpolation",+ "url": "https://huggingface.co/Comfy-Org/frame_interpolation/resolve/main/frame_interpolation/rife_v4.26.safetensors",+ "sizeGb": 0.02+ },+ {+ "file": "film_net_fp16.safetensors",+ "folder": "frame_interpolation",+ "url": "https://huggingface.co/Comfy-Org/Frame-Interpolation/resolve/main/frame_interpolation/film_net_fp16.safetensors",+ "sizeGb": 0.07,+ "optional": true+ }+ ],+ "customNodes": [+ {+ "name": "ComfyUI-VideoHelperSuite",+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"+ }+ ],+ "vramGb": 2,+ "license": "RIFE 4.26 and FILM weights from Comfy-Org/frame_interpolation (MIT / Apache-2.0); VideoHelperSuite (GPL-3.0 code) for Select Every Nth",+ "validated": true,+ "notes": "Higgsfield's FPS Boost targets (24 / 30 / 60 / 90 / 120 fps) and slow motion on the open engine. The provider picks m (multiplier, 2-16) and n (every) from the clip's own frame rate (its header) so that source fps x m / n = target x slowdown (src/lib/av/fps.ts: 24 -> 30 m5 n4, 24 -> 60 m5 n2, 24 -> 90 m15 n4, 24 -> 120 m5, 30 -> 60 m2, 60 -> 90 m3 n2, 60 -> 120 m2; a target the source rate is a whole multiple of (60 -> 30: m1 n2) only drops frames, and then the provider links FrameInterpolate out; other lower targets still interpolate (30 -> 24: m4 n5)). The output fps is computed in the graph from the decoded frame rate (source fps x m / (n x slowdown)); m and n need the header's rate, so the provider refuses a clip without one rather than guess. The last frame is held once more before interpolating, so the clip keeps its length (N frames become N x m + 1, about one output frame longer than the source) instead of losing a source frame. slowdown > 1 stretches the clip (2 = twice as long); the provider then drops the sound link (it would no longer match). checkpoint film_net_fp16.safetensors runs FILM (better on large motion, about 31x slower on CPU). Holds the whole interpolated clip in memory (the source frames, their copy with the last frame held, and source frames x m; the selection is a view): the provider refuses clips that need more than half the server's RAM. Ran here through Fuobe (CPU, a random-weight RIFE file standing in for the weights): 24 fps 2 s 320x180 -> 60 fps = 121 frames, 2.017 s (m 5, n 2); 25 fps 3 s with sound -> 30 fps at 2x slow motion = 181 frames, 6.03 s, no sound track; 30 fps 2 s with sound -> 24 fps = 49 frames, 2.04 s, sound kept (m 4, n 5)."+ },+ {+ "id": "upscale-video-esrgan-chunked",+ "title": "Video Upscale (Real-ESRGAN 4x) in passes of a few frames: memory stays flat whatever the length (VHS meta-batch)",+ "capability": "upscale-video",+ "file": "upscale-video-esrgan-chunked.json",+ "source": "hand-built (scripts/comfy/hand-built/upscale-video-esrgan-chunked.json)",+ "bindings": {+ "video": [+ {+ "node": "1",+ "input": "video"+ }+ ],+ "framesPerBatch": [+ {+ "node": "2",+ "input": "frames_per_batch"+ }+ ],+ "upscaleModel": [+ {+ "node": "3",+ "input": "model_name"+ }+ ],+ "shortSide": [+ {+ "node": "5",+ "input": "resize_type.shorter_size"+ }+ ],+ "filenamePrefix": [+ {+ "node": "7",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "7",+ "kind": "video"+ }+ ],+ "defaults": {+ "framesPerBatch": 16,+ "shortSide": 1080+ },+ "limits": {+ "maxWidth": 3840,+ "maxHeight": 3840+ },+ "models": [+ {+ "file": "RealESRGAN_x4plus.safetensors",+ "folder": "upscale_models",+ "url": "https://huggingface.co/Comfy-Org/Real-ESRGAN_repackaged/resolve/main/RealESRGAN_x4plus.safetensors",+ "sizeGb": 0.07+ }+ ],+ "customNodes": [+ {+ "name": "ComfyUI-VideoHelperSuite",+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"+ }+ ],+ "vramGb": 4,+ "license": "Real-ESRGAN weights (BSD-3-Clause); VideoHelperSuite GPL-3.0 code",+ "validated": true,+ "notes": "R4-38: upscale-video-esrgan decodes the whole film (about 38 GB of float frames for 30 s at 480p before the 4x model). This one decodes framesPerBatch frames per pass (VHS_BatchManager re-queues the prompt until the clip is done, as mixed-media-zimage-frames does), upscales them with the model (tiled), scales them so the shorter edge is shortSide px (params.resolution: 1080p -> 1080, the shape kept) and pipes them into one ffmpeg H.264 encode that stays open across passes; the last pass writes the file with the source's sound at the source frame rate. The provider follows the passes by their filename prefix. framesPerBatch: the provider sizes it from the clip's header so a pass holds about 1.5 GB of frames (16 by default). Any spandrel model in models/upscale_models works as upscaleModel (x2 / x4). Ran here (CPU, a random-weight x4 ESRGAN file standing in for the weights): 30 s 256x144 25 fps with sound -> 1920x1080, 750 frames, AAC, 47 passes of 16 frames in 417 s, ComfyUI's RSS peaked 0.87 GB above idle (upscale-video-esrgan on 10 s of the same clip, 4x to 1024x576 only, peaked 3.0 GB above idle); through Fuobe a silent 2 s 24 fps clip -> 1280x720, 48 frames, no audio link."+ },+ {+ "id": "upscale-video-seedvr2-chunked",+ "title": "Video Upscale / Restore (SeedVR2 3B int8) in passes of 4n+1 frames: memory stays flat (VHS meta-batch)",+ "capability": "upscale-video",+ "file": "upscale-video-seedvr2-chunked.json",+ "source": "hand-built (scripts/comfy/hand-built/upscale-video-seedvr2-chunked.json)",+ "bindings": {+ "video": [+ {+ "node": "1",+ "input": "video"+ }+ ],+ "framesPerBatch": [+ {+ "node": "2",+ "input": "frames_per_batch"+ }+ ],+ "shortSide": [+ {+ "node": "3",+ "input": "resize_type.shorter_size"+ }+ ],+ "seed": [+ {+ "node": "9",+ "input": "seed"+ }+ ],+ "filenamePrefix": [+ {+ "node": "13",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "13",+ "kind": "video"+ }+ ],+ "defaults": {+ "framesPerBatch": 33,+ "shortSide": 1080+ },+ "limits": {+ "maxWidth": 3840,+ "maxHeight": 3840+ },+ "models": [+ {+ "file": "seedvr2_ema_vae_fp16.safetensors",+ "folder": "vae",+ "url": "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors",+ "sizeGb": 0.5+ },+ {+ "file": "seedvr2_3b_int8_convrot.safetensors",+ "folder": "diffusion_models",+ "url": "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors",+ "sizeGb": 3.46+ }+ ],+ "customNodes": [+ {+ "name": "ComfyUI-VideoHelperSuite",+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"+ }+ ],+ "vramGb": 16,+ "license": "SeedVR2 (Apache-2.0); VideoHelperSuite GPL-3.0 code",+ "validated": true,+ "notes": "The native SeedVR2 nodes of upscale-video-seedvr2 (same files, same settings) run on framesPerBatch frames per pass (33 by default; SeedVR2 pads a pass to 4n+1 frames and crops the padding back) and the passes are piped into one H.264 encode with the source's sound, so a long clip no longer needs the whole film in memory (the template is capped at 20 s). The frames are first scaled so the shorter edge is shortSide px. Each pass is restored on its own: there is no temporal context across a pass boundary, so a seam every framesPerBatch frames is possible (not measured: no GPU here). Validated by /prompt only."+ },+ {+ "id": "video-export-pro-chunked",+ "title": "Pro codec export in passes (ProRes 422 HQ / 4444, H.265 10-bit, FFV1, H.264): memory stays flat (VHS meta-batch)",+ "capability": "export-video",+ "file": "video-export-pro-chunked.json",+ "source": "hand-built (scripts/comfy/hand-built/video-export-pro-chunked.json)",+ "bindings": {+ "video": [+ {+ "node": "1",+ "input": "video"+ }+ ],+ "framesPerBatch": [+ {+ "node": "2",+ "input": "frames_per_batch"+ }+ ],+ "format": [+ {+ "node": "4",+ "input": "format"+ }+ ],+ "profile": [+ {+ "node": "4",+ "input": "profile"+ }+ ],+ "filenamePrefix": [+ {+ "node": "4",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "4",+ "kind": "video"+ }+ ],+ "defaults": {+ "framesPerBatch": 64,+ "format": "video/ProRes",+ "profile": "hq"+ },+ "limits": {},+ "models": [],+ "customNodes": [+ {+ "name": "ComfyUI-VideoHelperSuite",+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"+ }+ ],+ "vramGb": 0,+ "license": "n/a (no model; VideoHelperSuite GPL-3.0 code and the system ffmpeg's prores_ks / libx265 / ffv1 / libx264 encoders)",+ "validated": true,+ "notes": "video-export-pro with VHS_LoadVideo decoding framesPerBatch frames per pass (64 by default) into one VHS_VideoCombine encode that stays open across passes, at the source frame rate, with the source's sound: the export Fuobe's Export mode runs (video-export-pro decodes the whole clip). Same params.format mapping (prores_422_hq -> video/ProRes + hq, prores_4444 -> + 4444, h265_10bit -> video/h265-mp4 (yuv420p10le), ffv1 -> video/ffv1-mkv, h264 -> video/h264-mp4; exr -> video-export-exr). VHS lists only <prefix>_00001-audio.<ext> when the clip has sound, <prefix>_00001.<ext> otherwise, on the last pass. Caveat: VHS's ProRes \"hq\" profile leaves the pixel format to prores_ks, which picks yuv444p10le for the RGB frames, so \"ProRes 422 HQ\" is the HQ profile (apch) carrying 4:4:4 10-bit samples (FFmpeg decodes it; a strict 4:2:2 file needs a VHS format with -pix_fmt yuv422p10le, which would be a change to the node pack). The same holds for video-export-pro. Ran here (CPU, r4/video-finish, 3 s 320x180 25 fps clip with sound): ProRes apch / yuv444p10le / PCM and H.265 Main 10 yuv420p10le with AAC; on a silent 2 s 24 fps clip FFV1 gbrap16le .mkv, 48 of 48 frames; each ffprobe-checked."+ },+ {+ "id": "video-sdr-to-hdr-exr",+ "title": "SDR to HDR as OpenEXR frames (scene-linear Rec.2020, half float) plus a 10-bit HLG preview (core, no model)",+ "capability": "sdr-to-hdr",+ "file": "video-sdr-to-hdr-exr.json",+ "source": "hand-built (scripts/comfy/hand-built/video-sdr-to-hdr-exr.json)",+ "bindings": {+ "video": [+ {+ "node": "1",+ "input": "file"+ }+ ],+ "peakNits": [+ {+ "node": "3",+ "input": "algorithm.target_luminance"+ }+ ],+ "filenamePrefix": [+ {+ "node": "6",+ "input": "filename_prefix"+ },+ {+ "node": "4",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "6",+ "kind": "video",+ "role": "preview"+ },+ {+ "node": "4",+ "kind": "image",+ "role": "frames"+ }+ ],+ "defaults": {+ "peakNits": 650+ },+ "limits": {},+ "models": [],+ "customNodes": [],+ "vramGb": 0,+ "license": "n/a (no model; ComfyUI core)",+ "validated": true,+ "notes": "params.format exr of the sdr-to-hdr operation (Higgsfield's \"EXR 16-bit: uncompressed frame sequence for compositing\"). The same ImageSDRToHDR expansion as video-sdr-to-hdr; SaveImageAdvanced writes each frame as a half-float EXR with input_color_space HDR, i.e. the inverse HLG curve: scene-linear light in Rec.2020 primaries, highlights above 1.0 kept. Node 6 saves the 10-bit HLG MP4 with the clip's sound as the result to watch (role preview); the provider zips the frames (role frames) onto it as meta.artifacts.exr. Decodes the whole clip: RAM grows with the length (the provider refuses what the server can't hold). Ran here through Fuobe (CPU, 2 s 160x96 30 fps clip with sound): 60 half-float EXR frames zipped onto an H.264 High 10 HLG (arib-std-b67, bt2020) preview with AAC."}]}