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
E2E: real CPU runs of the round-3 video tools through Fuobe, checked with ffprobe
Claude73654872fa16
diff --git a/scripts/comfy/hand-built/selftest-meta-batch.json b/scripts/comfy/hand-built/selftest-meta-batch.jsonnew file mode 100644index 00000000..67abd961--- /dev/null+++ b/scripts/comfy/hand-built/selftest-meta-batch.json@@ -0,0 +1,21 @@+{+ "1": {+ "class_type": "VHS_LoadVideo",+ "inputs": {+ "video": "input.mp4", "force_rate": 0, "custom_width": 0, "custom_height": 0, "frame_load_cap": 0, "skip_first_frames": 0,+ "select_every_nth": 1, "format": "None", "meta_batch": ["2", 0]+ },+ "_meta": { "title": "Clip (loaded 8 frames per pass)" }+ },+ "2": { "class_type": "VHS_BatchManager", "inputs": { "frames_per_batch": 8 }, "_meta": { "title": "Meta batch: re-queue every 8 frames" } },+ "3": { "class_type": "ImageInvert", "inputs": { "image": ["1", 0] }, "_meta": { "title": "Per-frame work (invert)" } },+ "4": {+ "class_type": "VHS_VideoCombine",+ "inputs": {+ "images": ["3", 0], "frame_rate": 8, "loop_count": 0, "filename_prefix": "fuobe/selftest-meta-batch", "format": "video/h264-mp4",+ "pix_fmt": "yuv420p", "crf": 19, "save_metadata": true, "trim_to_audio": false, "pingpong": false, "save_output": true,+ "meta_batch": ["2", 0], "audio": ["1", 2]+ },+ "_meta": { "title": "Save video (written by the last pass)" }+ }+}diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjsindex 7916640a..9d11e610 100644--- a/scripts/comfy/library.spec.mjs+++ b/scripts/comfy/library.spec.mjs@@ -1720,6 +1720,19 @@ export const SPEC = [vramGb: 0,notes: 'Runs on any ComfyUI (CPU is fine), needs no model files. Exercises the SaveVideo output path.',},+ {+ id: 'selftest-meta-batch',+ title: 'Self-test: invert a clip 8 frames at a time (VHS meta-batch)',+ capability: 'v2v',+ handBuilt: 'hand-built/selftest-meta-batch.json',+ bindings: { video: [b('1', 'video')], filenamePrefix: [b('4', 'filename_prefix')] },+ outputs: [{ node: '4', kind: 'video' }],+ vramGb: 0,+ license: 'n/a (no model)',+ notes:+ 'Runs on any ComfyUI (CPU is fine), needs no model files. VHS_BatchManager re-queues the prompt every 8 frames (new prompt ids, ui "unfinished_batch" until the last pass); ' ++ 'exercises the provider\'s meta-batch follow-up that mixed-media-zimage-frames relies on. Keeps the source fps and audio.',+ },// =========================================================================// comfyui-oss-3 (round 3): docs/research/comfyui-oss-3.json. Graphs are the researcher's validated API graphs;diff --git a/scripts/comfy/validation-state.json b/scripts/comfy/validation-state.jsonindex fdabeadc..c4e08949 100644--- a/scripts/comfy/validation-state.json+++ b/scripts/comfy/validation-state.json@@ -299,6 +299,12 @@"error": null,"at": "2026-10-16T20:57:16.889Z"},+ "selftest-meta-batch": {+ "sha256": "15894296f99cdd4919b88b3a67159bbe2cac97f4c19b3f7bf669e023156fb76c",+ "validated": true,+ "error": null,+ "at": "2026-10-17T21:22:10.139Z"+ },"sfx-hunyuan-foley": {"sha256": "54a10b4f9586f3e65c0f9cd1bcedf02d1842e3bf73df9dd98304eef0f07b212a","validated": true,diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 1172b930..193e199c 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -436,6 +436,17 @@ const open: ModelDef[] = [options: {},hidden: true,}),+ o({+ id: "oss-selftest-meta-batch",+ name: "ComfyUI self-test (meta-batch)",+ vendor: "Fuobe",+ family: "selftest",+ kind: "video",+ tagline: "Inverts a clip 8 frames per pass, like Mixed Media — needs no model files",+ routes: [comfy("v2v", "selftest-meta-batch")],+ options: {},+ hidden: true,+ }),// ---------------- Video tools (extend, reframe, relight, draw-to-video, mattes, depth)o({diff --git a/tests/e2e/comfyui-selftest.mjs b/tests/e2e/comfyui-selftest.mjsindex ba5a1c33..3c3c7c59 100644--- a/tests/e2e/comfyui-selftest.mjs+++ b/tests/e2e/comfyui-selftest.mjs@@ -1,10 +1,20 @@// End-to-end check of the open-source engine against a live ComfyUI.// Usage: node tests/e2e/comfyui-selftest.mjs [appUrl] (app must be running, ComfyUI reachable)-// Uploads a PNG, runs the weight-free self-test workflows through /api/generations,-// waits for completion and verifies the saved outputs.+// Runs the weight-free workflows through Fuobe's own API (/api/uploads → POST /api/generations → poll →+// download the stored output): the self-tests, then the round-3 video tools on a clip the engine makes+// itself — add a soundtrack (one track, then voice + background), a VHS meta-batch pass, trim, cut a resampled segment and burn+// in captions. With ffprobe/ffmpeg on PATH every output is probed (streams, duration, frames, size) and the+// captioned frames are compared with the source frames.+import { spawnSync } from "node:child_process";+import fs from "node:fs";+import os from "node:os";+import path from "node:path";import zlib from "node:zlib";const app = process.argv[2] ?? "http://localhost:3000";+const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-selftest-"));+const hasFfprobe = spawnSync("ffprobe", ["-version"]).status === 0;+if (!hasFfprobe) console.warn("! ffprobe not found: outputs are checked for kind and size only");function png(w, h) {const crcTable = Array.from({ length: 256 }, (_, n) => {@@ -44,36 +54,153 @@ function png(w, h) {]);}-async function run(modelId, op, expectKind) {+/** Mono 16-bit PCM WAV with a sine tone. */+function wav(seconds, freq, rate = 22050) {+ const n = Math.round(seconds * rate);+ const data = Buffer.alloc(n * 2);+ for (let i = 0; i < n; i++) data.writeInt16LE(Math.round(Math.sin((2 * Math.PI * freq * i) / rate) * 0.3 * 32767), i * 2);+ const h = Buffer.alloc(44);+ h.write("RIFF", 0);+ h.writeUInt32LE(36 + data.length, 4);+ h.write("WAVEfmt ", 8);+ h.writeUInt32LE(16, 16);+ h.writeUInt16LE(1, 20);+ h.writeUInt16LE(1, 22);+ h.writeUInt32LE(rate, 24);+ h.writeUInt32LE(rate * 2, 28);+ h.writeUInt16LE(2, 32);+ h.writeUInt16LE(16, 34);+ h.write("data", 36);+ h.writeUInt32LE(data.length, 40);+ return Buffer.concat([h, data]);+}++async function upload(buf, type, name) {const form = new FormData();- form.append("file", new Blob([png(64, 48)], { type: "image/png" }), "selftest.png");- const up = await (await fetch(`${app}/api/uploads`, { method: "POST", body: form })).json();+ form.append("file", new Blob([buf], { type }), name);+ const res = await fetch(`${app}/api/uploads`, { method: "POST", body: form });+ const up = await res.json();+ if (!res.ok) throw new Error(`upload ${name}: ${up.error}`);+ return up.url;+}++/** One generation through Fuobe's API; returns its outputs with the downloaded files. */+async function generate(label, body, expectKinds) {const res = await fetch(`${app}/api/generations`, {method: "POST",headers: { "Content-Type": "application/json" },- body: JSON.stringify({ feature: "selftest", modelId, op, prompt: "self-test", inputs: { images: [up.url] } }),+ body: JSON.stringify({ feature: "selftest", ...body }),});- const body = await res.json();- if (!res.ok) throw new Error(`${modelId}: ${body.error}`);- const id = body.items[0].id;+ const created = await res.json();+ if (!res.ok) throw new Error(`${label}: ${created.error}`);+ const id = created.items[0].id;const t0 = Date.now();for (;;) {const g = await (await fetch(`${app}/api/generations/${id}`)).json();if (g.status === "succeeded") {- if (g.provider !== "comfyui") throw new Error(`${modelId} ran on ${g.provider}, not ComfyUI (is ComfyUI reachable from the app?)`);- const out = g.outputs[0];- const file = await fetch(`${app}${out.url}`);- const bytes = Buffer.from(await file.arrayBuffer());- if (out.kind !== expectKind || !bytes.length) throw new Error(`${modelId}: unexpected output ${JSON.stringify(out)}`);- console.log(`✓ ${modelId}: ${out.kind} ${file.headers.get("content-type")} ${bytes.length} bytes in ${Date.now() - t0} ms`);- return;+ if (g.provider !== "comfyui") throw new Error(`${label} ran on ${g.provider}, not ComfyUI (is ComfyUI reachable from the app?)`);+ const kinds = g.outputs.map((o) => o.kind);+ if (JSON.stringify(kinds) !== JSON.stringify(expectKinds)) throw new Error(`${label}: outputs ${JSON.stringify(kinds)}, expected ${JSON.stringify(expectKinds)}`);+ const files = [];+ for (const [i, out] of g.outputs.entries()) {+ const file = await fetch(`${app}${out.url}`);+ const bytes = Buffer.from(await file.arrayBuffer());+ if (!bytes.length) throw new Error(`${label}: output ${i} is empty`);+ const local = path.join(tmp, `${label}-${i}${path.extname(new URL(out.url, app).pathname) || ""}`);+ fs.writeFileSync(local, bytes);+ files.push({ ...out, local, bytes: bytes.length, contentType: file.headers.get("content-type") });+ }+ console.log(`✓ ${label} (${body.modelId}): ${files.map((f) => `${f.kind} ${f.contentType} ${f.bytes} B`).join(", ")} in ${Date.now() - t0} ms`);+ return { generation: g, files };}- if (g.status === "failed" || g.status === "canceled") throw new Error(`${modelId}: ${g.status} — ${g.error}`);- if (Date.now() - t0 > 120_000) throw new Error(`${modelId}: timed out (${g.status} ${g.message ?? ""})`);+ if (g.status === "failed" || g.status === "canceled") throw new Error(`${label}: ${g.status} — ${g.error}`);+ if (Date.now() - t0 > 300_000) throw new Error(`${label}: timed out (${g.status} ${g.message ?? ""})`);await new Promise((r) => setTimeout(r, 1000));}}-await run("oss-selftest-image", "edit", "image");-await run("oss-selftest-video", "i2v", "video");-console.log("ComfyUI engine OK");+function probe(file) {+ const r = spawnSync("ffprobe", ["-v", "error", "-count_frames", "-show_entries", "stream=codec_type,codec_name,width,height,r_frame_rate,nb_read_frames,duration:format=duration", "-of", "json", file], { encoding: "utf8" });+ if (r.status !== 0) throw new Error(`ffprobe ${file}: ${r.stderr}`);+ const j = JSON.parse(r.stdout);+ const v = j.streams.find((s) => s.codec_type === "video");+ const a = j.streams.find((s) => s.codec_type === "audio");+ const [num, den] = (v?.r_frame_rate ?? "0/1").split("/").map(Number);+ return {+ duration: Number(j.format?.duration ?? v?.duration ?? 0),+ video: v ? { codec: v.codec_name, width: v.width, height: v.height, fps: num / (den || 1), frames: Number(v.nb_read_frames) } : null,+ audio: a ? { codec: a.codec_name, duration: Number(a.duration ?? 0) } : null,+ };+}++function expectProbe(label, p, want) {+ const problems = [];+ if (want.audio !== undefined && !!p.audio !== want.audio) problems.push(`audio ${p.audio ? "present" : "missing"}`);+ if (want.frames !== undefined && p.video?.frames !== want.frames) problems.push(`${p.video?.frames} frames, expected ${want.frames}`);+ if (want.fps !== undefined && Math.abs((p.video?.fps ?? 0) - want.fps) > 0.01) problems.push(`${p.video?.fps} fps, expected ${want.fps}`);+ if (want.size && (p.video?.width !== want.size[0] || p.video?.height !== want.size[1])) problems.push(`${p.video?.width}x${p.video?.height}, expected ${want.size.join("x")}`);+ if (want.duration !== undefined && Math.abs(p.duration - want.duration) > (want.tolerance ?? 0.15)) problems.push(`${p.duration.toFixed(3)} s, expected ${want.duration} s`);+ if (problems.length) throw new Error(`${label}: ${problems.join("; ")} — ${JSON.stringify(p)}`);+ console.log(` ffprobe ${label}: ${p.video ? `${p.video.codec} ${p.video.width}x${p.video.height} ${p.video.fps} fps ${p.video.frames} frames` : "no video"}, ${p.audio ? `${p.audio.codec} audio` : "no audio"}, ${p.duration.toFixed(2)} s`);+}++/** Gray pixels of the frame at `t` seconds. */+function frameAt(file, t) {+ const r = spawnSync("ffmpeg", ["-v", "error", "-ss", String(t), "-i", file, "-frames:v", "1", "-f", "rawvideo", "-pix_fmt", "gray", "-"]);+ if (r.status !== 0) throw new Error(`ffmpeg frame ${file}@${t}: ${r.stderr}`);+ return r.stdout;+}+const changedPixels = (a, b) => a.reduce((n, v, i) => n + (Math.abs(v - b[i]) > 48 ? 1 : 0), 0);++async function selftests() {+ const image = await upload(png(64, 48), "image/png", "selftest.png");+ await generate("selftest-image", { modelId: "oss-selftest-image", op: "edit", prompt: "self-test", inputs: { images: [image] } }, ["image"]);+ await generate("selftest-video", { modelId: "oss-selftest-video", op: "i2v", prompt: "self-test", inputs: { images: [image] } }, ["video"]);+}++async function videoTools() {+ // A 3 s clip (24 frames @ 8 fps, 320x240, silent) made by the engine, plus two soundtracks.+ const still = await upload(png(320, 240), "image/png", "clip-still.png");+ const clip = (await generate("source-clip", { modelId: "oss-selftest-video", op: "i2v", prompt: "self-test", inputs: { images: [still] } }, ["video"])).files[0];+ const voice = await upload(wav(2.5, 440), "audio/wav", "voice.wav");+ const music = await upload(wav(3.5, 220), "audio/wav", "music.wav");+ if (hasFfprobe) expectProbe("source clip", probe(clip.local), { frames: 24, fps: 8, size: [320, 240], audio: false });++ const muxed = (await generate("mux", { modelId: "oss-mux", op: "mux", inputs: { video: clip.url, audio: voice } }, ["video"])).files[0];+ if (hasFfprobe) expectProbe("mux (one track)", probe(muxed.local), { frames: 24, fps: 8, size: [320, 240], audio: true });++ const mixed = (await generate("mux-mix", { modelId: "oss-mux", op: "mux", inputs: { video: clip.url, audio: voice }, params: { extra: { audio2: music, backgroundVolumeDb: -12 } } }, ["video"])).files[0];+ if (hasFfprobe) expectProbe("mux (voice + background)", probe(mixed.local), { frames: 24, fps: 8, audio: true });++ // VHS meta-batching (Mixed Media): three re-queued passes of 8 frames, collected from the last one.+ const passes = (await generate("meta-batch", { modelId: "oss-selftest-meta-batch", op: "v2v", prompt: "self-test", inputs: { video: muxed.url } }, ["video"])).files[0];+ if (hasFfprobe) expectProbe("meta-batch (3 passes)", probe(passes.local), { frames: 24, fps: 8, size: [320, 240], audio: true });++ const trimmed = (await generate("trim", { modelId: "oss-trim", op: "trim", inputs: { video: muxed.url }, params: { startTime: 0.5, endTime: 2 } }, ["video"])).files[0];+ if (hasFfprobe) expectProbe("trim 0.5-2.0 s", probe(trimmed.local), { frames: 12, fps: 8, size: [320, 240], audio: true, duration: 1.5 });++ const seg = await generate(+ "segment",+ { modelId: "oss-segment", op: "trim", inputs: { video: muxed.url }, params: { startTime: 1, endTime: 2, fps: 4, aspectRatio: "1:1", resolution: "480p" } },+ ["video", "image"],+ );+ if (hasFfprobe) expectProbe("segment 1-2 s @ 4 fps, 1:1", probe(seg.files[0].local), { frames: 5, fps: 4, size: [480, 480], audio: true });++ const cues = "0.00-1.00: Hello from Fuobe\n1.20-2.50: Open captions";+ const captioned = (await generate("captions", { modelId: "oss-captions-burnin", op: "captions", prompt: cues, inputs: { video: muxed.url }, params: { extra: { fontSize: 9 } } }, ["video"])).files[0];+ if (hasFfprobe) {+ expectProbe("captions burn-in", probe(captioned.local), { frames: 24, fps: 8, size: [320, 240], audio: true, duration: 3, tolerance: 0.2 });+ const during = changedPixels(frameAt(captioned.local, 0.5), frameAt(muxed.local, 0.5));+ const gap = changedPixels(frameAt(captioned.local, 1.1), frameAt(muxed.local, 1.1));+ if (during < 200 || gap > 50) throw new Error(`captions: ${during} pixels changed under a cue, ${gap} in the gap`);+ console.log(` captions visible: ${during} pixels changed at 0.5 s (cue), ${gap} at 1.1 s (gap)`);+ }+}++try {+ await selftests();+ await videoTools();+ console.log("ComfyUI engine OK");+} finally {+ fs.rmSync(tmp, { recursive: true, force: true });+}diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.jsonindex be9da593..88d3fc63 100644--- a/workflows/comfyui/manifest.json+++ b/workflows/comfyui/manifest.json@@ -1,6 +1,6 @@{"version": 1,- "generatedAt": "2026-10-17T21:13:08.018Z",+ "generatedAt": "2026-10-17T21:22:08.981Z","comfyuiCommit": "fc04da91b2ab12f99e4716371a7e4f98ac982597","comfyuiVersion": "0.41.0","workflowTemplatesVersion": "0.11.86",@@ -7346,6 +7346,46 @@"defaults": {},"source": "hand-built (Fuobe self-test, no model weights)"},+ {+ "id": "selftest-meta-batch",+ "title": "Self-test: invert a clip 8 frames at a time (VHS meta-batch)",+ "capability": "v2v",+ "file": "selftest-meta-batch.json",+ "source": "hand-built (scripts/comfy/hand-built/selftest-meta-batch.json)",+ "bindings": {+ "video": [+ {+ "node": "1",+ "input": "video"+ }+ ],+ "filenamePrefix": [+ {+ "node": "4",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "4",+ "kind": "video"+ }+ ],+ "defaults": {},+ "limits": {},+ "models": [],+ "customNodes": [+ {+ "name": "ComfyUI-VideoHelperSuite",+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"+ }+ ],+ "vramGb": 0,+ "license": "n/a (no model)",+ "validated": true,+ "notes": "Runs on any ComfyUI (CPU is fine), needs no model files. VHS_BatchManager re-queues the prompt every 8 frames (new prompt ids, ui \"unfinished_batch\" until the last pass); exercises the provider's meta-batch follow-up that mixed-media-zimage-frames relies on. Keeps the source fps and audio."+ },{"id": "layers-qwen-image-layered","title": "Layers: split an image into RGBA layers (Qwen-Image-Layered)",diff --git a/workflows/comfyui/object_info.subset.json b/workflows/comfyui/object_info.subset.jsonindex a5516a68..bf09a5ab 100644--- a/workflows/comfyui/object_info.subset.json+++ b/workflows/comfyui/object_info.subset.json@@ -8760,6 +8760,14 @@"multiselect": false,"options": ["clip4s.mp4",+ "fuobe_1p8twlz8.mp4",+ "fuobe_52CkO1zA.wav",+ "fuobe_EAO6RFsA.mp4",+ "fuobe_VC-FibEl.mp4",+ "fuobe_aQ4wM6Uo.wav",+ "fuobe_mRUurdwM.mp4",+ "fuobe_owTi-cFJ.mp4",+ "fuobe_oxa2g7HS.wav","fuobe_real.mp4","fuobe_real.wav","fuobe_validate.mp4",@@ -8921,8 +8929,11 @@"image": [["example.png",+ "fuobe_SfM8ZKie.png",+ "fuobe_qmXgUGxd.png","fuobe_validate.png",- "fuobe_validate_mask.png"+ "fuobe_validate_mask.png",+ "fuobe_yy5Vt6TE.png"],{"image_upload": true@@ -8972,8 +8983,11 @@"image": [["example.png",+ "fuobe_SfM8ZKie.png",+ "fuobe_qmXgUGxd.png","fuobe_validate.png",- "fuobe_validate_mask.png"+ "fuobe_validate_mask.png",+ "fuobe_yy5Vt6TE.png"],{"image_upload": true@@ -9028,6 +9042,11 @@"multiselect": false,"options": ["clip4s.mp4",+ "fuobe_1p8twlz8.mp4",+ "fuobe_EAO6RFsA.mp4",+ "fuobe_VC-FibEl.mp4",+ "fuobe_mRUurdwM.mp4",+ "fuobe_owTi-cFJ.mp4","fuobe_real.mp4","fuobe_validate.mp4"],@@ -16242,6 +16261,11 @@"video": [["clip4s.mp4",+ "fuobe_1p8twlz8.mp4",+ "fuobe_EAO6RFsA.mp4",+ "fuobe_VC-FibEl.mp4",+ "fuobe_mRUurdwM.mp4",+ "fuobe_owTi-cFJ.mp4","fuobe_real.mp4","fuobe_validate.mp4"]diff --git a/workflows/comfyui/selftest-meta-batch.json b/workflows/comfyui/selftest-meta-batch.jsonnew file mode 100644index 00000000..147042f4--- /dev/null+++ b/workflows/comfyui/selftest-meta-batch.json@@ -0,0 +1,73 @@+{+ "1": {+ "class_type": "VHS_LoadVideo",+ "inputs": {+ "video": "input.mp4",+ "force_rate": 0,+ "custom_width": 0,+ "custom_height": 0,+ "frame_load_cap": 0,+ "skip_first_frames": 0,+ "select_every_nth": 1,+ "format": "None",+ "meta_batch": [+ "2",+ 0+ ]+ },+ "_meta": {+ "title": "Clip (loaded 8 frames per pass)"+ }+ },+ "2": {+ "class_type": "VHS_BatchManager",+ "inputs": {+ "frames_per_batch": 8+ },+ "_meta": {+ "title": "Meta batch: re-queue every 8 frames"+ }+ },+ "3": {+ "class_type": "ImageInvert",+ "inputs": {+ "image": [+ "1",+ 0+ ]+ },+ "_meta": {+ "title": "Per-frame work (invert)"+ }+ },+ "4": {+ "class_type": "VHS_VideoCombine",+ "inputs": {+ "images": [+ "3",+ 0+ ],+ "frame_rate": 8,+ "loop_count": 0,+ "filename_prefix": "fuobe/selftest-meta-batch",+ "format": "video/h264-mp4",+ "pix_fmt": "yuv420p",+ "crf": 19,+ "save_metadata": true,+ "trim_to_audio": false,+ "pingpong": false,+ "save_output": true,+ "meta_batch": [+ "2",+ 0+ ],+ "audio": [+ "1",+ 2+ ]+ },+ "_meta": {+ "title": "Save video (written by the last pass)"+ }+ }+}