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
Video tools: Remove background and Depth map get Higgsfield's options
Claudec5a3e32636dd
diff --git a/scripts/comfy/validation-state.json b/scripts/comfy/validation-state.jsonindex db52bbc8..a34ab5f3 100644--- a/scripts/comfy/validation-state.json+++ b/scripts/comfy/validation-state.json@@ -519,13 +519,13 @@"sha256": "08da8d310a04add6eb729fb67f3a82b63b0a806368ce49fc498dfe6aeb58c83e","validated": true,"error": null,- "at": "2026-10-23T01:11:55.971Z"+ "at": "2026-10-23T04:45:33.273Z"},"video-bg-remove-sam3": {"sha256": "0d8eb4714dee686b9c5b63a74ff2edd7feccf8eae825e3c6843e00efe1bac1b9","validated": true,"error": null,- "at": "2026-10-23T01:11:55.986Z"+ "at": "2026-10-23T04:45:33.383Z"},"video-concat-2": {"sha256": "3d08966f5a3c2da662dc112df537ad4245bcd5dbb90e0451a0beb5c54d8db581",@@ -585,19 +585,19 @@"sha256": "732796f61d7404fe06f9e1132262778692c7e51ebca7316841ed14b91493e4f7","validated": true,"error": null,- "at": "2026-10-23T01:11:55.998Z"+ "at": "2026-10-23T04:45:33.598Z"},"video-depth-vda-small": {"sha256": "dc83a7795e72cde121a462cc9b3cc684e9619711521d3935fee015209f932dfe","validated": true,"error": null,- "at": "2026-10-23T01:11:56.014Z"+ "at": "2026-10-23T04:45:34.199Z"},"video-erase-void": {"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",@@ -621,13 +621,13 @@"sha256": "71aaa43c8ac4bb0a764a9a835d96d1c47b33244f741611c7036ebea8ffcef3a7","validated": true,"error": null,- "at": "2026-10-23T00:12:19.803Z"+ "at": "2026-10-23T04:45:37.134Z"},"video-inpaint-wan-vace-painted": {"sha256": "97d00c52d4c177c408528604cf20116bebf7128fba216021fefe5560f9a8d3fb","validated": true,"error": null,- "at": "2026-10-23T01:11:56.041Z"+ "at": "2026-10-23T04:45:41.777Z"},"video-insert-wan-vace": {"sha256": "5f57a143e6b2357badf59ebaa3d6d5c834c03330dee79f8af96d9b2307b5be24",diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.pyindex 75f1dfcc..4492f172 100644--- a/scripts/gen-cloud-models.py+++ b/scripts/gen-cloud-models.py@@ -489,14 +489,17 @@ model("elevenlabs-sfx", "ElevenLabs Sound Effects", "ElevenLabs", "elevenlabs",[("sfx", "fal-ai/elevenlabs/sound-effects/v2")], pricing=("second", 0.002), defaults={"duration": 5}, options={"durations": [2, 5, 10, 22]})model("elevenlabs-music", "ElevenLabs Music", "ElevenLabs", "elevenlabs", "audio", "Studio-quality songs from a prompt",[("music", "fal-ai/elevenlabs/music")], pricing=("minute", 0.6), defaults={"duration": 30}, options={"durations": [15, 30, 60, 120]})-model("birefnet-video", "BiRefNet video (hosted)", "ZhengPeng7", "birefnet", "video", "Transparent WebM cut-outs of the subject",- [("bg-remove-video", "fal-ai/birefnet/v2/video")], pricing=("second", 0.0), fixed={"video_output_type": "VP9 (.webm)", "model": "General Use (Heavy)"})+# Remove background (Video tools): the cut-out, or (BiRefNet: output_mask adds mask_video) its alpha mask.+model("birefnet-video", "BiRefNet video (hosted)", "ZhengPeng7", "birefnet", "video", "Transparent WebM cut-outs of the subject, or their alpha mask",+ [("bg-remove-video", "fal-ai/birefnet/v2/video", "fal", {"keys": {"maskOutput": "output_mask"}})], pricing=("second", 0.0),+ fixed={"video_output_type": "VP9 (.webm)", "model": "General Use (Heavy)"})model("bria-video-bg", "Bria video background removal", "Bria", "bria", "video", "Production-grade video matting with audio kept",[("bg-remove-video", "bria/video/background-removal/v3")], pricing=("second", 0.05),- fixed={"background_color": "Transparent", "output_container_and_codec": "webm_vp9"})+ fixed={"background_color": "Transparent", "output_container_and_codec": "webm_vp9"}, options={"matteOutputs": ["cutout"]})model("depth-anything-video-cloud", "Video Depth Anything (hosted)", "ByteDance", "depth-anything", "video", "Stable depth maps for every frame",- # The colour map follows params.colormap (Higgsfield's Depth Map picker); grayscale unless asked.- [("depth-video", "fal-ai/depth-anything-video", "fal", {"keys": {"colormap": "colormap"}})], pricing=("second", 0.04),+ # The colour map follows params.colormap (Higgsfield's Depth Map picker); grayscale unless asked. Side by side+ # puts the original clip next to the map.+ [("depth-video", "fal-ai/depth-anything-video", "fal", {"keys": {"colormap": "colormap", "sideBySide": "side_by_side"}})], pricing=("second", 0.04),fixed={"model": "VDA-Base"}, api_defaults={"colormap": "grayscale"})model("lightx-relight", "LightX Relight", "LightX", "lightx", "video", "Relight a video from a description and a light direction",[("relight-video", "fal-ai/lightx/relight")], pricing=("second", 0.1),@@ -633,12 +636,13 @@ model("wan-22-vace-inpaint", "Wan 2.2 VACE Fun Inpaint (hosted)", "Alibaba Wan",{"byResolution": {"720p": 0.1, "580p": 0.075, "480p": 0.05}}),api_defaults={"match_input_num_frames": True, "match_input_frames_per_second": True},options={"requires": {"mask": True, "msg": "Paint the area to change on the first frame"}})-# The mask maker for the erase and swap chains: what you name or click becomes a black-and-white mask video-# (apply_mask off; whether the matte is clean black and white is unverified without a run).+# The mask maker for the erase and swap chains, and Remove background's "keep what you name" on the cloud (Higgsfield+# runs SAM 3 video there): what you name or click becomes a black-and-white mask video (apply_mask off; whether the+# matte is clean black and white is unverified without a run). fal can't cut out by words, so it makes the mask only.model("sam-3-1-video-mask", "SAM 3.1 video mask", "Meta", "sam", "video",- "A mask video of what you name or click, tracked through the clip",- [("bg-remove-video", "fal-ai/sam-3-1/video")], fixed={"apply_mask": False}, hidden=True,- pricing=("second", 0.015, "$0.01 per 16 input frames (24 fps)"))+ "The alpha mask of what you name (“the dog”), tracked through the clip",+ [("bg-remove-video", "fal-ai/sam-3-1/video")], fixed={"apply_mask": False},+ pricing=("second", 0.015, "$0.01 per 16 input frames (24 fps)"), options={"keepsNamed": True, "matteOutputs": ["matte"]})# ----- Swap who or what is on cameramodel("p-video-replace", "P-Video Replace", "Pruna AI", "p-video", "video",@@ -1019,6 +1023,15 @@ def part4_slots(op, kf, inputs, m, opts, fmap):fmap["frameInterval"] = kf["frameInterval"]if "colormap" in kf and op == "depth-video":fmap["colormap"] = kf["colormap"]+ # The picker offers the API's own maps (Higgsfield's Depth Map: Grayscale, Turbo, Inferno, Magma, Viridis).+ opts["colormaps"] = union(opts.get("colormaps", []), [str(v) for v in enum_of(inputs, kf["colormap"])])+ # Depth maps beside the original clip, and Remove background's alpha mask (Higgsfield's Video tools options).+ if "sideBySide" in kf and op == "depth-video" and (inputs.get(kf["sideBySide"]) or {}).get("type") == "boolean":+ fmap["sideBySide"] = kf["sideBySide"]+ opts["sideBySide"] = True+ if "maskOutput" in kf and op == "bg-remove-video" and (inputs.get(kf["maskOutput"]) or {}).get("type") == "boolean":+ fmap["matteOutput"] = {"key": kf["maskOutput"], "values": {"cutout": False, "matte": True}}+ opts["matteOutputs"] = ["cutout", "matte"]if "frames" in kf and op == "images-to-video":item = (inputs.get(kf["frames"]) or {}).get("itemSchema") or {}url, frames = next((k for k in item if "url" in k), None), next((k for k in item if "frame" in k), None)diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.tsindex 789d35d5..d43e4ed6 100644--- a/src/app/api/generations/route.ts+++ b/src/app/api/generations/route.ts@@ -70,6 +70,8 @@ const RequestSchema = z.object({targetFps: z.number().positive().max(240).optional(),slowdown: z.number().min(1).max(8).optional(),colormap: z.string().max(40).optional(),+ sideBySide: z.boolean().optional(),+ matteOutput: z.enum(["cutout", "matte"]).optional(),position: Focus.optional(),scale: z.number().positive().max(10).optional(),animation: z.union([z.string().max(200), z.number()]).optional(),diff --git a/src/components/studio/settings-panel.tsx b/src/components/studio/settings-panel.tsxindex f1b2ac3c..21092655 100644--- a/src/components/studio/settings-panel.tsx+++ b/src/components/studio/settings-panel.tsx@@ -6,7 +6,7 @@ import { Button } from "@/components/ui/button";import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";import { Switch } from "@/components/ui/switch";import { OPERATION_LABELS, type GenParams, type ModelDef, type Operation } from "@/lib/catalog/types";-import { durationLabel, hiddenChanges, settingsSummary, type SettingsShape } from "@/lib/composer";+import { colormapLabel, durationLabel, hiddenChanges, MATTE_OUTPUT_LABELS, settingsSummary, videoToolNote, type SettingsShape } from "@/lib/composer";import { ratioValue } from "@/lib/format";import { cn } from "@/lib/utils";import { SliderControls } from "./audio-controls";@@ -102,6 +102,11 @@ function Toggle({ label, hint, checked, onChange, children }: { label: string; h);}+/** What the model can't do of an option the studio offers (open depth maps: grayscale and inferno only). */+function OptionNote({ text }: { text: string | null }) {+ return text ? <p className="text-[12px] leading-snug text-muted-foreground">{text}</p> : null;+}+export interface SettingsPanelProps {model?: ModelDef;op?: Operation;@@ -210,13 +215,26 @@ function SettingsBody({ model, op, shape, params: p, setP, setExtra, negativePro<Segmented label={kind === "video" ? "Videos" : "Images"} options={[1, 2, 3, 4]} value={p.numOutputs ?? 1} onChange={(v) => setP({ numOutputs: v })} format={(v) => `×${v}`} /></Section>)}+ {shape.matteOutput && model && (+ <Section label="Output">+ <Segmented label="Output" options={shape.matteOutput} value={p.matteOutput ?? shape.matteOutput[0]} onChange={(v) => setP({ matteOutput: v })} format={(v) => MATTE_OUTPUT_LABELS[v]} />+ <OptionNote text={videoToolNote(model, "matte")} />+ </Section>+ )}+ {shape.colormap && model && (+ <Section label="Color map">+ <Segmented label="Color map" options={shape.colormap} value={p.colormap ?? shape.colormap[0]} onChange={(v) => setP({ colormap: v })} format={colormapLabel} />+ <OptionNote text={videoToolNote(model, "colormap")} />+ </Section>+ )}{shape.multiShot && model && (<Section label="Multi-shot"><MultiShotControl model={model} params={p} onChange={setP} /></Section>)}- {(shape.draft || shape.audio || shape.enhance) && (+ {(shape.draft || shape.audio || shape.enhance || shape.sideBySide) && (<div className="divide-y rounded-xl border px-3">+ {shape.sideBySide && <Toggle label="Side by side" hint="Put the original video next to the depth map" checked={!!p.sideBySide} onChange={(v) => setP({ sideBySide: v })} />}{shape.draft && (<Toggle label="Draft" hint={p.draft ? "Cheap 480p take — finish the one you like in 1080p" : "Preview at 480p first, then render the keeper in 1080p"} checked={!!p.draft} onChange={(v) => setP({ draft: v })} />)}diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.tsindex ff6affab..f27d3c3f 100644--- a/src/lib/catalog/cloud-models.generated.ts+++ b/src/lib/catalog/cloud-models.generated.ts@@ -9736,7 +9736,7 @@ export const CLOUD_MODELS: ModelDef[] = ["family": "birefnet","engine": "cloud","kind": "video",- "tagline": "Transparent WebM cut-outs of the subject",+ "tagline": "Transparent WebM cut-outs of the subject, or their alpha mask","routes": [{"op": "bg-remove-video",@@ -9745,6 +9745,13 @@ export const CLOUD_MODELS: ModelDef[] = ["map": {"prompt": false,"video": "video_url",+ "matteOutput": {+ "key": "output_mask",+ "values": {+ "cutout": false,+ "matte": true+ }+ },"fixed": {"video_output_type": "VP9 (.webm)","model": "General Use (Heavy)"@@ -9753,6 +9760,10 @@ export const CLOUD_MODELS: ModelDef[] = [}],"options": {+ "matteOutputs": [+ "cutout",+ "matte"+ ],"promptless": true},"pricing": {@@ -9784,7 +9795,10 @@ export const CLOUD_MODELS: ModelDef[] = [}],"options": {- "promptless": true+ "promptless": true,+ "matteOutputs": [+ "cutout"+ ]},"pricing": {"unit": "second",@@ -9808,6 +9822,7 @@ export const CLOUD_MODELS: ModelDef[] = ["prompt": false,"video": "video_url","colormap": "colormap",+ "sideBySide": "side_by_side","resolution": "resolution","fixed": {"model": "VDA-Base"@@ -9819,6 +9834,14 @@ export const CLOUD_MODELS: ModelDef[] = [}],"options": {+ "colormaps": [+ "grayscale",+ "turbo",+ "inferno",+ "magma",+ "viridis"+ ],+ "sideBySide": true,"resolutions": ["auto","360p",@@ -12255,7 +12278,7 @@ export const CLOUD_MODELS: ModelDef[] = ["family": "sam","engine": "cloud","kind": "video",- "tagline": "A mask video of what you name or click, tracked through the clip",+ "tagline": "The alpha mask of what you name (\u201cthe dog\u201d), tracked through the clip","routes": [{"op": "bg-remove-video",@@ -12273,13 +12296,17 @@ export const CLOUD_MODELS: ModelDef[] = [}}],- "options": {},+ "options": {+ "keepsNamed": true,+ "matteOutputs": [+ "matte"+ ]+ },"pricing": {"unit": "second","usd": 0.015,"note": "$0.01 per 16 input frames (24 fps)"- },- "hidden": true+ }},{"id": "p-video-replace",diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 0d6acabc..a2185229 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -501,9 +501,10 @@ const open: ModelDef[] = [vendor: "ZhengPeng7",family: "birefnet",kind: "video",- tagline: "Cut the subject out of every frame — transparent WebM plus a matte",+ tagline: "Cut the subject out of every frame — a transparent WebM, or its alpha mask",routes: [comfy("bg-remove-video", "video-bg-remove-birefnet")],- options: {},+ // The graph saves both; params.matteOutput keeps one (Video tools → Remove background: Cutout video / Alpha mask).+ options: { promptless: true, matteOutputs: ["cutout", "matte"] },}),o({id: "oss-video-matte-sam3",@@ -511,9 +512,9 @@ const open: ModelDef[] = [vendor: "Meta",family: "sam",kind: "video",- tagline: "Keep just the object you name (“the dog”, “the red car”)",+ tagline: "Keep just what you name (“the dog”, “the red car”) — a transparent WebM, or its alpha mask",routes: [comfy("bg-remove-video", "video-bg-remove-sam3")],- options: {},+ options: { keepsNamed: true, matteOutputs: ["cutout", "matte"] },}),o({id: "oss-video-depth-da3",@@ -521,9 +522,9 @@ const open: ModelDef[] = [vendor: "ByteDance",family: "depth-anything",kind: "video",- tagline: "Per-frame depth maps for compositing and 3D effects",+ tagline: "Per-frame depth maps for compositing and 3D effects · grayscale",routes: [comfy("depth-video", "video-depth-da3")],- options: {},+ options: { colormaps: ["grayscale"], sideBySide: true },}),o({id: "oss-video-depth-vda",@@ -531,9 +532,10 @@ const open: ModelDef[] = [vendor: "ByteDance",family: "depth-anything",kind: "video",- tagline: "Temporally stable, flicker-free depth",+ tagline: "Temporally stable, flicker-free depth · grayscale or inferno",routes: [comfy("depth-video", "video-depth-vda-small")],- options: {},+ // VideoDepthAnythingOutput draws gray or inferno only; turbo, magma and viridis are the cloud's.+ options: { colormaps: ["grayscale", "inferno"], sideBySide: true },}),// Remove object (Video tools → Remove object; docs/research/comfyui-oss-4.md §b). The prompt names what to remove// (the provider sends it to SAM 3.1 as maskPrompt; the scene the gap is filled with is params.extra.prompt or adiff --git a/src/lib/catalog/payload.ts b/src/lib/catalog/payload.tsindex 01072ec7..17533268 100644--- a/src/lib/catalog/payload.ts+++ b/src/lib/catalog/payload.ts@@ -1,5 +1,5 @@import { readTimeline, timelineTracks } from "@/lib/av/timeline";-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];@@ -325,6 +325,11 @@ export function buildPayload(map: FieldMap, input: GenInput): Record<string, unkconst [k, v] = enumValue(map.colormap, input.colormap);out[k] = v;}+ if (map.sideBySide && input.sideBySide !== undefined) out[map.sideBySide] = input.sideBySide;+ if (map.matteOutput && input.matteOutput) {+ const v = map.matteOutput.values[input.matteOutput];+ if (v !== undefined) out[map.matteOutput.key] = v;+ }if (map.frames && images.length) out[map.frames.key] = images.map((url) => ({ [map.frames!.url]: url, [map.frames!.frames]: 1 }));if (map.loop && input.audio) {const want = input.duration && input.sourceDuration ? Math.ceil(input.duration / input.sourceDuration) : map.loop.max;@@ -755,6 +760,28 @@ function stemOutputs(response: unknown): ExtractedOutput[] {return stems.length ? stems.sort((a, b) => rank(a.meta.stem) - rank(b.meta.stem)) : extractMedia(response);}+/**+ * Remove background: BiRefNet answers with the cut-out (`video`) and, when asked, its mask (`mask_video`); both are+ * tagged (meta.role "cutout" / "matte") so the job keeps the one asked for ({@link keepMatte}).+ */+function matteOutputs(response: unknown): ExtractedOutput[] {+ const r = body(response);+ const cut = isObj(r) ? fileOf(r.video) : undefined;+ const mask = isObj(r) ? fileOf(r.mask_video) : undefined;+ if (!cut || !mask) return extractMedia(response);+ return [+ { url: cut.url, kind: "video", contentType: cut.contentType, meta: { role: "cutout" } },+ { url: mask.url, kind: "video", contentType: mask.contentType, meta: { role: "matte" } },+ ];+}++/** The results of a Remove background job: only the asked-for file when the answer tagged both (else all of them). */+export function keepMatte<T extends { meta?: Record<string, unknown> }>(outputs: T[], want: MatteOutput | undefined): T[] {+ if (!want) return outputs;+ const kept = outputs.filter((o) => o.meta?.role === want);+ return kept.length ? kept : outputs;+}+/*** Every result of a provider response, with structure the operation defines: layers (name, z, bbox),* text blocks, transcripts (text + cues), 3D models and audio stems. A text operation's response with@@ -796,6 +823,9 @@ export function extractOutputs(response: unknown, op?: Operation): ExtractedOutpcase "separate-audio":out = stemOutputs(response);break;+ case "bg-remove-video":+ out = matteOutputs(response);+ break;default:out = extractMedia(response);}diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex c31d731c..2c608d7d 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -238,6 +238,7 @@ export function planGeneration(if (requires?.prompt && !prompt) throw new Error(requires.msg);if (requires?.mask && !req.inputs?.mask) throw new Error(requires.msg);if (requires?.points && !params.points?.length) throw new Error(requires.msg);+ if (op === "bg-remove-video" || op === "depth-video") checkVideoToolOptions(model, op, prompt, params);if (!prompt && !promptOptional(model, op) && !markedTarget(model, op, req, params)) {throw new Error(op === "remove-object" ? "Say what to remove, e.g. “the coffee cup in her hand”" : "Write a prompt first");}@@ -254,6 +255,33 @@ export function planGeneration(return { model, op, prompt, params: { ...params, numOutputs: perJobOutputs }, loras, jobs, perJobOutputs };}+/**+ * Remove background and Depth map options (Higgsfield's Video tools): what to keep, the cut-out or its alpha mask,+ * the colour map and side by side, each checked against what the model makes, so nothing is quietly swapped.+ */+function checkVideoToolOptions(model: ModelDef, op: "bg-remove-video" | "depth-video", prompt: string, params: GenParams) {+ const o = model.options;+ if (op === "bg-remove-video") {+ // A segmenter keeps what is named (or clicked, where its route reads points): with neither it keeps nothing.+ const clicked = !!params.points?.length && routesFor(model, op).some((r) => !!r.map?.points);+ if (o.keepsNamed && !prompt && !clicked) throw new Error("Say what to keep, e.g. “the dog” or “the woman in red”");+ const outputs = o.matteOutputs ?? ["cutout"];+ if (params.matteOutput && !outputs.includes(params.matteOutput)) {+ throw new Error(params.matteOutput === "matte" ? `${model.name} makes the cut-out only — pick BiRefNet or SAM for an alpha mask` : `${model.name} makes the alpha mask only — pick BiRefNet for a cut-out video`);+ }+ return;+ }+ const maps = o.colormaps ?? ["grayscale"];+ if (params.colormap && !maps.includes(params.colormap.toLowerCase())) {+ throw new Error(+ model.engine === "open"+ ? `${model.name} draws ${maps.length > 1 ? `${maps.slice(0, -1).join(", ")} or ${maps.at(-1)}` : "grayscale only"} — the open engine has no ${params.colormap}; it's on the cloud`+ : `${model.name} has no ${params.colormap} colour map`,+ );+ }+ if (params.sideBySide && !o.sideBySide) throw new Error(`${model.name} can't put the original next to the depth map`);+}+/** Keyframes: one time per image, from 0 up, inside the clip, no more than the model takes. */function checkKeyframes(model: ModelDef, n: number, params: GenParams) {const max = model.options.maxImages;diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex 5bee704f..7cc207a9 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -222,6 +222,12 @@ export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {*/export type VideoFormat = "h264" | "h265_10bit" | "prores_422_hq" | "prores_4444" | "ffv1" | "exr";+/** 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;@@ -380,6 +386,13 @@ export interface FieldMap {frameInterval?: string;/** Depth map colours (params.colormap: grayscale, turbo, inferno, magma, viridis). */colormap?: string | EnumField;+ /** Boolean field: the original clip next to the depth map (params.sideBySide). */+ sideBySide?: string;+ /**+ * Remove background's output (params.matteOutput) as the API's own value: BiRefNet's `output_mask` true adds+ * the mask video, and the job keeps the asked-for file (outputs tagged meta.role "cutout" / "matte").+ */+ matteOutput?: { key: string; values: Partial<Record<MatteOutput, unknown>> };/** Images held as video frames: [{[url]: image, [frames]: 1}] in order (images to video at params.fps). */frames?: { key: string; url: string; frames: string };/**@@ -477,6 +490,14 @@ export interface ModelOptions {requires?: { 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;}export interface Pricing {@@ -575,6 +596,10 @@ export interface GenParams {slowdown?: number;/** Depth map colours: grayscale, turbo, inferno, magma or viridis. */colormap?: string;+ /** Depth maps: the original clip next to the result. */+ sideBySide?: boolean;+ /** Remove background: the cut-out (transparent video) or its alpha mask (black and white). */+ matteOutput?: MatteOutput;/** Overlay: where its centre goes (0–1 of the background) and its size (1 = its own size). */position?: FocusPoint;scale?: number;diff --git a/src/lib/composer.ts b/src/lib/composer.tsindex 01ac129f..51855ca7 100644--- a/src/lib/composer.ts+++ b/src/lib/composer.ts@@ -3,7 +3,7 @@* 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 type { Engine, GenParams, InputSlot, MediaKind, ModelDef, Operation } from "./catalog/types";+import { COLORMAPS, type Engine, type GenParams, type InputSlot, type MatteOutput, type MediaKind, type ModelDef, type Operation } from "./catalog/types";// ---------------------------------------------------------------------------// Settings summary ("16:9 · 720p · 5s · ×1")@@ -29,6 +29,12 @@ export interface SettingsShape {enhance: boolean;sliders: boolean;negativePrompt: boolean;+ /** 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;}/**@@ -47,6 +53,8 @@ export function settingsShape(const o = model?.options ?? {};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),@@ -58,9 +66,39 @@ export function settingsShape(enhance: showPrompt,sliders: !!o.sliders?.length,negativePrompt: !!o.negativePrompt,+ 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,};}+export const MATTE_OUTPUT_LABELS: Record<MatteOutput, string> = { cutout: "Cutout video", matte: "Alpha mask" };+export const colormapLabel = (v: string) => v.charAt(0).toUpperCase() + v.slice(1);++/**+ * What a Remove background or Depth map model can't make, said under its picker (Higgsfield offers five colour+ * maps and both outputs on one model; here they depend on the model and the engine).+ */+export function videoToolNote(model: Pick<ModelDef, "name" | "engine" | "options">, what: "matte" | "colormap"): string | null {+ const o = model.options;+ if (what === "matte") {+ const outs = o.matteOutputs ?? ["cutout"];+ if (outs.length > 1) return null;+ if (outs[0] === "cutout") return `${model.name} makes the cut-out only — BiRefNet and SAM also make the alpha mask.`;+ return model.engine === "cloud"+ ? "The cloud gives the alpha mask of what you name — cut it out by words with SAM 3 on your ComfyUI, or cut out the whole subject with BiRefNet or Bria."+ : `${model.name} makes the alpha mask only.`;+ }+ const maps = o.colormaps ?? ["grayscale"];+ if (maps.length >= COLORMAPS.length) return null;+ if (model.engine === "open") {+ return maps.length > 1+ ? `The open engine draws ${maps.map(colormapLabel).join(" and ")} — Turbo, Magma and Viridis need the cloud engine.`+ : `${model.name} draws grayscale only — Video Depth Anything adds Inferno; Turbo, Magma and Viridis need the cloud engine.`;+ }+ return `${model.name} draws ${maps.map(colormapLabel).join(", ")}.`;+}+/** The parts of the summary chip label, in reading order. */export function settingsSummary(shape: SettingsShape, params: GenParams, model?: Pick<ModelDef, "options" | "defaults">): string[] {const parts: string[] = [];@@ -77,6 +115,9 @@ export function settingsSummary(shape: SettingsShape, params: GenParams, model?:if (shape.draft && params.draft) parts.push("Draft");if (shape.audio && params.generateAudio === false) parts.push("No audio");if (shape.enhance && params.enhancePrompt) parts.push("Enhance");+ 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 --git a/src/lib/studios.ts b/src/lib/studios.tsindex 3274b84f..62076a91 100644--- a/src/lib/studios.ts+++ b/src/lib/studios.ts@@ -313,8 +313,8 @@ export const VIDEO_MATTE_STUDIO: StudioConfig = {feature: "video-tools",title: "Video tools",hero: "Cut out the subject",- subtitle: "Every frame matted — a transparent WebM you can drop over anything.",- placeholder: "Optional (SAM 3): what to keep, e.g. “the dog”",+ subtitle: "Every frame matted — a transparent WebM you can drop over anything, or its black-and-white alpha mask. Pick SAM to keep just what you name.",+ placeholder: "What to keep, e.g. “the dog” or “the woman in red”",kind: "video",ops: ["bg-remove-video"],feed: { features: ["video-tools"] },@@ -326,7 +326,7 @@ export const VIDEO_MATTE_STUDIO: StudioConfig = {export const VIDEO_DEPTH_STUDIO: StudioConfig = {...VIDEO_MATTE_STUDIO,hero: "A depth map for every frame",- subtitle: "For compositing, fog, parallax and 3D effects.",+ subtitle: "For compositing, fog, parallax and 3D effects — in grayscale or a color map, alone or next to the original.",placeholder: "",ops: ["depth-video"],defaultModels: { cloud: "depth-anything-video-cloud", open: "oss-video-depth-vda" },diff --git a/src/server/generations.ts b/src/server/generations.tsindex f0e3da18..a6d9b522 100644--- a/src/server/generations.ts+++ b/src/server/generations.ts@@ -8,6 +8,7 @@ import { withSignatureWords } from "@/lib/catalog/palettes";import { applySketch, stripMotionPaths } from "@/lib/catalog/sketch";import { cueText, type Cue } from "@/lib/cues";import { estimateCost, planGeneration, routesFor } from "@/lib/catalog/plan";+import { keepMatte } from "@/lib/catalog/payload";import {LAST_FRAME_CHAIN,OPERATION_OUTPUT,@@ -870,7 +871,9 @@ async function pollOne(r: Row): Promise<void> {// Mark first so a slow download isn't polled twice.update(r.id, { status: "running", progress: 0.99, message: "Saving results" });const outputs: OutputFile[] = [];- for (const o of res.outputs as RichOutput[]) {+ // Remove background: of a cut-out and its mask (BiRefNet's answer), the one asked for (params.matteOutput).+ const matte = r.op === "bg-remove-video" ? (JSON.parse(r.request_json) as GenerationRequest).params?.matteOutput : undefined;+ for (const o of keepMatte(res.outputs as RichOutput[], matte)) {try {outputs.push(await persistOutput(o, r.id));} catch (e) {diff --git a/src/server/providers/comfyui.ts b/src/server/providers/comfyui.tsindex 2980f919..b07a1a09 100644--- a/src/server/providers/comfyui.ts+++ b/src/server/providers/comfyui.ts@@ -582,15 +582,16 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,}if (b.prompt) values.prompt = REMOVE_SCENE;}- // Depth colour maps: Video Depth Anything has gray and inferno; the other graphs are grayscale only.+ // Depth maps: Video Depth Anything draws gray or inferno (the other graphs grayscale only), and can put the+ // original clip next to the map.if (ctx.op === "depth-video" && input.colormap) {const want = input.colormap.toLowerCase() === "grayscale" ? "gray" : input.colormap.toLowerCase();if (b.colormap && (want === "gray" || want === "inferno")) values.colormap = want;else if (want !== "gray") throw new ProviderError(b.colormap ? "The open engine's depth maps come in grayscale or inferno — turbo, magma and viridis are on the cloud" : "This depth model makes grayscale maps only — pick Video Depth Anything for inferno");}- // Matte graphs save a cut-out and a black-and-white matte: params.extra.keepOutput ("cutout" | "matte") keeps one.- const keepRole = typeof extra.keepOutput === "string" ? extra.keepOutput : undefined;- delete extra.keepOutput;+ if (b.sideBySide && input.sideBySide !== undefined) values.sideBySide = input.sideBySide;+ // Matte graphs save a cut-out and a black-and-white matte: params.matteOutput keeps one.+ const keepRole: string | undefined = ctx.op === "bg-remove-video" ? input.matteOutput : undefined;if (b.filenamePrefix) values.filenamePrefix = `fuobe/${ctx.generationId}`;const cues = manifest.expand === "captions" ? captionCues(input, extra) : [];diff --git a/src/server/providers/mock.ts b/src/server/providers/mock.tsindex 2c6278a2..2b096c98 100644--- a/src/server/providers/mock.ts+++ b/src/server/providers/mock.ts@@ -294,6 +294,8 @@ function demoOutputs(op: Operation | undefined, kind: MediaKind, prompt: string,// The painted eraser also hands the window's last tracked mask to the next window....(meta.lastMask ? [{ url: svgUri(demoMaskSvg(ar)), kind: "image" as const, contentType: "image/svg+xml", meta: { role: "mask", demo: true } }] : []),];+ case "bg-remove-video":+ return [{ url: `sample:${sampleClip(ar)}`, kind: "video", contentType: "video/mp4", meta: { demo: true, role: meta.matteOutput } }];case "video-swap":case "video-insert":case "keyframes":@@ -349,6 +351,8 @@ export const mockProvider: ProviderAdapter = {duration: input.duration,format: input.format,clips: input.audios?.length,+ // Remove background: which file the demo stands for (the cut-out or its alpha mask).+ matteOutput: route.op === "bg-remove-video" ? (input.matteOutput ?? model.options.matteOutputs?.[0] ?? "cutout") : undefined,// The painted eraser's second output: the window's last tracked mask (video-inpaint-wan-vace-painted).lastMask: route.provider === "comfyui" && route.endpoint === "video-inpaint-wan-vace-painted",// Workflows whose second output is the cut's first frame (video-segment-resample).diff --git a/tests/cloud-catalog-4.test.ts b/tests/cloud-catalog-4.test.tsindex f9635bf8..d8d32836 100644--- a/tests/cloud-catalog-4.test.ts+++ b/tests/cloud-catalog-4.test.ts@@ -63,8 +63,8 @@ const ROUND4: Record<string, Operation> = {"genjutsu-lite-motion-transfer": "motion-transfer",};-/** Chain helpers that never show in a picker. */-const HIDDEN = ["bria-video-erase-points", "bria-video-erase-mask", "sam-3-1-video-mask", "ken-burns", "overlay-image", "extract-frames", "images-to-video", "join-audio"];+/** Chain helpers that never show in a picker (SAM 3.1's mask is also Remove background's "keep what you name" on the cloud). */+const HIDDEN = ["bria-video-erase-points", "bria-video-erase-mask", "ken-burns", "overlay-image", "extract-frames", "images-to-video", "join-audio"];const NEW_OPS: Operation[] = ["remove-object", "video-swap", "video-insert", "keyframes", "sdr-to-hdr", "export-video", "ocr", "still-motion", "audio-loop", "audio-join",diff --git a/tests/remove-object-comfy.test.ts b/tests/remove-object-comfy.test.tsindex 93ec9d48..1d1252b3 100644--- a/tests/remove-object-comfy.test.ts+++ b/tests/remove-object-comfy.test.ts@@ -93,15 +93,16 @@ describe("matte graphs: Cutout video or Alpha mask", () => {const both = await prepare("video-bg-remove-sam3", { prompt: "the dog" }, "bg-remove-video");expect(Object.keys(both.workflow)).toEqual(expect.arrayContaining(["9", "12"]));expect(both.manifest.outputs.map((o) => o.role)).toEqual(["cutout", "matte"]);- const matte = await prepare("video-bg-remove-sam3", { prompt: "the dog", extra: { keepOutput: "matte" } }, "bg-remove-video");+ const matte = await prepare("video-bg-remove-sam3", { prompt: "the dog", matteOutput: "matte" }, "bg-remove-video");expect(matte.workflow["9"]).toBeUndefined();expect(matte.workflow["12"].class_type).toBe("SaveVideo");expect(at(matte.workflow, "4", "text")).toBe("the dog");- const cut = await prepare("video-bg-remove-birefnet", { extra: { keepOutput: "cutout" } }, "bg-remove-video");+ const cut = await prepare("video-bg-remove-birefnet", { matteOutput: "cutout" }, "bg-remove-video");expect(cut.workflow["10"]).toBeUndefined();expect(cut.workflow["7"].class_type).toBe("SaveWEBM");- // keepOutput is not a graph input.- expect(JSON.stringify(cut.workflow)).not.toContain("keepOutput");+ // Only Remove background keeps one: a matte graph run for another op saves both.+ const other = await prepare("video-bg-remove-birefnet", { matteOutput: "cutout" }, "bg-remove");+ expect(Object.keys(other.workflow)).toEqual(expect.arrayContaining(["7", "10"]));});});@@ -110,7 +111,7 @@ describe("depth graphs: colour map and side by side", () => {const gray = await prepare("video-depth-vda-small", { colormap: "grayscale" }, "depth-video");expect(at(gray.workflow, "5", "colormap")).toBe("gray");expect(at(gray.workflow, "9", "value")).toBe(false);- const inferno = await prepare("video-depth-vda-small", { colormap: "inferno", extra: { sideBySide: true } }, "depth-video");+ const inferno = await prepare("video-depth-vda-small", { colormap: "inferno", sideBySide: true }, "depth-video");expect(at(inferno.workflow, "5", "colormap")).toBe("inferno");expect(at(inferno.workflow, "9", "value")).toBe(true);expect(inferno.workflow["10"].inputs).toEqual({ switch: ["9", 0], on_true: ["8", 0], on_false: ["5", 0] });@@ -119,7 +120,7 @@ describe("depth graphs: colour map and side by side", () => {it("Depth Anything 3 is grayscale only (and can go side by side too)", async () => {await expect(prepare("video-depth-da3", { colormap: "inferno" }, "depth-video")).rejects.toThrow(/grayscale maps only/);- const sbs = await prepare("video-depth-da3", { colormap: "grayscale", extra: { sideBySide: true } }, "depth-video");+ const sbs = await prepare("video-depth-da3", { colormap: "grayscale", sideBySide: true }, "depth-video");expect(at(sbs.workflow, "9", "value")).toBe(true);});});diff --git a/tests/video-tool-options.test.ts b/tests/video-tool-options.test.tsnew file mode 100644index 00000000..cdff75b9--- /dev/null+++ b/tests/video-tool-options.test.ts@@ -0,0 +1,123 @@+import { describe, expect, it } from "vitest";+import { getModel, getPreset } from "@/lib/catalog";+import { buildPayload, extractOutputs, keepMatte } from "@/lib/catalog/payload";+import { planGeneration } from "@/lib/catalog/plan";+import type { GenerationRequest, ModelDef } from "@/lib/catalog/types";+import { settingsShape, settingsSummary, videoToolNote } from "@/lib/composer";+import { VIDEO_DEPTH_STUDIO, VIDEO_MATTE_STUDIO } from "@/lib/studios";++// Video tools → Remove background and Depth map, with Higgsfield's options (docs/research/higgsfield-delta-4.md §4.3):+// what to keep (SAM), Cutout video or Alpha mask, the colour map and side by side, per model and engine.++const model = (id: string) => getModel(id)!;+const map = (id: string) => model(id).routes[0].map!;+const plan = (req: Omit<GenerationRequest, "feature">) => planGeneration({ feature: "video-tools", ...req }, getModel, getPreset);+const fails = (req: Omit<GenerationRequest, "feature">) => {+ try {+ plan(req);+ } catch (e) {+ return (e as Error).message;+ }+ return null;+};+const clip = { video: "/api/files/clip.mp4" };++describe("Remove background: what to keep, cut-out or alpha mask", () => {+ it("each model says what it makes", () => {+ expect(model("bria-video-bg").options.matteOutputs).toEqual(["cutout"]);+ expect(model("birefnet-video").options.matteOutputs).toEqual(["cutout", "matte"]);+ expect(model("sam-3-1-video-mask").options).toMatchObject({ matteOutputs: ["matte"], keepsNamed: true });+ expect(model("sam-3-1-video-mask").hidden).toBeFalsy();+ expect(model("oss-video-matte-birefnet").options).toMatchObject({ promptless: true, matteOutputs: ["cutout", "matte"] });+ expect(model("oss-video-matte-sam3").options).toMatchObject({ keepsNamed: true, matteOutputs: ["cutout", "matte"] });+ });++ it("BiRefNet's alpha mask is its output_mask switch; Bria has none", () => {+ expect(buildPayload(map("birefnet-video"), { ...clip, matteOutput: "matte" })).toMatchObject({ video_url: clip.video, output_mask: true, video_output_type: "VP9 (.webm)" });+ expect(buildPayload(map("birefnet-video"), { ...clip, matteOutput: "cutout" })).toMatchObject({ output_mask: false });+ expect(buildPayload(map("birefnet-video"), clip)).not.toHaveProperty("output_mask");+ expect(buildPayload(map("bria-video-bg"), { ...clip, matteOutput: "cutout" })).toEqual({ video_url: clip.video, background_color: "Transparent", output_container_and_codec: "webm_vp9" });+ });++ it("the cut-out and the mask come back tagged, and the job keeps the one asked for", () => {+ const answer = { video: { url: "https://fal.media/cut.webm", content_type: "video/webm" }, mask_video: { url: "https://fal.media/mask.mp4", content_type: "video/mp4" } };+ const outs = extractOutputs(answer, "bg-remove-video");+ expect(outs.map((o) => [o.url, o.meta?.role])).toEqual([+ ["https://fal.media/cut.webm", "cutout"],+ ["https://fal.media/mask.mp4", "matte"],+ ]);+ expect(keepMatte(outs, "matte").map((o) => o.url)).toEqual(["https://fal.media/mask.mp4"]);+ expect(keepMatte(outs, "cutout").map((o) => o.url)).toEqual(["https://fal.media/cut.webm"]);+ // One file (Bria, SAM's mask video): kept as it is, untagged.+ const one = extractOutputs({ video: { url: "https://fal.media/only.webm" } }, "bg-remove-video");+ expect(one).toEqual([{ url: "https://fal.media/only.webm", kind: "video" }]);+ expect(keepMatte(one, "matte")).toEqual(one);+ expect(keepMatte(outs, undefined)).toHaveLength(2);+ });++ it("SAM keeps what you name: words (or clicks where its route reads them) are needed", () => {+ expect(fails({ modelId: "sam-3-1-video-mask", op: "bg-remove-video", inputs: clip })).toMatch(/Say what to keep/);+ expect(plan({ modelId: "sam-3-1-video-mask", op: "bg-remove-video", prompt: "the dog", inputs: clip }).prompt).toBe("the dog");+ // Remove object's tracker sends clicked points without words.+ expect(fails({ modelId: "sam-3-1-video-mask", op: "bg-remove-video", inputs: clip, params: { points: [{ x: 5, y: 5 }] } })).toBeNull();+ // The open graph reads words only.+ expect(fails({ modelId: "oss-video-matte-sam3", op: "bg-remove-video", inputs: clip, params: { points: [{ x: 5, y: 5 }] } })).toMatch(/Say what to keep/);+ expect(fails({ modelId: "oss-video-matte-sam3", op: "bg-remove-video", prompt: "the red car", inputs: clip, params: { matteOutput: "matte" } })).toBeNull();+ expect(fails({ modelId: "oss-video-matte-birefnet", op: "bg-remove-video", inputs: clip })).toBeNull();+ });++ it("an output the model can't make is named, not quietly swapped", () => {+ expect(fails({ modelId: "bria-video-bg", op: "bg-remove-video", inputs: clip, params: { matteOutput: "matte" } })).toMatch(/cut-out only — pick BiRefNet or SAM/);+ expect(fails({ modelId: "sam-3-1-video-mask", op: "bg-remove-video", prompt: "the dog", inputs: clip, params: { matteOutput: "cutout" } })).toMatch(/alpha mask only/);+ expect(fails({ modelId: "birefnet-video", op: "bg-remove-video", inputs: clip, params: { matteOutput: "matte" } })).toBeNull();+ });+});++describe("Depth map: colour map and side by side", () => {+ it("the cloud draws Higgsfield's five maps and goes side by side; the open engine gray or inferno", () => {+ expect(model("depth-anything-video-cloud").options).toMatchObject({ colormaps: ["grayscale", "turbo", "inferno", "magma", "viridis"], sideBySide: true });+ expect(buildPayload(map("depth-anything-video-cloud"), { ...clip, colormap: "turbo", sideBySide: true })).toMatchObject({+ video_url: clip.video,+ colormap: "turbo",+ side_by_side: true,+ model: "VDA-Base",+ });+ expect(buildPayload(map("depth-anything-video-cloud"), clip)).toMatchObject({ colormap: "grayscale" });+ expect(model("oss-video-depth-vda").options).toMatchObject({ colormaps: ["grayscale", "inferno"], sideBySide: true });+ expect(model("oss-video-depth-da3").options).toMatchObject({ colormaps: ["grayscale"], sideBySide: true });+ });++ it("a map a model can't draw stops before anything runs", () => {+ expect(fails({ modelId: "oss-video-depth-vda", op: "depth-video", inputs: clip, params: { colormap: "turbo" } })).toMatch(/grayscale or inferno — the open engine has no turbo/);+ expect(fails({ modelId: "oss-video-depth-da3", op: "depth-video", inputs: clip, params: { colormap: "inferno" } })).toMatch(/grayscale only/);+ expect(fails({ modelId: "oss-video-depth-vda", op: "depth-video", inputs: clip, params: { colormap: "inferno", sideBySide: true } })).toBeNull();+ expect(fails({ modelId: "depth-anything-video-cloud", op: "depth-video", inputs: clip, params: { colormap: "viridis", sideBySide: true } })).toBeNull();+ });+});++describe("the composer's settings for these tools", () => {+ const shape = (m: ModelDef, ops: typeof VIDEO_MATTE_STUDIO.ops) => settingsShape(m, undefined, "video", false, {}, ops);++ it("Remove background offers what the model makes (one output still shows, with a note)", () => {+ const biref = shape(model("oss-video-matte-birefnet"), VIDEO_MATTE_STUDIO.ops);+ expect(biref.matteOutput).toEqual(["cutout", "matte"]);+ expect(biref.colormap).toBeNull();+ expect(settingsSummary(biref, {}, model("oss-video-matte-birefnet"))).toEqual(["Cutout video"]);+ expect(settingsSummary(biref, { matteOutput: "matte" }, model("oss-video-matte-birefnet"))).toEqual(["Alpha mask"]);+ expect(shape(model("bria-video-bg"), VIDEO_MATTE_STUDIO.ops).matteOutput).toEqual(["cutout"]);+ expect(videoToolNote(model("bria-video-bg"), "matte")).toMatch(/cut-out only — BiRefNet and SAM also make the alpha mask/);+ expect(videoToolNote(model("sam-3-1-video-mask"), "matte")).toMatch(/SAM 3 on your ComfyUI/);+ expect(videoToolNote(model("birefnet-video"), "matte")).toBeNull();+ });++ it("Depth map: the colour maps, side by side, and what the open engine lacks", () => {+ const cloud = shape(model("depth-anything-video-cloud"), VIDEO_DEPTH_STUDIO.ops);+ expect(cloud).toMatchObject({ colormap: ["grayscale", "turbo", "inferno", "magma", "viridis"], sideBySide: true, matteOutput: null });+ expect(settingsSummary(cloud, { colormap: "turbo", sideBySide: true }, model("depth-anything-video-cloud"))).toEqual(["auto", "Turbo", "Side by side"]);+ expect(videoToolNote(model("depth-anything-video-cloud"), "colormap")).toBeNull();+ expect(videoToolNote(model("oss-video-depth-vda"), "colormap")).toBe("The open engine draws Grayscale and Inferno — Turbo, Magma and Viridis need the cloud engine.");+ expect(videoToolNote(model("oss-video-depth-da3"), "colormap")).toMatch(/grayscale only — Video Depth Anything adds Inferno/);+ // Other studios don't get these sections.+ expect(settingsShape(model("seedance-2-5"), "t2v", "video", true)).toMatchObject({ matteOutput: null, colormap: null, sideBySide: false });+ });+});diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.jsonindex a2fd8957..5359855f 100644--- a/workflows/comfyui/manifest.json+++ b/workflows/comfyui/manifest.json@@ -1,6 +1,6 @@{"version": 1,- "generatedAt": "2026-10-23T01:11:51.812Z",+ "generatedAt": "2026-10-23T04:45:29.784Z","comfyuiCommit": "fc04da91b2ab12f99e4716371a7e4f98ac982597","comfyuiVersion": "0.41.0","workflowTemplatesVersion": "0.11.86",diff --git a/workflows/comfyui/object_info.subset.json b/workflows/comfyui/object_info.subset.jsonindex 0595a42e..2821f9f8 100644--- a/workflows/comfyui/object_info.subset.json+++ b/workflows/comfyui/object_info.subset.json@@ -5290,9 +5290,7 @@{"tooltip": "Select a frame interpolation model to load. Models must be placed in the 'frame_interpolation' folder.","multiselect": false,- "options": [- "vftest_rife_random.safetensors"- ]+ "options": []}]}@@ -17566,9 +17564,7 @@"COMBO",{"multiselect": false,- "options": [- "vftest_esrgan_x4_random.safetensors"- ]+ "options": []}]}