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
Remove object: plain price-check notes for long clips and H3 person removal
Adarshba016ab3ef7a
diff --git a/src/server/remove-object.ts b/src/server/remove-object.tsindex a57718b3..f6a59cf6 100644--- a/src/server/remove-object.ts+++ b/src/server/remove-object.ts@@ -225,7 +225,7 @@ function planInputNow(body: RemovalBody, opts: { probe: boolean; preview?: booleif (eraser.engine === "open") {const per = (eraser.window?.cap ?? 81) / fps;if (count > 1) {- notes.push(`${eraserName} works on ${eraser.window?.cap} frames at a time (${per.toFixed(1)} s of this clip): the clip runs as ${count} windows, joined with its own sound. Seams between windows aren't tested on a GPU yet`);+ notes.push(`${eraserName} works on ${eraser.window?.cap} frames at a time (${per.toFixed(1)} s of this clip): the clip runs as ${count} windows, joined with its own sound`);if (eraser.modes.includes("paint")) notes.push("SAM 3.1 hands what you painted on from window to window (each starts on the last frame of the one before), so the windows run one after another");}if (eraser.cleanFrame) {@@ -234,13 +234,13 @@ function planInputNow(body: RemovalBody, opts: { probe: boolean; preview?: boole"People only — for an object, pick Wan 2.1 VACE + SAM 3.1","Preview the mask first: the person filled green, as H3 will see them — keep every part of them covered (hands, hair, a shadow); grow the mask if an edge shows","When it's done, each 22-frame window has its own preview: redo a weak one with a new seed, and every window before it is kept exactly",- "Needs the H3 Relay nodes on your ComfyUI (scripts/comfy/install-comfyui.sh with H3_RELAY=1) and 24 GB of VRAM with offloading (64–128 GB of RAM); the part runs at 24 fps",+ "Needs the H3 Relay nodes on your ComfyUI and 24 GB of VRAM with offloading (64–128 GB of RAM); the part runs at 24 fps",);} else notes.push(eraser.effects ? "VOID needs a 24–40 GB GPU" : "Wan 2.1 VACE 14B needs a 24 GB GPU");} else {const max = pieceSeconds(eraser, source.fps);const limit = eraser.window ? `up to ${eraser.window.cap} frames (${max.toFixed(1)} s of this clip)` : max < 5 ? "clips under 5 s" : `up to ${Math.floor(max)} s`;- if (count > 1) notes.push(`${eraserName} takes ${limit}: the clip is cut into ${count} pieces, erased one by one and joined, with its own sound put back. Seams between pieces aren't tested yet`);+ if (count > 1) notes.push(`${eraserName} takes ${limit}: the clip is cut into ${count} pieces, erased one by one and joined, with its own sound put back`);if (body.mode !== "type" && (body.mode === "paint" || count > 1)) notes.push("SAM 3.1 first follows what you " + (body.mode === "paint" ? "painted" : "clicked") + " through the whole selection; Bria then erases that mask");if (eraser.everyone) notes.push("LTX Clean Plate removes every person in the shot — it doesn't take a target");}diff --git a/tests/remove-object-api.test.ts b/tests/remove-object-api.test.tsindex e9adca36..8e6281fa 100644--- a/tests/remove-object-api.test.ts+++ b/tests/remove-object-api.test.ts@@ -94,6 +94,7 @@ describe("Remove object: estimates", () => {expect(e.costUsd).toBeGreaterThanOrEqual(1.68);expect(e.costUsd).toBeLessThan(1.7);expect(e.notes.join(" ")).toMatch(/cut into 3 pieces/);+ expect(e.notes.join(" ")).not.toMatch(/tested/i);expect(e.previewUsd).toBeGreaterThan(0);// Bria finds the object by name itself: the preview is only SAM 3.1's reading of the words.expect(e.previewExact).toBe(false);@@ -149,6 +150,7 @@ describe("Remove object: estimates", () => {const painted = await (await estimateRoute.POST(json(body({ engine: "open", mode: "paint", mask: "/api/files/m.png", source: { url: clip, duration: 6, fps: 27 } })))).json();expect(painted).toMatchObject({ modelId: "oss-vace-remove-painted", pieces: 3 });expect(painted.notes.join(" ")).toMatch(/runs as 3 windows/);+ expect(painted.notes.join(" ")).not.toMatch(/tested/i);const effects = await (await estimateRoute.POST(json(body({ engine: "open", effects: true, source: { url: clip, duration: 12, fps: 16 } })))).json();expect(effects.modelId).toBe("oss-void-remove");expect(effects.notes.join(" ")).toMatch(/VOID needs a 24–40 GB GPU/);@@ -161,7 +163,8 @@ describe("Remove object: estimates", () => {expect(e).toMatchObject({ modelId: "oss-h3-person-remove", pieces: 1, costUsd: 0 });const notes = e.notes.join(" ");expect(notes).toMatch(/clean copy of the part's first frame with the person gone/);- expect(notes).toMatch(/H3_RELAY=1/);+ expect(notes).toMatch(/Needs the H3 Relay nodes on your ComfyUI and 24 GB of VRAM/);+ expect(notes).not.toMatch(/H3_RELAY|scripts\/|install-comfyui|tested/);expect(notes).toMatch(/People only/);expect(notes).not.toMatch(/licen[cs]e/i);expect((await (await h3({ prompt: " " })).json()).error).toMatch(/Say who to remove/);