Skip to content

armgit / fuobe

Public Imported from GitHub
0

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.

Originals O9: the studios default to Fuobe Mixed Media and Fuobe Shorts, eval suites on the Originals

Claudeccb22f023229
diff --git a/scripts/eval/README.md b/scripts/eval/README.md
index 23c72802..1e51685d 100644
--- a/scripts/eval/README.md
+++ b/scripts/eval/README.md
@@ -117,8 +117,8 @@ One JSON file per Original in `cases/`. Later Original packages add their own fi
| `dop` | Fuobe DoP motions and effects | the 69 the research gives a LoRA, and the 20 camera moves it gives a Fun Camera pose or an LTX camera LoRA | `catalog`, `prompt-only`, `research` (the candidate), `partner` (cloud) | temporal, clip |
| `dop-mix` | Fuobe DoP's Mix | 5 move + effect pairs | `mix` (the candidate), `first` (the move alone) | temporal, clip |
| `genjutsu` | Genjutsu move / swap / restyle / Character swap | 7: Motion transfer and Object swap (each also on the Lite tier), Restyle, and Character swap with and without the first frame (through `/api/genjutsu`) | `original`, `partner` (cloud: each mode's own partner on fal) | temporal, clip |
-| `mixed-media` | Mixed Media | 5 looks on one clip (through `/api/mixed-media`) | `studio` | temporal, style |
-| `shorts` | Shorts restyle | 1 | `restyle` | temporal, style, clip |
+| `mixed-media` | Fuobe Mixed Media (O9) | 7 looks on one clip, 3 s at 8 fps (through `/api/mixed-media`): 3 with a look LoRA, 4 on their words | `studio` (the Original frame by frame), `smooth` (its first frame, then Wan 2.2 Fun VACE), `words` (open: the per-frame model before O9), `partner-frames` (cloud: Nano Banana 2 per frame), `fast` (cloud: LTX-2.3 Reference Restyle) | temporal, style |
+| `shorts` | Fuobe Shorts (O9) | 2: one segment from its first frame (`/api/generations`), and a 6 s session (`/api/shorts/sessions`) | `restyle` (Fuobe Shorts), `partner` (cloud: Gemini Omni Flash) | temporal, style, clip |
| `speak` | talking portraits | 1 portrait + voice | `infinitetalk`, `s2v` | lipsync, temporal, identity |
| `cinema` | Fuobe Cinema (O6) | 3 Director scenes (the prompt Cinema compiles), 4 camera moves as LTX-2.3's `camera_lora` (cloud), 2 films of 3 shots | `original`, `words` (no camera LoRA), `expansion` (fal's prompt expansion on), `wan` (Wan 2.2 A14B hosted), `partner` (Seedance 2.5); all but `original` cloud only | clip, temporal, continuity |
@@ -192,13 +192,14 @@ small synthetic files in `fixtures/` instead.
scripts/eval/local/
references/soul/<look-slug>/*.jpg # style references per look (your own or licensed images; never Higgsfield previews)
references/mixed-media/<look>/* # what each Mixed Media look should look like
+ references/shorts/claymation/* # what the Shorts session's look should look like
characters/default/*.jpg # 20+ photos (80 at most) of ONE consenting person (soul-id)
styles/default/*.jpg # 20+ images in one style, a moodboard (soul-id/look)
dop/start.png, dop/end.png # a start frame (a person on a bridge fits the prompts), an end frame for transitions
genjutsu/dance.mp4, character.png, style.png
genjutsu/street.mp4, object.png # street.mp4 at least 720 px on each side (Kling O3's edit, the cloud partner)
- mixed-media/clip.mp4
- shorts/clip.mp4, shorts/frame0.png
+ mixed-media/clip.mp4 # 4–10 s
+ shorts/clip.mp4, shorts/frame0.png # clip.mp4 at least 6 s (the session case); frame0.png its first frame in the new look
speak/portrait.png, speak/voice.wav
```
diff --git a/scripts/eval/cases/mixed-media.json b/scripts/eval/cases/mixed-media.json
index 1ab71acf..59319c42 100644
--- a/scripts/eval/cases/mixed-media.json
+++ b/scripts/eval/cases/mixed-media.json
@@ -2,56 +2,191 @@
"$schema": "./case.schema.json",
"suite": "mixed-media",
"title": "Fuobe Mixed Media · per-frame looks",
- "description": "Runs the Mixed Media studio route (POST /api/mixed-media) on your clip (local/mixed-media/clip.mp4, 4–10 s), the first three seconds at 8 fps, for five presets. Measures flicker (temporal drift and warp error) and how close each preset stays to its look (style references in local/references/mixed-media/<preset>/, optional). On the cloud it runs the studio's hosted open model (LTX-2.3 restyle on fal); O9 moves it to per-frame hosted open models.",
+ "description": "Runs the Mixed Media studio route (POST /api/mixed-media) on your clip (local/mixed-media/clip.mp4, 4–10 s), the first three seconds at 8 fps, for seven looks: three drawn with a look LoRA (Sketch, Noir, Origami) and four on their words. Measures flicker (temporal drift and warp error) and how close each look stays to its references (local/references/mixed-media/<preset>/, optional; your own or licensed images, never Higgsfield previews). The default variant is Fuobe Mixed Media frame by frame (build plan O9: Z-Image Turbo + its Fun ControlNet with the look's LoRA and one seed, free on your GPU, about a cent a frame on fal); smooth is its first-frame-then-Wan-2.2-Fun-VACE option; words is the open engine's per-frame model before O9 (no LoRA, no fixed seed), to see what the LoRA and the seed earn; partner-frames (Nano Banana 2 frame by frame) and fast (LTX-2.3 Reference Restyle in one pass) are the cloud routes the Original replaces as the default.",
"original": "fuobe-mixed-media",
"kind": "video",
"targets": {
- "open": { "models": ["oss-mixed-media"] },
- "cloud": { "models": ["ltx-2-3-restyle"] },
- "demo": { "models": ["oss-mixed-media"] }
+ "open": {"models": ["fuobe-mixed-media"]},
+ "cloud": {"models": ["fuobe-mixed-media"]},
+ "demo": {"models": ["fuobe-mixed-media"]}
+ },
+ "defaults": {
+ "seeds": [1001],
+ "metrics": ["temporal", "style"],
+ "timeoutSeconds": 3600,
+ "params": {"mode": "frames"},
+ "variant": "studio"
+ },
+ "variants": {
+ "studio": {"description": "Fuobe Mixed Media frame by frame: the studio's default on both engines"},
+ "smooth": {
+ "description": "Fuobe Mixed Media's Smooth: the first frame in the look, then Wan 2.2 Fun VACE carries it through by depth",
+ "params": {"mode": "smooth"}
+ },
+ "words": {
+ "description": "The open per-frame model before O9 (oss-mixed-media): the look's words, no LoRA, no fixed seed",
+ "engines": ["demo", "open"],
+ "models": {"open": ["oss-mixed-media"], "demo": ["oss-mixed-media"]}
+ },
+ "partner-frames": {
+ "description": "Nano Banana 2 frame by frame, in lanes from the preview (the cloud default before O9)",
+ "engines": ["cloud"],
+ "models": {"cloud": ["nano-banana-2"]}
+ },
+ "fast": {
+ "description": "LTX-2.3 Reference Restyle in one video-to-video pass (Fast)",
+ "engines": ["cloud"],
+ "models": {"cloud": ["ltx-2-3-restyle"]},
+ "params": {"mode": "fast"}
+ }
},
- "defaults": { "seeds": [1001], "metrics": ["temporal", "style"], "timeoutSeconds": 3600 },
- "variants": { "studio": { "description": "The Mixed Media studio's own pipeline" } },
"cases": [
+ {
+ "id": "mixed-media/sketch",
+ "title": "Mixed Media · Sketch (the look's LoRA: pencil)",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
+ "references": "local/references/mixed-media/sketch",
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-sketch",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
+ },
+ {
+ "id": "mixed-media/noir",
+ "title": "Mixed Media · Noir (the look's LoRA: DARKROOM Noir)",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
+ "references": "local/references/mixed-media/noir",
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-noir",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
+ },
+ {
+ "id": "mixed-media/origami",
+ "title": "Mixed Media · Origami (the look's LoRA: paper diorama (civitai: needs your key))",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
+ "references": "local/references/mixed-media/origami",
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-origami",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
+ },
{
"id": "mixed-media/toxic",
- "title": "Mixed Media · Toxic",
- "inputs": { "video": "local/mixed-media/clip.mp4" },
- "demoInputs": { "video": "samples/demo-portrait.mp4" },
+ "title": "Mixed Media · Toxic (on its words)",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
"references": "local/references/mixed-media/toxic",
- "submit": { "route": "/api/mixed-media", "body": { "engine": "{{engine}}", "modelId": "{{modelId}}", "presetId": "mixed-toxic", "source": "{{source:inputs.video}}", "range": { "start": 0, "end": 3 }, "fps": 8, "seed": "{{seed}}", "requestId": "{{requestId}}" } }
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-toxic",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
},
{
"id": "mixed-media/two-color",
- "title": "Mixed Media · Two color",
- "inputs": { "video": "local/mixed-media/clip.mp4" },
- "demoInputs": { "video": "samples/demo-portrait.mp4" },
+ "title": "Mixed Media · Two color (on its words)",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
"references": "local/references/mixed-media/two-color",
- "submit": { "route": "/api/mixed-media", "body": { "engine": "{{engine}}", "modelId": "{{modelId}}", "presetId": "mixed-two-color", "source": "{{source:inputs.video}}", "range": { "start": 0, "end": 3 }, "fps": 8, "seed": "{{seed}}", "requestId": "{{requestId}}" } }
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-two-color",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
},
{
"id": "mixed-media/ultraviolet",
- "title": "Mixed Media · Ultraviolet",
- "inputs": { "video": "local/mixed-media/clip.mp4" },
- "demoInputs": { "video": "samples/demo-portrait.mp4" },
+ "title": "Mixed Media · Ultraviolet (on its words)",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
"references": "local/references/mixed-media/ultraviolet",
- "submit": { "route": "/api/mixed-media", "body": { "engine": "{{engine}}", "modelId": "{{modelId}}", "presetId": "mixed-ultraviolet", "source": "{{source:inputs.video}}", "range": { "start": 0, "end": 3 }, "fps": 8, "seed": "{{seed}}", "requestId": "{{requestId}}" } }
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-ultraviolet",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
},
{
"id": "mixed-media/lava",
- "title": "Mixed Media · Lava",
- "inputs": { "video": "local/mixed-media/clip.mp4" },
- "demoInputs": { "video": "samples/demo-portrait.mp4" },
+ "title": "Mixed Media · Lava (on its words)",
+ "inputs": {"video": "local/mixed-media/clip.mp4"},
+ "demoInputs": {"video": "samples/demo-portrait.mp4"},
"references": "local/references/mixed-media/lava",
- "submit": { "route": "/api/mixed-media", "body": { "engine": "{{engine}}", "modelId": "{{modelId}}", "presetId": "mixed-lava", "source": "{{source:inputs.video}}", "range": { "start": 0, "end": 3 }, "fps": 8, "seed": "{{seed}}", "requestId": "{{requestId}}" } }
- },
- {
- "id": "mixed-media/origami",
- "title": "Mixed Media · Origami",
- "inputs": { "video": "local/mixed-media/clip.mp4" },
- "demoInputs": { "video": "samples/demo-portrait.mp4" },
- "references": "local/references/mixed-media/origami",
- "submit": { "route": "/api/mixed-media", "body": { "engine": "{{engine}}", "modelId": "{{modelId}}", "presetId": "mixed-origami", "source": "{{source:inputs.video}}", "range": { "start": 0, "end": 3 }, "fps": 8, "seed": "{{seed}}", "requestId": "{{requestId}}" } }
+ "submit": {
+ "route": "/api/mixed-media",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "mode": "{{request.params.mode}}",
+ "presetId": "mixed-lava",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 3},
+ "fps": 8,
+ "seed": "{{seed}}",
+ "requestId": "{{requestId}}"
+ }
+ }
}
]
}
diff --git a/scripts/eval/cases/shorts.json b/scripts/eval/cases/shorts.json
index 2951a70e..f7d1e9f0 100644
--- a/scripts/eval/cases/shorts.json
+++ b/scripts/eval/cases/shorts.json
@@ -2,25 +2,63 @@
"$schema": "./case.schema.json",
"suite": "shorts",
"title": "Fuobe Shorts · segment restyle",
- "description": "One segment of a Shorts restyle on your clip (local/shorts/clip.mp4, ≤5 s) with a restyled first frame you made or own (local/shorts/frame0.png): the Wan 2.2 Fun VACE restyle the open Shorts pipeline runs per segment, against LTX 2.3 Reference Restyle on the cloud. Flicker and style are measured; O9 adds the hosted open route.",
+ "description": "Fuobe Shorts (build plan O9) on your clip (local/shorts/clip.mp4). shorts/segment is one segment's Wan 2.2 Fun VACE pass from a first frame you made or own (local/shorts/frame0.png), straight through /api/generations; shorts/session is the whole studio chain through POST /api/shorts/sessions (each segment's first frame drawn in the look by Qwen-Image-Edit 2511, Fun VACE by depth, the segments stitched under the clip's sound), on the first 6 s (local/shorts/clip.mp4 must be at least that long). Flicker, style and prompt match are measured. The partner variant runs Gemini Omni Flash, Higgsfield's Shorts engine and still a choice in the studio, for comparison.",
"original": "fuobe-shorts",
"kind": "video",
"targets": {
- "open": { "models": ["fuobe-shorts", "oss-wan22-vace-restyle"] },
- "cloud": { "models": ["fuobe-shorts", "ltx-2-3-restyle"] },
- "demo": { "models": ["oss-wan22-vace-restyle"] }
+ "open": {"models": ["fuobe-shorts"]},
+ "cloud": {"models": ["fuobe-shorts"]},
+ "demo": {"models": ["fuobe-shorts"]}
+ },
+ "defaults": {
+ "seeds": [1001, 2002],
+ "metrics": ["temporal", "style", "clip"],
+ "timeoutSeconds": 3600,
+ "variant": "restyle"
+ },
+ "variants": {
+ "restyle": {
+ "description": "Fuobe Shorts: the restyle as the Shorts pipeline runs it, on the engine asked for"
+ },
+ "partner": {
+ "description": "Gemini Omni Flash (a partner model, Higgsfield's Shorts engine) on the same clip",
+ "engines": ["cloud"],
+ "models": {"cloud": ["gemini-omni-flash"]}
+ }
},
- "defaults": { "seeds": [1001, 2002], "metrics": ["temporal", "style", "clip"], "timeoutSeconds": 3600 },
- "variants": { "restyle": { "description": "The segment restyle as the Shorts pipeline runs it" } },
"cases": [
{
"id": "shorts/segment",
"title": "Restyle one segment from its first frame",
"op": "v2v",
- "inputs": { "video": "local/shorts/clip.mp4", "images": ["local/shorts/frame0.png"] },
- "demoInputs": { "video": "samples/demo-portrait.mp4", "images": ["fixtures/references/warm-1.png"] },
- "prompts": [{ "id": "anime", "text": "the same shot as a soft anime illustration with clean line art" }],
+ "inputs": {"video": "local/shorts/clip.mp4", "images": ["local/shorts/frame0.png"]},
+ "demoInputs": {"video": "samples/demo-portrait.mp4", "images": ["fixtures/references/warm-1.png"]},
+ "prompts": [
+ {"id": "anime", "text": "the same shot as a soft anime illustration with clean line art"}
+ ],
"references": "local/shorts/frame0.png"
+ },
+ {
+ "id": "shorts/session",
+ "title": "A Shorts session: segments, first frames in the look, Fun VACE, stitched under the sound",
+ "inputs": {"video": "local/shorts/clip.mp4"},
+ "demoInputs": {"video": "fixtures/walk-6s.mp4"},
+ "references": "local/references/shorts/claymation",
+ "metrics": ["temporal", "style"],
+ "submit": {
+ "route": "/api/shorts/sessions",
+ "estimate": "/api/shorts/estimate",
+ "body": {
+ "engine": "{{engine}}",
+ "modelId": "{{modelId}}",
+ "presetId": "shorts-claymation",
+ "source": "{{source:inputs.video}}",
+ "range": {"start": 0, "end": 6},
+ "aspectRatio": "9:16",
+ "language": "auto",
+ "requestId": "{{requestId}}"
+ }
+ }
}
]
}
diff --git a/scripts/eval/lib/run.mjs b/scripts/eval/lib/run.mjs
index 215d5112..c4ebbc53 100644
--- a/scripts/eval/lib/run.mjs
+++ b/scripts/eval/lib/run.mjs
@@ -87,10 +87,14 @@ async function pool(items, n, fn) {
await Promise.all(workers);
}
-/** The model a studio route's answer names and its generations: {final, items}. */
-const routeResult = (answer, how) => {
- const items = answer?.items ?? [];
- const final = answer?.final ?? items.at(-1);
+/**
+ * The generations a studio route's answer names: {final, items}, or a Shorts session (POST /api/shorts/sessions), whose
+ * finished video is its latest stitch's final step and whose items are its segments' restyles.
+ */
+export const routeResult = (answer, how) => {
+ const stitch = Array.isArray(answer?.stitches) ? answer.stitches.at(-1) : undefined;
+ const items = answer?.items ?? (stitch ? (answer.segments ?? []).flatMap((s) => (s.takes ?? []).map((t) => ({ id: t.look }))) : []);
+ const final = answer?.final ?? (stitch?.final ? { id: stitch.final } : items.at(-1));
if (how === "all") return items.length ? items : [final].filter(Boolean);
if (how === "last") return [items.at(-1) ?? final].filter(Boolean);
return [final].filter(Boolean);
diff --git a/src/app/(studio)/mixed-media/page.tsx b/src/app/(studio)/mixed-media/page.tsx
index ef092228..3fd1f2b7 100644
--- a/src/app/(studio)/mixed-media/page.tsx
+++ b/src/app/(studio)/mixed-media/page.tsx
@@ -5,10 +5,13 @@ import { modelInfos } from "@/lib/catalog/shorts-models";
export const metadata: Metadata = { title: "Mixed Media" };
-/** The restyle models per engine (cloud: Fast), slimmed on the server so the page ships no catalog. */
-const MODELS = { cloud: modelInfos(MIXED_MODELS.cloud), open: modelInfos(MIXED_MODELS.open) };
-/** The cloud image editors that redraw each frame (Per frame). */
-const FRAME_MODELS = modelInfos([...MIXED_FRAME_MODELS]);
+/**
+ * The models per engine as each runs there, slimmed on the server so the page ships no catalog: Fast's video-to-video
+ * models (cloud), and the models that draw each frame (Fuobe Mixed Media first on both engines, then the cloud's partner
+ * image editors). Smooth is Fuobe Mixed Media's own.
+ */
+const MODELS = { cloud: modelInfos(MIXED_MODELS.cloud, "cloud"), open: modelInfos(MIXED_MODELS.open, "open") };
+const FRAME_MODELS = { cloud: modelInfos([...MIXED_FRAME_MODELS], "cloud"), open: modelInfos(MIXED_MODELS.open, "open") };
export default function Page() {
return <MixedStudio models={MODELS} frameModels={FRAME_MODELS} />;
diff --git a/src/app/(studio)/shorts/page.tsx b/src/app/(studio)/shorts/page.tsx
index 64bec3d6..aefdd893 100644
--- a/src/app/(studio)/shorts/page.tsx
+++ b/src/app/(studio)/shorts/page.tsx
@@ -5,8 +5,8 @@ import { modelInfos } from "@/lib/catalog/shorts-models";
export const metadata: Metadata = { title: "Shorts Studio" };
-/** The restyle models per engine, slimmed on the server so the page ships no catalog. */
-const MODELS = { cloud: modelInfos(SHORTS_MODELS.cloud), open: modelInfos(SHORTS_MODELS.open) };
+/** The restyle models per engine as each runs there (Fuobe Shorts runs on both), slimmed on the server so the page ships no catalog. */
+const MODELS = { cloud: modelInfos(SHORTS_MODELS.cloud, "cloud"), open: modelInfos(SHORTS_MODELS.open, "open") };
export default function Page() {
return <ShortsStudio models={MODELS} />;
diff --git a/src/components/mixed-media/hooks.ts b/src/components/mixed-media/hooks.ts
index 15736532..19caa897 100644
--- a/src/components/mixed-media/hooks.ts
+++ b/src/components/mixed-media/hooks.ts
@@ -13,12 +13,12 @@ export interface MixedBody {
engine: Engine;
presetId: string;
values: MixedValues;
- source: { url: string; name?: string; duration?: number; fps?: number };
+ source: { url: string; name?: string; duration?: number; fps?: number; width?: number; height?: number };
range: { start: number; end: number };
fps: number;
resolution: MixedResolution;
modelId?: string;
- /** Cloud: frame by frame (default) or Fast. */
+ /** Frame by frame (default), Smooth or (cloud) Fast. */
mode?: MixedMode;
anchor?: string;
frameUrl?: string;
@@ -118,6 +118,11 @@ function stepLabel(g: Generation): string {
return g.status === "queued" && !g.progress ? "Redrawing the frames" : "Putting the frames together";
case "concat":
return "Joining the clips";
+ // Smooth: each piece's first frame, drawn in the look, then carried through by Wan 2.2 Fun VACE.
+ case "frame":
+ return "Taking the first frame";
+ case "edit":
+ return "Drawing the first frame in the look";
default:
return "Restyling";
}
diff --git a/src/components/mixed-media/mixed-studio.tsx b/src/components/mixed-media/mixed-studio.tsx
index 03df21b7..0e4fde23 100644
--- a/src/components/mixed-media/mixed-studio.tsx
+++ b/src/components/mixed-media/mixed-studio.tsx
@@ -11,7 +11,7 @@ import { VideoTrimmer, type VideoTrimmerHandle } from "@/components/studio/video
import { LookCard } from "@/components/shorts/preset-card";
import { useSubmitGuard } from "@/components/shorts/hooks";
import { ClipBar, ClipDrop, costText, Field, Segmented, tabKeys } from "@/components/shorts/ui";
-import { clipDuration, useSourceClip } from "@/components/shorts/use-source-clip";
+import { clipDuration, clipSize, useSourceClip } from "@/components/shorts/use-source-clip";
import { uploadFile, useEngine, useModelAccess } from "@/lib/api";
import { keepOffered, offered } from "@/lib/model-access";
import {
@@ -20,6 +20,8 @@ import {
fpsChoices,
FRAME_LIMITS,
MIXED,
+ MIXED_MODES,
+ MIXED_ORIGINAL,
MIXED_PRESETS,
mixedFrames,
mixedPreview,
@@ -51,11 +53,20 @@ const HOW = [
{ step: "Choose a preset", text: "Browse 33 mixed-media looks — sketch, comic, paper, neon, marble — and pick the one that fits your clip." },
{ step: "Upload your video", text: "Add a clip and trim it to up to 10 seconds. It needs at least 4 frames per second." },
{ step: "Customize settings", text: "Each preset has its own colours, materials and intensity. Save them per preset; they stay in this browser." },
- { step: "Generate & preview", text: "Make one preview frame first to check the look, then render the whole video, frame by frame at the rate you pick. On the cloud, Fast restyles it in one video-to-video pass instead." },
+ {
+ step: "Generate & preview",
+ text: "Make one preview frame first to check the look, then render the whole video, frame by frame at the rate you pick. Smooth draws only the first frame in the look and carries it through the clip; on the cloud, Fast restyles it in one video-to-video pass.",
+ },
+];
+
+const MODE_OPTIONS: { value: MixedMode; label: string; title: string }[] = [
+ { value: "frames", label: "Per frame", title: "Every frame drawn again in the look — the mixed-media flicker" },
+ { value: "smooth", label: "Smooth", title: "The first frame in the look, then carried through the clip by depth — no flicker" },
+ { value: "fast", label: "Fast", title: "A partner video model restyles the whole clip in one pass" },
];
/** Mixed Media: pick a look, add a ≤10 s clip, tune the settings, preview one frame, render. */
-export function MixedStudio({ models, frameModels }: { models: Record<Engine, RestyleModelInfo[]>; frameModels: RestyleModelInfo[] }) {
+export function MixedStudio({ models, frameModels }: { models: Record<Engine, RestyleModelInfo[]>; frameModels: Record<Engine, RestyleModelInfo[]> }) {
const [tab, setTab] = useState<Tab>("presets");
const [engine, setEngine] = useEngine();
useEffect(() => {
@@ -105,10 +116,10 @@ export function MixedStudio({ models, frameModels }: { models: Record<Engine, Re
<p className="text-[12px] font-semibold tracking-[0.14em] text-brand-text uppercase">No prompts, just vibe</p>
<h2 className="mt-2 font-heading text-display text-balance">Turn any video into mixed-media art</h2>
<p className="mx-auto mt-2 max-w-[560px] text-body text-pretty text-muted-foreground">
- 33 looks, each with its own colours and materials. Preview one frame first, then render the clip frame by frame at the rate you choose.
+ 33 looks, each with its own colours and materials. Preview one frame first, then render the clip frame by frame at the rate you choose — on Fuobe Mixed Media, free on your GPU.
</p>
</div>
- <Workspace engine={engine} models={models[engine]} frameModels={frameModels} />
+ <Workspace engine={engine} models={models[engine]} frameModels={frameModels[engine]} />
</>
)}
</div>
@@ -132,14 +143,16 @@ function How({ onStart }: { onStart: () => void }) {
<div className="mt-6 rounded-2xl bg-muted/60 p-5 text-[13px] text-muted-foreground">
<p className="font-medium text-foreground">Cost</p>
<p className="mt-1">
- A render is counted in frames: seconds × frame rate, rounded down (10 s at 8 FPS = 80 frames). On the open engine every frame runs on your GPU for free; on the
- cloud each frame is redrawn by an image model and priced per frame (Nano Banana 2 or Seedream 5.0 Flash). Fast restyles the clip in one video-to-video pass,
- priced by the model. The estimate shows before you generate.
+ A render is counted in frames: seconds × frame rate, rounded down (10 s at 8 FPS = 80 frames; at most 10 s × 24 FPS = 240). Fuobe Mixed Media draws every
+ frame again in the look — Z-Image Turbo following the frame&apos;s own outlines, with the look&apos;s LoRA and one seed — free on your GPU, or on the cloud
+ at about a cent a frame. Nano Banana 2 and Seedream 5.0 Flash redraw frames too, priced per frame. Smooth draws only the first frame in the look, then Wan 2.2
+ Fun VACE carries it through the clip by depth, priced per second. Fast restyles the clip in one video-to-video pass, priced by the model. The estimate shows
+ before you generate.
</p>
<p className="mt-2">
- To keep a render quick, the cloud redraws frames in runs of {FRAME_LIMITS.lane} side by side: each frame matches the one before it, and each run starts from
- your preview frame, so the look can shift slightly every {FRAME_LIMITS.lane} frames. If a frame fails, the frames still waiting stop, and Try again redraws only
- the frames that didn’t finish.
+ Over {FRAME_LIMITS.perClip} frames, the frames go back together as clips and are joined. Nano Banana 2 and Seedream redraw frames in runs of {FRAME_LIMITS.lane}{" "}
+ side by side, each frame matching the one before it and each run starting from your preview frame, so their look can shift slightly every {FRAME_LIMITS.lane}{" "}
+ frames. If a frame fails, the frames still waiting stop, and Try again redraws only the frames that didn’t finish.
</p>
</div>
<div className="mt-6 text-center">
@@ -152,6 +165,7 @@ function How({ onStart }: { onStart: () => void }) {
}
function Workspace({ engine, models, frameModels }: { engine: Engine; models: RestyleModelInfo[]; frameModels: RestyleModelInfo[] }) {
+ const [hasClip, setHasClip] = useState(false);
const [presetId, setPresetId] = useState<string | null>(null);
const preset = MIXED_PRESETS.find((p) => p.id === presetId) ?? null;
const [values, setValues] = useState<MixedValues>({});
@@ -227,7 +241,7 @@ function Workspace({ engine, models, frameModels }: { engine: Engine; models: Re
)}
</section>
<aside ref={panel} id="mm-editor" className="scrollbar-none min-w-0 scroll-mt-16 lg:sticky lg:top-16 lg:max-h-[calc(100svh-4.5rem)] lg:overflow-y-auto lg:overscroll-contain lg:rounded-2xl">
- <Editor engine={engine} models={models} frameModels={frameModels} preset={preset} values={values} setValues={setValues} />
+ <Editor engine={engine} models={models} frameModels={frameModels} preset={preset} values={values} setValues={setValues} onClip={setHasClip} />
</aside>
{preset && !panelVisible && (
<div className="fixed inset-x-3 bottom-[max(0.75rem,env(safe-area-inset-bottom))] z-30 lg:hidden">
@@ -239,7 +253,7 @@ function Workspace({ engine, models, frameModels }: { engine: Engine; models: Re
<Sparkles className="size-4 shrink-0" />
<span className="min-w-0 flex-1 truncate text-left">{preset.name}</span>
<span className="flex shrink-0 items-center gap-1">
- Add a clip <ArrowDown className="size-4" />
+ {hasClip ? "Settings & render" : "Add a clip"} <ArrowDown className="size-4" />
</span>
</button>
</div>
@@ -258,6 +272,7 @@ function Editor({
preset,
values,
setValues,
+ onClip,
}: {
engine: Engine;
models: RestyleModelInfo[];
@@ -265,9 +280,13 @@ function Editor({
preset: MixedPreset | null;
values: MixedValues;
setValues: (v: MixedValues) => void;
+ /** Whether a clip is loaded (the phone bar says what's next). */
+ onClip?: (has: boolean) => void;
}) {
const source = useSourceClip(MIXED.maxBytes);
const { clip } = source;
+ const hasClip = !!clip;
+ useEffect(() => onClip?.(hasClip), [hasClip, onClip]);
// Hand-off: /mixed-media?video=/api/files/… (a result or a Library clip).
useEffect(() => {
const video = new URLSearchParams(window.location.search).get("video");
@@ -280,17 +299,24 @@ function Editor({
const [fpsChoice, setFpsChoice] = useState<FpsChoice>(MIXED.defaultFps as number);
const [manual, setManual] = useState<number>(MIXED.defaultFps);
const [resolution, setResolution] = useState<MixedResolution>("1K");
- // Cloud: frame by frame (the default, priced per frame) or Fast (one video-to-video pass).
- const [mode, setMode] = useState<MixedMode>("frames");
+ // Frame by frame (the default, priced per frame), Smooth (the first frame, then carried through by depth) or, on the
+ // cloud, Fast (one video-to-video pass). A mode the engine hasn't (Fast on your GPU) reads as Per frame.
+ const [picked, setMode] = useState<MixedMode>("frames");
+ const mode: MixedMode = MIXED_MODES[engine].includes(picked) ? picked : "frames";
const cloud = engine === "cloud";
- const frameMode = cloud && mode === "frames";
+ const frameMode = mode === "frames";
+ const smooth = mode === "smooth";
// Models switched off in Settings → Models & licences leave the menu, and the pick falls back to one that is on.
const access = useModelAccess();
- const models = keepOffered(frameMode ? frameModels : restyleModels, (m) => offered(access, m.id, engine));
- const slot = frameMode ? "frames" : engine;
- const [pickedModel, setModel] = useState<Record<Engine | "frames", string>>({ cloud: "", open: "", frames: "" });
+ const models = keepOffered(
+ smooth ? frameModels.filter((m) => m.id === MIXED_ORIGINAL) : frameMode ? frameModels : restyleModels,
+ (m) => offered(access, m.id, engine),
+ );
+ const slot = `${engine}:${mode}`;
+ const [pickedModel, setModel] = useState<Record<string, string>>({});
const modelId = (models.some((m) => m.id === pickedModel[slot]) && pickedModel[slot]) || models[0]?.id;
const model = models.find((m) => m.id === modelId);
+ const original = modelId === MIXED_ORIGINAL;
const [previewId, setPreviewId] = useState<string | null>(null);
// Every main step of the latest render (cut → frames or restyle → sound), so a failed step shows its own error.
const [renderIds, setRenderIds] = useState<string[]>([]);
@@ -313,24 +339,27 @@ function Editor({
const problem = mmRange ? mixedRangeProblem(mmRange, duration, sourceFps) : null;
const frames = mmRange ? mixedFrames(seconds, fps) : 0;
// Fast restyles the cut as video: the resolution is the model's own setting nearest to 1K / 2K / 4K
- // (choices that land on the same one are off). Per frame draws each frame at 1K–4K (Seedream up to 2K).
- const fast = cloud && !frameMode;
+ // (choices that land on the same one are off). Per frame draws each frame at 1K–4K (Seedream and the Original up to 2K
+ // in the cloud; your GPU renders up to 1536 px). Smooth renders at its own size (720p in the cloud, 480p on your GPU).
+ const fast = cloud && mode === "fast";
const lengthIssue = (m: RestyleModelInfo) => (fast && seconds ? clipLengthProblem(m, seconds) : null);
const resOptions = MIXED.resolutions.map((r, i) => {
if (frameMode) {
- const capped = r === "4K" && modelId === "seedream-5-flash";
+ const capped = r === "4K" && cloud && (modelId === "seedream-5-flash" || original);
return { value: r, label: r, hint: undefined, disabled: capped, title: capped ? `${model?.name} draws frames up to 2K` : `Each frame at ${r}` };
}
const at = fast ? nearestResolution(model?.resolutions, r) : undefined;
const prev = i > 0 && fast ? nearestResolution(model?.resolutions, MIXED.resolutions[i - 1]) : undefined;
return { value: r, label: r, hint: at, disabled: fast && !!at && at === prev, title: fast && at === prev ? `${model?.name} renders up to ${at}` : at };
});
- const showResolution = !fast || resOptions.some((o) => o.hint && !o.disabled && o.value !== "1K");
+ const showResolution = !smooth && (!fast || resOptions.some((o) => o.hint && !o.disabled && o.value !== "1K"));
const resShown: MixedResolution = resOptions.find((o) => o.value === resolution)?.disabled ? ([...resOptions].reverse().find((o) => !o.disabled)?.value ?? "1K") : resolution;
const modelRes = fast ? nearestResolution(model?.resolutions, resShown) : undefined;
const previewImage = preview?.status === "succeeded" ? preview.outputs.find((o) => o.kind === "image") : undefined;
- // Per frame always starts from the approved preview; Fast only when the model takes a still.
- const anchor = cloud && (frameMode || model?.image) && previewImage && !anchorOff ? previewImage.url : undefined;
+ // The partner editors start every run of frames from the approved preview; Fast only when the model takes a still. The
+ // Original needs no anchor: frame 1 is drawn exactly as the preview was (same look, LoRA and seed).
+ const anchor = cloud && !original && (frameMode || (fast && model?.image)) && previewImage && !anchorOff ? previewImage.url : undefined;
+ const size = clipSize(clip);
const body: MixedBody | null =
preset && mmRange && !problem
@@ -338,12 +367,19 @@ function Editor({
engine,
presetId: preset.id,
values,
- source: { url: clip?.url ?? "/api/files/placeholder.mp4", name: clip?.name, duration, fps: sourceFps },
+ source: {
+ url: clip?.url ?? "/api/files/placeholder.mp4",
+ name: clip?.name,
+ duration,
+ fps: sourceFps,
+ // The frames' size on the Original (and so their price) follows the clip's shape.
+ ...(size.width && size.height ? { width: size.width, height: size.height } : {}),
+ },
range: mmRange,
fps,
resolution: resShown,
modelId,
- ...(cloud ? { mode } : {}),
+ mode,
...(anchor ? { anchor } : {}),
}
: null;
@@ -351,7 +387,7 @@ function Editor({
const est = estimate.data;
// A new clip, preset or engine starts without a preview (and so does another frame editor: the preview is its own work).
- const key = `${preset?.id}|${clip?.preview}|${engine}|${frameMode ? modelId : ""}`;
+ const key = `${preset?.id}|${clip?.preview}|${engine}|${mode === "fast" ? "" : modelId}`;
const [lastKey, setLastKey] = useState(key);
if (key !== lastKey) {
setLastKey(key);
@@ -469,21 +505,14 @@ function Editor({
)}
</Field>
- {cloud && (
- <Field label="Restyle" hint={frameMode ? "Every frame redrawn · priced per frame" : "One video-to-video pass · priced by the model"}>
- <Segmented<MixedMode>
- label="Restyle"
- value={mode}
- onChange={setMode}
- options={[
- { value: "frames", label: "Per frame", title: "Each frame is redrawn by an image model, looking at the frame before it" },
- { value: "fast", label: "Fast", title: "A video model restyles the whole clip in one pass" },
- ]}
- />
- </Field>
- )}
+ <Field
+ label="Restyle"
+ hint={frameMode ? `Every frame drawn again · ${cloud ? "priced per frame" : "free on your GPU"}` : smooth ? `First frame, then carried through · ${cloud ? "priced per second" : "free on your GPU"}` : "One video-to-video pass · priced by the model"}
+ >
+ <Segmented<MixedMode> label="Restyle" value={mode} onChange={setMode} options={MODE_OPTIONS.filter((o) => MIXED_MODES[engine].includes(o.value))} />
+ </Field>
- {(!cloud || frameMode) && (
+ {frameMode && (
<Field label="Frame rate" hint={sourceFps ? `Uploaded video has ${Math.round(sourceFps)} FPS` : "8 FPS is the classic stop-motion look"}>
<Segmented<FpsChoice>
label="Frame rate"
@@ -537,7 +566,7 @@ function Editor({
}
>
{models.length > 1 ? (
- <Select value={modelId} onValueChange={(v) => setModel((m) => ({ ...m, [engine]: v }))}>
+ <Select value={modelId} onValueChange={(v) => setModel((m) => ({ ...m, [slot]: v }))}>
<SelectTrigger className="w-full" aria-label="Model">
<SelectValue>
<span className="flex min-w-0 items-center gap-2">
@@ -568,7 +597,15 @@ function Editor({
<span className="font-medium">{model?.name ?? "—"}</span> <span className="text-muted-foreground">· {model?.price}</span>
</div>
)}
- {model && <p className="text-[12px] leading-snug text-muted-foreground">{model.tagline}</p>}
+ {model && (
+ <p className="text-[12px] leading-snug text-muted-foreground">
+ {smooth
+ ? `Fuobe Original · the first frame drawn in the look, then Wan 2.2 Fun VACE carries it through the clip by depth${cloud ? " at 720p" : " (480p, 16 FPS on your GPU)"}.`
+ : original
+ ? `Fuobe Original · every frame drawn again by Z-Image Turbo along its own outlines, with the look's LoRA and one seed${cloud ? ", hosted on fal" : ""}.`
+ : model.tagline}
+ </p>
+ )}
</Field>
<div className="space-y-2 rounded-xl border p-3">
@@ -590,6 +627,13 @@ function Editor({
)}
</div>
)}
+ {/* The cloud draws the preview and the frames on one route; your GPU draws a Per frame preview on the per-frame graph
+ itself (a one-frame clip), but Smooth's first frame on another (Z-Image's image-to-image), so it says nothing there. */}
+ {original && (cloud ? !!previewImage : frameMode && preview?.status === "succeeded") && (
+ <p className="flex items-center gap-1.5 text-[12px] text-brand-text">
+ <Wand2 className="size-3.5 shrink-0" /> {smooth ? "The first frame is drawn just like this, then carried through the clip" : "Every frame is drawn like this one: same look, LoRA and seed"}
+ </p>
+ )}
{anchor && (
<p className="flex items-center gap-1.5 text-[12px] text-brand-text">
<Wand2 className="size-3.5 shrink-0" /> {frameMode ? "Every frame is matched to this one" : `${model?.name} follows this frame for the whole video`}
@@ -616,14 +660,20 @@ function Editor({
<div className="space-y-3 border-t pt-4">
<div className="flex items-baseline justify-between gap-2">
<span className="text-[13px] text-muted-foreground">
- {!mmRange ? "Estimate" : fast ? `${seconds.toFixed(1)} s${modelRes ? ` · ${modelRes}` : ""}` : `${est?.frames ?? frames} frames · ${+(est?.fps ?? fps).toFixed(2)} FPS`}
+ {!mmRange
+ ? "Estimate"
+ : fast
+ ? `${seconds.toFixed(1)} s${modelRes ? ` · ${modelRes}` : ""}`
+ : smooth
+ ? `${seconds.toFixed(1)} s · ${cloud ? "720p" : "480p, 16 FPS"}`
+ : `${est?.frames ?? frames} frames · ${+(est?.fps ?? fps).toFixed(2)} FPS`}
</span>
<span className="flex items-center gap-1.5 font-mono text-[13px] font-medium tabular-nums" aria-live="polite">
{estimate.isFetching && <Loader2 className="size-3 animate-spin text-muted-foreground" />}
{body ? costText(est, engine) : "—"}
</span>
</div>
- {frameMode && est && !est.demo && typeof est.perFrameUsd === "number" && (
+ {frameMode && cloud && est && !est.demo && typeof est.perFrameUsd === "number" && (
<p className="text-[12px] text-muted-foreground tabular-nums">
{est.frames} frames × ${est.perFrameUsd.toFixed(3).replace(/0$/, "")} a frame ({model?.name}), plus a few cents to cut and rebuild the clip
</p>
diff --git a/src/components/shorts/hooks.ts b/src/components/shorts/hooks.ts
index 0614a91d..f13e7117 100644
--- a/src/components/shorts/hooks.ts
+++ b/src/components/shorts/hooks.ts
@@ -22,7 +22,8 @@ export const send = async <T>(url: string, method: string, body?: unknown) =>
export interface ShortsBody {
engine: Engine;
presetId: string;
- source: { url: string; name?: string; duration?: number; width?: number; height?: number };
+ /** fps: the clip's own rate (Fuobe Shorts in the cloud cuts and bills on frames). */
+ source: { url: string; name?: string; duration?: number; width?: number; height?: number; fps?: number };
range: ShortsRange;
aspectRatio: ShortsRatio;
language: string;
diff --git a/src/components/shorts/shorts-studio.tsx b/src/components/shorts/shorts-studio.tsx
index 0dc2c1be..ac912fc4 100644
--- a/src/components/shorts/shorts-studio.tsx
+++ b/src/components/shorts/shorts-studio.tsx
@@ -16,6 +16,7 @@ import {
SHORTS_CATEGORIES,
SHORTS_LANGUAGES,
SHORTS_PRESETS,
+ SHORTS_ORIGINAL,
SHORTS_RATIOS,
shortsPreview,
type ShortsCustomPreset,
@@ -333,7 +334,13 @@ function SetupPanel({
? {
engine,
presetId,
- source: { url: clip?.url ?? "/api/files/placeholder.mp4", name: clip?.name, duration, ...(size.width && size.height ? { width: size.width, height: size.height } : {}) },
+ source: {
+ url: clip?.url ?? "/api/files/placeholder.mp4",
+ name: clip?.name,
+ duration,
+ ...(size.width && size.height ? { width: size.width, height: size.height } : {}),
+ ...(clip?.info?.fps ? { fps: clip.info.fps } : {}),
+ },
range: shortsRange,
aspectRatio: ratio,
language,
@@ -486,7 +493,15 @@ function SetupPanel({
<span className="font-medium">{model?.name ?? "—"}</span> <span className="text-muted-foreground">· {model?.price}</span>
</div>
)}
- {model && <p className="text-[12px] leading-snug text-muted-foreground">{engine === "open" ? "Each ≤5 s segment: its first frame is restyled with Qwen-Image-Edit, then Wan 2.2 Fun VACE follows it and the clip's depth." : model.tagline}</p>}
+ {model && (
+ <p className="text-[12px] leading-snug text-muted-foreground">
+ {engine === "open"
+ ? "Each ≤5 s segment: its first frame is restyled with Qwen-Image-Edit, then Wan 2.2 Fun VACE follows it and the clip's depth."
+ : model.id === SHORTS_ORIGINAL
+ ? "Fuobe Original · each segment's first frame is drawn in the look (Qwen-Image-Edit 2511), then Wan 2.2 Fun VACE carries it through every frame by depth, on open weights hosted by fal."
+ : model.tagline}
+ </p>
+ )}
{customRefs > 0 && engine === "cloud" && model && !model.refs && (
<p className="flex gap-1.5 text-[12px] leading-snug text-warning">
<Info className="mt-0.5 size-3.5 shrink-0" />
diff --git a/src/lib/catalog/dop.ts b/src/lib/catalog/dop.ts
index a55a86af..2616d9ab 100644
--- a/src/lib/catalog/dop.ts
+++ b/src/lib/catalog/dop.ts
@@ -23,6 +23,7 @@
*/
import { gpuOnlyLicence, libraryEntry, loraName, loraRef, triggerOf } from "./loras";
import { defaultValues, getMixedPreset, originalFrameRequest } from "./mixed-media";
+import { mixedLoras } from "./mixed-media-looks";
import { DOP_RECIPES, OSS_LORAS, type DopRecipe, type OssLora } from "./oss-loras.generated";
import type { LoraRef, Operation, Preset, PresetRoute } from "./types";
@@ -124,7 +125,7 @@ function mixedPrestep(presetId: string): Preset["prestep"] {
const values = defaultValues(look);
const labels = { step: `Start frame as ${look.name}`, clip: `${look.name} clip` };
const step = (engine: "open" | "cloud") => {
- const { modelId, prompt, loras, params } = originalFrameRequest({ engine, preset: look, values, resolution: "1K" });
+ const { modelId, prompt, loras, params } = originalFrameRequest({ engine, preset: look, values, resolution: "1K", loras: mixedLoras(look.id) });
return { modelId, op: "edit" as const, prompt: prompt ?? "", ...(loras?.length && { loras }), ...(params && { params }), labels };
};
return { open: step("open"), cloud: step("cloud") };
diff --git a/src/lib/catalog/mixed-media-looks.ts b/src/lib/catalog/mixed-media-looks.ts
new file mode 100644
index 00000000..559e31b0
--- /dev/null
+++ b/src/lib/catalog/mixed-media-looks.ts
@@ -0,0 +1,18 @@
+/**
+ * Fuobe Mixed Media's look LoRAs (build plan O9): a Mixed Media preset id → the Z-Image LoRAs its frames are drawn with,
+ * from the research (studios[mixed-media].original.looks) through the LoRA library (pinned downloads, licences).
+ * 14 of the 33 looks have one; the rest run on their words. Unverified until the evaluation harness measures each.
+ *
+ * Kept apart from mixed-media.ts so the studio page doesn't ship the LoRA library: the server (and DoP's Mixed Media
+ * effects) hand the planner the LoRAs a run can reach.
+ */
+import { MIXED_MEDIA_LOOK_LORAS } from "./lora-library.generated";
+import { loraEntry, loraRef } from "./loras";
+import type { LoraRef } from "./types";
+
+export function mixedLoras(presetId: string): LoraRef[] {
+ return (MIXED_MEDIA_LOOK_LORAS[presetId] ?? []).flatMap((l) => {
+ const e = loraEntry(l.key);
+ return e ? [loraRef(e, l.strength)] : [];
+ });
+}
diff --git a/src/lib/catalog/mixed-media.ts b/src/lib/catalog/mixed-media.ts
index 06ce846b..2db2b9e6 100644
--- a/src/lib/catalog/mixed-media.ts
+++ b/src/lib/catalog/mixed-media.ts
@@ -15,8 +15,6 @@
* Research: docs/research/higgsfield-studios.md §3, docs/research/fuobe-originals-recipes-5.md §8 mixed-media.
*/
import { scenePoster, type PresetPreview, type PreviewFx, type PreviewScene } from "../preset-cards";
-import { MIXED_MEDIA_LOOK_LORAS } from "./lora-library.generated";
-import { loraEntry, loraRef, triggerOf } from "./loras";
import { planShorts, SHORTS_ORIGINAL, type PlanStep, type ShortsLook } from "./shorts";
import type { Engine, GenerationRequest, LoraRef } from "./types";
@@ -473,20 +471,11 @@ export const denoiseFor = (values: MixedValues) => DENOISE[values.intensity] ??
/** How closely the Original's cloud frames follow the source's outlines (fal's control_scale). */
export const controlFor = (values: MixedValues) => CONTROL[values.intensity] ?? CONTROL.balanced;
-/**
- * The look's LoRAs (research studios[mixed-media].original.looks, through the LoRA library: pinned downloads, licences).
- * 14 of the 33 looks have one; the rest run on their words. Unverified until the evaluation harness measures each.
- */
-export function mixedLoras(presetId: string): LoraRef[] {
- return (MIXED_MEDIA_LOOK_LORAS[presetId] ?? []).flatMap((l) => {
- const e = loraEntry(l.key);
- return e ? [loraRef(e, l.strength)] : [];
- });
-}
-
-/** A prompt led by its LoRAs' trigger words ("drkrm style, …"), as the Soul looks are. */
-export function withTrigger(prompt: string, loras: LoraRef[]): string {
- const t = triggerOf(loras);
+/** A prompt led by its LoRAs' trigger words ("drkrm style, …"), as the Soul looks are (the first LoRA with a trigger). */
+export function withTrigger(prompt: string, loras: Pick<LoraRef, "trigger">[]): string {
+ const t = loras
+ .map((l) => l.trigger?.trim().replace(/[\s.,;:]+$/, ""))
+ .find(Boolean);
return t ? `${t}, ${prompt}` : prompt;
}
@@ -623,7 +612,7 @@ export function originalFrameParams(values: MixedValues, resolution: MixedResolu
export function originalFrameRequest(
input: Pick<MixedPlanInput, "engine" | "preset" | "values" | "resolution" | "sourceSize" | "seed" | "loras">,
): Pick<GenerationRequest, "engine" | "modelId" | "op" | "prompt" | "loras" | "params"> {
- const loras = input.loras ?? mixedLoras(input.preset.id);
+ const loras = input.loras ?? [];
const seed = input.seed ?? FRAME_SEED;
return {
engine: input.engine,
@@ -666,7 +655,10 @@ export interface MixedPlanInput {
/** Cloud: the model's extra settings (LTX: follow the outlines). */
extra?: Record<string, unknown>;
seed?: number;
- /** The Original: the look's LoRAs this run can reach (the server leaves out a civitai one without the key); else the look's own. */
+ /**
+ * The Original: the look's LoRAs this run can reach (src/lib/catalog/mixed-media-looks.ts; the server leaves out a civitai
+ * one without the key). None: the look runs on its words.
+ */
loras?: LoraRef[];
}
@@ -684,7 +676,7 @@ export function planMixed(input: MixedPlanInput): { steps: PlanStep[]; final: st
// The Original draws every frame at one seed (the same seed keeps frames alike).
const seed = input.seed !== undefined ? { seed: input.seed } : original ? { seed: FRAME_SEED } : {};
if (input.engine === "open") {
- const loras = original ? (input.loras ?? mixedLoras(input.preset.id)) : [];
+ const loras = original ? (input.loras ?? []) : [];
return {
final: "render",
steps: [
@@ -886,6 +878,9 @@ export function planMixedFrames(input: MixedPlanInput): { steps: PlanStep[]; fin
return { steps, final: "final" };
}
+/** Smooth's first frame: 1K, else 2K (the Original's frame route draws up to 2K; Wan 2.2 Fun VACE renders at 720p after it). */
+const smoothFrameResolution = (r: MixedResolution): MixedResolution => (r === "1K" ? "1K" : "2K");
+
/**
* Smooth (both engines): the clip in pieces (on your GPU 81 frames at 16 fps, 480p; on fal up to 240 frames at the clip's
* own rate, 720p), each piece's first frame drawn in the look by the Original (the preview's route and seed), then Fuobe
@@ -911,7 +906,7 @@ export function planMixedSmooth(input: MixedPlanInput): { steps: PlanStep[]; fin
seed: input.seed ?? FRAME_SEED,
});
const final = plan.final ?? plan.takes[0].look;
- const frame = originalFrameRequest({ ...input, resolution: input.resolution === "1K" ? "1K" : "2K" });
+ const frame = originalFrameRequest({ ...input, resolution: smoothFrameResolution(input.resolution) });
const frameKeys = new Set(plan.takes.map((t) => t.frame));
const steps = plan.steps.map((s) => {
let request: GenerationRequest = s.key === final ? { ...s.request, feature: MIXED_FEATURE, title: input.title } : { ...s.request, feature: MIXED_STEP_FEATURE };
@@ -929,13 +924,14 @@ export function planMixedPreview(input: MixedPlanInput & { frameUrl?: string }):
// The Original in the cloud (Per frame and Smooth): its frame route on the grabbed frame, with the render's seed, look and size.
if (original && input.engine === "cloud") {
const count = input.sourceFps ? frameSampling(input.range.end - input.range.start, input.fps, input.sourceFps).frames : 0;
- const frame = originalFrameRequest({ ...input, resolution: input.mode === "smooth" ? input.resolution : frameResolution(count, input.resolution) });
+ // Smooth's first frame is drawn at 1K or 2K (planMixedSmooth); Per frame at the size its frame count allows.
+ const frame = originalFrameRequest({ ...input, resolution: input.mode === "smooth" ? smoothFrameResolution(input.resolution) : frameResolution(count, input.resolution) });
return { key: "preview", request: { feature: MIXED_PREVIEW_FEATURE, title, ...frame, inputs: { images: input.frameUrl ? [input.frameUrl] : [] } } };
}
if (input.engine === "open") {
// The per-frame graph on the selection's first frame: on your GPU the Original's preview (and Smooth's first frame) is
// drawn with the render's look, LoRA and seed.
- const loras = input.modelId === MIXED_OPEN_LEGACY ? [] : (input.loras ?? mixedLoras(input.preset.id));
+ const loras = input.modelId === MIXED_OPEN_LEGACY ? [] : (input.loras ?? []);
const seed = input.seed ?? (input.modelId === MIXED_OPEN_LEGACY ? undefined : FRAME_SEED);
return {
key: "preview",
diff --git a/src/server/mixed-media.ts b/src/server/mixed-media.ts
index f6254393..c8949c1e 100644
--- a/src/server/mixed-media.ts
+++ b/src/server/mixed-media.ts
@@ -16,7 +16,6 @@ import {
MIXED_ORIGINAL,
MIXED_SMOOTH_MODEL,
mixedFrames,
- mixedLoras,
mixedRangeProblem,
nearestResolution,
planMixed,
@@ -25,6 +24,7 @@ import {
type MixedPlanInput,
type MixedResolution,
} from "@/lib/catalog/mixed-media";
+import { mixedLoras } from "@/lib/catalog/mixed-media-looks";
import { clipLengthProblem, planSegments, type PlanStep } from "@/lib/catalog/shorts";
import { sourceSeconds, takesImage } from "@/lib/catalog/shorts-models";
import type { Engine, Generation, ProviderId } from "@/lib/catalog/types";
diff --git a/tests/e2e/mixed-shorts-original.mjs b/tests/e2e/mixed-shorts-original.mjs
new file mode 100644
index 00000000..015ddd4f
--- /dev/null
+++ b/tests/e2e/mixed-shorts-original.mjs
@@ -0,0 +1,249 @@
+// Fuobe Mixed Media and Fuobe Shorts on the Originals, browser check (build plan O9). At 1440 and 390 px, light and
+// dark, in demo mode (no keys, ComfyUI unreachable): /mixed-media runs Fuobe Mixed Media by default, frame by frame on
+// both engines, with Smooth on both and Fast on the cloud only, the partner frame editors (Nano Banana 2, Seedream 5.0
+// Flash) still in the model menu, a preview frame that says every frame is drawn like it, and a demo render that
+// finishes; /shorts runs Fuobe Shorts by default on both engines with Gemini Omni Flash still a choice, and a demo
+// session starts on it. Then, once, with a (fake) fal key: the cloud estimates are real prices before anything runs
+// (frames × a price a frame on Mixed Media, a dollar figure on Shorts). Nothing scrolls sideways.
+// Usage: node tests/e2e/mixed-shorts-original.mjs [appUrl] [--shots <dir>] (app running in demo mode, ComfyUI unreachable).
+// Exits 1 on a failed check.
+import { spawnSync } from "node:child_process";
+import fs from "node:fs";
+import os from "node:os";
+import path from "node:path";
+import { launch, root } from "./_browser.mjs";
+
+const argv = process.argv.slice(2);
+const app = (argv.find((a) => !a.startsWith("--") && argv[argv.indexOf(a) - 1] !== "--shots") ?? "http://localhost:3000").replace(/\/$/, "");
+const shots = argv.includes("--shots") ? argv[argv.indexOf("--shots") + 1] : undefined;
+if (shots) fs.mkdirSync(shots, { recursive: true });
+
+const failures = [];
+const check = (label, ok, extra = "") => {
+ console.log(`${ok ? "ok " : "FAIL"} ${label.padEnd(76)}${extra ? ` ${extra}` : ""}`);
+ if (!ok) failures.push(label);
+};
+
+async function upload(file, type, name) {
+ const form = new FormData();
+ form.append("file", new Blob([fs.readFileSync(path.isAbsolute(file) ? file : path.join(root, file))], { type }), name);
+ const res = await fetch(`${app}/api/uploads`, { method: "POST", body: form });
+ if (!res.ok) throw new Error(`upload failed: ${res.status}`);
+ return (await res.json()).url;
+}
+
+const putSettings = (body) => fetch(`${app}/api/settings`, { method: "PUT", headers: { "content-type": "application/json" }, body: JSON.stringify(body) });
+
+// A 6 s portrait clip with sound: Mixed Media trims to ≤10 s, Shorts makes segments of it.
+const clip = await upload("scripts/eval/fixtures/walk-6s.mp4", "video/mp4", "walk.mp4");
+// The cloud preview grabs its frame in the browser, and Playwright's Chromium can't decode H.264: Mixed Media gets the
+// same clip as VP9 when ffmpeg is here (else the cloud preview isn't checked).
+const webm = path.join(fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-e2e-o9-")), "walk.webm");
+const vp9 = spawnSync("ffmpeg", ["-v", "error", "-y", "-i", path.join(root, "scripts/eval/fixtures/walk-6s.mp4"), "-c:v", "libvpx-vp9", "-b:v", "300k", "-c:a", "libopus", webm]).status === 0;
+const mmClip = vp9 ? await upload(webm, "video/webm", "walk.webm") : clip;
+
+const browser = await launch();
+try {
+ for (const [width, height] of [
+ [1440, 900],
+ [390, 844],
+ ]) {
+ for (const scheme of ["light", "dark"]) {
+ const tag = `${width} ${scheme}`;
+ const context = await browser.newContext({ viewport: { width, height }, colorScheme: scheme, ...(width < 500 ? { isMobile: true, hasTouch: true } : {}) });
+ await context.addInitScript(() => {
+ try {
+ if (!sessionStorage.getItem("e2e.engine.set")) {
+ localStorage.setItem("fuobe.engine", "cloud");
+ sessionStorage.setItem("e2e.engine.set", "1");
+ }
+ } catch {}
+ });
+ const page = await context.newPage();
+ const shot = async (name) => shots && (await page.screenshot({ path: path.join(shots, `${name}-${width}-${scheme}.png`), fullPage: true }));
+ const sideways = () => page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
+ const settle = () =>
+ page.waitForFunction(() => !document.querySelector('[role="listbox"][data-state="closed"], [role="dialog"][data-state="closed"]'), null, { timeout: 5000 }).catch(() => {});
+ const engine = async (name) => {
+ await page.getByRole("radiogroup", { name: "Engine" }).getByRole("radio", { name: new RegExp(name, "i") }).first().click();
+ await page.waitForTimeout(400);
+ };
+ const restyle = () => page.getByRole("radiogroup", { name: "Restyle" });
+ const modes = async () => (await restyle().getByRole("radio").allInnerTexts()).map((t) => t.trim());
+ const checkedMode = async () => (await restyle().locator('[aria-checked="true"]').innerText()).trim();
+ const menu = async (trigger) => {
+ await page.getByRole("combobox", { name: trigger }).click();
+ const opts = (await page.getByRole("option").allInnerTexts()).map((t) => t.replace(/\s+/g, " ").trim());
+ await page.keyboard.press("Escape");
+ await settle();
+ return opts;
+ };
+ // The estimate (the price, "Demo · free" or "Free · your GPU"), not the trimmer's live length.
+ const cost = (scope) => page.locator(scope).locator('span[aria-live="polite"].font-mono').filter({ hasText: /Demo|Free|≈ \$|Price unknown/ }).first();
+ const costShown = (scope) =>
+ cost(scope)
+ .waitFor({ timeout: 30_000 })
+ .then(
+ () => cost(scope).innerText(),
+ () => "",
+ );
+
+ // ---- Mixed Media ------------------------------------------------------------------------------------------
+ await page.goto(`${app}/mixed-media?preset=mixed-sketch&video=${encodeURIComponent(mmClip)}`, { waitUntil: "load" });
+ await page.locator("#mm-editor").getByText("Generate video").waitFor({ timeout: 30_000 });
+ await page.waitForTimeout(800);
+ const editor = page.locator("#mm-editor");
+ check(`${tag} · mixed: Per frame, Smooth and Fast on the cloud`, JSON.stringify(await modes()) === JSON.stringify(["Per frame", "Smooth", "Fast"]), JSON.stringify(await modes()));
+ check(`${tag} · mixed: Per frame is the default`, (await checkedMode()) === "Per frame");
+ const mmModel = (await page.getByRole("combobox", { name: "Model" }).innerText()).replace(/\s+/g, " ");
+ check(`${tag} · mixed: Fuobe Mixed Media is the default model`, /Fuobe Mixed Media/.test(mmModel), mmModel);
+ const mmOpts = await menu("Model");
+ check(`${tag} · mixed: the partner frame editors stay in the menu`, mmOpts.some((o) => /Nano Banana 2/.test(o)) && mmOpts.some((o) => /Seedream 5\.0 Flash/.test(o)), JSON.stringify(mmOpts));
+ check(`${tag} · mixed: the Original's menu line shows its price`, mmOpts.some((o) => /Fuobe Mixed Media.*\$/.test(o)), mmOpts[0]);
+ check(`${tag} · mixed: the Original's line names its recipe`, (await editor.innerText()).includes("Fuobe Original · every frame drawn again by Z-Image Turbo"));
+ const mmCost = await costShown("#mm-editor");
+ check(`${tag} · mixed: the estimate shows before running (demo)`, /Demo · free/.test(mmCost), mmCost);
+ check(`${tag} · mixed: frames counted before running (6 s × 8 FPS)`, /48 frames · 8 FPS/.test(await editor.innerText()));
+ // The preview frame: one frame in the look (the Original's edit route), drawn as every frame will be.
+ const preview = async (where) => {
+ await editor.getByRole("button", { name: /Generate preview frame/ }).click();
+ const drawn = await editor
+ .getByText("Every frame is drawn like this one")
+ .waitFor({ timeout: 60_000 })
+ .then(
+ () => true,
+ () => false,
+ );
+ check(`${tag} · mixed: the preview (${where}) says every frame is drawn like it`, drawn, drawn ? "" : (await editor.innerText()).replace(/\s+/g, " ").match(/Preview frame.{0,240}/)?.[0]);
+ };
+ if (vp9) await preview("cloud");
+ // Smooth: the Original only, no frame rate, priced per second.
+ await restyle().getByRole("radio", { name: "Smooth" }).click();
+ await page.waitForTimeout(300);
+ const smoothText = await editor.innerText();
+ check(`${tag} · mixed: Smooth runs on Fuobe Mixed Media`, /Fuobe Mixed Media/.test(await editor.getByText(/Fuobe Mixed Media/).first().innerText()) && /Wan 2\.2 Fun VACE/.test(smoothText));
+ check(`${tag} · mixed: Smooth has no frame rate`, !(await page.getByRole("radiogroup", { name: "Frame rate" }).count()));
+ check(`${tag} · mixed: Smooth's hint says priced per second`, /priced per second/.test(smoothText));
+ await restyle().getByRole("radio", { name: "Per frame" }).click();
+ await page.waitForTimeout(300);
+ // A demo render: the request names the Original, Per frame, and finishes.
+ const sent = page.waitForResponse((r) => r.url().endsWith("/api/mixed-media") && r.request().method() === "POST", { timeout: 30_000 });
+ await editor.getByRole("button", { name: "Generate video" }).click();
+ const res = await sent.catch(() => null);
+ const req = res ? JSON.parse(res.request().postData() ?? "{}") : {};
+ check(`${tag} · mixed: the render asks for the Original, per frame`, res?.ok() && req.modelId === "fuobe-mixed-media" && req.mode === "frames", res ? `${res.status()} ${req.modelId} ${req.mode}` : "no request");
+ const done = await editor
+ .locator("video")
+ .first()
+ .waitFor({ timeout: 120_000 })
+ .then(
+ () => true,
+ () => false,
+ );
+ check(`${tag} · mixed: the demo render finishes with a video`, done);
+ await shot("mixed-cloud");
+ check(`${tag} · mixed: nothing scrolls sideways (cloud)`, (await sideways()) <= 0, `${await sideways()} px`);
+ // Your GPU: Per frame and Smooth, no Fast, the Original first, free.
+ await page.evaluate(() => window.scrollTo(0, 0));
+ await engine("Open source");
+ check(`${tag} · mixed: your GPU has Per frame and Smooth, no Fast`, JSON.stringify(await modes()) === JSON.stringify(["Per frame", "Smooth"]), JSON.stringify(await modes()));
+ const openModel = await editor.innerText();
+ check(`${tag} · mixed: Fuobe Mixed Media on your GPU`, /Fuobe Mixed Media/.test(openModel) && /free on your GPU/i.test(openModel));
+ const openCost = await costShown("#mm-editor");
+ check(`${tag} · mixed: free on your GPU (demo)`, /free/i.test(openCost), openCost);
+ await preview("your GPU");
+ await shot("mixed-open");
+ check(`${tag} · mixed: nothing scrolls sideways (open)`, (await sideways()) <= 0, `${await sideways()} px`);
+ if (width < 500) {
+ // The phone bar says what's next: the clip is in, so it's the settings and the render.
+ await page.evaluate(() => window.scrollTo(0, 0));
+ await page.waitForTimeout(500);
+ const bar = page.locator("button", { hasText: "Settings & render" });
+ check(`${tag} · mixed: the phone bar goes to the settings once a clip is in`, (await bar.count()) > 0 && !(await page.locator("button", { hasText: "Add a clip" }).count()));
+ }
+ await engine("Cloud");
+
+ // ---- Shorts -----------------------------------------------------------------------------------------------
+ await page.goto(`${app}/shorts?preset=shorts-claymation&video=${encodeURIComponent(clip)}`, { waitUntil: "load" });
+ await page.getByRole("button", { name: /Generate short/ }).waitFor({ timeout: 30_000 });
+ await page.waitForTimeout(800);
+ const shModel = (await page.getByRole("combobox", { name: "Restyle model" }).innerText()).replace(/\s+/g, " ");
+ check(`${tag} · shorts: Fuobe Shorts is the default on the cloud`, /Fuobe Shorts/.test(shModel), shModel);
+ const shOpts = await menu("Restyle model");
+ check(`${tag} · shorts: Gemini Omni Flash stays a choice`, shOpts.some((o) => /Gemini Omni Flash/.test(o)), JSON.stringify(shOpts));
+ const body = await page.locator("body").innerText();
+ check(`${tag} · shorts: the Original's line names its recipe`, body.includes("Fuobe Original · each segment's first frame is drawn in the look"));
+ const shCost = await costShown("main");
+ check(`${tag} · shorts: the estimate shows before running (demo)`, /Demo · free/.test(shCost), shCost);
+ await shot("shorts-cloud");
+ check(`${tag} · shorts: nothing scrolls sideways (cloud)`, (await sideways()) <= 0, `${await sideways()} px`);
+ await engine("Open source");
+ const openSh = (await page.getByRole("combobox", { name: "Restyle model" }).count())
+ ? (await page.getByRole("combobox", { name: "Restyle model" }).innerText()).replace(/\s+/g, " ")
+ : await page.locator("body").innerText();
+ check(`${tag} · shorts: Fuobe Shorts on your GPU`, /Fuobe Shorts/.test(openSh), openSh.slice(0, 80));
+ await shot("shorts-open");
+ check(`${tag} · shorts: nothing scrolls sideways (open)`, (await sideways()) <= 0, `${await sideways()} px`);
+ await engine("Cloud");
+ if (scheme === "light") {
+ // A demo session on the Original (once per width: each makes a session in the Library).
+ const started = page.waitForResponse((r) => r.url().endsWith("/api/shorts/sessions") && r.request().method() === "POST", { timeout: 30_000 });
+ await page.getByRole("button", { name: /Generate short/ }).click();
+ const s = await started.catch(() => null);
+ const sreq = s ? JSON.parse(s.request().postData() ?? "{}") : {};
+ check(`${tag} · shorts: a demo session starts on Fuobe Shorts`, s?.ok() && sreq.modelId === "fuobe-shorts" && sreq.engine === "cloud", s ? `${s.status()} ${sreq.modelId}` : "no request");
+ await page.waitForTimeout(1500);
+ check(`${tag} · shorts: nothing scrolls sideways (session)`, (await sideways()) <= 0, `${await sideways()} px`);
+ }
+ await context.close();
+ }
+ }
+
+ // ---- Real prices before running (a fake fal key: estimates only, nothing is run) ---------------------------------
+ const r = await putSettings({ falKey: "fal-e2e-fake-key" });
+ check("prices · a fal key can be saved for the estimate", r.ok, String(r.status));
+ try {
+ const context = await browser.newContext({ viewport: { width: 1440, height: 900 } });
+ await context.addInitScript(() => {
+ try {
+ localStorage.setItem("fuobe.engine", "cloud");
+ } catch {}
+ });
+ const page = await context.newPage();
+ await page.goto(`${app}/mixed-media?preset=mixed-sketch&video=${encodeURIComponent(mmClip)}`, { waitUntil: "load" });
+ const editor = page.locator("#mm-editor");
+ await editor.getByText("Generate video").waitFor({ timeout: 30_000 });
+ const perFrame = await editor
+ .getByText(/frames × \$[\d.]+ a frame \(Fuobe Mixed Media\)/)
+ .waitFor({ timeout: 20_000 })
+ .then(
+ () => editor.getByText(/frames × \$[\d.]+ a frame/).innerText(),
+ () => "",
+ );
+ check("prices · mixed: frames × a price a frame on Fuobe Mixed Media", !!perFrame, perFrame);
+ const estimate = editor.locator('span[aria-live="polite"].font-mono').filter({ hasText: /≈ \$/ }).first();
+ await estimate.waitFor({ timeout: 30_000 }).catch(() => {});
+ const price = await estimate.innerText();
+ check("prices · mixed: a dollar estimate before running", /≈ \$\d/.test(price), price);
+ await page.getByRole("radiogroup", { name: "Restyle" }).getByRole("radio", { name: "Smooth" }).click();
+ await page.waitForTimeout(1500);
+ const smoothPrice = await estimate.innerText().catch(() => "");
+ const smoothLine = (await editor.innerText()).match(/\d+\.\d s · 720p/)?.[0] ?? "";
+ check("prices · mixed: Smooth counts seconds at 720p", !!smoothLine, smoothLine);
+ check("prices · mixed: Smooth priced before running", /≈ \$\d/.test(smoothPrice), smoothPrice);
+ await page.goto(`${app}/shorts?preset=shorts-claymation&video=${encodeURIComponent(clip)}`, { waitUntil: "load" });
+ await page.getByRole("button", { name: /Generate short/ }).waitFor({ timeout: 30_000 });
+ await page.waitForTimeout(2000);
+ const shortsPrice = (await page.locator("body").innerText()).match(/≈ \$[\d.]+/)?.[0] ?? "";
+ check("prices · shorts: a dollar estimate on Fuobe Shorts before running", !!shortsPrice, shortsPrice);
+ if (shots) await page.screenshot({ path: path.join(shots, "shorts-priced-1440.png"), fullPage: true });
+ await context.close();
+ } finally {
+ await putSettings({ falKey: "" });
+ }
+} finally {
+ await browser.close();
+}
+
+console.log(failures.length ? `\n${failures.length} check(s) failed` : "\nAll checks passed");
+process.exit(failures.length ? 1 : 0);
diff --git a/tests/eval-harness.test.ts b/tests/eval-harness.test.ts
index 94825723..bcdabdfb 100644
--- a/tests/eval-harness.test.ts
+++ b/tests/eval-harness.test.ts
@@ -35,6 +35,8 @@ const element = await import("@/app/api/elements/[id]/route");
const genjutsu = await import("@/app/api/genjutsu/route");
const genjutsuEstimate = await import("@/app/api/genjutsu/estimate/route");
const mixedEstimate = await import("@/app/api/mixed-media/estimate/route");
+const shortsEstimate = await import("@/app/api/shorts/estimate/route");
+const shortsSessions = await import("@/app/api/shorts/sessions/route");
const paletteLock = await import("@/app/api/palettes/lock/route");
// The harness is plain ESM JavaScript (it runs with node, no build step).
@@ -42,6 +44,7 @@ const evalCli = (await import("../scripts/eval/eval.mjs")) as { main: (argv: str
const cases = (await import("../scripts/eval/lib/cases.mjs")) as { loadSuite: (n: string) => Record<string, unknown>; validateAll: () => { ok: boolean; file: string; lines: string[] }[] };
const runner = (await import("../scripts/eval/lib/run.mjs")) as {
runEval: (opts: object, io: object) => Promise<Record<string, unknown>>;
+ routeResult: (answer: unknown, how?: string) => { id: string }[];
lorasMissing: (jobs: object[], installed: string[] | null) => { file: string; url?: string; jobs: number }[] | null;
trainingPrice: (target: { price?: string } | null) => number | null;
};
@@ -71,6 +74,8 @@ const ROUTES: [string, RegExp, (req: Request, m: RegExpExecArray) => Promise<Res
["POST", /^\/api\/genjutsu$/, (r) => genjutsu.POST(r)],
["POST", /^\/api\/genjutsu\/estimate$/, (r) => genjutsuEstimate.POST(r)],
["POST", /^\/api\/mixed-media\/estimate$/, (r) => mixedEstimate.POST(r)],
+ ["POST", /^\/api\/shorts\/estimate$/, (r) => shortsEstimate.POST(r)],
+ ["POST", /^\/api\/shorts\/sessions$/, (r) => shortsSessions.POST(r)],
["POST", /^\/api\/palettes\/lock$/, (r) => paletteLock.POST(r)],
];
@@ -237,6 +242,16 @@ describe("the runner on the demo provider", () => {
expect(row.outputs?.[0]?.kind).toBe("video");
});
+ it("runs a Shorts session through its route and measures the stitched clip", async () => {
+ const r = await cli(["run", "--suite", "shorts", "--engine", "demo", "--cases", "shorts/session", "--seeds", "1001", "--no-metrics"]);
+ expect(r.code, r.stderr).toBe(0);
+ const [row] = store.latestJobs(path.join(results, runIdFrom(r.stderr)));
+ expect(row.status, JSON.stringify(row)).toBe("succeeded");
+ expect((row.request as { route: string }).route).toBe("/api/shorts/sessions");
+ expect((row.request as { body: Record<string, unknown> }).body).toMatchObject({ engine: "open", modelId: "fuobe-shorts", presetId: "shorts-claymation", range: { start: 0, end: 6 } });
+ expect(row.outputs?.[0]?.kind).toBe("video");
+ });
+
it("runs Genjutsu's Character swap on the 6 s fixture clip: the part, the character, who to swap", async () => {
const r = await cli(["run", "--suite", "genjutsu", "--engine", "demo", "--cases", "genjutsu/character,genjutsu/character-plain", "--no-metrics"]);
expect(r.code, r.stderr).toBe(0);
@@ -298,9 +313,22 @@ describe("the runner on the demo provider", () => {
["genjutsu/swap-lite", "fuobe-genjutsu-swap-lite", null],
["genjutsu/restyle", "fuobe-genjutsu-restyle", null],
]);
- // Mixed Media names its hosted open model, so the studio runs that one (and says so).
+ // Mixed Media and Shorts run their Originals on fal (the cloud halves); the partner variant runs Gemini Omni Flash.
const mm = await dry(["--suite", "mixed-media", "--engine", "cloud", "--cases", "mixed-media/toxic", "--allow-fixtures"]);
- expect(mm.jobs.map((j) => [j.model, j.skip ?? null])).toEqual([["ltx-2-3-restyle", null]]);
+ expect(mm.jobs.map((j) => [j.model, j.skip ?? null])).toEqual([["fuobe-mixed-media", null]]);
+ // Two seeds a case: one segment from its first frame, and a whole session through the Shorts route.
+ const sh = await dry(["--suite", "shorts", "--engine", "cloud", "--allow-fixtures"]);
+ expect(sh.jobs.map((j) => [j.case, j.model, j.skip ?? null])).toEqual([
+ ["shorts/segment", "fuobe-shorts", null],
+ ["shorts/segment", "fuobe-shorts", null],
+ ["shorts/session", "fuobe-shorts", null],
+ ["shorts/session", "fuobe-shorts", null],
+ ]);
+ const shp = await dry(["--suite", "shorts", "--engine", "cloud", "--variants", "partner", "--seeds", "1001", "--allow-fixtures"]);
+ expect(shp.jobs.map((j) => [j.case, j.model, j.skip ?? null])).toEqual([
+ ["shorts/segment", "gemini-omni-flash", null],
+ ["shorts/session", "gemini-omni-flash", null],
+ ]);
// A partner variant is a cloud model: on the open engine it would only repeat the Original's run.
const open = await dry(["--suite", "genjutsu", "--engine", "open", "--variants", "partner", "--allow-fixtures"]);
expect(open.jobs.every((j) => j.skip === "the partner variant runs on cloud only")).toBe(true);
@@ -735,6 +763,23 @@ describe("report, blind review, compare and promote", () => {
});
describe("runEval as a library", () => {
+ it("reads a Shorts session's answer: the last stitch is the result, each take's look the steps", () => {
+ const session = {
+ id: "s1",
+ segments: [
+ { index: 0, takes: [{ look: "g-look-0" }] },
+ { index: 1, takes: [{ look: "g-look-1" }, { look: "g-look-1b" }] },
+ ],
+ stitches: [{ final: "g-old" }, { final: "g-final" }],
+ };
+ expect(runner.routeResult(session)).toEqual([{ id: "g-final" }]);
+ expect(runner.routeResult(session, "all").map((g) => g.id)).toEqual(["g-look-0", "g-look-1", "g-look-1b"]);
+ expect(runner.routeResult(session, "last")).toEqual([{ id: "g-look-1b" }]);
+ // A studio route's {final, items} answer reads as before.
+ expect(runner.routeResult({ final: { id: "f" }, items: [{ id: "a" }, { id: "f" }] })).toEqual([{ id: "f" }]);
+ expect(runner.routeResult({ items: [{ id: "a" }, { id: "b" }] }, "all")).toEqual([{ id: "a" }, { id: "b" }]);
+ });
+
it("names the LoRAs ComfyUI doesn't have yet, once each with how many jobs load them", () => {
const job = (files: string[], applied = true) => (applied ? { preview: { loras: { applied: files.map((file) => ({ file, url: `https://x/${file}` })) } } } : { request: { loras: files.map((file) => ({ file })) } });
const jobs = [job(["a.safetensors", "b.safetensors"]), job(["a.safetensors"]), job(["[ZImage.Turbo]c.safetensors"], false)];
diff --git a/tests/mixed-shorts-originals.test.ts b/tests/mixed-shorts-originals.test.ts
index 027abc89..894c6000 100644
--- a/tests/mixed-shorts-originals.test.ts
+++ b/tests/mixed-shorts-originals.test.ts
@@ -23,6 +23,7 @@ const { onEngine } = await import("@/lib/catalog/engines");
const { estimateCost } = await import("@/lib/catalog/plan");
const { prestepCost } = await import("@/lib/composer");
const mm = await import("@/lib/catalog/mixed-media");
+const { mixedLoras } = await import("@/lib/catalog/mixed-media-looks");
const sh = await import("@/lib/catalog/shorts");
const { maxRefsFor, modelInfos, reframes, resolutionFor } = await import("@/lib/catalog/shorts-models");
const { MIXED_MEDIA_LOOK_LORAS, LORA_LIBRARY } = await import("@/lib/catalog/lora-library.generated");
@@ -50,6 +51,8 @@ const input = (over: Partial<Parameters<typeof mm.planMixed>[0]> = {}): Paramete
mode: "frames",
sourceFps: 24,
sourceSize: { width: 1920, height: 1080 },
+ // The server hands the planner the look's LoRAs a run can reach (src/server/mixed-media.ts).
+ loras: mixedLoras("mixed-noir"),
...over,
});
@@ -113,10 +116,10 @@ describe("Fuobe Mixed Media and Fuobe Shorts in the catalog", () => {
expect(mm.getMixedPreset(id), id).toBeDefined();
for (const l of loras) expect(LORA_LIBRARY.find((e) => e.key === l.key)?.base, `${id} ${l.key}`).toBe("z-image-turbo");
}
- expect(mm.mixedLoras("mixed-noir").map((l) => [l.file, l.strength])).toEqual([["darkroom-noir.safetensors", 0.8]]);
- expect(mm.mixedLoras("mixed-toxic")).toEqual([]);
+ expect(mixedLoras("mixed-noir").map((l) => [l.file, l.strength])).toEqual([["darkroom-noir.safetensors", 0.8]]);
+ expect(mixedLoras("mixed-toxic")).toEqual([]);
// A look with a LoRA leads with its trigger words.
- expect(mm.withTrigger("Noir.", mm.mixedLoras("mixed-noir"))).toBe("drkrm style, Noir.");
+ expect(mm.withTrigger("Noir.", mixedLoras("mixed-noir"))).toBe("drkrm style, Noir.");
});
});
@@ -228,6 +231,16 @@ describe("Smooth: the first frame in the look, then Wan 2.2 Fun VACE by depth",
expect(steps.some((s) => s.request.op === "reframe")).toBe(false);
});
+ it("cloud: the preview is the render's first frame, drawn the same way (look, LoRA, seed and size), even after a 4K pick", () => {
+ for (const resolution of ["1K", "2K", "4K"] as const) {
+ const { steps } = mm.planMixed(input({ mode: "smooth", resolution }));
+ const frame0 = steps.find((s) => s.key === "frame0")!.request;
+ const preview = mm.planMixedPreview({ ...input({ mode: "smooth", resolution }), frameUrl: "/api/files/f.jpg" }).request;
+ expect(preview).toMatchObject({ engine: "cloud", modelId: "fuobe-mixed-media", op: "edit", inputs: { images: ["/api/files/f.jpg"] } });
+ expect([preview.prompt, preview.loras, preview.params]).toEqual([frame0.prompt, frame0.loras, frame0.params]);
+ }
+ });
+
it("open: 81-frame segments at 16 fps, the first frame drawn by the Original on your GPU, Fun VACE, joined, the sound", () => {
const { steps, final } = mm.planMixed(input({ engine: "open", mode: "smooth" }));
const cuts = steps.filter((s) => s.request.modelId === "oss-segment");
@@ -307,7 +320,7 @@ describe("Fuobe Shorts: segment → Qwen edit of frame 0 → Wan Fun VACE depth
images: ["https://x/f0.jpg"],
seed: 424242,
numOutputs: 1,
- loras: mm.mixedLoras("mixed-noir"),
+ loras: mixedLoras("mixed-noir"),
extra: { control_scale: 0.75, image_size: { width: 1360, height: 768 } },
});
expect(sent.url).toContain("fal-ai/z-image/turbo/controlnet/lora");
@@ -356,7 +369,7 @@ describe("DoP's Mixed Media effects run on Fuobe Mixed Media", () => {
const [clip, still] = createGenerations({ ...req, engine });
expect(still).toMatchObject({ modelId: "fuobe-mixed-media", engine, op: "edit" });
expect(still.request.step?.label).toBe("Start frame as Sketch");
- expect(still.request.loras?.map((l) => l.file)).toEqual(mm.mixedLoras("mixed-sketch").map((l) => l.file));
+ expect(still.request.loras?.map((l) => l.file)).toEqual(mixedLoras("mixed-sketch").map((l) => l.file));
expect(still.request.params?.seed).toBe(mm.FRAME_SEED);
expect(clip).toMatchObject({ modelId: "fuobe-dop", engine });
expect(clip.request.step?.label).toBe("Sketch clip");