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
Canvas, Cinema and Faceless: MiniMax H3 and Qwen-Image 2.1 are the open defaults
Adarshff6f13052082
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex c2cc930e..8a37f335 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -211,7 +211,7 @@ Built on that:- **Face mosaic run** (`createMosaicRun`, round 5 part 1, O11). A Fuobe Soul request in a look with a step after it (PixeletedFace: `soulPostStep` is `face-mosaic`) becomes, for each picture (at most 4, each on seed + i), a two-step pipeline in one batch: the picture ("Before the face mosaic", marked `postMade` so it doesn't start another), then the face mosaic on the same engine (`faceMosaicStep`: `oss-face-mosaic` on the GPU, `sam-3-1-face-mask` in the cloud). The mosaics come first in the answer, so a pipeline's next step or a Canvas node takes the pixelated picture; a request that waits for earlier steps waits with its picture.- **Keyframe film** (`createKeyframeFilm`): Frames mode on an open model whose `keyframes` route is `chained`. `createGenerations` hands a keyframes request on Wan 2.2 14B (or Lightning) to it: one `wan22-flf2v-14b` clip per pair of neighbouring frames, each as long as its gap in the workflow's frame steps (`planKeyframeClips`), then an image-to-video clip after the last frame when it isn't at the end, then a join. The whole request is previewed first, and clips already made are canceled when one fails. A chained route can't be a step that waits for another step's output: `createGenerations`, `previewChained` and Canvas's `describeNode` refuse it with one message (`chainedWaitMessage`). The one exception, since round 5 part 2, is a keyframe film whose frames earlier steps make (`framesWait`: every chain slot an image with `at`). `createGenerations` hands it to `createKeyframeFilm` with its `dependsOn`, and `previewChained` lets it wait (Canvas still refuses it). The film is checked with placeholders for the frames to come, and each clip waits only for the frames it starts or ends on, so the clips between the request's own frames start at once. Run again on such a film is refused, since those steps are gone: it is made again where it was made. Every Frames film goes through this code.- **Pieces and windows** (`src/lib/catalog/remove-object.ts`, shared by Remove object and Genjutsu): a long clip is cut into pieces each cloud model takes (`planCloudPieces`), or into frame-exact windows for the open graphs (`planWindows`, `planFrameCuts`; `VACE_WINDOW` is 4n+1 frames, up to 81). Each piece is trimmed and made, the pieces are joined, and the clip's own sound is put back (`joinWithSound`), with the helpers in `REMOVE_TOOLS` (fal trim / join / mux, or `oss-trim` / `oss-join-clips` / `oss-mux`). Open windows are joined with hard cuts; the seams have not been checked on real models.-- **Text to 3D on the open engine** (`createStillTo3d`, round 4 part 3): `oss-text-trellis2`'s `text-to-3d` route is `chained`. `createGenerations` reads the operation as the planner does (`inferOperation`, so Assist, MCP and API calls that leave `op` out get it too) and makes one batch of two steps: a Z-Image Turbo still (`oss-z-image-turbo`, 1:1 at 1K, the words plus "a single object … on a plain light grey background", feature `image-to-3d-step`, a helper the Library hides), then `oss-trellis2` on that still (`BUILDERS_3D`). A photo sent with the words is dropped. Like a keyframe film, it can't wait for another step's output: `chainedWaitMessage(name, op)` now has 3D wording, and Canvas refuses any chained route fed by another node before Run.+- **Text to 3D on the open engine** (`createStillTo3d`, round 4 part 3): `oss-text-trellis2`'s `text-to-3d` route is `chained`. `createGenerations` reads the operation as the planner does (`inferOperation`, so Assist, MCP and API calls that leave `op` out get it too) and makes one batch of two steps: a Qwen-Image 2.1 still (`oss-qwen-image-21` on its `t2i` route, 1:1 at 1K, the words plus "a single object … on a plain light grey background", feature `image-to-3d-step`, a helper the Library hides), then `oss-trellis2` on that still (`BUILDERS_3D`). A photo sent with the words is dropped. Like a keyframe film, it can't wait for another step's output: `chainedWaitMessage(name, op)` now has 3D wording, and Canvas refuses any chained route fed by another node before Run.- **Relit clip** (`createRelitClip`, round 4 part 3): a Fuobe DoP relight effect run on its own model (`relightStep` in `generations.ts`) is one batch of two steps. "Relit start frame" runs the preset's `prestep` on the clip's engine (`oss-qwen-relight` on ComfyUI; `qwen-image-edit-2509-cloud` with the Relight LoRA on fal); "Relit clip" takes it as its start frame. `createGenerations` checks text to 3D first, then the relight. Since round 5 part 1 the step can carry its own `params` and `labels`, and its model may be an Original that runs on the clip's engine: DoP's Mixed Media effects draw "Start frame as <Look>" on Fuobe Mixed Media, then "<Look> clip" (see Fuobe Originals).- **Canvas nodes made in steps, or once per table row** (round 4 part 3, `runCanvas` in `src/server/canvas.ts`): a node whose `NodeRequest` has `steps` (the Video concatenator) runs as one `createPipeline` whose last step holds its result (`NodeRun.out`; the steps before it have feature `canvas-step`). A node fed by a Table has `rows`: one step per filled row (`StepSource {node, row}`: a row of the next node waits for the same row), each row a result (`NodeRun.rows`). Each row has a signature (`NodeRun.rowSigs`); a row whose inputs didn't change and whose result is live is kept (`keptRow`), so a failed, trashed or added row runs and is billed alone, and a node that takes rows is signed by all its row ids (`depIdentity`), so a film joined from rows goes stale when one is redone. The concatenator's steps, per clip: on the cloud `trim-video` (when cut) → `scale-video` (cropped to the film's size) → for a muted or soundless clip `merge-audio-video` with a silent WAV the server writes when the run starts (`silenceRef`, `silenceWriter`; for a muted clip of unknown length `extract-soundtrack` → `ffmpeg-loudnorm` at −70 dB → the mux), then `join-clips` at 30 fps, folded in joins of up to 24; on the open engine `oss-fit-clip` (`video-fit-clip`: cut, framed, 30 fps, its sound or silence, in one streamed pass), then `oss-join-encoded`.diff --git a/src/app/(studio)/image-to-3d/page.tsx b/src/app/(studio)/image-to-3d/page.tsxindex 27a821eb..d83a4db2 100644--- a/src/app/(studio)/image-to-3d/page.tsx+++ b/src/app/(studio)/image-to-3d/page.tsx@@ -10,7 +10,7 @@ import { buildLicenceList, FLAG_LABEL } from "@/lib/licences";export const metadata: Metadata = { title: "Image to 3D" };/** The open text-to-3D route draws its still with this workflow before TRELLIS.2 (src/server/chains.ts). */-const EXTRA_WORKFLOWS: Record<string, string[]> = { "oss-text-trellis2": ["z-image-turbo-t2i"] };+const EXTRA_WORKFLOWS: Record<string, string[]> = { "oss-text-trellis2": ["qwen-image-21-t2i"] };/** The licence the picker shows for each open model: its short name, its catches and the notices it needs. */async function readLicences(): Promise<Record<string, NonNullable<Model3dInfo["licence"]>>> {diff --git a/src/components/faceless/settings-form.tsx b/src/components/faceless/settings-form.tsxindex c436e155..451c7dd7 100644--- a/src/components/faceless/settings-form.tsx+++ b/src/components/faceless/settings-form.tsx@@ -251,7 +251,7 @@ export function EpisodeSettingsForm({<p className="text-[12px] text-muted-foreground">{value.engine === "cloud"? `Pictures: Nano Banana Pro · ${frames ? "Camera: Ken Burns zoom (fal), no video model" : `Video: ${video?.name ?? "Gemini Omni Flash"}`} · Voice: ElevenLabs v4 (Chatterbox for your own voice), timed word by word by ElevenLabs forced alignment · Music: Sonilo · Subtitles: Auto Subtitle`- : `Pictures: Z-Image Turbo (Qwen-Image-Edit with your images) · ${frames ? "Camera: Ken Burns pan and zoom, scenes over 10 s in pieces" : "Video: Wan 2.2 Lightning"} · Voice: Chatterbox, timed by Qwen3-ASR · Music: ACE-Step, looped past 4 minutes · Subtitles: Qwen3-ASR + burn-in`}+ : `Pictures: Qwen-Image 2.1 (Krea 2 Style Reference or Qwen-Image 2.1 Turbo with your images) · ${frames ? "Camera: Ken Burns pan and zoom, scenes over 10 s in pieces" : `Video: ${video?.name ?? "MiniMax H3"}`} · Voice: Chatterbox, timed by Qwen3-ASR · Music: ACE-Step, looped past 4 minutes · Subtitles: Qwen3-ASR + burn-in`}{" "}Each scene is cut to where its lines are spoken.</p></CollapsibleContent>diff --git a/src/components/marketing/model-info.ts b/src/components/marketing/model-info.tsindex 212fac96..a3b7f9bd 100644--- a/src/components/marketing/model-info.ts+++ b/src/components/marketing/model-info.ts@@ -29,7 +29,7 @@ const slim = (m: ModelDef): ModelInfo => ({/** Every model a marketing flow can name, by id. */export function marketingModelInfo(): Record<string, ModelInfo> {- const ids = new Set<string>(["text-llm", "oss-text-llm", "oss-qwen-image", "oss-infinitetalk-long", "nano-banana-pro", "oss-qwen-edit"]);+ const ids = new Set<string>(["text-llm", "oss-text-llm", "oss-qwen-image-21", "oss-infinitetalk-long", "nano-banana-pro", "oss-qwen-image-21-turbo"]);for (const f of Object.keys(FORMATS) as FormatId[])for (const engine of ["cloud", "open"] as const)for (const has of [{ product: true, avatar: true }, { product: false, avatar: false }]) for (const c of formatModels(FORMATS[f], engine, has)) ids.add(c.id);diff --git a/src/components/model3d/model3d-studio.tsx b/src/components/model3d/model3d-studio.tsxindex 81adc8dc..2db6351a 100644--- a/src/components/model3d/model3d-studio.tsx+++ b/src/components/model3d/model3d-studio.tsx@@ -247,7 +247,7 @@ export function Model3dStudio({ info }: { info: Record<string, Model3dInfo> }) {className="min-h-28 rounded-xl"/><p className="mt-2 text-[12px] text-muted-foreground">- One object: what it is, its material and colours.{engine === "open" && " Z-Image Turbo draws it on a plain background first; the finished model's card links to that still."}+ One object: what it is, its material and colours.{engine === "open" && " Qwen-Image 2.1 draws it on a plain background first; the finished model's card links to that still."}</p></Panel>) : (diff --git a/src/lib/av/model3d.ts b/src/lib/av/model3d.tsindex 33bcc2b6..a7e33034 100644--- a/src/lib/av/model3d.ts+++ b/src/lib/av/model3d.ts@@ -48,7 +48,7 @@ export const MODELS_3D: Record<Model3dMode, Record<Engine, Model3dChoice[]>> = {},text: {cloud: [{ id: "tripo-h3-1-text", note: "A textured model from words · ≈ $0.20" }],- open: [{ id: "oss-text-trellis2", note: "Draws the object, then builds it · textured GLB + turntable · 16 GB GPU" }],+ open: [{ id: "oss-text-trellis2", note: "Draws the object, then builds it · textured GLB + turntable · 20 GB GPU" }],},objects: {cloud: [{ id: "sam-3d-objects", note: "Rebuilds what you name, as it stands in the photo · ≈ $0.02" }],@@ -171,7 +171,7 @@ export function modeOfRequest(r: Pick<GenerationRequest, "op" | "modelId" | "inp*/export function stillPromptFor3d(prompt: string): string {const words = prompt.trim().replace(/[.\s]+$/, "");- return `${words}. A single object, whole and centred, seen from the front at eye level, on a plain light grey background, soft even studio light, no other objects, no text`;+ return `${words}. The object alone, whole and centred, seen from the front at eye level, on a plain light grey background, soft even studio light`;}/**diff --git a/src/lib/catalog/canvas.ts b/src/lib/catalog/canvas.tsindex 4e498760..320b694a 100644--- a/src/lib/catalog/canvas.ts+++ b/src/lib/catalog/canvas.ts@@ -331,12 +331,12 @@ const needsMarks = (m: ModelDef) => !!(m.options.requires?.mask || m.options.reqconst PREFERRED: Partial<Record<Operation, Partial<Record<Engine, string>>>> = {t2i: { cloud: "nano-banana-pro", open: "oss-ideogram-4" },edit: { cloud: "nano-banana-pro", open: "oss-qwen-image-21" },- t2v: { cloud: "kling-2-5-turbo", open: "oss-wan22-14b-fast" },- i2v: { cloud: "kling-2-5-turbo", open: "oss-wan22-14b-fast" },- flf2v: { cloud: "kling-2-5-turbo", open: "oss-wan22-14b-fast" },+ t2v: { cloud: "minimax-h3", open: "oss-minimax-h3" },+ i2v: { cloud: "minimax-h3", open: "oss-minimax-h3" },+ flf2v: { cloud: "minimax-h3", open: "oss-minimax-h3" },ref2v: { cloud: "seedance-2-5", open: "oss-wan-vace" },avatar: { cloud: "kling-avatar-2", open: "oss-infinitetalk" },- lipsync: { cloud: "sync-lipsync-2-pro" },+ lipsync: { cloud: "sync-lipsync-3" },tts: { cloud: "elevenlabs-v4", open: "oss-chatterbox" },"voice-change": { cloud: "elevenlabs-voice-changer", open: "oss-chatterbox-vc" },dub: { cloud: "elevenlabs-dubbing" },@@ -344,8 +344,8 @@ const PREFERRED: Partial<Record<Operation, Partial<Record<Engine, string>>>> = {sfx: { cloud: "elevenlabs-sfx" },concat: { cloud: "join-clips", open: "oss-join-clips" },frame: { cloud: "extract-frame" },- "upscale-image": { cloud: "topaz-image", open: "oss-upscale-image" },- "upscale-video": { cloud: "topaz-video", open: "oss-upscale-video-esrgan" },+ "upscale-image": { cloud: "topaz-image", open: "oss-seedvr2-image" },+ "upscale-video": { cloud: "topaz-video", open: "oss-seedvr2" },"bg-remove": { cloud: "birefnet-cloud", open: "oss-rmbg" },"bg-remove-video": { cloud: "birefnet-video", open: "oss-video-matte-birefnet" },write: { cloud: "text-llm", open: "oss-text-llm" },@@ -1785,8 +1785,8 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [build: tpl([{ id: "prompt", type: "prompt", x: 0, y: 80, data: { label: "Prompt", text: "A lighthouse on a sea cliff at golden hour, waves crashing below, cinematic wide shot" } },- { id: "still", type: "model", x: COL, y: 40, data: { mediaKind: "image", label: "Still", params: { aspectRatio: "16:9" } }, models: { cloud: "nano-banana-pro", open: "oss-z-image-turbo" } },- { id: "animate", type: "model", x: COL * 2, y: 40, data: { mediaKind: "video", label: "Animate", op: "i2v", prompt: "Slow push-in as the waves roll and the beam sweeps across the sea", params: { aspectRatio: "16:9", duration: 5 } }, models: { cloud: "kling-2-5-turbo", open: "oss-wan22-14b-fast" } },+ { id: "still", type: "model", x: COL, y: 40, data: { mediaKind: "image", label: "Still", params: { aspectRatio: "16:9" } }, models: { cloud: "nano-banana-pro", open: "oss-qwen-image-21" } },+ { id: "animate", type: "model", x: COL * 2, y: 40, data: { mediaKind: "video", label: "Animate", op: "i2v", prompt: "Slow push-in as the waves roll and the beam sweeps across the sea", params: { aspectRatio: "16:9", duration: 5 } }, models: { cloud: "minimax-h3", open: "oss-minimax-h3" } },{ id: "out", type: "output", x: COL * 3, y: 60, data: { label: "Film" } },],[@@ -1851,7 +1851,7 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [x: COL * 2,y: i * FILM_ROW,data: { mediaKind: "image" as const, label: `Frame ${i + 1}`, prompt: "Cinematic storyboard still, one consistent look across the film: {text}", params: { aspectRatio: "16:9" } },- models: { cloud: "nano-banana-pro", open: "oss-z-image-turbo" },+ models: { cloud: "nano-banana-pro", open: "oss-qwen-image-21" },})),...[0, 1, 2].map((i) => ({id: `shot${i + 1}`,@@ -1859,7 +1859,7 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [x: COL * 3,y: i * FILM_ROW,data: { mediaKind: "video" as const, label: `Shot ${i + 1}`, op: "i2v" as const, prompt: "Animate this moment, smooth cinematic camera move: {text}", params: { aspectRatio: "16:9", duration: 5 } },- models: { cloud: "kling-2-5-turbo", open: "oss-wan22-14b-fast" },+ models: { cloud: "minimax-h3", open: "oss-minimax-h3" },})),{ id: "film", type: "join", x: COL * 4, y: FILM_ROW / 2, data: { label: "Film" }, models: { cloud: "join-clips", open: "oss-join-clips" } },{ id: "out", type: "output", x: COL * 4, y: FILM_ROW * 1.5, data: { label: "Film" } },@@ -1891,7 +1891,7 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [icon: "Columns3",hue: 150,build: (engine) => {- const models = engine === "open" ? ["oss-ideogram-4", "oss-qwen-image-21", "oss-krea2-realism"] : ["nano-banana-pro", "seedream-5-pro", "flux-2-pro"];+ const models = engine === "open" ? ["oss-ideogram-4", "oss-qwen-image-21", "oss-krea2-realism"] : ["nano-banana-pro", "seedream-5-pro", "flux-3"];return tpl([{ id: "prompt", type: "prompt", x: 0, y: ROW - 60, data: { label: "Prompt", text: "Portrait of an elderly fisherman mending a net at dawn, soft window light, film grain" } },@@ -1935,8 +1935,8 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [build: tpl([{ id: "cast", type: "table", x: 0, y: 40, data: { label: "Shots", columns: ["Animal", "Place"], rows: [["red fox", "a snowy pine forest"], ["barn owl", "an old wooden barn at dusk"], ["sea otter", "a kelp forest at sunrise"]] } },- { id: "still", type: "model", x: COL + 140, y: 0, data: { mediaKind: "image", label: "Still", prompt: "A {Animal} in {Place}, wildlife photography, soft natural light", params: { aspectRatio: "16:9" } }, models: { cloud: "nano-banana-pro", open: "oss-z-image-turbo" } },- { id: "animate", type: "model", x: COL * 2 + 140, y: 0, data: { mediaKind: "video", label: "Animate", op: "i2v", prompt: "Slow push-in, the animal turns its head", params: { aspectRatio: "16:9", duration: 5 } }, models: { cloud: "kling-2-5-turbo", open: "oss-wan22-14b-fast" } },+ { id: "still", type: "model", x: COL + 140, y: 0, data: { mediaKind: "image", label: "Still", prompt: "A {Animal} in {Place}, wildlife photography, soft natural light", params: { aspectRatio: "16:9" } }, models: { cloud: "nano-banana-pro", open: "oss-qwen-image-21" } },+ { id: "animate", type: "model", x: COL * 2 + 140, y: 0, data: { mediaKind: "video", label: "Animate", op: "i2v", prompt: "Slow push-in, the animal turns its head", params: { aspectRatio: "16:9", duration: 5 } }, models: { cloud: "minimax-h3", open: "oss-minimax-h3" } },{ id: "film", type: "concat", x: COL * 3 + 140, y: 0, data: { label: "Film", params: { aspectRatio: "16:9" } }, models: { cloud: CONCAT_MODELS.cloud, open: CONCAT_MODELS.open } },],[@@ -1972,13 +1972,13 @@ export const CANVAS_TEMPLATES: CanvasTemplate[] = [// Effects 2.0 chains (build plan O13): Higgsfield's "Prompt based" effect chains as Fuobe templates. A photo goes// through an image edit that sets the scene, then Fuobe DoP animates it with the effect's words (research// higgsfield-originals-5.md §3.8: an image edit, then image to video). Both steps are open weights on both engines:-// Qwen-Image 2.1 on your GPU (Qwen-Image-Edit 2511 hosted on fal) and Fuobe DoP (Wan 2.2 14B on your GPU, or hosted on fal).+// Qwen-Image 2.1 Turbo on your GPU (Qwen-Image-Edit 2511 hosted on fal) and Fuobe DoP (Wan 2.2 14B on your GPU, or hosted on fal).// The edit prompts are Fuobe's own words; the motion is the effect's own prompt from the effects catalog.export const EFFECT_CHAIN_GROUP = "Effects 2.0 chains";/** Image edit, then image to video: the models per engine (Fuobe DoP is an Original, run on the template's engine). */-export const EFFECT_CHAIN_MODELS = { edit: { cloud: "qwen-image-edit-2511-cloud", open: "oss-qwen-image-21" }, video: "fuobe-dop" } as const;+export const EFFECT_CHAIN_MODELS = { edit: { cloud: "qwen-image-edit-2511-cloud", open: "oss-qwen-image-21-turbo" }, video: "fuobe-dop" } as const;/** The researched Effects 2.0 chains with a scene to set first: the effect (its name in the effects catalog) and the edit. */export const EFFECT_CHAINS: { effect: string; edit: string; icon: string; hue: number }[] = [diff --git a/src/lib/catalog/cinema.ts b/src/lib/catalog/cinema.tsindex 4f136426..8e6743cd 100644--- a/src/lib/catalog/cinema.ts+++ b/src/lib/catalog/cinema.ts@@ -1,6 +1,7 @@import { DEFAULT_MOTION, PATH_FPS, PATH_FRAMES, normalizeKeys, toH3MaxTrajectory, type CameraKey } from "@/lib/camera-path";import { APERTURE, LENS, anglesNote, poseWords, recomposePrompt, type ScenePose } from "@/lib/scene3d";import { getModel, getPreset } from "./index";+import { plannedDurations } from "./clip-lengths";import { DOP_MODEL, LTX25_HOSTED } from "./dop";import { dualEngine, onEngine } from "./engines";import { localOnly, needsToken, triggerOf } from "./loras";@@ -596,11 +597,15 @@ export const CAST_SHEET_MODEL = "oss-zimage-soul-cast";/*** Models offered in the prompt bar, per mode and engine. The first is the default: the Original on both engines.- * Partner models stay as choices (the Director compiled into the prompt); LTX-2.5 is the open choice with sound.+ * Partner models stay as choices (the Director compiled into the prompt). MiniMax H3 comes next on both engines (a clip+ * with its own sound); LTX-2.5 is the other open choice with sound.*/export const CINEMA_MODELS: Record<CinemaMode, Record<Engine, string[]>> = {- video: { cloud: [CINEMA_MODEL, "seedance-2-5", "kling-3", "veo-3-1"], open: [CINEMA_MODEL, "oss-ltx25", "oss-wan22-14b"] },- image: { cloud: [CINEMA_STILL_MODEL, "nano-banana-pro", "seedream-5-pro"], open: [CINEMA_STILL_MODEL, "oss-ideogram-4", "oss-qwen-image-21", "oss-z-image-turbo", "oss-qwen-image"] },+ video: {+ cloud: [CINEMA_MODEL, "minimax-h3", "seedance-2-5", "kling-3", "veo-3-1", "minimax-h3-max", "wan-3"],+ open: [CINEMA_MODEL, "oss-minimax-h3", "oss-ltx25", "oss-wan22-14b"],+ },+ image: { cloud: [CINEMA_STILL_MODEL, "nano-banana-pro", "seedream-5-pro"], open: [CINEMA_STILL_MODEL, "oss-ideogram-4", "oss-qwen-image-21", "oss-krea2-realism", "oss-moss-image"] },};/**@@ -714,7 +719,7 @@ export function gridPrompt(scene: string, size: GridSize, type: GridType): strinconst { rows, cols } = gridDims(size);const t = GRID_TYPES.find((g) => g.id === type) ?? GRID_TYPES[0];return [- `A cinematic contact sheet: a ${cols}×${rows} grid of ${rows * cols} equally sized film stills separated by thin, straight white gutters, no text, no numbers, no borders around the sheet`,+ `A cinematic contact sheet: a ${cols}×${rows} grid of ${rows * cols} equally sized film stills separated by thin, straight white gutters, the grid filling the frame edge to edge, every panel a clean picture of the scene alone`,`The panels, in reading order (left to right, top to bottom), show ${t.instruction}`,`Same characters, wardrobe, location, lighting and colour grade in every panel`,`Scene: ${tidy(scene)}`,@@ -820,7 +825,7 @@ export function castPrompt(values: CastValues, description?: string): string {`Casting turnaround sheet for an original film character${film ? ` in a ${film}` : ""}: a ${who}${looks.length ? `, ${looks.join(", ")}` : ""}`,tidy(description) || undefined,"Full-body front view, three-quarter view, side profile and back view side by side, plus a close-up portrait of the face, on a seamless neutral studio backdrop with soft, even lighting",- "The same person, face and wardrobe in every view; photorealistic, natural skin texture, no text",+ "The same person, face and wardrobe in every view, the views alone on the backdrop; photorealistic, natural skin texture",].filter(Boolean).join(". ") + ".";@@ -846,14 +851,14 @@ export const LOCATION_VIEWS: { id: string; name: string; prompt: string; pose: S{ id: "high", name: "High angle", prompt: "Show the same location from a high angle looking down, as from a crane or a balcony", pose: { horizontal: 0, vertical: 60, zoom: 3 } },];-/** An empty 16:9 set: no people, the place itself is the subject. */+/** An empty 16:9 set: the place itself is the subject. */export function locationPrompt(description: string, settings: DirectorSettings): string {const camera = cameraWords(settings, true);const palette = paletteWords(settings.palette);const light = lightingWords(settings.lighting);return [`Establishing shot of a film location: ${tidy(description)}`,- "An empty set with no people, wide 16:9 composition with depth, production-designed detail, cinematic lighting",+ "An empty set, the place itself the only subject, wide 16:9 composition with depth, production-designed detail, cinematic lighting",camera,light,palette,@@ -862,7 +867,7 @@ export function locationPrompt(description: string, settings: DirectorSettings):.join(". ") + ".";}-const LOCATION_KEEP = "Keep everything about the place the same: architecture, props, materials, time of day, lighting and colour grade. No people";+const LOCATION_KEEP = "Keep everything about the place the same: architecture, props, materials, time of day, lighting and colour grade. The place stands empty";export function locationViewPrompt(view: string, description?: string): string {const v = LOCATION_VIEWS.find((x) => x.id === view) ?? LOCATION_VIEWS[0];@@ -1313,7 +1318,7 @@ function fitParams(model: ModelDef, input: CinemaGenerateInput, notes: string[],}if (kind === "video" && model.kind === "video") {const want = Math.max(DURATION.min, Math.min(DURATION.max, Math.round(input.duration ?? DURATION.default)));- const allowed = o.durations;+ const allowed = plannedDurations(model);// Fuobe Cinema in the cloud: any whole second; past 20 s planVideo adds an extend for the rest.if (anyLength(model)) params.duration = Math.min(want, CINEMA_MAX_SECONDS);else {@@ -1394,15 +1399,15 @@ function label(steps: CinemaStep[], labels: Record<string, string>): CinemaStep[/*** Reference clips on the cloud default: Fuobe Cinema takes none yet (research studios[cinema-studio].original- * .referenceClips), so a take that carries some runs on the first partner model in the menu that takes them all- * (Seedance 2.5). A model picked from the menu stays, and clipInputs says what it leaves out.+ * .referenceClips), so a take that carries some runs on the first partner model in the menu that takes them all, as+ * many as were added (MiniMax H3 takes 3 of each kind, Seedance 2.5 more), else the first that takes their kinds. A+ * model picked from the menu stays, and clipInputs says what it leaves out.*/function clipModel(model: ModelDef, input: CinemaGenerateInput, notes: string[]): ModelDef {const kinds = (["videos", "audios"] as const).filter((k) => !!input[k]?.length);if (input.engine !== "cloud" || input.modelId || model.id !== CINEMA_MODEL || !kinds.length || kinds.every((k) => takesClips(model, "ref2v", k))) return model;- const instead = CINEMA_MODELS.video.cloud- .flatMap((id) => (id === CINEMA_MODEL ? [] : (modelOn(id, "cloud") ?? [])))- .find((m) => kinds.every((k) => takesClips(m, "ref2v", k)));+ const partners = CINEMA_MODELS.video.cloud.flatMap((id) => (id === CINEMA_MODEL ? [] : (modelOn(id, "cloud") ?? []))).filter((m) => kinds.every((k) => takesClips(m, "ref2v", k)));+ const instead = partners.find((m) => kinds.every((k) => (input[k]?.length ?? 0) <= clipMax(m, k))) ?? partners[0];if (!instead) return model;notes.push(`${model.name} doesn't take reference clips yet, so this take runs on ${instead.name} (a partner model) with them — pick ${model.name} in the menu to leave them out`);return instead;@@ -1539,17 +1544,29 @@ function planVideo(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlan {const STILL_CLIPS_NOTE = "Stills use image references — reference videos and audio are left out";-/** What edits a still with references: Qwen-Image-Edit 2511 on the user's GPU, Nano Banana Pro in the cloud. */+/**+ * What edits a frame on the user's GPU outside stills and grids (the moment before a take, a take's first frame), and a+ * location's other view (with the Multiple-Angles LoRA trained on it): Qwen-Image-Edit 2511. Nano Banana Pro in the cloud.+ */function editModel(engine: Engine): ModelDef {return getModel(engine === "open" ? "oss-qwen-edit" : "nano-banana-pro")!;}+/** What makes a still or a grid with references: Qwen-Image 2.1 on the user's GPU (up to 4), Nano Banana Pro in the cloud. */+export const STILL_EDIT_MODELS: Record<Engine, string> = { cloud: "nano-banana-pro", open: "oss-qwen-image-21" };+/** How many references a still or a grid sends, per engine. */+export const STILL_REFERENCES: Record<Engine, number> = { cloud: 10, open: 4 };++function stillEditModel(engine: Engine): ModelDef {+ return getModel(STILL_EDIT_MODELS[engine]) ?? editModel(engine);+}+function planStill(input: CinemaGenerateInput): CinemaPlan {const notes: string[] = [];let model = pickModel("image", input);- const images = (input.images ?? []).slice(0, input.engine === "open" ? 3 : 10);+ const images = (input.images ?? []).slice(0, STILL_REFERENCES[input.engine]);if (images.length && !model.routes.some((r) => r.op === "edit")) {- const instead = editModel(input.engine);+ const instead = stillEditModel(input.engine);notes.push(`Stills with references run on ${instead.name}`);model = instead;}@@ -1585,10 +1602,10 @@ function planGrid(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlan {const has = ctx.has ?? ((id: string) => !!getModel(id));const size = input.grid?.size ?? "2x2";const type = input.grid?.type ?? "freeform";- const images = (input.images ?? []).slice(0, input.engine === "open" ? 3 : 10);+ const images = (input.images ?? []).slice(0, STILL_REFERENCES[input.engine]);let model: ModelDef;const extra: Record<string, unknown> = {};- if (images.length) model = editModel(input.engine);+ if (images.length) model = stillEditModel(input.engine);else if (input.engine === "open" && has("oss-zimage-grid")) {model = getModel("oss-zimage-grid")!;const { rows, cols } = gridDims(size);@@ -1619,7 +1636,7 @@ export const CAST_MODELS: Record<Engine, string[]> = { cloud: [SOUL_BUILDER_MODE*/export const LOCATION_MODELS: Record<Engine, string[]> = {cloud: [SOUL_BUILDER_MODEL, "nano-banana-pro", "seedream-5-pro"],- open: [SOUL_BUILDER_MODEL, "oss-qwen-image-21", "oss-krea2-realism", "oss-z-image-turbo", "oss-qwen-image"],+ open: [SOUL_BUILDER_MODEL, "oss-qwen-image-21", "oss-krea2-realism", "oss-moss-image", "oss-z-image-turbo"],};/** A builder's maker: the one asked for when this engine offers it (and this install has it), else the first. */@@ -1839,7 +1856,7 @@ export function editPrompt(change: string, scene?: string): string {return `${sc ? `${sc}. The same shot with one change` : "The same shot with one change"}: ${c}. ${keep}.`;}-/** A take made on a partner model in the menu (Seedance 2.5, Kling 3.0, Veo 3.1): a partner editor edits it. */+/** A take made on a partner model in the menu (MiniMax H3, Seedance 2.5, Kling 3.0, Veo 3.1…): a partner editor edits it. */const partnerTake = (modelId: string) => modelId !== CINEMA_MODEL && CINEMA_MODELS.video.cloud.includes(modelId);function planEdit(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlan {diff --git a/src/lib/catalog/clip-lengths.ts b/src/lib/catalog/clip-lengths.tsnew file mode 100644index 00000000..fc6d4f91--- /dev/null+++ b/src/lib/catalog/clip-lengths.ts@@ -0,0 +1,16 @@+import type { ModelDef } from "./types";++/**+ * Clip lengths a studio plans with, per model, where the catalog also lists a shorter clip than the model is trained+ * for. MiniMax H3 on your GPU is trained on 5–15 s clips (124–362 frames at 24 fps); its 3 s clip serves the presets+ * made at that length. A studio that picks the length itself (Faceless and the Explainer, Storyboard films, Marketing,+ * Cinema) asks it for 5, 10 or 15 s.+ */+export const PLANNED_DURATIONS: Readonly<Record<string, readonly number[]>> = { "oss-minimax-h3": [5, 10, 15] };++/** The clip lengths a studio plans with on a model: PLANNED_DURATIONS, else the catalog's own. */+export function plannedDurations(model: Pick<ModelDef, "id" | "options"> | undefined): number[] | undefined {+ if (!model) return undefined;+ const planned = PLANNED_DURATIONS[model.id];+ return planned ? [...planned] : model.options.durations;+}diff --git a/src/lib/catalog/faceless.ts b/src/lib/catalog/faceless.tsindex d2f6bde9..4c95c37f 100644--- a/src/lib/catalog/faceless.ts+++ b/src/lib/catalog/faceless.ts@@ -1,4 +1,5 @@import { describeMove, KEN_BURNS_FPS, sceneMoves } from "@/lib/av/ken-burns";+import { plannedDurations } from "./clip-lengths";import { estimateCost } from "./plan";import { pricingAt } from "./promo";import type { ChainSlot, Engine, Generation, GenerationRequest, ModelDef } from "./types";@@ -16,9 +17,11 @@ import type { ChainSlot, Engine, Generation, GenerationRequest, ModelDef } from** still(b) ──► clip(b, s)… ──► join (folded) ──► mix ◄── narration, music ──► captions ──► final*- * - still: a picture per block in the episode's style (Nano Banana Pro / Z-Image Turbo; with style- * references Nano Banana Pro edit / Qwen-Image-Edit Style Reference).- * - clip: the still animated (Gemini Omni Flash, Higgsfield's engine, or Seedance 2.5 / Wan 2.2 Lightning).+ * - still: a picture per block in the episode's style (Nano Banana Pro / Qwen-Image 2.1; with style+ * references Nano Banana Pro edit / Krea 2 Style Reference).+ * - clip: the still animated (Gemini Omni Flash, Higgsfield's engine, MiniMax H3 or Seedance 2.5 / MiniMax H3 or+ * Wan 2.2 Lightning). Clips that carry their own sound (MiniMax H3) lose it in the mix: the narration and the+ * music take its place (the open join keeps the picture only; oss-mux lays the new soundtrack on).* Frame by frame keeps the still and moves the camera slowly over it with no video model: a real Ken Burns* (src/lib/av/ken-burns.ts) — fal's image-to-video zooms in and out by turns on the cloud; ComfyUI's* kenburns-still zooms and pans on the open engine, at most 10 s a job, so longer scenes are split into@@ -636,7 +639,7 @@ export const ENGINE_MODELS: Record<Engine, EngineModels> = {styleStill: "nano-banana-pro",editStill: "nano-banana-pro",video: "gemini-omni-flash",- videoChoices: ["gemini-omni-flash", "seedance-2-5"],+ videoChoices: ["gemini-omni-flash", "minimax-h3", "seedance-2-5"],narration: "elevenlabs-v4",cloneNarration: "chatterbox-cloud",longNarration: "elevenlabs-multilingual-v2",@@ -658,11 +661,11 @@ export const ENGINE_MODELS: Record<Engine, EngineModels> = {write: "text-llm",},open: {- still: "oss-z-image-turbo",- styleStill: "oss-style-qwen-edit",- editStill: "oss-qwen-edit",- video: "oss-wan22-14b-fast",- videoChoices: ["oss-wan22-14b-fast"],+ still: "oss-qwen-image-21",+ styleStill: "oss-style-krea2",+ editStill: "oss-qwen-image-21-turbo",+ video: "oss-minimax-h3",+ videoChoices: ["oss-minimax-h3", "oss-wan22-14b-fast"],narration: "oss-chatterbox",cloneNarration: "oss-chatterbox",longNarration: "oss-chatterbox",@@ -679,7 +682,7 @@ export const ENGINE_MODELS: Record<Engine, EngineModels> = {captions: "oss-captions-burnin",align: "oss-qwen3-asr",captionsUseWords: true,- sourceStill: "oss-qwen-edit",+ sourceStill: "oss-qwen-image-21-turbo",upscale: "oss-upscale-video-esrgan",write: "oss-text-llm",},@@ -687,15 +690,18 @@ export const ENGINE_MODELS: Record<Engine, EngineModels> = {/*** Clip lengths each block video model can make. Gemini Omni Flash takes any whole number of seconds- * from 3 to 10 (research: duration 3–10); the Ken Burns moves 1–30 s (fal) and 1–10 s per job (ComfyUI,- * longer scenes split); the others list their durations in the catalog.+ * from 3 to 10 (research: duration 3–10), hosted MiniMax H3 any from 5 to 15 (fal's schema); the Ken Burns+ * moves 1–30 s (fal) and 1–10 s per job (ComfyUI, longer scenes split); the others list their durations in the+ * catalog, MiniMax H3 on your GPU the 5, 10 and 15 s it is trained for (plannedDurations).*/-export const DURATION_RANGES: Record<string, [number, number]> = { "gemini-omni-flash": [3, 10], "ken-burns": [1, 30], "oss-ken-burns": [1, 10] };+export const DURATION_RANGES: Record<string, [number, number]> = { "gemini-omni-flash": [3, 10], "minimax-h3": [5, 15], "ken-burns": [1, 30], "oss-ken-burns": [1, 10] };/** Default quality per mode. Frame by frame trades resolution for price on the cloud. */export const DEFAULT_RESOLUTION: Record<string, Record<AnimationMode, string>> = {"gemini-omni-flash": { animated: "720p", frames: "360p" },+ "minimax-h3": { animated: "768P", frames: "768P" },"seedance-2-5": { animated: "720p", frames: "480p" },+ "oss-minimax-h3": { animated: "768p", frames: "768p" },"oss-wan22-14b-fast": { animated: "480p", frames: "480p" },// No model in the loop: 720p costs CPU time and memory (~11 MB a frame), not a GPU."oss-ken-burns": { animated: "720p", frames: "720p" },@@ -754,10 +760,10 @@ export function shotsFor(seconds: number, durations: number[] | undefined, rangereturn best ?? Array.from({ length: n }, () => max);}-/** The block video model's shots for a block. */+/** The block video model's shots for a block (MiniMax H3 on your GPU: 5, 10 or 15 s each). */export function blockShots(seconds: number, model: ModelDef | undefined): number[] {if (!model) return [Math.round(seconds)];- return shotsFor(seconds, model.options.durations, DURATION_RANGES[model.id]);+ return shotsFor(seconds, plannedDurations(model), DURATION_RANGES[model.id]);}// ---------------------------------------------------------------------------@@ -773,18 +779,18 @@ export function stillPrompt(style: VisualStyle, block: Pick<ScriptBlock, "visual: `Style: ${style.look}`;const sources = o.sources ? `Use the attached source picture${o.sources > 1 ? "s" : ""} for what the subject looks like` : "";const brief = o.look?.trim() && !o.refs ? `Look: ${clean(o.look)}` : "";- return [clean(block.visual), look, brief, sources, frame, "No text, letters, captions or watermarks in the image"].filter(Boolean).join(". ") + ".";+ return [clean(block.visual), look, brief, sources, frame, "A clean, full-frame picture of the scene alone"].filter(Boolean).join(". ") + ".";}/** What moves when a block's still is animated (Fully animated; Frame by frame moves the camera with no model, see sceneMoves). */export function motionPrompt(style: VisualStyle, block: Pick<ScriptBlock, "motion">, shot = 0, camera?: string): string {const then = shot ? "The camera keeps moving from where the last shot ended. " : "";const brief = camera?.trim() ? ` Camera: ${clean(camera)}.` : "";- return `${then}${clean(block.motion) || DEFAULT_MOTION}. ${style.motion.charAt(0).toUpperCase()}${style.motion.slice(1)}.${brief} Keep the art style, characters and colours exactly as in the first frame. No text.`;+ return `${then}${clean(block.motion) || DEFAULT_MOTION}. ${style.motion.charAt(0).toUpperCase()}${style.motion.slice(1)}.${brief} Keep the art style, characters and colours exactly as in the first frame, the picture clean throughout.`;}export const musicPrompt = (genre: GenreInfo, style: VisualStyle, mood?: string) =>- `Instrumental background music for a narrated video: ${mood?.trim() ? clean(mood) : genre.music}. It sits under a voice-over, no vocals, steady level, no sudden hits. Mood to match ${style.name.toLowerCase()} visuals.`;+ `Instrumental background music for a narrated video: ${mood?.trim() ? clean(mood) : genre.music}. It sits under a voice-over: purely instrumental, at a steady level with smooth, even dynamics. Mood to match ${style.name.toLowerCase()} visuals.`;// ---------------------------------------------------------------------------// The render graphdiff --git a/src/lib/catalog/marketing.ts b/src/lib/catalog/marketing.tsindex d3b4f00d..e2478ba6 100644--- a/src/lib/catalog/marketing.ts+++ b/src/lib/catalog/marketing.ts@@ -943,15 +943,16 @@ export interface ModelChoice {}/**- * Marketing Studio Image's Original (build plan O10): Qwen-Image-Edit 2511 with Fuobe's template prompts on both engines- * (Qwen-Image 2512 without a product photo; a Standalone product shot relit by the White_to_Scene LoRA on the open- * engine). Its pictures carry no words: the headline and CTA are set over them in the browser, so they come out exact.+ * Marketing Studio Image's Original (build plan O10) with Fuobe's template prompts: Qwen-Image 2.1 on the user's GPU+ * (its edit with up to 4 references, its text-to-image without a product photo; a Standalone product shot relit by the+ * White_to_Scene LoRA), Qwen-Image-Edit 2511 hosted on fal. Its pictures carry no words: the headline and CTA are set+ * over them in the browser, so they come out exact.*/export const MARKETING_IMAGE_MODEL = "fuobe-marketing-image";/** The Original's line in the model menus, per engine. */export const MARKETING_IMAGE_NOTE: Record<Engine, string> = {- open: "Fuobe Original · Qwen-Image-Edit 2511 on your GPU",+ open: "Fuobe Original · Qwen-Image 2.1 on your GPU",cloud: "Fuobe Original · Qwen-Image-Edit 2511, hosted",};@@ -967,7 +968,10 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:if (engine === "open") {switch (format.pipeline) {case "motion":- return [{ id: "oss-wan22-14b-fast", note: "Wan 2.2 14B, shot by shot" }];+ return [+ { id: "oss-minimax-h3", note: "MiniMax H3, 5–15 s clips with sound" },+ { id: "oss-wan22-14b-fast", note: "Wan 2.2 14B, shot by shot" },+ ];case "ugc":return [{ id: "oss-infinitetalk", note: "InfiniteTalk presenter" }];default:@@ -985,10 +989,10 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:case "poster":return has.product? [original, { id: "gpt-image-2-5", note: "Draws the exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }]- : [original, { id: "ideogram-3", note: "Exact text in your brand colours" }, { id: "ideogram-4-5" }, { id: "recraft-4-1" }, { id: "gpt-image-2-5" }];+ : [original, { id: "ideogram-4-5", note: "Exact text in your brand colours" }, { id: "recraft-4-1" }, { id: "gpt-image-2-5" }];case "ugc-talking":case "tiktok":- return [{ id: "omnihuman-2", note: "Full-body presenter" }, { id: "kling-avatar" }];+ return [{ id: "omnihuman-2", note: "Full-body presenter" }, { id: "kling-avatar-2" }];default:return [{ id: "seedance-2-5", note: "Multi-shot with sound" }, { id: "kling-o3" }, { id: "gemini-omni-flash" }];}@@ -999,7 +1003,7 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:* engines (the product photo as reference, else made from the concept), partner models as choices in the cloud.*/export const AD_VISUAL_MODELS: Record<Engine, ModelChoice[]> = {- open: [{ id: MARKETING_IMAGE_MODEL, name: "Fuobe Marketing Image", note: "Fuobe Original · Qwen-Image-Edit 2511 with your product photo, free on your GPU" }],+ open: [{ id: MARKETING_IMAGE_MODEL, name: "Fuobe Marketing Image", note: "Fuobe Original · Qwen-Image 2.1 with your product photo, free on your GPU" }],cloud: [{ id: MARKETING_IMAGE_MODEL, name: "Fuobe Marketing Image", note: "Fuobe Original · Qwen-Image-Edit 2511 with your product photo, hosted on fal" },{ id: "nano-banana-pro", name: "Nano Banana Pro", note: "Google's Gemini 3 Pro Image, through fal" },@@ -1012,10 +1016,26 @@ export function adVisualModel(engine: Engine, asked?: string | null): string {return asked && AD_VISUAL_MODELS[engine].some((c) => c.id === asked) ? asked : AD_VISUAL_MODELS[engine][0].id;}-/** Cloud talking-presenter / voice / caption models for UGC pipelines. */+/**+ * Talking-presenter / voice / caption models for UGC pipelines (Marketing Studio UGC and TikTok, Click to Ad, the Ad+ * Multiplier's new hook and CTA). `still` makes the presenter from reference photos (up to 4 on Qwen-Image 2.1 Turbo);+ * `stillFromWords` without any. A clip's own sound never reaches the film: the open joins keep the picture and one+ * chosen soundtrack (the presenter's voice, or the reference ad's), and the mux lays the voiceover in its place.+ */export const UGC_MODELS = {- cloud: { voice: "elevenlabs-v4", still: "nano-banana-pro", talk: "omnihuman-2", clip: "seedance-2-5", captions: "auto-subtitle", join: "join-clips", mux: "merge-audio-video", trim: "trim-video", frame: "extract-frame" },- open: { voice: "oss-chatterbox", still: "oss-qwen-edit", talk: "oss-infinitetalk", clip: "oss-wan22-14b-fast", captions: "oss-captions-burnin", join: "oss-join-clips", mux: "oss-mux", trim: "oss-trim", frame: "oss-extract-frame" },+ cloud: { voice: "elevenlabs-v4", still: "nano-banana-pro", stillFromWords: "nano-banana-pro", talk: "omnihuman-2", clip: "seedance-2-5", captions: "auto-subtitle", join: "join-clips", mux: "merge-audio-video", trim: "trim-video", frame: "extract-frame" },+ open: {+ voice: "oss-chatterbox",+ still: "oss-qwen-image-21-turbo",+ stillFromWords: "oss-qwen-image-21",+ talk: "oss-infinitetalk",+ clip: "oss-minimax-h3",+ captions: "oss-captions-burnin",+ join: "oss-join-clips",+ mux: "oss-mux",+ trim: "oss-trim",+ frame: "oss-extract-frame",+ },} as const;/**diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex ec01a486..813a2096 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -1647,14 +1647,14 @@ const open: ModelDef[] = [}),o({id: "oss-text-trellis2",- name: "Z-Image Turbo → TRELLIS.2",- vendor: "Alibaba Tongyi × Microsoft",+ name: "Qwen-Image 2.1 → TRELLIS.2",+ vendor: "Alibaba Qwen × Microsoft",family: "trellis",kind: "model3d",- tagline: "Describe one object: Z-Image Turbo draws it on a plain background, then TRELLIS.2 builds the textured 3D model and a turntable · 16 GB GPU · Apache-2.0 + MIT",+ tagline: "Describe one object: Qwen-Image 2.1 draws it on a plain background, then TRELLIS.2 builds the textured 3D model and a turntable · 20 GB GPU · non-commercial weights + MIT",badges: ["new"],- // Built on the server as two steps: a Z-Image Turbo still, then image-to-3d-trellis2 on it (src/server/chains.ts).- routes: [{ op: "text-to-3d", provider: "comfyui", endpoint: "image-to-3d-trellis2", chained: true, note: "a Z-Image Turbo still → TRELLIS.2" }],+ // Built on the server as two steps: a Qwen-Image 2.1 still, then image-to-3d-trellis2 on it (src/server/chains.ts).+ routes: [{ op: "text-to-3d", provider: "comfyui", endpoint: "image-to-3d-trellis2", chained: true, note: "a Qwen-Image 2.1 still → TRELLIS.2" }],options: { seed: true },}),o({diff --git a/src/server/assist/studio-tools.ts b/src/server/assist/studio-tools.tsindex abeb35d1..447bf754 100644--- a/src/server/assist/studio-tools.ts+++ b/src/server/assist/studio-tools.ts@@ -320,17 +320,18 @@ function facelessSteps(i: FacelessToolInput, ctx: ToolContext, voiceFor: VoiceFoif (scenes.length < 2) throw new Error("Give at least 2 scenes");const open = engineOf(ctx) === "open";const aspect = ["9:16", "16:9", "1:1"].includes(i.aspect_ratio ?? "") ? i.aspect_ratio! : "9:16";- const stillModel = open ? "oss-z-image-turbo" : "nano-banana-pro";- // Higgsfield's Faceless runs Gemini Omni Flash per block (16:9 / 9:16 only); square goes to Seedance.- const clipModel = open ? "oss-wan22-14b-fast" : aspect === "1:1" ? "seedance-2-5" : "gemini-omni-flash";+ const stillModel = open ? "oss-qwen-image-21" : "nano-banana-pro";+ // Higgsfield's Faceless runs Gemini Omni Flash per block (16:9 / 9:16 only); square goes to Seedance. On your GPU,+ // MiniMax H3 makes 5 s clips; its own sound is left out by the join, and the narration goes on in its place.+ const clipModel = open ? "oss-minimax-h3" : aspect === "1:1" ? "seedance-2-5" : "gemini-omni-flash";const steps: (PipelineStep & { label: string })[] = [];scenes.forEach((s, k) => {steps.push(- { key: `still${k}`, label: `Scene ${k + 1} · still`, request: req({ modelId: stillModel, op: "t2i", prompt: `${s.visual.trim()}. Style: ${i.style.trim()}. No text.`, params: { aspectRatio: aspect } }) },+ { key: `still${k}`, label: `Scene ${k + 1} · still`, request: req({ modelId: stillModel, op: "t2i", prompt: `${s.visual.trim()}. Style: ${i.style.trim()}. A clean, full-frame picture of the scene alone.`, params: { aspectRatio: aspect } }) },{key: `clip${k}`,label: `Scene ${k + 1} · clip`,- request: req({ modelId: clipModel, op: "i2v", prompt: `${s.visual.trim()}. Gentle, slow camera push-in; subtle natural motion; same style.`, params: { aspectRatio: aspect, ...(clipModel === "seedance-2-5" && { duration: 5 }) } }),+ request: req({ modelId: clipModel, op: "i2v", prompt: `${s.visual.trim()}. Gentle, slow camera push-in; subtle natural motion; same style.`, params: { aspectRatio: aspect, ...(clipModel !== "gemini-omni-flash" && { duration: 5 }) } }),after: `still${k}`,chain: [{ slot: "images", position: "first" }],},@@ -396,7 +397,8 @@ function adRequests(i: AdsToolInput, ctx: ToolContext): GenerationRequest[] {const n = Math.max(1, Math.min(8, i.count ?? 4));const ratios = (i.aspect_ratios?.length ? i.aspect_ratios : ["4:5"]).slice(0, 4);const open = engineOf(ctx) === "open";- const model = i.product_image ? (open ? "oss-qwen-edit" : "nano-banana-pro") : open ? "oss-qwen-image" : "nano-banana-pro";+ // Qwen-Image 2.1 on your GPU: its edit with the product photo, its text-to-image without one.+ const model = open ? "oss-qwen-image-21" : "nano-banana-pro";const out: GenerationRequest[] = [];for (let k = 0; k < n && out.length < 12; k++) {for (const ratio of ratios) {@@ -407,7 +409,7 @@ function adRequests(i: AdsToolInput, ctx: ToolContext): GenerationRequest[] {i.headline ? `Headline exactly: “${i.headline.trim()}”.` : "A short, punchy headline of 2–6 words.",i.cta ? `Call-to-action button: “${i.cta.trim()}”.` : "",i.product_image ? "Keep the product exactly as in the photo: same shape, colours, label and logo." : "",- "Clean modern layout, crisp legible typography, no other text, no watermark.",+ `Clean modern layout and crisp, legible typography: ${i.cta ? "the headline and the button are" : "the headline is"} the only added lettering, spelled exactly.`,].filter(Boolean).join(" ");diff --git a/src/server/chains.ts b/src/server/chains.tsindex cf5a92f6..6304dfb8 100644--- a/src/server/chains.ts+++ b/src/server/chains.ts@@ -367,13 +367,13 @@ export function createExtendChain(original: GenerationRequest, model: ModelDef):}}-/** The still the open text-to-3D route draws first. */-const STILL_MODEL = "oss-z-image-turbo";+/** The still the open text-to-3D route draws first (Qwen-Image 2.1's text-to-image route). */+const STILL_MODEL = "oss-qwen-image-21";/** The image-to-3D model that runs a text-to-3D route's workflow. */const BUILDERS_3D: Record<string, string> = { "image-to-3d-trellis2": "oss-trellis2" };/**- * Text to 3D on the open engine (a text-to-3d route marked `chained`): Z-Image Turbo draws the object whole on a+ * Text to 3D on the open engine (a text-to-3d route marked `chained`): Qwen-Image 2.1 draws the object whole on a* plain background (a helper step), then the route's workflow (TRELLIS.2) builds the model from that still.*/export function createStillTo3d(original: GenerationRequest, model: ModelDef, route: ModelRoute): Generation[] {@@ -533,9 +533,12 @@ export function createMosaicRun(original: GenerationRequest, model: ModelDef, opreturn [...mosaics, ...pictures];}-/** The model a storyboard film is animated with. */+/**+ * The model a storyboard film is animated with: MiniMax H3 on your GPU (5 s shots, its default), Seedance 2.5 in the+ * cloud. A clip's own sound stays out of the film: the open join (video-concat-{n}) keeps the picture only.+ */export function filmModel(engine: Engine, modelId?: string): ModelDef {- const m = getModel(modelId ?? (engine === "open" ? "oss-wan22-14b-fast" : "seedance-2-5"));+ const m = getModel(modelId ?? (engine === "open" ? "oss-minimax-h3" : "seedance-2-5"));if (!m || m.kind !== "video" || !supportsOp(m, "i2v")) throw new Error("Pick an image-to-video model");return m;}diff --git a/src/server/faceless.ts b/src/server/faceless.tsindex be67fdb1..de6ce752 100644--- a/src/server/faceless.ts+++ b/src/server/faceless.ts@@ -42,6 +42,7 @@ import {spokenTimes,staleSteps,styleRefLimit,+ subjectOf,TIMING_PARTS,topicsBrief,topicsSchema,@@ -416,7 +417,8 @@ export function makeAvatar(id: string): Generation {const [g] = createGenerations({feature: "faceless-avatar",modelId: ENGINE_MODELS[engine].still,- prompt: `A round channel avatar for a YouTube channel called “${c.name}” (${c.idea}): one bold, simple central emblem, centred on a plain background. Style: ${style.look}. No text or letters.`,+ // The words name only what the picture shows (the open still model draws any words it is given, and reads no negatives).+ prompt: `A round channel avatar for a YouTube channel about ${subjectOf(c.idea) || c.name}: one bold, simple pictorial emblem, centred on a plain background. Style: ${style.look}.`,params: { aspectRatio: "1:1", numOutputs: 1 },title: `${c.name} · avatar`,});diff --git a/src/server/marketing.ts b/src/server/marketing.tsindex 9922cc05..5a1a5f30 100644--- a/src/server/marketing.ts+++ b/src/server/marketing.ts@@ -2,6 +2,7 @@ import "server-only";import { nanoid } from "nanoid";import { z } from "zod";import { getModel, supportsOp } from "@/lib/catalog";+import { plannedDurations } from "@/lib/catalog/clip-lengths";import {AD_STYLES,brandLine,@@ -203,6 +204,9 @@ function productLine(p?: Product | null): string {const KEEP_PRODUCT = "Keep the product exactly as in the reference photo: its shape, proportions, label, logo, text and colours";+/** The picture the browser sets the words over: the scene and the subject alone (the product keeps its own label). */+const CLEAN_PICTURE = "A clean, uncluttered picture of the scene and the subject alone";+/*** The exact headline/CTA in a prompt (cloud partner models render text), or room left for the browser to set it (open* models and Fuobe Marketing Image on either engine: wordsOnTop).@@ -212,10 +216,11 @@ function textLine(f: FormatDef, onTop: boolean, headline?: string, cta?: string,// The words are set in the browser, in the layout overlayLayout() picks: the picture leaves room for them.if (onTop)return overlayLayout(f.id) === "frame"- ? "No text, letters, words or logos anywhere in the image; the subject well composed with a little breathing room at the edges"- : "Leave calm, uncluttered space in the lower third for a headline; no text, letters, words or logos anywhere in the image";+ ? `${CLEAN_PICTURE}; the subject well composed with a little breathing room at the edges`+ : `${CLEAN_PICTURE}, with calm, uncluttered space in the lower third for the headline`;const font = brand?.fonts.heading ? `set in a ${brand.fonts.heading}-style typeface` : "in bold, clean typography";- return [headline && `The headline reads exactly “${headline}” ${font}`, cta && `a button that says exactly “${cta}”`, "spell every word exactly as written, no other text"].filter(Boolean).join(", ");+ const lettering = headline && cta ? "the headline and the button are the only added lettering" : headline ? "the headline is the only added lettering" : "the button is the only added lettering";+ return [headline && `The headline reads exactly “${headline}” ${font}`, cta && `a button that says exactly “${cta}”`, (headline || cta) && `${lettering}, every word spelled exactly as written`].filter(Boolean).join(", ");}export interface PlanContext {@@ -308,7 +313,7 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlan// On the user's GPU a Standalone shot of one product photo is cut out and relit into the scene (White_to_Scene).const productShot = open && modelId === MARKETING_IMAGE_MODEL && f.id === "product-standalone" && op === "edit" && images.length === 1;if (productShot) notes.push("Your product is cut out and relit into the scene, so it stays as it is");- else if (open && op === "edit") notes.push("Qwen-Image-Edit keeps your first photo's shape on your GPU");+ else if (open && op === "edit") notes.push("Qwen-Image 2.1 keeps your first photo's shape on your GPU");return {feature,engine: input.engine,@@ -347,7 +352,7 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlanjoin(tpl ? fill(tpl.prompt, product, brand) : "A polished product commercial", extra, productLine(product), hasProduct && "The product stays exactly as in the first frame: same shape, label and colours", prompt, brandText, !hasProduct && website && `For the product at ${website}`);const base = { feature, modelId, params: { aspectRatio: aspect } as GenerationRequest["params"] };// Open models make a few seconds per clip: longer motion is several shots from the product photo, joined.- const shots = open ? shotPlan(want, model.options.durations) : [snapDuration(want, model.options.durations)];+ const shots = open ? shotPlan(want, plannedDurations(model)) : [snapDuration(want, model.options.durations)];if (!open && shots[0] !== want) notes.push(`${model.name} makes ${shots[0]} s clips — the closest to ${want} s`);const op: Operation = refs.length > 1 && supportsOp(model, "ref2v") ? "ref2v" : refs.length ? "i2v" : "t2v";if (op === "t2v" && !supportsOp(model, "t2v")) throw new PlanError("Attach a product to generate");@@ -373,7 +378,7 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlanrequest: { feature, modelId: joiner, op: "concat", prompt: title, params: { aspectRatio: nearestAspect(aspect, need(joiner).options.aspectRatios) }, chain: shots.map(() => ({ slot: "videos" as const })), title, batchTitle: title },after: shots.map((_, i) => `shot${i + 1}`),});- notes.push(`${model.name} makes up to ${Math.max(...(model.options.durations ?? [5]))} s per clip: ${shots.length} shots from your product photo, joined`);+ notes.push(`${model.name} makes up to ${Math.max(...(plannedDurations(model) ?? [5]))} s per clip: ${shots.length} shots from your product photo, joined`);}return { feature, engine: input.engine, title, steps, finals: [steps[steps.length - 1].key], meta, notes };}@@ -438,10 +443,11 @@ function planPresenter(p: PresenterPlan): RunPlan {const seconds = p.script.split(/\s+/).filter(Boolean).length / 2.5;const talkId = p.talkModel ?? (open ? (seconds > 6.5 ? "oss-infinitetalk-long" : M.talk) : M.talk);const talk = need(talkId);- const stillModel = need(M.still);const clip = need(M.clip);const aspect = nearestAspect(p.aspect, talk.options.aspectRatios) ?? p.aspect;- const refs = [...(p.avatar ? [p.avatar] : []), ...p.productImages.slice(0, 1), ...(p.reference ? [p.reference] : [])].slice(0, stillModel.options.maxImages ?? 3);+ const refs = [...(p.avatar ? [p.avatar] : []), ...p.productImages.slice(0, 1), ...(p.reference ? [p.reference] : [])].slice(0, need(M.still).options.maxImages ?? 3);+ // Reference photos go to the edit model; without any the presenter is drawn from the words.+ const stillModel = need(refs.length ? M.still : M.stillFromWords);const person = p.avatar ? "the person from the first reference photo (same face, hair and skin tone)" : "a friendly, relatable creator in their twenties";const holding = p.productImages.length ? `holding the product from the ${p.avatar ? "second reference photo" : "reference photo"} up near their face` : "talking to the camera";const where = p.setting?.prompt ?? "at home in natural light";@@ -463,7 +469,7 @@ function planPresenter(p: PresenterPlan): RunPlan {label: "Presenter",request: {feature: step,- modelId: refs.length ? M.still : open ? "oss-qwen-image" : M.still,+ modelId: stillModel.id,op: refs.length ? "edit" : "t2i",prompt: join(`A vertical smartphone selfie video frame of ${person} ${holding}, ${where}`,@@ -473,7 +479,7 @@ function planPresenter(p: PresenterPlan): RunPlan {p.brand && brandLine(p.brand),),inputs: refs.length ? { images: refs } : undefined,- params: { aspectRatio: nearestAspect(aspect, (refs.length ? stillModel : need(open ? "oss-qwen-image" : M.still)).options.aspectRatios) ?? aspect, numOutputs: 1 },+ params: { aspectRatio: nearestAspect(aspect, stillModel.options.aspectRatios) ?? aspect, numOutputs: 1 },},},{@@ -493,7 +499,7 @@ function planPresenter(p: PresenterPlan): RunPlan {chain: [{ slot: "video" }],},];- const clipLen = (want: number) => snapDuration(want, clip.options.durations);+ const clipLen = (want: number) => snapDuration(want, plannedDurations(clip));const clips: string[] = [];if (p.hook) {steps.push({@@ -663,12 +669,28 @@ export async function writeScript(s: ScriptInput): Promise<{ script: string; by:/** Seconds of voice that fit the ad: the presenter talks, then a product close-up ends it. */export function clickToAdSeconds(engine: Engine, presenter: boolean): { voice: number; broll: number } {- if (presenter) return { voice: 8, broll: 4 };const clip = need(UGC_MODELS[engine].clip);- const shots = engine === "open" ? shotPlan(9, clip.options.durations) : [4, 4, 4];+ // The close-up is the clip model's length nearest 4 s (5 s on MiniMax H3); the voice gets the rest of the 12 s.+ if (presenter) {+ const broll = snapDuration(4, plannedDurations(clip));+ return { voice: CLICK_TO_AD.maxSeconds - broll, broll };+ }+ const shots = engine === "open" ? adShots(clip) : [4, 4, 4];return { voice: Math.max(4, Math.min(CLICK_TO_AD.maxSeconds, shots.reduce((a, b) => a + b, 0)) - 0.6), broll: 0 };}+/**+ * A product-only ad's shots on the open engine: about 9 s, in at least two shots so two of the kit's angles show (a model+ * whose shortest planned clip is 5 s, MiniMax H3, makes two 5 s shots rather than one 10 s clip).+ */+function adShots(clip: ModelDef): number[] {+ const ds = plannedDurations(clip);+ const plan = shotPlan(9, ds);+ if (plan.length > 1 || !ds?.length) return plan;+ const shortest = Math.min(...ds);+ return 2 * shortest <= CLICK_TO_AD.maxSeconds ? [shortest, shortest] : plan;+}+/** A raster logo overlay-image can place (an SVG can't be read there), else undefined. */const rasterLogo = (brand?: BrandKit | null) => (brand?.logo && !isSvg(brand.logo) ? brand.logo : undefined);@@ -759,7 +781,7 @@ function planAd(input: ClickToAdInput, ctx: { product: Product; brand?: BrandKitif (open && !input.voiceSample) throw new PlanError("Add a voice sample — open-source voices are cloned from a short recording");const M = UGC_MODELS[input.engine];const clip = need(M.clip);- const lens = open ? shotPlan(9, clip.options.durations) : [4, 4, 4];+ const lens = open ? adShots(clip) : [4, 4, 4];const angles = ["Hero shot, the camera glides in", "Close-up on the details as light sweeps across", "The product in use, ending on a clean final frame"];const step = "click-to-ad-step";const steps: Step[] = [@@ -914,7 +936,7 @@ export function planMultiplier(input: MultiplierInput, ctx: MultiplierContext):const frameModel = getModel(M.frame);const canExtract = !!frameModel && (ctx.extractFrame ?? true);const clipAspect = nearestAspect(ctx.referenceAspect, clipModel.options.aspectRatios);- const clipParams = { duration: snapDuration(4, clipModel.options.durations), ...(clipModel.options.audio && { generateAudio: true }), resolution: nearestRes(resolution, clipModel), ...(clipAspect && { aspectRatio: clipAspect }) };+ const clipParams = { duration: snapDuration(4, plannedDurations(clipModel)), ...(clipModel.options.audio && { generateAudio: true }), resolution: nearestRes(resolution, clipModel), ...(clipAspect && { aspectRatio: clipAspect }) };const order: string[] = [];if (input.hook != null) {const start = input.firstFrame ?? images[0];@@ -1081,7 +1103,7 @@ export function presenterSeconds(input: MarketingInput, ctx: { product?: Productconst f = FORMATS[input.format];const want = input.duration ?? f.durations?.default ?? 15;const tpl = input.templateId ? TEMPLATE_INDEX.get(input.templateId) : undefined;- const shot = snapDuration(4, need(UGC_MODELS[input.engine].clip).options.durations);+ const shot = snapDuration(4, plannedDurations(need(UGC_MODELS[input.engine].clip)));const hook = f.hookAndSetting && hookById(input.hookId === undefined ? tpl?.hook : input.hookId);const broll = !!(input.productImages?.length || ctx.product?.images.length);return Math.max(MIN_TALK_SECONDS, want - (hook ? shot : 0) - (broll ? shot : 0));diff --git a/tests/assist-context.test.ts b/tests/assist-context.test.tsindex e0485ba6..11620e0e 100644--- a/tests/assist-context.test.ts+++ b/tests/assist-context.test.ts@@ -315,6 +315,33 @@ describe("studio tools", () => {expect(ads[0]).toMatchObject({ modelId: "nano-banana-pro", op: "edit", inputs: { images: ["/api/files/uploads/p.png"] } });});+ // Words that name what a picture or clip should leave out: an image or video model with no negative branch adds them.+ const NEGATION = /\b(no|not|never|without|none|nothing|avoid|don't|do not|free of)\b/i;++ it("a faceless episode on your GPU: Qwen-Image 2.1 stills, MiniMax H3 clips, the narration in place of their sound", () => {+ const scenes = Array.from({ length: 3 }, (_, i) => ({ narration: `Line ${i}`, visual: `Scene ${i}` }));+ const steps = studio.fallbackSteps.faceless({ scenes, style: "flat 2D", aspect_ratio: "9:16" }, { engine: "open" });+ const still = steps.find((s) => s.key === "still0")!;+ expect(still.request).toMatchObject({ modelId: "oss-qwen-image-21", op: "t2i", params: { aspectRatio: "9:16" } });+ const clip = steps.find((s) => s.key === "clip0")!;+ expect(clip.request).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v", params: { aspectRatio: "9:16", duration: 5 } });+ // The clips are joined with the picture only, and the mux lays the narration on as the film's sound.+ expect(steps.find((s) => s.key === "film")!.request.modelId).toBe("oss-join-clips");+ expect(steps.find((s) => s.key === "episode")).toMatchObject({ after: ["film", "voice"], chain: [{ slot: "video" }, { slot: "audio" }], request: { modelId: "oss-mux" } });+ for (const s of steps.filter((x) => x.key.startsWith("still") || x.key.startsWith("clip"))) expect(s.request.prompt, s.key).not.toMatch(NEGATION);+ });++ it("ads on your GPU run on Qwen-Image 2.1 (its edit with the product photo, text-to-image without), worded as what is wanted", () => {+ const withProduct = studio.fallbackSteps.ads({ brief: "oat milk", product_image: "/api/files/uploads/p.png", count: 2, cta: "Shop now" }, { engine: "open" });+ expect(withProduct[0]).toMatchObject({ modelId: "oss-qwen-image-21", op: "edit", inputs: { images: ["/api/files/uploads/p.png"] } });+ expect(withProduct[0].prompt).toMatch(/the headline and the button are the only added lettering, spelled exactly\.$/);+ const words = studio.fallbackSteps.ads({ brief: "oat milk", count: 2 }, { engine: "open" });+ expect(words[0]).toMatchObject({ modelId: "oss-qwen-image-21", op: "t2i" });+ expect(words[0].inputs).toBeUndefined();+ expect(words[0].prompt).toMatch(/the headline is the only added lettering, spelled exactly\.$/);+ for (const r of [...withProduct, ...words]) expect(r.prompt).not.toMatch(NEGATION);+ });+const image = "/api/files/uploads/2026-10-19/still.png";const scenes = [{ narration: "Tea began as medicine.", visual: "A misty mountain tea garden" },diff --git a/tests/canvas-api.test.ts b/tests/canvas-api.test.tsindex 629830a5..496a191b 100644--- a/tests/canvas-api.test.ts+++ b/tests/canvas-api.test.ts@@ -215,7 +215,7 @@ describe("canvas API", () => {let res = await list.POST(req("POST", { templateId: "image-animate", engine: "cloud" }));const c = (await res.json()) as Canvas;expect(c.name).toBe("Image → Animate");- expect(c.pages[0].graph.nodes.filter((n) => n.data.modelId).map((n) => n.data.modelId)).toEqual(["oss-z-image-turbo", "oss-wan22-14b-fast"]);+ expect(c.pages[0].graph.nodes.filter((n) => n.data.modelId).map((n) => n.data.modelId)).toEqual(["oss-qwen-image-21", "oss-minimax-h3"]);// Cloud nodes are refused with a reason.res = await run.POST(req("POST", { graph: board }), ctx(id));expect(res.status).toBe(422);diff --git a/tests/canvas-models.test.ts b/tests/canvas-models.test.tsnew file mode 100644index 00000000..e8d82400--- /dev/null+++ b/tests/canvas-models.test.ts@@ -0,0 +1,74 @@+import { describe, expect, it } from "vitest";+import { getModel } from "@/lib/catalog";+import { CANVAS_TEMPLATES, defaultModelFor, defaultModelForNode, EFFECT_CHAIN_MODELS, getTemplate, planCanvas, type CanvasNode } from "@/lib/catalog/canvas";+import type { Engine, Operation } from "@/lib/catalog/types";++// The models a new Canvas node and the templates start on: MiniMax H3 for video on both engines, Qwen-Image 2.1 for the+// open stills, SeedVR2 for open upscales, Sync Lipsync 3 in the cloud.++const node = (id: string, type: CanvasNode["type"], data: CanvasNode["data"] = {}): CanvasNode => ({ id, type, position: { x: 0, y: 0 }, data });++describe("Canvas defaults", () => {+ it.each([+ ["t2v", "cloud", "minimax-h3"],+ ["i2v", "cloud", "minimax-h3"],+ ["flf2v", "cloud", "minimax-h3"],+ ["t2v", "open", "oss-minimax-h3"],+ ["i2v", "open", "oss-minimax-h3"],+ ["flf2v", "open", "oss-minimax-h3"],+ ["ref2v", "cloud", "seedance-2-5"],+ ["ref2v", "open", "oss-wan-vace"],+ ["lipsync", "cloud", "sync-lipsync-3"],+ ["upscale-image", "open", "oss-seedvr2-image"],+ ["upscale-video", "open", "oss-seedvr2"],+ ] as [Operation, Engine, string][])("%s on %s starts on %s", (op, engine, id) => {+ expect(defaultModelFor(op, engine, { hidden: true })?.id).toBe(id);+ });++ it("a new video node and the Upscale utility start on those models", () => {+ expect(defaultModelForNode(node("v", "model", { mediaKind: "video" }), "open")?.id).toBe("oss-minimax-h3");+ expect(defaultModelForNode(node("v", "model", { mediaKind: "video", op: "i2v" }), "cloud")?.id).toBe("minimax-h3");+ expect(defaultModelForNode(node("u", "upscale", { mediaKind: "image" }), "open")?.id).toBe("oss-seedvr2-image");+ expect(defaultModelForNode(node("u", "upscale", { mediaKind: "video" }), "open")?.id).toBe("oss-seedvr2");+ });+});++describe("Canvas templates' models", () => {+ const models = (id: string, engine: Engine) => Object.fromEntries(getTemplate(id)!.build(engine).nodes.filter((n) => n.data.modelId).map((n) => [n.id, n.data.modelId]));++ it("Image → Animate and Table → shots → film: a Qwen-Image 2.1 still (open), a MiniMax H3 clip", () => {+ for (const id of ["image-animate", "table-film"]) {+ expect(models(id, "open")).toMatchObject({ still: "oss-qwen-image-21", animate: "oss-minimax-h3" });+ expect(models(id, "cloud")).toMatchObject({ still: "nano-banana-pro", animate: "minimax-h3" });+ }+ });++ it("Script → storyboard → film: Qwen-Image 2.1 frames, MiniMax H3 shots, joined", () => {+ const open = models("script-film", "open");+ for (const i of [1, 2, 3]) expect(open).toMatchObject({ [`frame${i}`]: "oss-qwen-image-21", [`shot${i}`]: "oss-minimax-h3" });+ expect(open.film).toBe("oss-join-clips");+ const cloud = models("script-film", "cloud");+ for (const i of [1, 2, 3]) expect(cloud).toMatchObject({ [`frame${i}`]: "nano-banana-pro", [`shot${i}`]: "minimax-h3" });+ // The shots are 5 s, the start of H3's trained range.+ const shots = getTemplate("script-film")!.build("open").nodes.filter((n) => n.id.startsWith("shot"));+ expect(shots.every((n) => n.data.params?.duration === 5)).toBe(true);+ });++ it("Compare 3 image models: FLUX.3 next to Nano Banana Pro and Seedream 5 Pro in the cloud", () => {+ expect(Object.values(models("compare-image", "cloud"))).toEqual(["nano-banana-pro", "seedream-5-pro", "flux-3"]);+ expect(Object.values(models("compare-image", "open"))).toEqual(["oss-ideogram-4", "oss-qwen-image-21", "oss-krea2-realism"]);+ });++ it("Effects 2.0 chains set the scene with Qwen-Image 2.1 Turbo on your GPU, then animate with Fuobe DoP", () => {+ expect(EFFECT_CHAIN_MODELS).toMatchObject({ edit: { open: "oss-qwen-image-21-turbo", cloud: "qwen-image-edit-2511-cloud" }, video: "fuobe-dop" });+ expect(getModel("oss-qwen-image-21-turbo")!.routes.some((r) => r.op === "edit")).toBe(true);+ });++ it("every template plans on the open engine with these models, for free", () => {+ for (const t of CANVAS_TEMPLATES) {+ const plan = planCanvas(t.build("open"), { engineMode: "open" });+ for (const e of plan.errors) expect(e.message, t.id).toMatch(/^(Add (an image|an audio clip|a video|a voice sample) to|Waiting on)/);+ expect(plan.costUsd, t.id).toBe(0);+ }+ });+});diff --git a/tests/canvas.test.ts b/tests/canvas.test.tsindex 0947b658..cdfd545f 100644--- a/tests/canvas.test.ts+++ b/tests/canvas.test.ts@@ -380,7 +380,7 @@ describe("canvas templates", () => {expect(graphEngine(graph)).toBe("open");expect(graph.nodes.find((n) => n.id === "film")!.data.modelId).toBe("oss-join-clips");expect(graph.nodes.find((n) => n.id === "beat1")!.data).toMatchObject({ modelId: "oss-text-llm", op: "write" });- expect(graph.nodes.find((n) => n.id === "shot1")!.data).toMatchObject({ modelId: "oss-wan22-14b-fast", op: "i2v" });+ expect(graph.nodes.find((n) => n.id === "shot1")!.data).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v" });expect(planCanvas(graph, { engineMode: "open" }).errors).toEqual([]);});diff --git a/tests/chains-h3-sound.test.ts b/tests/chains-h3-sound.test.tsnew file mode 100644index 00000000..fec1d90e--- /dev/null+++ b/tests/chains-h3-sound.test.ts@@ -0,0 +1,124 @@+import fs from "node:fs";+import path from "node:path";+import { describe, expect, it } from "vitest";+import { getModel } from "@/lib/catalog";+import { buildEpisodeGraph, defaultSettings, genreInfo, secondsFor, type EpisodeSettings, type ScriptBlock } from "@/lib/catalog/faceless";++// MiniMax H3 makes every clip with its own sound. Where a pipeline lays a voice or music on the film (Faceless, the+// Explainer, Content Factory, Assist's faceless episode, Click to Ad), that soundtrack takes the clips' place: the open+// joins build the film from the pictures, and the open mux replaces the film's sound. A Storyboard film has no+// soundtrack of its own: its open join keeps the picture only, as it did for silent clips.++type Graph = Record<string, { class_type: string; inputs: Record<string, unknown> }>;+const workflow = (id: string): Graph => JSON.parse(fs.readFileSync(path.join(__dirname, "../workflows/comfyui", `${id}.json`), "utf8"));+const isLink = (v: unknown): v is [string, number] => Array.isArray(v) && v.length === 2 && typeof v[0] === "string" && typeof v[1] === "number";++/** Every node class upstream of a node's input (the input's own source included). */+function upstream(g: Graph, nodeId: string, input: string): Set<string> {+ const out = new Set<string>();+ const queue = [g[nodeId].inputs[input]].filter(isLink).map((l) => l[0]);+ const seen = new Set<string>();+ while (queue.length) {+ const id = queue.shift()!;+ if (seen.has(id)) continue;+ seen.add(id);+ out.add(g[id].class_type);+ for (const v of Object.values(g[id].inputs)) if (isLink(v)) queue.push(v[0]);+ }+ return out;+}++const AUDIO_ONLY = new Set(["LoadAudio", "AudioAdjustVolume", "AudioMerge", "EmptyAudio", "AudioConcat"]);++describe("the open graphs a clip with sound goes through", () => {+ it("the join (video-concat-2/3/4) builds the film from the clips' pictures alone", () => {+ expect(getModel("oss-join-clips")!.routes[0].endpoint).toBe("video-concat-{n}");+ for (const n of [2, 3, 4]) {+ const g = workflow(`video-concat-${n}`);+ const create = Object.entries(g).filter(([, v]) => v.class_type === "CreateVideo");+ expect(create, `video-concat-${n}`).toHaveLength(1);+ expect(create[0][1].inputs.audio, `video-concat-${n}`).toBeUndefined();+ // Each clip is read for its frames (and the first for its frame rate), never for its sound (output 1).+ const links = Object.values(g).flatMap((v) => Object.values(v.inputs).filter(isLink));+ const components = new Set(Object.entries(g).filter(([, v]) => v.class_type === "GetVideoComponents").map(([k]) => k));+ expect(links.filter(([from, slot]) => components.has(from) && slot === 1), `video-concat-${n}`).toEqual([]);+ }+ });++ it("the mux puts the new soundtrack in place of the film's: the clip's sound never reaches it", () => {+ for (const id of ["video-mux-audio", "video-mux-audio-replace"]) {+ const g = workflow(id);+ const [concat] = Object.entries(g).filter(([, v]) => v.class_type === "ConcatenateVideo");+ // ComfyUI's ConcatenateVideo: complete_audio overrides the audio carried by the input videos.+ expect(isLink(concat[1].inputs.complete_audio), id).toBe(true);+ const sources = upstream(g, concat[0], "complete_audio");+ expect([...sources].every((c) => AUDIO_ONLY.has(c)), `${id}: ${[...sources].join(", ")}`).toBe(true);+ expect(sources.has("LoadAudio")).toBe(true);+ }+ });++ it("the UGC joins keep one chosen clip's sound: the presenter's voice, after a silent hook", () => {+ for (const n of [2, 3, 4]) {+ const first = workflow(`video-concat-sound1-${n}`);+ const [, create1] = Object.entries(first).find(([, v]) => v.class_type === "CreateVideo")!;+ // Clip 1's sound only (the presenter when there is no hook).+ expect(create1.inputs.audio).toEqual(["1", 2]);+ const second = workflow(`video-concat-sound2-${n}`);+ const [createId] = Object.entries(second).find(([, v]) => v.class_type === "CreateVideo")!;+ // Silence as long as clip 1 (the hook), then clip 2's sound (the presenter).+ const sources = upstream(second, createId, "audio");+ expect([...sources].sort()).toEqual(["AudioConcat", "EmptyAudio", "VHS_LoadVideo", "VHS_VideoInfoLoaded"]);+ const concat = Object.values(second).find((v) => v.class_type === "AudioConcat")!;+ expect(second[(concat.inputs.audio2 as [string, number])[0]]).toMatchObject({ class_type: "VHS_LoadVideo", inputs: { video: "clip_2.mp4" } });+ }+ });+});++const block = (i: number): ScriptBlock => {+ const narration = Array.from({ length: 20 }, (_, w) => `w${i}x${w}`).join(" ");+ return { id: `b${i}`, narration, visual: `Scene ${i}`, motion: "slow push-in", seconds: secondsFor(narration) };+};++describe("Faceless and the Explainer on MiniMax H3: the narration and the music replace the clips' sound", () => {+ const blocks = Array.from({ length: 6 }, (_, i) => block(i));+ const graph = (feature: "faceless" | "explainer", s: Partial<EpisodeSettings>) =>+ buildEpisodeGraph(+ { feature, title: "How tides work", genre: genreInfo("education"), settings: { ...defaultSettings("open", genreInfo("education")), animation: "animated", voice: null, ...s }, blocks, fallbackVoice: "/api/files/uploads/v.wav" },+ getModel,+ );++ it.each(["faceless", "explainer"] as const)("%s: clips with sound, joined as pictures, the voice and the bed mixed on", (feature) => {+ expect(getModel("oss-minimax-h3")!.options.audio).toBe("always");+ for (const music of [true, false]) {+ const g = graph(feature, { music });+ const clips = g.filter((s) => s.part === "clip");+ expect(clips.every((c) => c.request.modelId === "oss-minimax-h3")).toBe(true);+ const joins = g.filter((s) => s.part === "join");+ expect(joins.every((j) => j.request.modelId === "oss-join-clips" && j.chain!.every((c) => c.slot === "videos"))).toBe(true);+ const mix = g.find((s) => s.key === "mix")!;+ expect(mix.request.modelId).toBe("oss-mux");+ expect(mix.after).toEqual(music ? ["join", "narration", "music"] : ["join", "narration"]);+ expect(mix.chain).toEqual(music ? [{ slot: "video" }, { slot: "audio" }, { slot: "audio2" }] : [{ slot: "video" }, { slot: "audio" }]);+ // No step takes a clip, or a join of clips, as its sound (an audio slot fed by a clip would take its soundtrack).+ const pictureSteps = new Set([...clips, ...joins].map((s) => s.key));+ for (const s of g) {+ (s.chain ?? []).forEach((c, i) => {+ if (["audio", "audio2", "voiceAudio"].includes(c.slot)) expect(pictureSteps.has(s.after![i]), `${s.key} ← ${s.after![i]}`).toBe(false);+ });+ }+ }+ });++ it("the mux route lays one track in place of the film's sound, or the voice over the bed", () => {+ const route = getModel("oss-mux")!.routes.find((r) => r.op === "mux")!;+ expect(route.endpoint).toBe("video-mux-audio");+ expect(route.note).toMatch(/one track: video-mux-audio-replace/);+ });++ it("each H3 block lands on 5, 10 or 15 s", () => {+ const g = graph("faceless", { music: false });+ const lengths = g.filter((s) => s.part === "clip").map((c) => c.request.params?.duration);+ expect(lengths.length).toBeGreaterThan(0);+ for (const d of lengths) expect([5, 10, 15]).toContain(d);+ });+});diff --git a/tests/chains.test.ts b/tests/chains.test.tsindex 94f199ab..ca693165 100644--- a/tests/chains.test.ts+++ b/tests/chains.test.ts@@ -131,7 +131,10 @@ describe("storyboard film", () => {const { items } = createStoryboardFilm(board.batchId);const [film, ...clips] = items;expect(clips).toHaveLength(3);- expect(clips[0].modelId).toBe("oss-wan22-14b-fast");+ // MiniMax H3 on the GPU, in 5 s shots (its trained range starts there).+ expect(clips[0].modelId).toBe("oss-minimax-h3");+ expect(clips.every((c) => c.request.params?.duration === 5)).toBe(true);+ expect(film.modelId).toBe("oss-join-clips");// Start and end frame for every shot but the last.expect(dependsOn(clips[0].id)).toEqual([board.items[0].id, board.items[1].id]);expect(clips[0].request.chain).toEqual([{ slot: "images", position: "first" }, { slot: "endImage" }]);diff --git a/tests/cinema-models.test.ts b/tests/cinema-models.test.tsnew file mode 100644index 00000000..b9aae211--- /dev/null+++ b/tests/cinema-models.test.ts@@ -0,0 +1,66 @@+import { describe, expect, it } from "vitest";+import { getModel } from "@/lib/catalog";+import { CINEMA_MODELS, LOCATION_MODELS, planCinema, STILL_EDIT_MODELS, STILL_REFERENCES, type CinemaGenerateInput } from "@/lib/catalog/cinema";++// Cinema Studio's menus: Fuobe Cinema first, MiniMax H3 next on both engines; the open stills on Ideogram 4, Qwen-Image+// 2.1, Krea 2 Realism and MOSS-Image; stills and grids with references on Qwen-Image 2.1 with up to 4 of them.++const ctx = { cloudAllowed: true };+const SETTINGS = { camera: "modern", lens: "clean-sharp", focal: "50mm" } as CinemaGenerateInput["settings"];+const input = (over: Partial<CinemaGenerateInput>): CinemaGenerateInput => ({ engine: "open", mode: "video", action: "generate", prompt: "A keeper climbs the stairs", settings: {}, duration: 5, batch: 1, ...over });+const refs = Array.from({ length: 6 }, (_, i) => `/api/files/uploads/r${i}.png`);++describe("Cinema Studio's models", () => {+ it("video: Fuobe Cinema, then MiniMax H3, on both engines; the cloud adds H3 Max and Wan 3.0", () => {+ expect(CINEMA_MODELS.video.open).toEqual(["fuobe-cinema", "oss-minimax-h3", "oss-ltx25", "oss-wan22-14b"]);+ expect(CINEMA_MODELS.video.cloud).toEqual(["fuobe-cinema", "minimax-h3", "seedance-2-5", "kling-3", "veo-3-1", "minimax-h3-max", "wan-3"]);+ for (const engine of ["open", "cloud"] as const) for (const id of CINEMA_MODELS.video[engine]) expect(getModel(id), id).toBeTruthy();+ // The default stays Fuobe Cinema.+ expect(planCinema(input({}), ctx).model.id).toBe("fuobe-cinema");+ expect(planCinema(input({ engine: "cloud" }), ctx).model.id).toBe("fuobe-cinema");+ });++ it("MiniMax H3 picked on the GPU: a 5, 10 or 15 s take, the camera moves in words", () => {+ const plan = planCinema(input({ modelId: "oss-minimax-h3", duration: 4, moves: ["dolly-in"] }), ctx);+ expect(plan.model.id).toBe("oss-minimax-h3");+ expect(plan.steps[0].request).toMatchObject({ modelId: "oss-minimax-h3", params: { duration: 5 } });+ expect(plan.steps[0].request.loras).toBeUndefined();+ expect(plan.notes.join(" ")).toMatch(/MiniMax H3 makes 5s clips/);+ expect(planCinema(input({ modelId: "oss-minimax-h3", duration: 12 }), ctx).steps[0].request.params?.duration).toBe(10);+ expect(planCinema(input({ modelId: "oss-minimax-h3", duration: 14 }), ctx).steps[0].request.params?.duration).toBe(15);+ expect(planCinema(input({ engine: "cloud", modelId: "minimax-h3" }), ctx).model.id).toBe("minimax-h3");+ });++ it("stills: the open menu is Soul Cinema, Ideogram 4, Qwen-Image 2.1, Krea 2 Realism and MOSS-Image", () => {+ expect(CINEMA_MODELS.image.open).toEqual(["fuobe-soul-cinema", "oss-ideogram-4", "oss-qwen-image-21", "oss-krea2-realism", "oss-moss-image"]);+ for (const id of CINEMA_MODELS.image.open) expect(getModel(id), id).toBeTruthy();+ });++ it("stills and grids with references run on Qwen-Image 2.1 on the GPU, with up to 4 references", () => {+ expect(STILL_EDIT_MODELS.open).toBe("oss-qwen-image-21");+ expect(STILL_REFERENCES.open).toBe(4);+ expect(getModel("oss-qwen-image-21")!.options.maxImages).toBe(4);+ const still = planCinema(input({ mode: "image", settings: SETTINGS, images: refs }), ctx);+ expect(still.model.id).toBe("oss-qwen-image-21");+ expect(still.steps[0].request).toMatchObject({ modelId: "oss-qwen-image-21", inputs: { images: refs.slice(0, 4) } });+ expect(still.notes).toContain("Stills with references run on Qwen-Image 2.1");+ const grid = planCinema(input({ mode: "image", action: "grid", grid: { size: "2x2", type: "freeform" }, images: refs }), ctx);+ expect(grid.steps[0].request).toMatchObject({ modelId: "oss-qwen-image-21", inputs: { images: refs.slice(0, 4) } });+ // The cloud keeps Nano Banana Pro with up to 10.+ const cloud = planCinema(input({ engine: "cloud", mode: "image", settings: SETTINGS, images: refs }), ctx);+ expect(cloud.steps[0].request).toMatchObject({ modelId: "nano-banana-pro", inputs: { images: refs } });+ });++ it("the grid's words name what the sheet shows", () => {+ const grid = planCinema(input({ mode: "image", action: "grid", grid: { size: "3x3", type: "zooms" } }), ctx);+ expect(grid.steps[0].request.prompt).toMatch(/thin, straight white gutters, the grid filling the frame edge to edge, every panel a clean picture of the scene alone/);+ expect(grid.steps[0].request.prompt).not.toMatch(/\b(no|not|without)\b/i);+ });++ it("Soul Location's open alternatives: Qwen-Image 2.1, Krea 2 Realism, MOSS-Image and Z-Image Turbo after Fuobe Soul", () => {+ expect(LOCATION_MODELS.open).toEqual(["fuobe-soul", "oss-qwen-image-21", "oss-krea2-realism", "oss-moss-image", "oss-z-image-turbo"]);+ for (const id of LOCATION_MODELS.open) expect(getModel(id), id).toBeTruthy();+ const plan = planCinema(input({ mode: "image", action: "location", modelId: "oss-moss-image", prompt: "An empty diner" }), { ...ctx, has: () => true });+ expect(plan.model.id).toBe("oss-moss-image");+ });+});diff --git a/tests/cinema-refs.test.ts b/tests/cinema-refs.test.tsindex d2f58468..50c5ed41 100644--- a/tests/cinema-refs.test.ts+++ b/tests/cinema-refs.test.ts@@ -44,12 +44,12 @@ describe("reference clips", () => {const plan = planCinema({ ...VIDEO, ...CLIPS, modelId: "kling-3" }, ctx);expect(plan.model.id).toBe("kling-3");expect(plan.steps[0].request.inputs).toBeUndefined();- expect(plan.notes.join(" ")).toMatch(/Kling 3\.0 doesn't take reference videos and reference audio — Seedance 2\.5 does/);- // Fuobe Cinema picked from the menu takes none yet: Seedance 2.5 is named.+ expect(plan.notes.join(" ")).toMatch(/Kling 3\.0 doesn't take reference videos and reference audio — MiniMax H3 or Seedance 2\.5 or MiniMax H3 Max or Wan 3\.0 do/);+ // Fuobe Cinema picked from the menu takes none yet: the partners that do are named.const original = planCinema({ ...VIDEO, ...CLIPS, modelId: "fuobe-cinema" }, ctx);expect(original.model.id).toBe("fuobe-cinema");expect(original.steps[0].request.op).toBeUndefined();- expect(original.notes.join(" ")).toMatch(/Fuobe Cinema doesn't take reference videos and reference audio — Seedance 2\.5 does/);+ expect(original.notes.join(" ")).toMatch(/Fuobe Cinema doesn't take reference videos and reference audio — MiniMax H3 or Seedance 2\.5/);expect(original.notes.join(" ")).not.toMatch(/Cinema Studio/);// Open models and stills never take them.expect(planCinema({ ...VIDEO, ...CLIPS, engine: "open" }, ctx).notes.join(" ")).toMatch(/aren't sent to Fuobe Cinema/);@@ -79,13 +79,17 @@ describe("reference clips", () => {it("move a take on the default model to the first partner model that takes them all, with a note", () => {// Nothing picked in the menu (the cloud default, Fuobe Cinema): the clips aren't dropped.const plan = planCinema({ ...VIDEO, ...CLIPS }, ctx);- expect(plan.model.id).toBe("seedance-2-5");- expect(plan.steps[0].request).toMatchObject({ modelId: "seedance-2-5", op: "ref2v", inputs: CLIPS });- expect(plan.notes[0]).toBe("Fuobe Cinema doesn't take reference clips yet, so this take runs on Seedance 2.5 (a partner model) with them — pick Fuobe Cinema in the menu to leave them out");+ expect(plan.model.id).toBe("minimax-h3");+ expect(plan.steps[0].request).toMatchObject({ modelId: "minimax-h3", op: "ref2v", inputs: CLIPS });+ expect(plan.notes[0]).toBe("Fuobe Cinema doesn't take reference clips yet, so this take runs on MiniMax H3 (a partner model) with them — pick Fuobe Cinema in the menu to leave them out");expect(plan.costUsd).toBeGreaterThan(0);// Only a reference video, or only audio: the same.- expect(planCinema({ ...VIDEO, videos: CLIPS.videos }, ctx).model.id).toBe("seedance-2-5");- expect(planCinema({ ...VIDEO, audios: CLIPS.audios }, ctx).model.id).toBe("seedance-2-5");+ expect(planCinema({ ...VIDEO, videos: CLIPS.videos }, ctx).model.id).toBe("minimax-h3");+ expect(planCinema({ ...VIDEO, audios: CLIPS.audios }, ctx).model.id).toBe("minimax-h3");+ // More clips than MiniMax H3 takes (3 of each kind): the first partner that takes them all.+ const many = planCinema({ ...VIDEO, videos: ["/api/files/a.mp4", "/api/files/b.mp4", "/api/files/c.mp4", "/api/files/d.mp4"], audios: CLIPS.audios }, ctx);+ expect(many.model.id).toBe("seedance-2-5");+ expect(many.steps[0].request.inputs?.videos).toHaveLength(4);// No clips, or the GPU, or a still: Fuobe Cinema stays.expect(planCinema(VIDEO, ctx).model.id).toBe("fuobe-cinema");expect(planCinema({ ...VIDEO, ...CLIPS, engine: "open" }, ctx).model.id).toBe("fuobe-cinema");diff --git a/tests/cinema.test.ts b/tests/cinema.test.tsindex 8be0969a..711640fb 100644--- a/tests/cinema.test.ts+++ b/tests/cinema.test.ts@@ -434,7 +434,7 @@ describe("planCinema", () => {const loc = planCinema(base({ action: "location", mode: "image", prompt: "an abandoned diner on Route 66", brief: "" }), ctx);expect(loc.steps[0].request).toMatchObject({ modelId: "fuobe-soul", presetId: "v1-movie", params: { aspectRatio: "16:9", resolution: "1080p" } });- expect(loc.steps[0].request.prompt).toMatch(/^Establishing shot of a film location: an abandoned diner on Route 66\. An empty set with no people/);+ expect(loc.steps[0].request.prompt).toMatch(/^Establishing shot of a film location: an abandoned diner on Route 66\. An empty set, the place itself the only subject/);expect(LOCATION_MODELS.cloud).not.toContain("soul-cinema");const still = { url: "/api/files/diner.png", kind: "image" as const };diff --git a/tests/faceless-api.test.ts b/tests/faceless-api.test.tsindex 2f4d002a..391a572a 100644--- a/tests/faceless-api.test.ts+++ b/tests/faceless-api.test.ts@@ -495,7 +495,7 @@ describe("Explainer", () => {const v = await view(ep.id);expect(v.episode.status).toBe("rendering");const still = v.steps.find((s) => s.part === "still")!.generation!;- expect(still).toMatchObject({ modelId: "oss-qwen-edit", op: "edit" });+ expect(still).toMatchObject({ modelId: "oss-qwen-image-21-turbo", op: "edit" });expect(still.request.inputs?.images).toEqual([img]);await faceless.deleteEpisode(ep.id);});diff --git a/tests/faceless.test.ts b/tests/faceless.test.tsindex e9db12bf..7f1a8f59 100644--- a/tests/faceless.test.ts+++ b/tests/faceless.test.ts@@ -142,6 +142,22 @@ describe("blocks", () => {expect(blockShots(10, getModel("oss-wan22-14b-fast"))).toEqual([5, 5]);expect(blockShots(10, getModel("gemini-omni-flash"))).toEqual([10]);});++ it("lands MiniMax H3's shots on the 5, 10 and 15 s it is trained for (on your GPU), any 5–15 s hosted", () => {+ const h3 = getModel("oss-minimax-h3")!;+ // The catalog also lists 3 s (the presets made at that length); a planned block never asks for it.+ expect(h3.options.durations).toContain(3);+ for (let s = 1; s <= 40; s++) for (const shot of blockShots(s, h3)) expect([5, 10, 15]).toContain(shot);+ expect(blockShots(3, h3)).toEqual([5]);+ expect(blockShots(7, h3)).toEqual([10]);+ expect(blockShots(12, h3)).toEqual([15]);+ expect(blockShots(20, h3)).toEqual([10, 10]);+ expect(filmSeconds(9, h3)).toBe(10);+ // Hosted H3 takes any whole second from 5 to 15 (fal's schema).+ expect(blockShots(7, getModel("minimax-h3"))).toEqual([7]);+ expect(blockShots(3, getModel("minimax-h3"))).toEqual([5]);+ expect(blockShots(18, getModel("minimax-h3"))).toEqual([9, 9]);+ });});describe("render graph", () => {@@ -229,19 +245,24 @@ describe("render graph", () => {expect(long.filter((s) => s.part === "join").map((j) => j.after!.length)).toEqual([24, 24, 12, 3]);});- it("open: Wan 2.2 Lightning in 5-second shots, joins folded 4 at a time, Chatterbox, music under the voice, Qwen3-ASR timed burn-in", () => {+ it("open: MiniMax H3 in 5, 10 or 15 s shots, joins folded 4 at a time, Chatterbox, music under the voice, Qwen3-ASR timed burn-in", () => {const g = graphFor({ engine: "open", animation: "animated", music: true, voice: null }, six);+ const stills = g.filter((s) => s.part === "still");+ expect(stills[0].request).toMatchObject({ modelId: "oss-qwen-image-21", params: { aspectRatio: "16:9", numOutputs: 1 } });+ expect(stills[0].request.op).toBeUndefined();+ expect(stills[0].request.inputs).toBeUndefined();const clips = g.filter((s) => s.part === "clip");- expect(clips).toHaveLength(12);- expect(clips[0].request).toMatchObject({ modelId: "oss-wan22-14b-fast", params: { duration: 5, resolution: "480p" } });- expect(clips[1].request.prompt).toMatch(/keeps moving/);+ // Each 9 s block is one 10 s H3 clip at 768p; H3 always makes sound, so no audio switch is sent.+ expect(clips).toHaveLength(6);+ expect(clips[0].request).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v", params: { duration: 10, resolution: "768p" } });+ expect(clips.every((c) => c.request.params?.generateAudio === undefined)).toBe(true);const joins = g.filter((s) => s.part === "join");- // 12 clips → 3 joins of 4 → the final join of 3.- expect(joins.map((j) => j.after!.length)).toEqual([4, 4, 4, 3]);+ // 6 clips → joins of 4 and 2 → the final join of both.+ expect(joins.map((j) => j.after!.length)).toEqual([4, 2, 2]);expect(joins.every((j) => j.request.modelId === "oss-join-clips")).toBe(true);const narration = g.find((s) => s.key === "narration")!;expect(narration.request).toMatchObject({ modelId: "oss-chatterbox", inputs: { voiceAudio: "/api/files/uploads/demo-voice.wav" } });- // The bed is as long as the film (60 s of 5-second shots) plus a second.+ // The bed is as long as the film (six 10 s shots) plus a second.expect(g.find((s) => s.key === "music")!.request).toMatchObject({ modelId: "oss-ace-step", op: "music", params: { duration: 61, extra: { lyrics: "[Instrumental]" } } });const mix = g.find((s) => s.key === "mix")!;expect(mix).toMatchObject({ after: ["join", "narration", "music"], chain: [{ slot: "video" }, { slot: "audio" }, { slot: "audio2" }] });@@ -252,6 +273,23 @@ describe("render graph", () => {expect(words.request.prompt).toBeUndefined();expect(g.find((s) => s.key === "captions")).toMatchObject({ after: ["mix", "words"], chain: [{ slot: "video" }, { slot: "prompt" }], request: { modelId: "oss-captions-burnin" } });expect(estimateGraph(g, getModel).total).toBe(0);+ // Wan 2.2 Lightning stays a choice: 5-second shots, 12 clips → 3 joins of 4 → the final join of 3.+ const wan = graphFor({ engine: "open", animation: "animated", music: true, voice: null, videoModel: "oss-wan22-14b-fast" }, six);+ const wanClips = wan.filter((s) => s.part === "clip");+ expect(wanClips).toHaveLength(12);+ expect(wanClips[0].request).toMatchObject({ modelId: "oss-wan22-14b-fast", params: { duration: 5, resolution: "480p" } });+ expect(wanClips[1].request.prompt).toMatch(/keeps moving/);+ expect(wan.filter((s) => s.part === "join").map((j) => j.after!.length)).toEqual([4, 4, 4, 3]);+ expect(ENGINE_MODELS.open.videoChoices).toEqual(["oss-minimax-h3", "oss-wan22-14b-fast"]);+ expect(ENGINE_MODELS.cloud.videoChoices).toContain("minimax-h3");+ });++ it("hosted MiniMax H3 in the cloud: any 5–15 s shot at 768P", () => {+ const g = graphFor({ engine: "cloud", animation: "animated", music: false, videoModel: "minimax-h3" }, six);+ const clips = g.filter((s) => s.part === "clip");+ expect(clips).toHaveLength(6);+ expect(clips[0].request).toMatchObject({ modelId: "minimax-h3", op: "i2v", params: { duration: 9, resolution: "768P" } });+ expect(estimateGraph(g, getModel).parts.clip).toBeGreaterThan(0);});it("follows the voice, style references and the music choice", () => {@@ -262,7 +300,7 @@ describe("render graph", () => {expect(still.request.inputs?.images).toEqual(["/api/files/a.png", "/api/files/b.png"]);expect(still.request.prompt).toMatch(/style of the reference images/);const openRefs = graphFor({ engine: "open", styleRefs: ["/api/files/a.png", "/api/files/b.png", "/api/files/c.png"] }, six);- expect(openRefs.find((s) => s.part === "still")!.request).toMatchObject({ modelId: "oss-style-qwen-edit", inputs: { images: ["/api/files/a.png", "/api/files/b.png"] } });+ expect(openRefs.find((s) => s.part === "still")!.request).toMatchObject({ modelId: "oss-style-krea2", inputs: { images: ["/api/files/a.png", "/api/files/b.png"] } });// A cloud episode with music: the Sonilo bed (as long as the film) is levelled to -28 LUFS, then fal's// compose lays the voice and the bed on the film in one pass — no ComfyUI needed.const music = graphFor({ engine: "cloud", music: true }, six);@@ -289,7 +327,7 @@ describe("render graph", () => {it("builds a picture edit for a block the timeline editor changes", () => {const g = graphFor({ engine: "open" }, six, { stillEdits: { b2: { source: "/api/files/outputs/still.png", instruction: "make it night" } } });- expect(g.find((s) => s.key === "still-b2")!.request).toMatchObject({ modelId: "oss-qwen-edit", op: "edit", inputs: { images: ["/api/files/outputs/still.png"] } });+ expect(g.find((s) => s.key === "still-b2")!.request).toMatchObject({ modelId: "oss-qwen-image-21-turbo", op: "edit", inputs: { images: ["/api/files/outputs/still.png"] } });expect(g.find((s) => s.key === "still-b2")!.request.prompt).toMatch(/^make it night\. Keep everything else/);});@@ -307,7 +345,8 @@ describe("render graph", () => {describe("timeline re-runs and retries", () => {const blocks = Array.from({ length: 12 }, (_, i) => block(i));- const g = graphFor({ engine: "open", music: true }, blocks);+ // Wan 2.2 Lightning's 5-second shots: two clips per block.+ const g = graphFor({ engine: "open", music: true, videoModel: "oss-wan22-14b-fast" }, blocks);it("a picture change re-runs that block's still and clips, the joins up its branch, the mix and the subtitles", () => {const plan = planRerun(g, changedKeys(g, ["b3"], "picture"));@@ -345,7 +384,7 @@ describe("timeline re-runs and retries", () => {// A Frame by frame episode rendered before its scenes became Ken Burns moves: Wan 2.2 made each 8 s scene// as a 5 s and a 3 s shot. Its Ken Burns graph has one 8 s move per scene under the first shot's key.const scenes = [block(0, 20, 8), block(1, 20, 8), block(2, 20, 8)];- const wan = graphFor({ engine: "open", animation: "animated", music: false, voice: null }, scenes);+ const wan = graphFor({ engine: "open", animation: "animated", music: false, voice: null, videoModel: "oss-wan22-14b-fast" }, scenes);expect(wan.filter((s) => s.block === 0 && s.part === "clip").map((s) => s.seconds)).toEqual([5, 3]);const kb = graphFor({ engine: "open", animation: "frames", music: false, voice: null }, scenes);expect(kb.filter((s) => s.part === "clip").map((s) => [s.key, s.seconds])).toEqual([@@ -587,12 +626,12 @@ describe("pictures from sources, style references, music length, frame pricing",it("draws open pictures from attached images with a multi-image edit model", () => {const g = graphFor({ engine: "open", voice: null, sourceImages: [a, b] }, six);const still = g.find((s) => s.part === "still")!;- expect(still.request).toMatchObject({ modelId: "oss-qwen-edit", op: "edit", inputs: { images: [a, b] } });+ expect(still.request).toMatchObject({ modelId: "oss-qwen-image-21-turbo", op: "edit", inputs: { images: [a, b] } });expect(still.request.prompt).toMatch(/attached source pictures/);expect(still.request.prompt).toMatch(/Style: /);// Style references win over the sources; the open style model reads two of them.const refs = graphFor({ engine: "open", voice: null, styleRefs: [a, b, c], sourceImages: [x] }, six);- expect(refs.find((s) => s.part === "still")!.request).toMatchObject({ modelId: "oss-style-qwen-edit", inputs: { images: [a, b] } });+ expect(refs.find((s) => s.part === "still")!.request).toMatchObject({ modelId: "oss-style-krea2", inputs: { images: [a, b] } });expect(styleRefLimit("open", getModel)).toBe(2);expect(styleRefLimit("cloud", getModel)).toBe(3);// The cloud picture model reads the references and the sources.diff --git a/tests/genjutsu.test.ts b/tests/genjutsu.test.tsindex 99b3a97a..7af8ed79 100644--- a/tests/genjutsu.test.ts+++ b/tests/genjutsu.test.ts@@ -104,7 +104,7 @@ describe("Genjutsu: which model runs", () => {}expect(withoutOwnGpu("Wan Animate 2 at 480p in 4 steps · free on your GPU (24 GB) · Apache-2.0")).toBe("Wan Animate 2 at 480p in 4 steps · Apache-2.0");expect(withoutOwnGpu("MiniMax H3 + the swap LoRA on your GPU: SAM 3.1 picks the person · free · 48 GB+ advised")).toBe("MiniMax H3 + the swap LoRA: SAM 3.1 picks the person · 48 GB+ advised");- expect(withoutOwnGpu(MARKETING_IMAGE_NOTE.open)).toBe("Fuobe Original · Qwen-Image-Edit 2511");+ expect(withoutOwnGpu(MARKETING_IMAGE_NOTE.open)).toBe("Fuobe Original · Qwen-Image 2.1");expect(withoutOwnGpu("Lip sync · free on your GPU (24 GB), or hosted on fal")).toBe("Lip sync · hosted on fal");});diff --git a/tests/marketing-api.test.ts b/tests/marketing-api.test.tsindex accf57d8..493ac26e 100644--- a/tests/marketing-api.test.ts+++ b/tests/marketing-api.test.ts@@ -44,6 +44,7 @@ const creativeRoute = await import("@/app/api/ads/creatives/[id]/route");const saveRoute = await import("@/app/api/ads/creatives/[id]/save/route");const { saveFile } = await import("@/server/storage");const { getModel } = await import("@/lib/catalog");+const { TEMPLATES } = await import("@/lib/catalog/marketing");const json = (method: string, body?: unknown, url = "http://x/api") =>new Request(url, { method, headers: { "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body) });@@ -259,7 +260,7 @@ describe("brand kits", () => {const cloudAd = mk.planMarketing({ engine: "cloud", format: "ads", templateId: "ad-hero-headline" }, ctx);const r = cloudAd.steps[0].request;expect(r).toMatchObject({ modelId: "fuobe-marketing-image", engine: "cloud", op: "edit", feature: "marketing", params: { aspectRatio: "4:5", numOutputs: 1 } });- expect(r.prompt).toMatch(/no text, letters/);+ expect(r.prompt).toMatch(/A clean, uncluttered picture of the scene and the subject alone, with calm, uncluttered space in the lower third for the headline/);expect(r.prompt).not.toContain("“Meet Maple Pecan Granola”");expect(r.inputs?.images).toEqual([product.images[0]]);expect(r.params?.extra).toBeUndefined();@@ -272,21 +273,24 @@ describe("brand kits", () => {expect(g).toMatchObject({ modelId: "gpt-image-2-5", op: "edit", feature: "marketing", params: { aspectRatio: "4:5", numOutputs: 1 } });expect(g.prompt).toContain("“Meet Maple Pecan Granola”");expect(g.prompt).toContain("“Shop now”");+ expect(g.prompt).toMatch(/the headline and the button are the only added lettering, every word spelled exactly as written/);expect(g.inputs?.images).toEqual([product.images[0]]); // the SVG logo isn't sent to the modelexpect(gptAd.meta.overlay).toBeNull();const openAd = mk.planMarketing({ engine: "open", format: "ads", templateId: "ad-hero-headline", headline: "Crunch, sorted" }, ctx);expect(openAd.steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", engine: "open", op: "edit" });- expect(openAd.steps[0].request.prompt).toMatch(/no text, letters/);+ expect(openAd.steps[0].request.prompt).toMatch(/A clean, uncluttered picture of the scene and the subject alone/);expect(openAd.meta.overlay).toEqual({ headline: "Crunch, sorted", cta: "Shop now" });- expect(openAd.notes).toContain("Qwen-Image-Edit keeps your first photo's shape on your GPU");+ expect(openAd.notes).toContain("Qwen-Image 2.1 keeps your first photo's shape on your GPU");- // A poster without a product: Qwen-Image 2512 (the Original's text-to-image) by default, Ideogram 3.0 with the palette when picked.+ // A poster without a product: the Original's text-to-image by default; Ideogram 4.5 first among the partners.const poster = mk.planMarketing({ engine: "cloud", format: "poster", templateId: "po-swiss-grid", prompt: "Autumn launch" }, { ...ctx, product: null });expect(poster.steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "t2i" });expect(poster.steps[0].request.params?.palette).toBeUndefined();- const ideogram = mk.planMarketing({ engine: "cloud", format: "poster", templateId: "po-swiss-grid", prompt: "Autumn launch", modelId: "ideogram-3" }, { ...ctx, product: null });- expect(ideogram.steps[0].request).toMatchObject({ modelId: "ideogram-3", op: "t2i", params: { palette: b.colors.slice(0, 5) } });+ const ideogram = mk.planMarketing({ engine: "cloud", format: "poster", templateId: "po-swiss-grid", prompt: "Autumn launch", modelId: "ideogram-4-5" }, { ...ctx, product: null });+ expect(ideogram.steps[0].request).toMatchObject({ modelId: "ideogram-4-5", op: "t2i" });+ // Ideogram 3.0 is no longer offered: asking for it runs the Original.+ expect(mk.planMarketing({ engine: "cloud", format: "poster", templateId: "po-swiss-grid", prompt: "Autumn launch", modelId: "ideogram-3" }, { ...ctx, product: null }).steps[0].request.modelId).toBe("fuobe-marketing-image");expect(mk.planMarketing({ engine: "open", format: "poster", prompt: "Autumn" }, { ...ctx, product: null }).steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "t2i" });// A Standalone product shot: the Original by default; on the user's GPU one product photo is cut out and relit@@ -304,11 +308,15 @@ describe("brand kits", () => {expect(() => mk.planMarketing({ engine: "cloud", format: "product-with-model" }, { ...ctx, product: null })).toThrow("Attach reference or product");expect(() => mk.planMarketing({ engine: "cloud", format: "ads", templateId: "po-swiss-grid" }, ctx)).toThrow(/another format/);- // Open motion longer than a clip: shots from the product photo, then a join.+ // Open motion: MiniMax H3 makes up to 15 s in one clip with its own sound.const motion = mk.planMarketing({ engine: "open", format: "motion-hyper", templateId: "mh-orbit-hero", duration: 15 }, ctx);- expect(motion.steps.map((s) => s.key)).toEqual(["shot1", "shot2", "shot3", "film"]);- expect(motion.steps[0].request).toMatchObject({ modelId: "oss-wan22-14b-fast", op: "i2v", params: { duration: 5, aspectRatio: "9:16" }, feature: "marketing-step" });- expect(motion.steps[3]).toMatchObject({ after: ["shot1", "shot2", "shot3"], request: { modelId: "oss-join-clips", op: "concat", feature: "marketing" } });+ expect(motion.steps.map((s) => s.key)).toEqual(["shot1"]);+ expect(motion.steps[0].request).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v", params: { duration: 15, aspectRatio: "9:16", generateAudio: true }, feature: "marketing" });+ // Wan 2.2 Lightning stays a choice: longer motion is shots from the product photo, then a join.+ const wan = mk.planMarketing({ engine: "open", format: "motion-hyper", templateId: "mh-orbit-hero", duration: 15, modelId: "oss-wan22-14b-fast" }, ctx);+ expect(wan.steps.map((s) => s.key)).toEqual(["shot1", "shot2", "shot3", "film"]);+ expect(wan.steps[0].request).toMatchObject({ modelId: "oss-wan22-14b-fast", op: "i2v", params: { duration: 5, aspectRatio: "9:16" }, feature: "marketing-step" });+ expect(wan.steps[3]).toMatchObject({ after: ["shot1", "shot2", "shot3"], request: { modelId: "oss-join-clips", op: "concat", feature: "marketing" } });const cloudMotion = mk.planMarketing({ engine: "cloud", format: "motion-hyper", duration: 15 }, ctx);expect(cloudMotion.steps).toHaveLength(1);expect(cloudMotion.steps[0].request).toMatchObject({ modelId: "seedance-2-5", op: "i2v", params: { duration: 12 } });@@ -337,6 +345,39 @@ describe("brand kits", () => {expect(open.steps[0].request).toMatchObject({ modelId: "oss-chatterbox", inputs: { voiceAudio: expect.stringMatching(/^\/api\/files\//) } });expect(open.steps[2].request.modelId).toBe("oss-infinitetalk-long");expect(open.steps[3].request.prompt).toMatch(/^0\.00-\d+\.\d\d: Okay so I/);+ // On your GPU the presenter is a Qwen-Image 2.1 Turbo edit of the photos (up to 4), or Qwen-Image 2.1 from the words.+ expect(open.steps[1].request).toMatchObject({ modelId: "oss-qwen-image-21-turbo", op: "edit", inputs: { images: [product.images[0]] } });+ const avatar = upload("me.png");+ const reference = upload("place.png");+ const withAvatar = mk.planMarketing({ engine: "open", format: "ugc-talking", hookId: "product-hit", avatar, reference, voiceSample: upload("voice.png") }, { product, brand: b, script });+ expect(withAvatar.steps.find((s) => s.key === "still")!.request.inputs?.images).toEqual([avatar, product.images[0], reference]);+ // The hook and the close-up are 5 s MiniMax H3 clips; the join keeps the presenter's voice as the only sound.+ expect(withAvatar.steps.find((s) => s.key === "hook")!.request).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v", params: { duration: 5 } });+ expect(withAvatar.steps.find((s) => s.key === "broll")!.request).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v", params: { duration: 5 } });+ expect(withAvatar.steps.find((s) => s.key === "film")).toMatchObject({ after: ["hook", "captions", "broll"], request: { modelId: "oss-join-sound2" } });+ const words = mk.planMarketing({ engine: "open", format: "ugc-talking", hookId: null, voiceSample: upload("voice.png") }, { product: null, brand: b, script });+ expect(words.steps.find((s) => s.key === "still")!.request).toMatchObject({ modelId: "oss-qwen-image-21", op: "t2i" });+ expect(words.steps.find((s) => s.key === "still")!.request.inputs).toBeUndefined();+ });++ it("words every picture as what is wanted: a clean picture with room for the words, or the words as the only added lettering", () => {+ const b = brand.getBrand(brandId)!;+ const product = brand.listProducts(brandId)[0];+ const NEGATION = /\b(no|not|never|without|none|nothing|avoid|don't|do not|free of)\b/i;+ let checked = 0;+ for (const format of ["ads", "poster", "marketplace"] as const) {+ for (const tpl of TEMPLATES.filter((t) => t.format === format)) {+ for (const engine of ["cloud", "open"] as const) {+ for (const modelId of [undefined, "gpt-image-2-5"]) {+ if (engine === "open" && modelId) continue;+ const plan = mk.planMarketing({ engine, format, templateId: tpl.id, ...(modelId && { modelId }) }, { product, brand: b });+ expect(plan.steps[0].request.prompt, `${tpl.id} ${engine} ${modelId ?? ""}`).not.toMatch(NEGATION);+ checked++;+ }+ }+ }+ }+ expect(checked).toBeGreaterThan(20);});it("runs a template in demo mode and lists the run with its generations", async () => {@@ -394,11 +435,25 @@ describe("Click to Ad", () => {expect(cloud.steps.find((s) => s.key === "mux")).toMatchObject({ after: ["film", "voice"], chain: [{ slot: "video" }, { slot: "audio" }], request: { modelId: "merge-audio-video" } });expect(() => mk.planClickToAd({ engine: "open", productId: product.id, styleId: "luxury" }, { product, script })).toThrow(/voice sample/);const open = mk.planClickToAd({ engine: "open", productId: product.id, styleId: "luxury", voiceSample: upload("s.png") }, { product, script });- expect(open.steps.filter((s) => s.key.startsWith("shot")).map((s) => s.request.params?.duration)).toEqual([5, 5]);+ // MiniMax H3 on the GPU: two 5 s shots (two angles), joined with the picture only; the voiceover is the sound.+ const shots = open.steps.filter((s) => s.key.startsWith("shot"));+ expect(shots.map((s) => [s.request.modelId, s.request.params?.duration])).toEqual([+ ["oss-minimax-h3", 5],+ ["oss-minimax-h3", 5],+ ]);+ expect(open.steps.find((s) => s.key === "film")!.request.modelId).toBe("oss-join-clips");+ expect(open.steps.find((s) => s.key === "mux")).toMatchObject({ after: ["film", "voice"], chain: [{ slot: "video" }, { slot: "audio" }], request: { modelId: "oss-mux" } });+ expect(mk.clickToAdSeconds("open", false).voice).toBeCloseTo(9.4, 5);expect(open.steps.at(-1)!.request).toMatchObject({ modelId: "oss-captions-burnin", feature: "click-to-ad" });const presenter = mk.planClickToAd({ engine: "cloud", productId: product.id, styleId: "simple-ugc" }, { product, script });expect(presenter.steps.map((s) => s.key)).toEqual(["voice", "still", "talk", "captions", "broll", "film"]);expect(mk.clickToAdSeconds("cloud", true)).toEqual({ voice: 8, broll: 4 });+ // On the GPU the close-up is a 5 s H3 clip, so the voice gets 7 s: the ad stays at 12 s.+ expect(mk.clickToAdSeconds("open", true)).toEqual({ voice: 7, broll: 5 });+ const openPresenter = mk.planClickToAd({ engine: "open", productId: product.id, styleId: "simple-ugc", voiceSample: upload("p.png") }, { product, script });+ expect(openPresenter.steps.find((s) => s.key === "broll")!.request).toMatchObject({ modelId: "oss-minimax-h3", op: "i2v", params: { duration: 5 } });+ // The open join keeps the presenter's own voice as the film's only sound.+ expect(openPresenter.steps.find((s) => s.key === "film")!.request.modelId).toBe("oss-join-sound1");});it("writes a script offline within the word budget", async () => {diff --git a/tests/model-access-studios.test.ts b/tests/model-access-studios.test.tsindex a58d347d..247761e2 100644--- a/tests/model-access-studios.test.ts+++ b/tests/model-access-studios.test.ts@@ -91,7 +91,7 @@ describe("a studio's default on the server", () => {const settings = { engine: "cloud" as const, animation: "animated" } as Parameters<typeof withOfferedVideo>[0];expect(withOfferedVideo(settings)).toBe(settings);changeAccess([{ kind: "model", id: "gemini-omni-flash", on: false }]);- expect(withOfferedVideo(settings).videoModel).toBe("seedance-2-5");+ expect(withOfferedVideo(settings).videoModel).toBe("minimax-h3");// A pick stays the pick.expect(withOfferedVideo({ ...settings, videoModel: "gemini-omni-flash" }).videoModel).toBe("gemini-omni-flash");});diff --git a/tests/model3d.test.ts b/tests/model3d.test.tsindex 5d28a21d..d0331b30 100644--- a/tests/model3d.test.ts+++ b/tests/model3d.test.ts@@ -337,7 +337,7 @@ describe("open engine: TripoSplat (image-to-splat-triposplat)", () => {});});-describe("open engine: text to 3D as a Z-Image Turbo still, then TRELLIS.2", () => {+describe("open engine: text to 3D as a Qwen-Image 2.1 still, then TRELLIS.2", () => {async function settle(id: string, ms = 40_000) {const until = Date.now() + ms;for (;;) {@@ -352,8 +352,9 @@ describe("open engine: text to 3D as a Z-Image Turbo still, then TRELLIS.2", ()const req = m3d.model3dRequest({ engine: "open", mode: "text", prompt: "A brass lantern." });expect(gens.previewGeneration(req)).toMatchObject({ op: "text-to-3d", costUsd: 0 });const [built, still] = gens.createGenerations(req);- expect(still).toMatchObject({ feature: "image-to-3d-step", modelId: "oss-z-image-turbo", op: "t2i" });- expect(still.prompt).toMatch(/^A brass lantern\. A single object, whole and centred/);+ expect(still).toMatchObject({ feature: "image-to-3d-step", modelId: "oss-qwen-image-21", op: "t2i" });+ expect(still.request.params).toMatchObject({ aspectRatio: "1:1", resolution: "1K" });+ expect(still.prompt).toMatch(/^A brass lantern\. The object alone, whole and centred/);expect(built).toMatchObject({ feature: "image-to-3d", modelId: "oss-trellis2", op: "image-to-3d", status: "queued" });expect(built.batchId).toBe(still.batchId);const dep = (db().prepare("SELECT depends_on FROM generations WHERE id = ?").get(built.id) as { depends_on: string }).depends_on;@@ -370,7 +371,7 @@ describe("open engine: text to 3D as a Z-Image Turbo still, then TRELLIS.2", ()const steps = gens.createGenerations({ feature: "image-to-3d", modelId: "oss-text-trellis2", prompt: "a brass lantern" });expect(steps.map((g) => [g.modelId, g.op])).toEqual([["oss-trellis2", "image-to-3d"],- ["oss-z-image-turbo", "t2i"],+ ["oss-qwen-image-21", "t2i"],]);// A photo sent along has no place in this route: the model is built from the still alone.const [built] = gens.createGenerations({ feature: "image-to-3d", modelId: "oss-text-trellis2", prompt: "a brass lantern", inputs: { images: ["/api/files/p.png"] } });@@ -390,7 +391,7 @@ describe("open engine: text to 3D as a Z-Image Turbo still, then TRELLIS.2", ()it("writes the still prompt for a clean cut-out", () => {expect(m3d.stillPromptFor3d(" a ceramic teapot... ")).toBe(- "a ceramic teapot. A single object, whole and centred, seen from the front at eye level, on a plain light grey background, soft even studio light, no other objects, no text",+ "a ceramic teapot. The object alone, whole and centred, seen from the front at eye level, on a plain light grey background, soft even studio light",);});});diff --git a/tests/open-sota-studios.test.ts b/tests/open-sota-studios.test.tsindex de25be68..2be62b3e 100644--- a/tests/open-sota-studios.test.ts+++ b/tests/open-sota-studios.test.ts@@ -146,7 +146,7 @@ describe("apps and tools pick the new models first", () => {});it("Canvas' Effects 2.0 chains set the scene on Qwen-Image 2.1 on your GPU", () => {- expect(EFFECT_CHAIN_MODELS.edit).toEqual({ cloud: "qwen-image-edit-2511-cloud", open: "oss-qwen-image-21" });+ expect(EFFECT_CHAIN_MODELS.edit).toEqual({ cloud: "qwen-image-edit-2511-cloud", open: "oss-qwen-image-21-turbo" });});it("Photodump, Fashion Factory and Character swap offer Qwen-Image 2.1 before Qwen-Image-Edit 2511", () => {