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
Auto: Krea 2 Realism first, MOSS-Image for lettering, each the other's fallback
Adarsh61056e148061
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 03ec1006..4edb3e93 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -69,7 +69,7 @@ Feed, Library, studios (React Query caches patched by id; polls every 10 s while| `studio-packs.generated.ts` | Round 4 part 5. The 14 Photodump / Instadump packs and the 6 Fashion Factory templates (name, photo or shot count, description). **Generated** by `scripts/gen-studio-packs.py` from the research in `parity-image-studios.json`. It replaces the retired provider's generated presets file, which went with its generated models file and their generators (see Retired models); the Soul preset fallback list and `presetPrompt` left `packs.ts` with it || `replaced.ts` | Round 4 part 5 (O7). What replaced each retired model, training target and lost operation, pure and browser-safe: `REPLACED_BY` (12 model ids → the model that does the job now, with `was`, the name it ran under, a `note`, and `original`, `ops`, `withReferences` and `director` where they apply), `TRAINING_REPLACED_BY`, `OPS_REPLACED_BY`, `replacedBy`, `currentModelId`, `replacementOf` and `migrateRequest` (see Retired models) || `models.ts` | Open-source models (ComfyUI workflow ids), fal utility models (Join clips, and the hidden Extract frame, Crop to size, Mix voice and music, Level audio, Forced Alignment), the browser-only models (`local` provider: Color Grade, Ad compositor) + the generated cloud lists (whose hidden chain helpers include Trim video, Add soundtrack, Voice timeline and Extract soundtrack). A launch price (`Pricing.promo`) stays beside the list price (see `promo.ts`): the catalog never reads the clock. Since round 4 part 3 `MODELS` starts with the Fuobe Originals: `original()` joins each one's ComfyUI routes to its generated cloud half. Since round 4 part 5 the cloud list is `CLOUD_MODELS` and the cloud tools only (no retired provider's models or routes are joined, and the hand-written `ai-influencer` is gone), and two hidden open models run Character Swap Studio's graphs: `oss-h3-swap-segment` (`video-swap` on `video-character-swap-h3-segment`) and `oss-h3-person-mask` (`bg-remove-video` on `video-mask-h3-relay`). Since round 5 part 1 `originals` holds the eight new Originals' GPU halves, `oss-video-depth-vda-large` joins the open list, the hidden `oss-face-mosaic` (`face-mosaic` on `image-face-mosaic-sam3`) is the face mosaic's GPU step, and `oss-tryon-klein` carries the try-on LoRA in `ModelOptions.loras`, so its switch governs it. Since round 5 part 2 the open list gains `oss-moss-image` (MOSS-Image, `t2i` on `moss-image-t2i`; layout `moss`; a Quality control whose values each stand for several settings through `controls[].sets`, `MOSS_QUALITY`: Standard 25 steps, CFG 2.5, `er_sde`; Best 50 steps, CFG 3, euler; Fast 8 steps, CFG 1 on the 8-step DMD file) and `oss-dbs-separate` (DBS, `separate-audio` on `separate-soundtrack-dbs`: `separationModel`, Fast or Best, with no default so the host picks, and `channels`), and the hidden `oss-uni3c-path` (Wan 2.1 + Uni3C, `camera-path` on `wan21-i2v-uni3c-path`, which needs the still and the path's render: `requires.video`). Round 5 part 3 adds 16 open models (Kandinsky 6.0, Kandinsky VSR and VRMBG 3.0 are also hosted, as separate cloud models; the cloud's Bria matte is VRMBG 3.0): `oss-kandinsky6` (`t2v` on `kandinsky6-t2av`, `i2v` on `kandinsky6-i2av`; 5 s at 480p with sound; Quality Lite or Pro sets the transformer file through `controls[].sets`; an opt-in Prompt helper), `oss-kandinsky6-vsr` (`upscale-video` on `video-upscale-kandinsky6-vsr`, 2x, 2.25x or 4x, `maxSourceSeconds` 5), the three NVIDIA RTX Video models of `rtx-video.ts`, `oss-video-key-corridorkey` (CorridorKey 2.0 on `video-key-corridorkey`, `greenScreen`: the cut-out, its mask or the clean foreground, as WebM, ProRes 4444 or EXR), `oss-video-matte-vrmbg3` (Bria VRMBG 3.0 on `video-matte-vrmbg3`, gated weights placed by hand), `oss-matte-feynobg` (FeyNoBg fine hair on `image-matte-feynobg`), `oss-auk` (Tencent AuK: `speech-edit` on `speech-edit-auk`, `tts` on `speech-tts-auk`), `oss-idol-mesh` (Idol 3D quick mesh, `image-to-3d` on `image-to-mesh-idol`) and six hidden helpers: `oss-hi3d-refine` (`refine-3d` on `mesh-refine-hi3d`), `oss-hy-nomas-world` (`world-turn` on `world-hy-nomas-turn`), `oss-person-mask` (SAM 3.1, `bg-remove` on `image-person-mask-sam3`), and `oss-worldcast`, `oss-depth-pro` and `oss-vggt-omega`, whose routes go to the `worldcast` provider (endpoints `cases`, `depth/depth-pro`, `depth/vggt-omega`) and whose licences are in `ModelDef.licence`. `oss-minimax-h3` gains a `ref2v` and an `avatar` route on `minimax-h3-flex-ref2va` (Pika H3 Flex), the Quality value `flex` (the 6-step Flex graphs), `maxImages` 9, `maxVideos` 3 and `maxAudios` 3, and `finishTiers: ["2K"]` only while Regenerate is offered (`REGEN_OFFERED`, false). `oss-pixal3d`, `oss-trellis2`, `oss-hunyuan3d-21`, `oss-trellis2-multi` and `oss-idol-mesh` carry the "Refine detail · Hi3D 1.0" control (`params.extra.hi3dRefine`) |-| `../auto-image.ts` | Auto (`oss-auto-image`), the Image studio's open default: a catalog entry whose routes are its picks' own (so the picker, the price and the GPU pre-flight read them), never run as itself. `autoCandidates` picks the model for a request (a picture to work from → the edit model for its operation; lettering → Ideogram 4; a line of the owner's `autoImagePatterns` setting → Krea 2 Realism; else Ideogram 4), and `src/server/generations.ts` `autoRouted` plans the first that is switched on and keeps the pick in `GenerationRequest.auto`, so a run planned again goes to the same model. When Ideogram 4 declines a run of Auto (every picture its grey card), `declinedAgain` makes it with `AUTO_FALLBACKS` (Krea 2 Realism, FIBO 2 Dev, MOSS-Image) in order, each only after the one before fails (`declinedFails`), on the same row, hold and admission. `autoLine` is the line the feed card, the run details, the Library and Accounts' runs show |+| `../auto-image.ts` | Auto (`oss-auto-image`), the Image studio's open default: a catalog entry whose routes are its picks' own (so the picker, the price and the GPU pre-flight read them), never run as itself. `autoCandidates` picks the model for a request (a picture to work from → the edit model for its operation; lettering → MOSS-Image, then Krea 2 Realism; a line of the owner's `autoImagePatterns` setting, and anything else → Krea 2 Realism, then MOSS-Image; never Ideogram 4 or FIBO 2 Dev for text to image), and `src/server/generations.ts` `autoRouted` plans the first that is switched on and keeps the pick in `GenerationRequest.auto`, so a run planned again goes to the same model (while it is one of Auto's models for the operation). When a text-to-image run of Auto fails on its model (a job failure, not reaching the GPU), `autoFails` hands it to `declinedAgain`, which makes it with Auto's next model (`autoNext`, each model at most once, `why: "fallback"`), on the same row, hold and admission. Ideogram 4 picked by name, when it declines a run (every picture its grey card), goes the same way through `DECLINED_FALLBACKS` (Krea 2 Realism, FIBO 2 Dev, MOSS-Image), each only after the one before fails (`declinedFails`). `autoLine` is the line the feed card, the run details, the Library and Accounts' runs show || `llm-models.ts` | `text-llm` (cloud: Claude, else a local model) and `oss-text-llm` (open: a local model only, never Claude, route endpoint `ollama`; since round 4 its translations run on ComfyUI's Qwen3.5 4B, `oss-qwen35-translate`, when no local model server is ready), kind `text`, ops `translate` and `write` || `elements.ts` | Elements (character / location / prop / style / voice), `@handle` parsing and `applyMentions`; since round 4 part 4 an element holds up to 80 photos (`MAX_ELEMENT_PHOTOS`) and a mention brings its trained LoRA to every model of the LoRA's family on either engine (`identityFor`); since round 4 part 5 an older Soul ID (the retired provider's `referenceId`) goes to no model; the element shows "Older Soul ID" with "Retrain for Fuobe Soul" (nothing retrains by itself) || `sketch.ts` | `applySketch` (masks and drawings → the right operation and inputs) |diff --git a/docs/FEATURES.md b/docs/FEATURES.mdindex 967b2959..eb030e86 100644--- a/docs/FEATURES.md+++ b/docs/FEATURES.md@@ -61,7 +61,7 @@ Fuobe is a complete creative studio you can run yourself: 108 camera motions, 25- **MOSS-Image** (Image studio → model menu → MOSS-Image) — OpenMOSS's picture model, made for Chinese and English text in pictures. In the cloud it runs on fal at $0.05 per megapixel, up to 4 images (fal's safety checker returns a black image when it flags an output). On your GPU it is free, on ComfyUI's built-in nodes, with about 15 GB of files and 16 GB of VRAM (a guess); **Options → Quality** picks Standard (25 steps), Best (50), Fast (8 steps, an extra 5.4 GB file) or Base model (MOSS-Image Base, 50 steps, an extra 5.4 GB file). Its text encoder is the int8 Qwen3.5-9B: the w4a8 build in ComfyUI's template crashed the graphics driver on a test PC. The Image studio's controls chip now reads **Options** (it read "Director"). Text placed in boxes: the Image studio's Layout mode draws the boxes on the picture, and `src/lib/layout-prompt.ts` turns them into MOSS's prompt- **Film look** (Image studio and Canvas, MOSS-Image → Film look) — film and camera looks for MOSS-Image on both engines, in eight groups (colour film, slide, black and white, instant, motion picture, toy and odd cameras, grades, broken film), each with a thumbnail from its own test render. The server adds the picked look when the picture is made: the look's words before and after the prompt, and the look's opposite in the negative prompt beside MOSS-Image's own. A black-and-white look first takes the colour words out of the prompt (an LLM rewrite, then a word list; the word list alone when no LLM answers). The prompt box keeps the person's words, and Reuse applies the look again. Enhance, Assist (`film_look`) and the `moss-film-looks` skill write MOSS prompts by the same rules. Looks live in `src/lib/film-looks.ts`; a layout runs without a look- **The newest open image models, first on your GPU** — Ideogram 4, Qwen-Image 2.1 and its Turbo, Krea 2 (Realism, Turbo, Edit, Identity Edit, Image to image, Inpaint) and FIBO 2 (Dev, Edit Turbo), from the owner's ComfyUI workflows. On the open engine the Image studio opens on Auto (next item) and Edit and Inpaint on Qwen-Image 2.1; every model menu's "Best" list puts the new models first (text to image: Ideogram 4, Qwen-Image 2.1, Krea 2 Realism, MOSS-Image, then FIBO 2 Dev; edits: Qwen-Image 2.1, its Turbo, FIBO 2 Dev and Edit Turbo, then Krea 2 Edit), and so do apps, Layers, Canvas, Cinema stills, Photodump, Fashion Factory and Character swap's anchor. Apps and tools that run a LoRA trained on an older model keep it (Angles, Relight, Product shot, Try-On, Cinema's recompose). Ideogram 4 reads a JSON caption, which Fuobe writes from your words (with your local LLM, never a paid API; a plain caption without one) and keeps as the run's prompt. When Ideogram's safety filter sends its grey card for every picture of a run, the run is made once more with a new seed, then with Qwen-Image 2.1, before it fails and says what to try; the card is kept for the owner to look at. Soul Location doesn't offer Ideogram 4 (pictures of empty places hit that filter most), and a new Layers layer starts on Qwen-Image 2.1. Qwen-Image 2.1, FIBO 2 and Krea 2 Edit take up to 4 references (Krea 2 Edit 2) and leave out the ones you don't give; an edit keeps image 1's shape and size, so Edit and Inpaint show no aspect or size choice for them, and Qwen-Image 2.1's inpaint and expand take the picture alone. An app run made before an app moved to Qwen-Image 2.1 (a retry, Run again, Reuse) runs on Qwen-Image 2.1 and says so. About 92 GB of new files, 20–24 GB of VRAM (estimates), ComfyUI 0.42.0; Krea 2 runs Comfy-Org's fp8 Krea 2 Turbo, the file the owner's edit workflow loads. Krea 2 Inpaint also needs the ComfyUI-Krea2-Ostris-Edit node pack, so it isn't in Inpaint's "Best" list. Qwen-Image 2.1, Ideogram 4 and FIBO 2 weights are non-commercial. None of the 16 graphs has rendered through Fuobe yet-- **Auto, the Image studio's first pick on your GPU** — Auto picks the open model for each run, for everyone (the owner, accounts, and a guest's draft): a run with a picture to work from goes to the edit model for its operation (Qwen-Image 2.1), lettering, posters, logos and signs to Ideogram 4, prompts that Ideogram 4's safety filter often declines to Krea 2 Realism, and everything else to Ideogram 4. Those prompts are a list the owner edits in Settings → Auto image model (one word, phrase or pattern per line; a built-in list to start with). When Ideogram 4 declines a run of Auto, Krea 2 Realism, then FIBO 2 Dev, then MOSS-Image make the same run, each only if the one before fails; it is still one run for limits and billing. The tile, the run details and the Library say what made it ("Auto · made with Krea 2 Realism · Ideogram 4 declined this one"), and the price before Run is the picked model's. Picking a model by name always runs that model. On a declined run the owner also sees the words it declined and "Add a pattern", which puts a line on that list+- **Auto, the Image studio's first pick on your GPU** — Auto picks the open model for each run, for everyone (the owner, accounts, and a guest's draft): a run with a picture to work from goes to the edit model for its operation (Qwen-Image 2.1), lettering, posters, logos and signs (real words asked for, such as a poster that says "OPEN") to MOSS-Image, which follows the words and draws them in place, then Krea 2 Realism; and every other prompt to Krea 2 Realism, then MOSS-Image. Auto never picks Ideogram 4 or FIBO 2 Dev for a picture from words; both stay in the model menus to pick by hand. A list the owner edits in Settings → Auto image model (one word, phrase or pattern per line; a built-in list to start with) also starts on Krea 2 Realism, and the run details name the line it matched. When Auto's first model is switched off or can't run there, the run is planned on the other; when it fails, the other one makes the same run, each model at most once; it is still one run for limits and billing, with nothing charged again. The tile, the run details and the Library say what made it ("Auto · made with Krea 2 Realism", or "Auto · made with MOSS-Image · Auto's next model" when the other one made it), and the price before Run is the picked model's. Picking a model by name always runs that model; when Ideogram 4 picked by name declines a run, Krea 2 Realism, FIBO 2 Dev, then MOSS-Image make it, and the owner sees the words it declined and "Add a pattern", which puts a line on that list- **Kandinsky 6.0** (Video studio → model menu, both engines) — Kandinsky Lab's model makes 5 s clips at 480p with sound and lip-synced dialogue, from words or a first frame. Words in quotes are what someone says, and a closing `Sound:` line sets the sound. On your GPU it is free, on Kandinsky Lab's own node packs: **Options → Quality** picks Lite (10 steps, the default; about 24 GB of VRAM, an estimate) or Pro (about 80 GB, with an extra 60 GB file), and the Prompt helper (an extra 19 GB file) writes a fuller caption first. In the cloud it runs on fal: Pro or Lite at Fast, Standard or Best steps (Pro · Standard, the default, $0.56 a clip; Lite from $0.08; Pro · Best $1.35). Lipsync & avatars links a talking character from words to the Video studio on Kandinsky. **Kandinsky VSR** (Upscale → Video, both engines) upscales clips up to 5 s by 2x, 2.25x (the default, 480p to 1080p) or 4x, about $0.09 for 5 s of 480p to 1080p on fal- **Pika H3 Flex** (your GPU only) — Pika's add-on that makes MiniMax H3 clips in 6 steps. In the Video studio, MiniMax H3's Quality offers **Fast · Pika Flex (6 steps)** for words and first and last frames, and a **References** chip takes up to 9 images, 3 clips and 3 voice or music clips (Image N, Clip N and Voice N in the prompt). Cinema's reference takes and "Talk from a voice clip" in Lipsync & avatars use it too. 32 GB of VRAM recorded, not measured. No hosted service offers the add-on, so the cloud keeps hosted MiniMax H3 under its own name. MiniMax H3's other choices now read "Standard · 8 steps" and "Sharper · 20 steps"- **One sheet** (Storyboard) and **Re-render from layers** (Layers) — One sheet draws up to 8 panels on one picture with MOSS-Image (your GPU or fal), then cuts it into frames, each with Animate and Edit; it stays the owner's until a GPU test is recorded. Re-render from layers (desktop) repaints the layers as one picture, which lands as a new top layer: MOSS-Image on both engines, Ideogram 4.5 and FLUX.3 in the clouddiff --git a/src/components/add-auto-pattern.tsx b/src/components/add-auto-pattern.tsxindex 04d2d901..98e09a5a 100644--- a/src/components/add-auto-pattern.tsx+++ b/src/components/add-auto-pattern.tsx@@ -20,8 +20,8 @@ export function withAutoPattern(saved: string, line: string): string | null {/*** The owner's "Add a pattern" on a run Ideogram 4 declined: a word, phrase or pattern (the words selected on the page, to- * start with) goes on Auto's list in Settings, so Auto sends such prompts to Krea 2 Realism next time. Owner only: the- * settings it changes are the owner's (an account gets a 403).+ * start with) goes on Auto's list in Settings, so Auto starts such prompts on Krea 2 Realism and their run details name+ * the line. Owner only: the settings it changes are the owner's (an account gets a 403).*/export function AddAutoPattern({ className }: { className?: string }) {const [line, setLine] = useState<string | null>(null);diff --git a/src/components/auto-patterns-setting.tsx b/src/components/auto-patterns-setting.tsxindex 88e3cf3b..2f71e3e2 100644--- a/src/components/auto-patterns-setting.tsx+++ b/src/components/auto-patterns-setting.tsx@@ -7,9 +7,9 @@ import type { PublicSetting } from "@/components/connect-field";import { autoPatternsProblems, DEFAULT_AUTO_PATTERNS } from "@/lib/auto-image";/**- * Settings → Auto image model: the prompts Auto sends to Krea 2 Realism straight away (Ideogram 4's safety filter often- * declines them), one per line. The owner's only, as every setting is. Saving checks each line; Reset puts the built-in- * list back.+ * Settings → Auto image model: the prompts Auto starts on Krea 2 Realism (as it does every plain prompt), whose run+ * details name the line they matched, one per line. The owner's only, as every setting is. Saving checks each line;+ * Reset puts the built-in list back.*/export function AutoPatternsSetting({ setting, onSave, saving }: { setting: PublicSetting | undefined; onSave: (value: string) => void; saving: boolean }) {const saved = setting?.value ?? DEFAULT_AUTO_PATTERNS.join("\n");@@ -37,7 +37,7 @@ export function AutoPatternsSetting({ setting, onSave, saving }: { setting: Publ/><p className="text-[12px] leading-relaxed text-muted-foreground">One per line. A word or phrase matches as a whole word (a space or a hyphen matches either); any other line is a regular expression. Case- doesn’t matter, and a line that starts with # is a note. Prompts about lettering, posters or logos still go to Ideogram 4.+ doesn’t matter, and a line that starts with # is a note. Prompts about lettering, posters or logos still go to MOSS-Image first.</p>{problems.length > 0 && (<ul className="space-y-0.5 text-[12px] text-destructive">diff --git a/src/components/library/asset-card.tsx b/src/components/library/asset-card.tsxindex 5140c92f..898f6afb 100644--- a/src/components/library/asset-card.tsx+++ b/src/components/library/asset-card.tsx@@ -305,7 +305,7 @@ export const AssetCard = memo(function AssetCard({{/* "Rendering", as the Status filter calls it: "In progress" is a review status. */}{!stack && g.status !== "succeeded" && ` · ${listStatus(g)}`}</p>- {/* What made a run of Auto ("Auto · made with Ideogram 4"), and what changed while it ran ("Made with Krea 2 Realism · Ideogram 4 declined this one"). */}+ {/* What made a run of Auto ("Auto · made with Krea 2 Realism"), and what changed while it ran ("Made with Krea 2 Realism · Ideogram 4 declined this one" on Ideogram 4 picked by name). */}{!stack && autoLine(g) && <p className="truncate text-[12px] text-muted-foreground">{autoLine(g)}</p>}{!stack && g.request.notice && <p className="truncate text-[12px] text-muted-foreground">{g.request.notice}</p>}{/* An account's own GPU or key: the way out, in the row (its thumbnail is too small for it). */}diff --git a/src/components/run-details.tsx b/src/components/run-details.tsxindex 3c6aadcc..f8b8897b 100644--- a/src/components/run-details.tsx+++ b/src/components/run-details.tsx@@ -674,7 +674,7 @@ function Timeline({ t, status, progress, log }: { t: RunTiming; status: string;);}-/** How it was made: Auto's pick and why, Ideogram 4's declines (with what it returned), notices, and values made differently. */+/** How it was made: Auto's pick and why, Ideogram 4's declines (with what it returned) or Auto's next model, notices, and values made differently. */function MadeBy({ m, model, cards, prompt }: { m: RunMadeBy; model: RunDetails["model"]; cards?: AccountRun["declinedCards"]; prompt: string | null }) {if (!m.auto && !m.declined && !m.notices.length && !m.changes.length && !cards?.length) return null;return (@@ -687,7 +687,7 @@ function MadeBy({ m, model, cards, prompt }: { m: RunMadeBy; model: RunDetails["</Fact>)}{m.declined && (- <Fact label="Ideogram 4 declined">+ <Fact label={m.declined.cause === "failed" ? "Auto's next model" : "Ideogram 4 declined"}>{m.declined.words}{m.declined.askedModelName && m.declined.modelName && (<span className="block text-muted-foreground">diff --git a/src/components/settings-form.tsx b/src/components/settings-form.tsxindex dc16b4ce..02cbeba3 100644--- a/src/components/settings-form.tsx+++ b/src/components/settings-form.tsx@@ -802,7 +802,7 @@ export function SettingsForm({ prices }: { prices?: string }) {<Sectionid="auto-image"title="Auto image model"- description="Auto is the Image studio's first pick on the open engine: Ideogram 4 for most pictures and for lettering, Qwen-Image 2.1 for edits, and Krea 2 Realism for the prompts below, which Ideogram 4's safety filter often declines. When Ideogram 4 declines a run anyway, Krea 2 Realism, FIBO 2 Dev, then MOSS-Image make it."+ description="Auto is the Image studio's first pick on the open engine: Krea 2 Realism for every picture, MOSS-Image first for lettering, posters and logos, and Qwen-Image 2.1 for edits. When the first model is switched off, can't run or fails, the other one makes the same run, at no extra charge. Prompts that match the lines below start on Krea 2 Realism too, and their run details name the line."inactive={mode === "cloud" ? "Not used in Paid APIs only mode" : undefined}><AutoPatternsSetting setting={get("autoImagePatterns")} saving={save.isPending} onSave={set("autoImagePatterns")} />diff --git a/src/components/studio/made-note.tsx b/src/components/studio/made-note.tsxindex 32132e2d..09e8c2e0 100644--- a/src/components/studio/made-note.tsx+++ b/src/components/studio/made-note.tsx@@ -9,8 +9,8 @@ type NoteRun = Pick<Generation, "declinedCards" | "status" | "modelId" | "modelN/*** Under a run (the feed card, the run details): what made a run of Auto ("Auto · made- * with Krea 2 Realism · Ideogram 4 declined this one"), what changed while it ran (its notice: "Made with Krea 2 Realism ·- * Ideogram 4 declined this one"), and, for the owner's eyes only, what Ideogram 4 returned in place of a picture, for+ * with MOSS-Image · Auto's next model"), what changed while it ran (its notice: "Made with Krea 2 Realism ·+ * Ideogram 4 declined this one" on Ideogram 4 picked by name), and, for the owner's eyes only, what Ideogram 4 returned in place of a picture, for* which words. A setting a model makes differently is said before the run, where it can still be changed; after the run* the views show only the value it was made at (shownSettings), never a value the studio didn't offer.*/diff --git a/src/lib/auto-image.ts b/src/lib/auto-image.tsindex 60a21b4c..db4f3661 100644--- a/src/lib/auto-image.ts+++ b/src/lib/auto-image.ts@@ -11,16 +11,24 @@ import type { AutoPick, AutoWhy, Operation } from "./catalog/types";export const AUTO_IMAGE = "oss-auto-image";export const AUTO_NAME = "Auto";-/** Words, posters, logos and everything without a reason to go elsewhere. */-export const AUTO_TEXT_MODEL = "oss-ideogram-4";+/** Every plain prompt, an account's, a guest's or the owner's: natural skin, light and faces. */+export const AUTO_PHOTO_MODEL = "oss-krea2-realism";+/** Lettering (posters, logos, signs, words in quotes): MOSS-Image follows the words and draws them in place. */+export const AUTO_TEXT_MODEL = "oss-moss-image";/**- * When Ideogram 4 declines a run (its grey "blocked" card for every picture), the same run is made by these, in order,- * each only if the one before fails. A prompt that matches a pattern of the setting starts with the first of them.+ * Auto's text-to-image models, in order for a plain prompt; lettering takes them the other way round. When the first+ * is switched off or can't run here, the run is planned on the other; when it fails, the other makes the same run+ * (src/server/generations.ts autoFails), each model at most once.*/-export const AUTO_FALLBACKS = ["oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"] as const;+export const AUTO_T2I_MODELS = [AUTO_PHOTO_MODEL, AUTO_TEXT_MODEL] as const;+/**+ * Ideogram 4 picked by name (Auto never plans it): when it declines a run (its grey "blocked" card for every picture),+ * the same run is made by these, in order, each only if the one before fails.+ */+export const DECLINED_FALLBACKS = ["oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"] as const;/*** A run with a picture to work from goes to the studio's own default for its operation (the Edit and Inpaint studios'- * Qwen-Image 2.1), never to Ideogram 4. FIBO 2 Dev, which also edits, is next where Qwen-Image 2.1 is switched off.+ * Qwen-Image 2.1). FIBO 2 Dev, which also edits, is next where Qwen-Image 2.1 is switched off.*/export const AUTO_EDIT_MODELS: Readonly<Partial<Record<Operation, readonly string[]>>> = {edit: ["oss-qwen-image-21", "oss-fibo2-dev"],@@ -28,21 +36,24 @@ export const AUTO_EDIT_MODELS: Readonly<Partial<Record<Operation, readonly strinoutpaint: ["oss-qwen-image-21"],};-/** Every model Auto may plan a run on (a stored pick names one of these, or it is planned again). */-export const AUTO_MODELS: ReadonlySet<string> = new Set([AUTO_TEXT_MODEL, ...AUTO_FALLBACKS, ...Object.values(AUTO_EDIT_MODELS).flat()]);+/** The models Auto may plan an operation on: text to image on AUTO_T2I_MODELS, the others on AUTO_EDIT_MODELS. */+export const autoModelsFor = (op: Operation): readonly string[] => (op === "t2i" ? AUTO_T2I_MODELS : (AUTO_EDIT_MODELS[op] ?? []));++/** Every model Auto may plan a run on. */+export const AUTO_MODELS: ReadonlySet<string> = new Set([...AUTO_T2I_MODELS, ...Object.values(AUTO_EDIT_MODELS).flat()]);/**- * Prompts about lettering: what Ideogram 4 is made for. Words in quotes count too ("a sign that says “OPEN”").+ * Prompts about lettering, which go to MOSS-Image first. Words in quotes count too ("a sign that says “OPEN”").*/const TEXT_WORDS =/\b(text|texts|typography|typographic|typeface|font|fonts|lettering|letters|logo|logos|logotype|wordmark|monogram|poster|posters|signage|signs?|billboard|banner|headline|caption|calligraphy|graffiti|label|labels|menu|book cover|album cover|magazine cover|infographic|says|that reads)\b/i;const QUOTED = /["“”«»][^"“”«»\n]{2,80}["“”«»]/;/**- * The setting's first list (Settings → Auto image model): prompts that Ideogram 4's own safety filter often answers with- * its grey card. Auto sends them to Krea 2 Realism straight away. One per line: a word or phrase matches as a whole word- * (a space or a hyphen matches either), any other line is a regular expression, and a line that starts with "#" is a- * note; case never matters.+ * The setting's list (Settings → Auto image model): prompts Auto starts on Krea 2 Realism, the model every plain prompt+ * starts on too, and whose run details name the line they matched. Lettering still goes to MOSS-Image first. One per+ * line: a word or phrase matches as a whole word (a space or a hyphen matches either), any other line is a regular+ * expression, and a line that starts with "#" is a note; case never matters.*/export const DEFAULT_AUTO_PATTERNS: readonly string[] = ["# Animals or creatures dressed as people",@@ -79,7 +90,7 @@ function lineRegExp(line: string): RegExp | null {/*** Why the setting's text can't be saved, one line per problem (empty: it can). Each line must be a pattern that can be- * read, can't match empty words (it would send every prompt to Krea 2 Realism), and stays within the limits.+ * read, can't match empty words (it would match every prompt), and stays within the limits.*/export function autoPatternsProblems(text: string): string[] {const lines = text.split(/\r?\n/);@@ -137,46 +148,46 @@ export interface AutoAsk {op?: Operation;/** Pictures the run works from (its references). */images?: number;- /**- * A signed-up account's run (not the owner's): a plain prompt starts on Krea 2 Realism, because Ideogram 4 can take- * minutes to decline and the account would wait for the fallback. Lettering still goes to Ideogram 4.- */- account?: boolean;}/*** The models Auto would plan a run on, best first, and why: a picture to work from → the studio's edit model for its- * operation; lettering → Ideogram 4; a prompt the setting's patterns match → Krea 2 Realism (then FIBO 2 Dev and- * MOSS-Image, then Ideogram 4); an account's plain prompt → Krea 2 Realism first too; anything else → Ideogram 4 (then the others). The server plans the first one that is- * switched on and runs the operation (src/server/generations.ts autoRouted).+ * operation; lettering → MOSS-Image, then Krea 2 Realism; a prompt the setting's patterns match, and anything else →+ * Krea 2 Realism, then MOSS-Image. The same for the owner, an account and a guest. The server plans the first one that+ * is switched on and runs the operation (src/server/generations.ts autoRouted), and the next one makes the run when it+ * fails (autoNext).*/export function autoCandidates(ask: AutoAsk, patterns: readonly { line: string; re: RegExp }[]): { models: string[]; why: AutoWhy; pattern?: string } {const op = ask.op && ask.op !== "t2i" ? ask.op : (ask.images ?? 0) > 0 ? "edit" : "t2i";if (op !== "t2i") return { models: [...(AUTO_EDIT_MODELS[op] ?? [])], why: "edit" };const words = ask.prompt ?? "";- if (asksForText(words)) return { models: [AUTO_TEXT_MODEL, ...AUTO_FALLBACKS], why: "text" };+ if (asksForText(words)) return { models: [AUTO_TEXT_MODEL, AUTO_PHOTO_MODEL], why: "text" };const pattern = matchedPattern(words, patterns);- if (pattern) return { models: [...AUTO_FALLBACKS, AUTO_TEXT_MODEL], why: "trigger", pattern };- if (ask.account) return { models: [...AUTO_FALLBACKS, AUTO_TEXT_MODEL], why: "plain" };- return { models: [AUTO_TEXT_MODEL, ...AUTO_FALLBACKS], why: "plain" };+ if (pattern) return { models: [...AUTO_T2I_MODELS], why: "trigger", pattern };+ return { models: [...AUTO_T2I_MODELS], why: "plain" };}-/** The model that makes an Auto run after `after` failed on one Ideogram 4 declined (undefined: none left). */-export function nextAutoFallback(after: string | undefined): string | undefined {- const i = after ? (AUTO_FALLBACKS as readonly string[]).indexOf(after) : -1;- return AUTO_FALLBACKS[i + 1];+/** Auto's models left for a run, in its order, after the ones that tried it (each model makes a run at most once). */+export const autoNext = (models: readonly string[], tried: readonly string[]): string[] => models.filter((m) => !tried.includes(m));++/** The model that makes a run Ideogram 4 (picked by name) declined after `after` failed too (undefined: none left). */+export function nextDeclinedFallback(after: string | undefined): string | undefined {+ const i = after ? (DECLINED_FALLBACKS as readonly string[]).indexOf(after) : -1;+ return DECLINED_FALLBACKS[i + 1];}-/** "Ideogram 4 declined this one", after the model that made a run in its place. */-export const AUTO_DECLINED = "Ideogram 4 declined this one";+/** Said after the model that made an Auto run when the model before it couldn't make it. */+export const AUTO_NEXT = "Auto's next model";/**- * The line under an Auto run (the feed card, the run details, the Library, Accounts' runs): "Auto · made with Ideogram 4",- * and "· Ideogram 4 declined this one" when another model made it in its place. Null for any other run.+ * The line under an Auto run (the feed card, the run details, the Library, Accounts' runs): "Auto · made with Krea 2+ * Realism", and "· Auto's next model" when the model before it couldn't make it (or, on an older run, Ideogram 4+ * declined it). Null for any other run.*/export function autoLine(g: { status: string; modelName?: string; modelId: string; request: { modelId: string; auto?: AutoPick } }): string | null {if (g.request.modelId !== AUTO_IMAGE || !g.request.auto) return null;const name = g.modelName ?? g.modelId;const made = g.status === "succeeded" ? `made with ${name}` : g.status === "failed" || g.status === "canceled" ? `tried ${name}` : `making it with ${name}`;- return [AUTO_NAME, made, g.request.auto.why === "declined" ? AUTO_DECLINED : null].filter(Boolean).join(" · ");+ const next = g.request.auto.why === "fallback" || g.request.auto.why === "declined";+ return [AUTO_NAME, made, next ? AUTO_NEXT : null].filter(Boolean).join(" · ");}diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex a2bc8d76..5142701f 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -132,7 +132,7 @@ const open: ModelDef[] = [// (Ideogram 4, Qwen-Image 2.1, Krea 2, MOSS-Image, FIBO 2), then the edit models (Qwen-Image 2.1, FIBO 2, Krea 2).// A studio's "Best" list is its default, then the `top` models in this order (bestForStudio in src/lib/composer.ts).// Auto: the Image studio's default on the open engine. Not a model of its own: the server plans each run on the model it- // picks (src/lib/auto-image.ts), and the run names that model. Its routes are its picks' own (Ideogram 4 for words,+ // picks (src/lib/auto-image.ts), and the run names that model. Its routes are its picks' own (Krea 2 Realism for words,// Qwen-Image 2.1 for edits), so the picker, the price and the GPU pre-flight read them; it never runs as itself.o({id: AUTO_IMAGE,@@ -140,8 +140,8 @@ const open: ModelDef[] = [vendor: "Fuobe",family: "auto",kind: "image",- tagline: "Picks the model for you: Ideogram 4 for most pictures and lettering, Krea 2 Realism where Ideogram 4 often declines, Qwen-Image 2.1 for edits",- routes: [comfy("t2i", "ideogram4-t2i", "Auto picks the model before the run"), { ...comfy("edit", "qwen-image-21-edit", "Auto: Qwen-Image 2.1, up to 4 references"), unsized: true }],+ tagline: "Picks the model for you: Krea 2 Realism for most pictures, MOSS-Image for lettering, Qwen-Image 2.1 for edits",+ routes: [comfy("t2i", "krea2-realism-t2i", "Auto picks the model before the run"), { ...comfy("edit", "qwen-image-21-edit", "Auto: Qwen-Image 2.1, up to 4 references"), unsized: true }],options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K", "2K"], maxImages: 4, seed: true },defaults: { aspectRatio: "1:1", resolution: "1.5K" },}),diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex faff29d2..ef7df1b2 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -1619,9 +1619,10 @@ export interface Generation {/*** Why Auto picked its model: a picture to work from ("edit"), lettering ("text"), a prompt the owner's patterns match- * ("trigger"), anything else ("plain"), or Ideogram 4 declined the run and this model made it in its place ("declined").+ * ("trigger"), anything else ("plain"), or the model before it couldn't make the run and this one, Auto's next, made it+ * ("fallback"; "declined" on older runs, where Ideogram 4 declined it).*/-export type AutoWhy = "edit" | "text" | "trigger" | "plain" | "declined";+export type AutoWhy = "edit" | "text" | "trigger" | "plain" | "fallback" | "declined";/** The model Auto picked for a run (GenerationRequest.auto). */export interface AutoPick {diff --git a/src/lib/studios.ts b/src/lib/studios.tsindex 9c8b36cf..7d92af9f 100644--- a/src/lib/studios.ts+++ b/src/lib/studios.ts@@ -21,8 +21,8 @@ export const IMAGE_STUDIO: StudioConfig = {slots: [],// Up to 10 references where the model takes them (FLUX 3 Klein); each model's own limit caps it (composer refMax).multiRef: { label: "Add ref", max: 10 },- // Auto picks the open model for each run (src/lib/auto-image.ts): Ideogram 4 for most, Krea 2 Realism for prompts its- // safety filter often declines, Qwen-Image 2.1 for edits. The default for everyone: the owner, an account and a guest.+ // Auto picks the open model for each run (src/lib/auto-image.ts): Krea 2 Realism for most, MOSS-Image for lettering+ // (each the other's fallback), Qwen-Image 2.1 for edits. The default for everyone: the owner, an account and a guest.defaultModels: { cloud: "nano-banana-pro", open: AUTO_IMAGE },// A model's own settings (MOSS-Image's Quality, Ideogram's speed) sit under "Options".controlsTitle: "Options",diff --git a/src/server/generations.ts b/src/server/generations.tsindex 0bc0431c..74fd6d7c 100644--- a/src/server/generations.ts+++ b/src/server/generations.ts@@ -37,7 +37,7 @@ import { finishSteps, mosaicPixels, unionMasks } from "@/lib/soul-post";import { ANGLES_ORIGINAL, MOSAIC_SCALE } from "@/lib/catalog/open-tools";import { computeDimensions } from "@/lib/comfy";import { captionFromWords, captionWords, parseCaption } from "@/lib/ideogram-caption";-import { AUTO_IMAGE, AUTO_MODELS, autoCandidates, autoPatterns, nextAutoFallback } from "@/lib/auto-image";+import { AUTO_IMAGE, autoCandidates, autoModelsFor, autoNext, autoPatterns, nextDeclinedFallback } from "@/lib/auto-image";import { h3Frames, h3Prompt, inH3Layout } from "@/lib/h3-prompt";import { h3ReferenceTags, h3TalkPrompt } from "@/lib/h3-references";import {@@ -542,20 +542,27 @@ interface PendingMeta {/** Who holds the run as the release before this one marked it (OLD_LEASE), and until when. */lease?: { by?: unknown; until?: unknown };/**- * An Ideogram 4 run that returned only its "blocked" card (declinedAgain): the fallback that makes it now, and the- * cards it returned (kept for the owner). Kept through every hand-over.+ * An Ideogram 4 run that returned only its "blocked" card, or a run of Auto whose model failed (declinedAgain): the+ * fallback that makes it now, and the cards it returned (kept for the owner). Kept through every hand-over.*/declined?: DeclinedMeta;}-/** What an Ideogram 4 run that returned its "blocked" card keeps (PendingMeta.declined). */+/** What an Ideogram 4 run that returned its "blocked" card, or a run of Auto whose model failed, keeps (PendingMeta.declined). */interface DeclinedMeta {/** "fallback": a fallback makes it now. "retry": only on runs declined before (LEGACY_DECLINED). */stage?: "retry" | "fallback";- /** The fallback model that makes it now (src/lib/auto-image.ts AUTO_FALLBACKS); none on a legacy Qwen-Image 2.1 run. */+ /** "failed": a run of Auto whose model failed (autoFails), made by Auto's next model; none: Ideogram 4 declined it. */+ cause?: "failed";+ /**+ * The fallback model that makes it now (src/lib/auto-image.ts: Auto's next model, or DECLINED_FALLBACKS for Ideogram 4+ * picked by name); none on a legacy Qwen-Image 2.1 run.+ */model?: string;+ /** A run of Auto: the models that tried it before this one (each makes it at most once). */+ tried?: string[];cards?: DeclinedCard[];- /** The run as Ideogram 4's, put back when every fallback fails (declinedFails). */+ /** The run as first planned, put back when every fallback after Ideogram 4 declined fails (declinedFails). */was?: DeclinedRun;}@@ -1431,19 +1438,20 @@ function autoPatternsNow(): ReturnType<typeof autoPatterns> {/*** A run of Auto (src/lib/auto-image.ts) as the model it picks runs it: the pick it carries (a run planned again: a resend,- * a run that waited to enter the line, a fallback after Ideogram 4 declined), else the first of its picks for these words+ * a run that waited to enter the line, Auto's next model after the one before failed) while it is one of Auto's models+ * for the operation (an older run's Ideogram 4 or FIBO 2 Dev picture is planned again), else the first of its picks for these words* and pictures that is switched on and runs the operation (Settings → Models & licences). A picture to work from makes it* an edit. Any other request as it is.*/function autoRouted(req: GenerationRequest): GenerationRequest {if (req.modelId !== AUTO_IMAGE) return req;const images = req.inputs?.images?.length ?? 0;- if (req.auto && AUTO_MODELS.has(req.auto.model)) {+ if (req.auto) {const m = getModel(req.auto.model);- const op = req.op && m?.routes.some((r) => r.op === req.op) ? req.op : undefined;- return { ...req, modelId: req.auto.model, op: op ?? (images ? "edit" : "t2i") };+ const op = (req.op && m?.routes.some((r) => r.op === req.op) ? req.op : undefined) ?? (images ? "edit" : "t2i");+ if (autoModelsFor(op).includes(req.auto.model)) return { ...req, modelId: req.auto.model, op };}- const c = autoCandidates({ prompt: req.prompt, op: req.op, images, account: !!req.account }, autoPatternsNow());+ const c = autoCandidates({ prompt: req.prompt, op: req.op, images }, autoPatternsNow());const op: Operation = c.why === "edit" ? (req.op && req.op !== "t2i" ? req.op : "edit") : "t2i";const runs = (id: string) => {const m = getModel(id);@@ -2912,8 +2920,8 @@ async function pause(id: string, ms: number): Promise<boolean> {* account's own run, logged and noted for the owner (run-events.ts).*/function failRun(id: string, e: unknown, trouble: Diagnosis | undefined, account: string | undefined, facts?: RunFacts, own = !!facts): boolean {- // A fallback making a run Ideogram 4 declined: the next one, or it fails as the declined run.- const declined = declinedFails(id, trouble?.words ?? String((e as Error | null)?.message ?? e));+ // A fallback making a run Ideogram 4 declined, or a run of Auto: the next model, or it fails as the declined run.+ const declined = declinedFails(id, trouble?.words ?? String((e as Error | null)?.message ?? e), undefined, trouble);if (declined !== null) return declined;const fix = (e as { fix?: GenerationFix } | null)?.fix;const kept = keptFix(fix, trouble);@@ -3249,7 +3257,7 @@ function keepForOwner(assetIds: readonly string[]): void {}/**- * What one of Auto's fallbacks is asked when it makes a run Ideogram 4 declined: the same words in plain text (a caption+ * What a fallback is asked when it makes a run Ideogram 4 declined or Auto's model failed: the same words in plain text (a caption* given as the prompt becomes its words), the same pictures, aspect ratio, size and count, and the model's own settings.*/function declinedFallback(stored: GenerationRequest, modelId: string): GenerationRequest {@@ -3269,12 +3277,14 @@ function declinedFallback(stored: GenerationRequest, modelId: string): Generatio}/**- * An Ideogram 4 run whose every picture was its "blocked" card is made again in its place: the same run (its id, its- * place, its turn in the line, its billing hold), as the same job of its batch, through the same submit as every run- * (this install's workers, the owner's ComfyUI, an account's own GPU), never by Ideogram 4 again: Auto's fallbacks in- * order (src/lib/auto-image.ts: Krea 2 Realism, FIBO 2 Dev, MOSS-Image), the next one switched on that goes where the run- * went, each only when the one before fails (declinedFails). A run of Auto keeps Auto, its pick saying why- * (`why: "declined"`); Ideogram 4 picked by name names the model that made it (its model and its request's notice).+ * An Ideogram 4 run whose every picture was its "blocked" card, or a run of Auto whose model failed (autoFails), is made+ * again in its place: the same run (its id, its place, its turn in the line, its billing hold), as the same job of its+ * batch, through the same submit as every run (this install's workers, the owner's ComfyUI, an account's own GPU), never+ * by a model that tried it before. A run of Auto goes to Auto's models left in its order (src/lib/auto-image.ts: Krea 2+ * Realism and MOSS-Image, never Ideogram 4), each at most once, and keeps Auto, its pick saying why (`why: "fallback"`,+ * or "declined" after Ideogram 4 declined an older run); Ideogram 4 picked by name goes to DECLINED_FALLBACKS in order and+ * names the model that made it (its model and its request's notice). Each next model is the first switched on that goes+ * where the run went, and only when the one before fails (declinedFails).* None is a new press of Run: no limit counts it again, and no new row or hold is made. The run's tile says which model* makes it. False when none is left: the run fails as before. `later`: sent once the caller (a submit that failed) has* let go of the run.@@ -3294,9 +3304,16 @@ function declinedAgain(r: Row, declined: DeclinedMeta, later = false): boolean {let asked = stored;let model: string | undefined;let p: ReturnType<typeof prepare> | undefined;- // A legacy "retry" stage has no model: it starts at the first fallback.- for (let m = nextAutoFallback(declined.model); m && !p; m = nextAutoFallback(m)) {- let ask: GenerationRequest = auto ? { ...declinedFallback(stored, m), modelId: AUTO_IMAGE, auto: { model: m, why: "declined" } } : declinedFallback(stored, m);+ // Auto: its models left after the ones that tried the run, this one included. Ideogram 4 picked by name: its+ // fallbacks after the one that made it now (a legacy "retry" stage has no model: it starts at the first).+ const tried = auto ? [...new Set([...(declined.tried ?? []), r.model_id])] : undefined;+ const order: string[] = [];+ if (tried) order.push(...autoNext(autoCandidates({ prompt: stored.prompt, op: "t2i" }, autoPatternsNow()).models, tried));+ else for (let m = nextDeclinedFallback(declined.model); m; m = nextDeclinedFallback(m)) order.push(m);+ const why = declined.cause === "failed" ? "fallback" : "declined";+ for (const m of order) {+ if (p) break;+ let ask: GenerationRequest = auto ? { ...declinedFallback(stored, m), modelId: AUTO_IMAGE, auto: { model: m, why } } : declinedFallback(stored, m);let q: ReturnType<typeof prepare> | undefined;try {q = planned(ask);@@ -3316,9 +3333,9 @@ function declinedAgain(r: Row, declined: DeclinedMeta, later = false): boolean {if (!p || !model) return false;const go = p;const index = jobIndexOf(r, readMeta(r.external_meta_json));- // The run as Ideogram 4's stays kept from the first fallback on (declinedFails puts it back).+ // The run as first planned stays kept from the first fallback on (declinedFails puts it back after a decline).const was = declined.was ?? declinedRun(r);- const now: DeclinedMeta = { ...declined, stage: "fallback", model, was };+ const now: DeclinedMeta = { ...declined, stage: "fallback", model, was, ...(tried && { tried }) };const notice = (JSON.parse(was.request_json) as GenerationRequest).notice;const fields: Partial<Row> = {external_id: null,@@ -3358,24 +3375,68 @@ function declinedAgain(r: Row, declined: DeclinedMeta, later = false): boolean {}/**- * The model that made a run Ideogram 4 declined couldn't make it either. The run goes on to its next fallback- * (declinedAgain) while there is one. Otherwise the run fails as Ideogram 4's (its model, request and words put back, so- * Retry runs what was asked), saying what to try, whether its job failed or couldn't be sent. What the model said goes- * to the log. Null: not such a run; else whether the run was failed here (false: it still went, or goes on).+ * A run's model couldn't make it (its job failed, or it couldn't be sent). A fallback making a run Ideogram 4 declined,+ * or Auto's next model, goes on to the next one (declinedAgain) while there is one; a run of Auto whose first model+ * failed goes to Auto's next (autoFails). Otherwise a run Ideogram 4 declined fails as Ideogram 4's (its model, request+ * and words put back, so Retry runs what was asked), saying what to try; a run of Auto fails as its last model did (null:+ * the caller fails it, in its own words). What the model said goes to the log. Null: not such a run, or none left for a+ * run of Auto; else whether the run was failed here (false: it still went, or goes on). `trouble`: the failure as read,+ * where the caller has it.*/-function declinedFails(id: string, said: string, metaJson?: string | null): boolean | null {+function declinedFails(id: string, said: string, metaJson?: string | null, trouble?: Diagnosis): boolean | null {const json = metaJson !== undefined ? metaJson : (db().prepare("SELECT external_meta_json FROM generations WHERE id = ?").pluck().get(id) as string | null | undefined);const was = readMeta(json).declined;- if (was?.stage !== "fallback") return null;+ if (was?.stage !== "fallback") return autoFails(id, said, trouble);const tried = was.model ?? LEGACY_DECLINED.model;- console.warn(`[generations] ${id}: ${getModel(tried)?.name ?? tried} after Ideogram 4 declined: ${said.slice(0, 500)}`);- if (was.model && nextAutoFallback(was.model)) {+ console.warn(`[generations] ${id}: ${getModel(tried)?.name ?? tried} ${was.cause === "failed" ? "as Auto's next model" : "after Ideogram 4 declined"}: ${said.slice(0, 500)}`);+ if (was.model && !(was.cause === "failed" && trouble && !AUTO_NEXT_CAUSES.has(trouble.cause))) {const r = db().prepare("SELECT * FROM generations WHERE id = ?").get(id) as Row | undefined;if (r && (r.status === "queued" || r.status === "running") && declinedAgain(r, was, true)) return false;}+ if (was.cause === "failed") return null;return updateLive(id, { ...(was.was ?? {}), status: "failed", error: BLOCKED_CARD_MESSAGE, completed_at: Date.now(), message: null });}+/**+ * Failures of a model's own job that another of Auto's models may not share (the job stopped, ran out of memory, a file+ * or model was missing, the provider refused the words). One about reaching the GPU or the key, or a run that took too+ * long (its job may still go), fails the run as it is.+ */+const AUTO_NEXT_CAUSES: ReadonlySet<TroubleCause> = new Set<TroubleCause>([+ "gpu-error",+ "gpu-job-error",+ "gpu-out-of-memory",+ "gpu-model-file",+ "gpu-refused",+ "content-flag",+ "model-unavailable",+ "provider-failed",+ "no-result",+ "bad-input",+ "unknown",+]);++/**+ * A text-to-image run of Auto whose model failed: the same run is made by Auto's next model (Krea 2 Realism, then+ * MOSS-Image; lettering the other way round), as a run Ideogram 4 declined is (declinedAgain): the same row, hold and+ * place in line, nothing charged again. False: it goes on; null: not such a run, or no model left, so it fails as any run.+ */+function autoFails(id: string, said: string, trouble?: Diagnosis): false | null {+ if (trouble && !AUTO_NEXT_CAUSES.has(trouble.cause)) return null;+ const r = db().prepare("SELECT * FROM generations WHERE id = ?").get(id) as Row | undefined;+ if (!r || (r.status !== "queued" && r.status !== "running") || r.op !== "t2i") return null;+ let stored: GenerationRequest;+ try {+ stored = JSON.parse(r.request_json) as GenerationRequest;+ } catch {+ return null;+ }+ if (stored.modelId !== AUTO_IMAGE || !stored.auto) return null;+ if (!declinedAgain(r, { ...readMeta(r.external_meta_json).declined, cause: "failed" }, true)) return null;+ console.warn(`[generations] ${id}: ${getModel(r.model_id)?.name ?? r.model_id} couldn't make this run of Auto, so Auto's next model makes it: ${said.slice(0, 500)}`);+ return false;+}+/*** An account's poll that failed: a key that won't work (refused, no credit, no access) fails the run at once; a passing* problem (its GPU off, its provider busy) is asked again with a growing wait, the tile saying so. A run on its own GPU@@ -4513,8 +4574,8 @@ async function pollOne(r: Row): Promise<void> {if (res.state === "failed") {// Its GPU restarted and lost the job: an account's run is sent again once, as a computer's tab does.if (own && res.lost && resend(r, own, RESENT_WORDS)) return;- // A fallback making a run Ideogram 4 declined: the next one, or it fails as the declined run.- if (declinedFails(r.id, res.error, r.external_meta_json) !== null) return;+ // A fallback making a run Ideogram 4 declined, or a run of Auto: the next model, or it fails as the declined run.+ if (declinedFails(r.id, res.error, r.external_meta_json, res.trouble) !== null) return;// An account's run: its own GPU's words (comfyui.ts), or its key's provider's read plainly; the provider's own words// go in the details line. The owner's runs keep the provider's words.const trouble =diff --git a/src/server/run-details.ts b/src/server/run-details.tsindex 6d40dcb8..4081b655 100644--- a/src/server/run-details.ts+++ b/src/server/run-details.ts@@ -237,8 +237,11 @@ export interface RunMoney {export interface RunMadeBy {/** A run of Auto: the model it picked, and why. */auto?: { model: string; name: string; why: AutoWhy; words: string };- /** Ideogram 4 declined it: its stage, and the model that made it in its place. */- declined?: { stage?: string; words: string; model?: string; modelName?: string; askedModel?: string; askedModelName?: string };+ /**+ * Ideogram 4 declined it, or (cause "failed") the Auto model before couldn't make it: its stage, and the model that made+ * it in its place.+ */+ declined?: { stage?: string; cause?: "failed"; words: string; model?: string; modelName?: string; askedModel?: string; askedModelName?: string };/** What changed while it ran (an optional input left out, another model made it), said on the result. */notices: string[];/** Settings the model makes differently from what was asked (the account sees the made value only). */@@ -502,9 +505,10 @@ export function surfaceOf(feature: string, stamp: GenerationRequest): RunSurface/** Why Auto picked its model, in words. */export const AUTO_WHY_WORDS: Record<AutoWhy, string> = {edit: "It had a picture to work from, so it went to the edit model",- text: "Its words ask for lettering, so it went to Ideogram 4",- trigger: "Its words match a pattern in Settings → Auto image model",- plain: "A plain prompt: the usual first model",+ text: "Its words ask for lettering, so it went to MOSS-Image first",+ trigger: "Its words match a pattern in Settings → Auto image model, so it went to Krea 2 Realism first",+ plain: "A plain prompt, so it went to Krea 2 Realism first",+ fallback: "The model before it couldn't make it, so Auto's next model made it",declined: "Ideogram 4 declined it, so this model made it instead",};@@ -513,20 +517,23 @@ const DECLINED_STAGE_WORDS: Record<string, string> = {fallback: "Ideogram 4 declined it, so another model made it",};-/** How a run was made: Auto's pick, Ideogram 4's declines and the model after them, and the notices it carries. */+/** How a run was made: Auto's pick, Ideogram 4's declines (or Auto's model that failed) and the model after them, and the notices it carries. */export function madeByOf(run: AdminRun, meta: Record<string, unknown>): RunMadeBy {const req = run.request;const pick = req.modelId === AUTO_IMAGE && req.auto ? req.auto : undefined;const d = obj(meta.declined);const was = obj(d.was);const stage = str(d.stage);+ // An Auto run its next model made after the model before it failed.+ const failed = str(d.cause) === "failed";const askedModel = str(was.model_id);const fallback = str(d.model);const declined =stage || run.declinedCards?.length? {...(stage && { stage }),- words: (stage && DECLINED_STAGE_WORDS[stage]) || "Ideogram 4 returned its grey card for a picture",+ ...(failed && { cause: "failed" as const }),+ words: (failed && AUTO_WHY_WORDS.fallback) || (stage && DECLINED_STAGE_WORDS[stage]) || "Ideogram 4 returned its grey card for a picture",...(fallback && { model: fallback, modelName: getModel(fallback)?.name ?? fallback }),...(askedModel && { askedModel, askedModelName: getModel(askedModel)?.name ?? askedModel }),}diff --git a/src/server/safety-card.ts b/src/server/safety-card.tsindex 70443c17..1b84d03d 100644--- a/src/server/safety-card.ts+++ b/src/server/safety-card.ts@@ -47,8 +47,9 @@ export function looksBlocked(png: Buffer): boolean {}/**- * An Ideogram 4 run whose every picture was the card is made by Auto's fallbacks in order (src/server/generations.ts- * declinedAgain). The notice a run picked by name carries once one of them made it.+ * An Ideogram 4 run whose every picture was the card is made by its fallbacks in order (src/lib/auto-image.ts+ * DECLINED_FALLBACKS; src/server/generations.ts declinedAgain). The notice a run picked by name carries once one of them+ * made it.*/export const declinedNotice = (modelName: string): string => `Made with ${modelName} · Ideogram 4 declined this one`;/** Runs declined before that: stage "retry" (Ideogram 4 with a new seed), then a fallback with no model (Qwen-Image 2.1). */diff --git a/src/server/settings.ts b/src/server/settings.tsindex cf508c51..981cfe04 100644--- a/src/server/settings.ts+++ b/src/server/settings.ts@@ -137,8 +137,8 @@ export const SETTINGS = {/** Tokens of context the local model gets (Ollama's num_ctx; LM Studio loads models with it). 0 = the server's own setting. */llmContext: { key: "llm.context", env: "FUOBE_LLM_CONTEXT", default: "16384" },/**- * Settings → Auto image model: prompts Ideogram 4's safety filter often declines, one pattern per line, which Auto sends- * to Krea 2 Realism straight away (src/lib/auto-image.ts). Empty: the built-in list.+ * Settings → Auto image model: prompts Auto starts on Krea 2 Realism (as it does every plain prompt), one pattern per+ * line, whose run details name the line they matched (src/lib/auto-image.ts). Empty: the built-in list.*/autoImagePatterns: { key: "auto.imagePatterns", default: DEFAULT_AUTO_PATTERNS.join("\n") },/**diff --git a/tests/auto-image-pool.test.ts b/tests/auto-image-pool.test.tsindex 29908bca..bbe8c682 100644--- a/tests/auto-image-pool.test.ts+++ b/tests/auto-image-pool.test.ts@@ -5,11 +5,10 @@ import { startFakeBilling, FAKE_POLICY, type FakeBilling } from "./helpers/fake-import { tempDir } from "./helpers/temp-dir";/**- * An account's free run of Auto on this install's GPUs: Auto picks its model there as anywhere, and when Ideogram 4- * answers with its grey card, Krea 2 Realism (then FIBO 2 Dev, then MOSS-Image) makes the same run on the same GPUs. One- * press of Run stays one run: the hourly count, the runs at once and the billing hold count it once. The card and the- * words it declined are the owner's only (Accounts' runs); the account reads which model made its picture. The price- * before Run is the picked model's. (The owner's runs: tests/auto-image-runs.test.ts.)+ * An account's free run of Auto on this install's GPUs: Auto picks its model there as anywhere (Krea 2 Realism, or+ * MOSS-Image for lettering), and when that model fails, the other one makes the same run on the same GPUs. One press of+ * Run stays one run: the hourly count, the runs at once and the billing hold count it once; the account reads which+ * model made its picture. The price before Run is the picked model's. (The owner's runs: tests/auto-image-runs.test.ts.)*/vi.mock("next/server", async (importOriginal) => ({ ...(await importOriginal<typeof import("next/server")>()), connection: async () => {} }));@@ -49,7 +48,6 @@ const { comfyProvider, loadManifest } = await import("@/server/providers/comfyuiconst { loadIndex } = await import("@/server/gpu/index-file");const { allLanes } = await import("@/lib/lanes");const { getGeneration } = await import("@/server/generations");-const { listAccountRuns } = await import("@/server/account-admin");const { AUTO_IMAGE } = await import("@/lib/auto-image");const { autoLine } = await import("@/lib/auto-image");const { encodePng } = await import("@/server/png");@@ -63,7 +61,6 @@ const png = (w: number, h: number, at: (x: number, y: number) => [number, numberfor (let y = 0; y < h; y++) for (let x = 0; x < w; x++) data.set([...at(x, y), 255], (y * w + x) * 4);return encodePng({ width: w, height: h, data });};-const card = png(640, 480, (x, y) => (y > 232 && y < 248 && x > 180 && x < 460 && x % 4 < 2 ? [58, 58, 57] : [120, 118, 116]));const gradient = png(640, 480, (x, y) => [Math.round((x / 639) * 255), Math.round((y / 479) * 255), 128]);const dataUri = (b: Buffer) => `data:image/png;base64,${b.toString("base64")}`;@@ -109,7 +106,6 @@ async function settled(id: string): Promise<Generation> {/** The jobs the GPUs were sent (the workers' side is stood in for: each job answers at its first look). */let sent: { model: string; id: string; tile: Generation; going: number; hourly: number }[] = [];-let ideogram: Buffer[][] = [];let failing = new Set<string>();const submit = comfyProvider.submit;const poll = comfyProvider.poll;@@ -146,7 +142,6 @@ beforeEach(() => {db().prepare("DELETE FROM relay_workers").run();standInWorker();sent = [];- ideogram = [];failing = new Set();answers.clear();comfyProvider.submit = async (ctx) => {@@ -156,7 +151,7 @@ beforeEach(() => {comfyProvider.poll = async (ctx) => {if (failing.has(ctx.model.id)) return { state: "failed", error: "Out of memory on the GPU" };let pics = answers.get(ctx.externalId);- if (!pics) answers.set(ctx.externalId, (pics = ctx.model.id === "oss-ideogram-4" ? (ideogram.shift() ?? [gradient]) : [gradient]));+ if (!pics) answers.set(ctx.externalId, (pics = [gradient]));return { state: "succeeded", outputs: pics.map((p) => ({ url: dataUri(p), kind: "image" as const })) };};});@@ -166,56 +161,76 @@ afterEach(() => {});describe("an account's free run of Auto on this install's GPUs", () => {- it("Ideogram 4 declines: Krea 2 Realism makes it there at once, and it counts as one run", async () => {+ it("a plain prompt: Krea 2 Realism, with no Ideogram 4 or FIBO 2 Dev job", async () => {const a = account();accountId = a.id;- ideogram = [[card]];- const r = await post({ feature: "image", modelId: AUTO_IMAGE, prompt: "a poster of a red fox in deep snow that says \"WINTER\"", params: { aspectRatio: "4:5" } }, a.cookie);+ const r = await post({ feature: "image", modelId: AUTO_IMAGE, prompt: "a red fox in deep snow", params: { aspectRatio: "4:5" } }, a.cookie);+ expect(r.status, JSON.stringify(r.body)).toBe(201);+ const g = await settled(r.body.items![0].id);+ expect(g.status, g.error ?? "").toBe("succeeded");+ expect(g.place).toBe("pool");+ expect(sent.map((s) => s.model)).toEqual(["oss-krea2-realism"]);+ expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "plain" });+ expect(autoLine(g)).toBe("Auto · made with Krea 2 Realism");+ });++ it("Krea 2 Realism fails: MOSS-Image makes it there at once, and it counts as one run", async () => {+ const a = account();+ accountId = a.id;+ failing = new Set(["oss-krea2-realism"]);+ const r = await post({ feature: "image", modelId: AUTO_IMAGE, prompt: "a red fox in deep snow", params: { aspectRatio: "4:5" } }, a.cookie);expect(r.status, JSON.stringify(r.body)).toBe(201);const id = r.body.items![0].id;const g = await settled(id);expect(g.status, g.error ?? "").toBe("succeeded");expect(g.place).toBe("pool");- expect(g.modelId).toBe("oss-krea2-realism");+ expect(g.modelId).toBe("oss-moss-image");expect(g.request.modelId).toBe(AUTO_IMAGE);- expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "declined" });- expect(autoLine(g)).toBe("Auto · made with Krea 2 Realism · Ideogram 4 declined this one");+ expect(g.request.auto).toEqual({ model: "oss-moss-image", why: "fallback" });+ expect(autoLine(g)).toBe("Auto · made with MOSS-Image · Auto's next model");expect(sent.map((s) => [s.model, s.id])).toEqual([- ["oss-ideogram-4", id],["oss-krea2-realism", id],+ ["oss-moss-image", id],]);expect(sent[1].tile.status).toBe("running");- expect(sent[1].tile.message).toBe("Making it with Krea 2 Realism");+ expect(sent[1].tile.message).toBe("Making it with MOSS-Image");expect(sent[1].tile.queue).toBeUndefined();expect(sent.map((s) => s.going)).toEqual([1, 1]);expect(sent.map((s) => s.hourly)).toEqual([1, 1]);expect(admitted(a.id)).toBe(1);expect(rowsOf(a.id)).toBe(1);- // The account never sees what Ideogram 4 returned; the owner does, in Accounts' runs.- expect(g.declinedCards).toBeUndefined();- expect(JSON.stringify(getGeneration(id))).not.toContain("spread");- const listed = listAccountRuns({ account: a.id }).items.find((x) => x.id === id)!;- expect(listed.declinedCards).toHaveLength(1);- expect(listed.request.prompt).toBe("a poster of a red fox in deep snow that says \"WINTER\"");});- it("each next model only when the one before fails, still one run", async () => {+ it("lettering: MOSS-Image first, then Krea 2 Realism when it fails, still one run", async () => {const a = account();accountId = a.id;- ideogram = [[card]];- failing = new Set(["oss-krea2-realism", "oss-fibo2-dev"]);- const r = await post({ feature: "image", modelId: AUTO_IMAGE, prompt: "a sign that says \"LIGHTHOUSE\" at dusk" }, a.cookie);+ failing = new Set(["oss-moss-image"]);+ const r = await post({ feature: "image", modelId: AUTO_IMAGE, prompt: 'a sign that says "LIGHTHOUSE" at dusk' }, a.cookie);expect(r.status, JSON.stringify(r.body)).toBe(201);const g = await settled(r.body.items![0].id);expect(g.status, g.error ?? "").toBe("succeeded");- expect(sent.map((s) => s.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);- expect(g.modelId).toBe("oss-moss-image");- expect(sent.map((s) => s.hourly)).toEqual([1, 1, 1, 1]);+ expect(sent.map((s) => s.model)).toEqual(["oss-moss-image", "oss-krea2-realism"]);+ expect(g.modelId).toBe("oss-krea2-realism");+ expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "fallback" });+ expect(sent.map((s) => s.hourly)).toEqual([1, 1]);+ expect(admitted(a.id)).toBe(1);+ expect(rowsOf(a.id)).toBe(1);+ });++ it("both fail: each tried once, then the run fails once, as one run", async () => {+ const a = account();+ accountId = a.id;+ failing = new Set(["oss-krea2-realism", "oss-moss-image"]);+ const r = await post({ feature: "image", modelId: AUTO_IMAGE, prompt: "a lighthouse at dusk" }, a.cookie);+ expect(r.status, JSON.stringify(r.body)).toBe(201);+ const g = await settled(r.body.items![0].id);+ expect(g.status).toBe("failed");+ expect(sent.map((s) => s.model)).toEqual(["oss-krea2-realism", "oss-moss-image"]);expect(admitted(a.id)).toBe(1);expect(rowsOf(a.id)).toBe(1);});- it("a prompt the patterns match goes to Krea 2 Realism without an Ideogram 4 job; the price before Run is that model's", async () => {+ it("a prompt the patterns match goes to Krea 2 Realism, and so does a plain one; the price before Run is that model's", async () => {const a = account();accountId = a.id;const cat = { feature: "image", modelId: AUTO_IMAGE, prompt: "a cat in an antique-gold paillette gown, her hair lifting in the wind" };diff --git a/tests/auto-image-runs.test.ts b/tests/auto-image-runs.test.tsindex c108516e..cae4c139 100644--- a/tests/auto-image-runs.test.ts+++ b/tests/auto-image-runs.test.ts@@ -3,10 +3,10 @@ import { renderToStaticMarkup } from "react-dom/server";import type { GenInput, Generation } from "@/lib/catalog/types";import { tempDir } from "./helpers/temp-dir";-// Auto's runs: each is planned on the model Auto picks (Ideogram 4, Krea 2 Realism for the owner's patterns, Qwen-Image 2.1-// for an edit) and keeps Auto with its pick. When Ideogram 4 answers a run of Auto with its grey card, Krea 2 Realism, then-// FIBO 2 Dev, then MOSS-Image make the same run (never Ideogram 4 again), and only then does it fail. Ideogram 4 picked-// by name goes the same way (tests/ideogram-declined.test.ts). Its rules alone: tests/auto-image.test.ts.+// Auto's runs: each is planned on the model Auto picks (Krea 2 Realism, MOSS-Image for lettering, Qwen-Image 2.1 for an+// edit; never Ideogram 4 or FIBO 2 Dev for a picture from words) and keeps Auto with its pick. When its text-to-image+// model fails, the other one makes the same run, each at most once, and only then does it fail. Ideogram 4 picked by name+// still takes its own fallbacks when it declines (tests/ideogram-declined.test.ts). Its rules alone: tests/auto-image.test.ts.vi.setConfig({ testTimeout: 60_000 });const dir = tempDir("fuobe-auto-image-runs-");process.env.FUOBE_DATA_DIR = dir;@@ -91,25 +91,28 @@ const rowsSince = (id: string) => db().prepare("SELECT COUNT(*) FROM generationsconst line = (g: Generation) => renderToStaticMarkup(MadeNote({ g })!);describe("what Auto runs on", () => {- it("plain words: Ideogram 4, and the run keeps Auto with its pick", async () => {+ it("plain words: Krea 2 Realism, and the run keeps Auto with its pick", async () => {const g = await run("a red fox in deep snow", { params: { aspectRatio: "16:9" } });expect(g.status, g.error ?? "").toBe("succeeded");- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4"]);- expect(g.modelId).toBe("oss-ideogram-4");+ expect(handed.map((h) => h.model)).toEqual(["oss-krea2-realism"]);+ expect(g.modelId).toBe("oss-krea2-realism");expect(g.request.modelId).toBe(AUTO_IMAGE);- expect(g.request.auto).toEqual({ model: "oss-ideogram-4", why: "plain" });+ expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "plain" });expect(handed[0].input.aspectRatio).toBe("16:9");- expect(line(g)).toContain("Auto · made with Ideogram 4");+ expect(line(g)).toContain("Auto · made with Krea 2 Realism");+ expect(line(g)).not.toContain("next model");expect(g.request.notice).toBeUndefined();});- it("lettering: Ideogram 4", async () => {- const g = await run("a poster that says GRAND OPENING in gold letters");- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4"]);- expect(g.request.auto).toEqual({ model: "oss-ideogram-4", why: "text" });+ it("lettering: MOSS-Image", async () => {+ const g = await run('a poster that says "GRAND OPENING" in gold letters');+ expect(g.status, g.error ?? "").toBe("succeeded");+ expect(handed.map((h) => h.model)).toEqual(["oss-moss-image"]);+ expect(g.request.auto).toEqual({ model: "oss-moss-image", why: "text" });+ expect(line(g)).toContain("Auto · made with MOSS-Image");});- it("a prompt the patterns match: Krea 2 Realism straight away, with no Ideogram 4 job", async () => {+ it("a prompt the patterns match: Krea 2 Realism, naming the pattern", async () => {const g = await run(CAT);expect(g.status, g.error ?? "").toBe("succeeded");expect(handed.map((h) => h.model)).toEqual(["oss-krea2-realism"]);@@ -117,10 +120,9 @@ describe("what Auto runs on", () => {expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "trigger" });expect(handed[0].input.prompt).toBe(CAT);expect(line(g)).toContain("Auto · made with Krea 2 Realism");- expect(line(g)).not.toContain("declined");});- it("a picture to work from: Qwen-Image 2.1's edit, never Ideogram 4", async () => {+ it("a picture to work from: Qwen-Image 2.1's edit, as before", async () => {const g = await run("make it golden hour", { inputs: { images: [dataUri(gradient)] } });expect(g.status, g.error ?? "").toBe("succeeded");expect(handed.map((h) => h.model)).toEqual(["oss-qwen-image-21"]);@@ -128,26 +130,43 @@ describe("what Auto runs on", () => {expect(g.request.auto).toEqual({ model: "oss-qwen-image-21", why: "edit" });});- it("the owner's own patterns decide, and a model switched off is passed over", async () => {+ it("an edit that fails is not handed to another model", async () => {+ failing = new Set(["oss-qwen-image-21"]);+ const g = await run("make it golden hour", { inputs: { images: [dataUri(gradient)] } });+ expect(g.status).toBe("failed");+ expect(handed.map((h) => h.model)).toEqual(["oss-qwen-image-21"]);+ });++ it("Ideogram 4 and FIBO 2 Dev are never planned for a picture from words, whatever the words or the switches", () => {+ const words = ["a koi pond at night", 'a poster that says "OPEN"', CAT, "a neon sign above a bar", "a woman in a red evening gown"];+ for (const prompt of words) expect(["oss-krea2-realism", "oss-moss-image"], prompt).toContain(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt }).model.id);+ changeAccess([{ kind: "model", id: "oss-krea2-realism", on: false }]);+ for (const prompt of words) expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt }).model.id, prompt).toBe("oss-moss-image");+ changeAccess([{ kind: "model", id: "oss-moss-image", on: false }]);+ // Neither is on: Auto asks for a model rather than reaching for Ideogram 4 or FIBO 2 Dev.+ expect(() => previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: "a koi pond at night" })).toThrow(/Auto has no image model switched on here/);+ });++ it("the owner's own patterns still route, and a model switched off is passed over", async () => {setSetting("autoImagePatterns", "koi");expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: "a koi pond at night" }).model.id).toBe("oss-krea2-realism");- // The built-in list is gone with it: the cat goes to Ideogram 4 now.- expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT }).model.id).toBe("oss-ideogram-4");+ expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT }).model.id).toBe("oss-krea2-realism");setSetting("autoImagePatterns", "");expect(getSetting("autoImagePatterns")).toBe(DEFAULT_AUTO_PATTERNS.join("\n"));- changeAccess([{ kind: "model", id: "oss-ideogram-4", on: false }]);- expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: "a koi pond at night" }).model.id).toBe("oss-krea2-realism");+ changeAccess([{ kind: "model", id: "oss-moss-image", on: false }]);+ expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: 'a poster that says "OPEN"' }).model.id).toBe("oss-krea2-realism");});- it("is priced before Run as the model it would pick (free on a GPU), and a pick it carries stays", () => {+ it("is priced before Run as the model it would pick (free on a GPU), and a pick it carries stays while it is one of Auto's", () => {const p = previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: "a koi pond at night" });- expect(p.model.id).toBe("oss-ideogram-4");+ expect(p.model.id).toBe("oss-krea2-realism");expect(p.costUsd).toBe(0);- expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT }).model.id).toBe("oss-krea2-realism");+ expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: 'a sign that says "OPEN"' }).model.id).toBe("oss-moss-image");// A run planned again (a resend, a run that waited to enter the line) keeps the model it was made with.- expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT, auto: { model: "oss-fibo2-dev", why: "declined" } }).model.id).toBe("oss-fibo2-dev");- // A pick that isn't one of Auto's is planned again.- expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT, auto: { model: "nano-banana-pro", why: "plain" } }).model.id).toBe("oss-krea2-realism");+ expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT, auto: { model: "oss-moss-image", why: "fallback" } }).model.id).toBe("oss-moss-image");+ // An older run's Ideogram 4 or FIBO 2 Dev pick, or a pick that isn't one of Auto's, is planned again.+ for (const model of ["oss-ideogram-4", "oss-fibo2-dev", "nano-banana-pro"])+ expect(previewGeneration({ feature: "image", modelId: AUTO_IMAGE, prompt: CAT, auto: { model, why: "plain" } }).model.id, model).toBe("oss-krea2-realism");});it("a model picked by name always runs on that model", async () => {@@ -161,76 +180,58 @@ describe("what Auto runs on", () => {});});-describe("Auto after Ideogram 4 declines", () => {- it("Krea 2 Realism makes the same run at once (no second Ideogram 4 try), and the run says so", async () => {- ideogram = [[card]];- const g = await run("a red fox in deep snow", { params: { aspectRatio: "4:5", resolution: "1.5K" } });+describe("Auto's next model when one fails", () => {+ it("Krea 2 Realism fails: MOSS-Image makes the same run at once, and the run says so", async () => {+ failing = new Set(["oss-krea2-realism"]);+ const g = await run("a red fox in deep snow", { params: { aspectRatio: "4:5", resolution: "1K" } });expect(g.status, g.error ?? "").toBe("succeeded");- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism"]);- expect(g.modelId).toBe("oss-krea2-realism");+ expect(handed.map((h) => h.model)).toEqual(["oss-krea2-realism", "oss-moss-image"]);+ expect(g.modelId).toBe("oss-moss-image");expect(g.request.modelId).toBe(AUTO_IMAGE);- expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "declined" });+ expect(g.request.auto).toEqual({ model: "oss-moss-image", why: "fallback" });expect(g.request.notice).toBeUndefined();expect(g.outputs).toHaveLength(1);- // The same words in plain text, the shape and size asked; Working, saying which model makes it.+ // The same words, the shape and size asked; Working, saying which model makes it.expect(handed[1].input.prompt).toBe("a red fox in deep snow");expect(handed[1].input.aspectRatio).toBe("4:5");expect(handed[1].run.status).toBe("running");- expect(handed[1].run.message).toBe("Making it with Krea 2 Realism");+ expect(handed[1].run.message).toBe("Making it with MOSS-Image");expect(rowsSince(g.id)).toBe(1);- expect(line(g)).toContain("Auto · made with Krea 2 Realism · Ideogram 4 declined this one");- expect(line(g)).not.toContain(declinedNotice("Krea 2 Realism"));- // The owner's own run: the card, the words, and Add a pattern.- expect(g.declinedCards).toHaveLength(1);- expect(line(g)).toContain("Words: “a red fox in deep snow”");- expect(line(g)).toContain("Add a pattern");+ expect(line(g)).toContain("Auto · made with MOSS-Image · Auto's next model");+ expect(line(g)).not.toContain("declined");+ expect(g.declinedCards).toBeUndefined();});- it("each next model only when the one before fails: FIBO 2 Dev, then MOSS-Image", async () => {- ideogram = [[card]];- failing = new Set(["oss-krea2-realism"]);- const fibo = await run("a red fox in deep snow");- expect(fibo.status, fibo.error ?? "").toBe("succeeded");- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism", "oss-fibo2-dev"]);- expect(fibo.modelId).toBe("oss-fibo2-dev");- expect(handed[2].run.message).toBe("Making it with FIBO 2 Dev");- expect(line(fibo)).toContain("Auto · made with FIBO 2 Dev · Ideogram 4 declined this one");-- handed = [];- ideogram = [[card]];- failing = new Set(["oss-krea2-realism", "oss-fibo2-dev"]);- const moss = await run("a lighthouse at dusk");- expect(moss.status, moss.error ?? "").toBe("succeeded");- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);- expect(moss.modelId).toBe("oss-moss-image");- expect(rowsSince(moss.id)).toBe(1);+ it("lettering: MOSS-Image fails, Krea 2 Realism makes it", async () => {+ failing = new Set(["oss-moss-image"]);+ const g = await run('a storefront with "OPEN LATE" painted on the glass');+ expect(g.status, g.error ?? "").toBe("succeeded");+ expect(handed.map((h) => h.model)).toEqual(["oss-moss-image", "oss-krea2-realism"]);+ expect(g.request.auto).toEqual({ model: "oss-krea2-realism", why: "fallback" });+ expect(rowsSince(g.id)).toBe(1);});- it("when all three fail too, the run fails as Ideogram 4's, in the words it always had, and Retry runs Auto again", async () => {- ideogram = [[card]];- failing = new Set(["oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);+ it("when both fail, each was tried once, never Ideogram 4 or FIBO 2 Dev, and the run fails once as one run", async () => {+ failing = new Set(["oss-krea2-realism", "oss-moss-image", "oss-fibo2-dev", "oss-ideogram-4"]);const g = await run("a red fox in deep snow");expect(g.status).toBe("failed");- expect(g.error).toBe(BLOCKED_CARD_MESSAGE);- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);- expect(g.modelId).toBe("oss-ideogram-4");+ expect(g.error).toMatch(/Out of memory/);+ expect(handed.map((h) => h.model)).toEqual(["oss-krea2-realism", "oss-moss-image"]);expect(g.request.modelId).toBe(AUTO_IMAGE);- expect(g.request.auto).toEqual({ model: "oss-ideogram-4", why: "plain" });- expect(g.outputs).toEqual([]);- expect(g.declinedCards).toHaveLength(1);expect(rowsSince(g.id)).toBe(1);- expect(line(g)).toContain("Auto · tried Ideogram 4");});- it("a fallback switched off is passed over", async () => {- changeAccess([{ kind: "model", id: "oss-krea2-realism", on: false }]);- ideogram = [[card]];+ it("the next model switched off: the run fails as its first model did", async () => {+ changeAccess([{ kind: "model", id: "oss-moss-image", on: false }]);+ failing = new Set(["oss-krea2-realism"]);const g = await run("a red fox in deep snow");- expect(g.status, g.error ?? "").toBe("succeeded");- expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-fibo2-dev"]);+ expect(g.status).toBe("failed");+ expect(handed.map((h) => h.model)).toEqual(["oss-krea2-realism"]);});+});- it("Ideogram 4 picked by name takes the same fallbacks, and stays a run of that model with a notice", async () => {+describe("Ideogram 4 picked by name, when it declines", () => {+ it("takes its own fallbacks (Krea 2 Realism first), and stays a run of that model with a notice", async () => {ideogram = [[card]];const g = await run("a red fox in deep snow", {}, "oss-ideogram-4");expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism"]);@@ -238,6 +239,25 @@ describe("Auto after Ideogram 4 declines", () => {expect(g.request.notice).toBe(declinedNotice("Krea 2 Realism"));expect(g.request.auto).toBeUndefined();});++ it("each next one only when the one before fails: FIBO 2 Dev, then MOSS-Image, then it fails as Ideogram 4's", async () => {+ ideogram = [[card]];+ failing = new Set(["oss-krea2-realism", "oss-fibo2-dev"]);+ const moss = await run("a lighthouse at dusk", {}, "oss-ideogram-4");+ expect(moss.status, moss.error ?? "").toBe("succeeded");+ expect(handed.map((h) => h.model)).toEqual(["oss-ideogram-4", "oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);+ expect(moss.modelId).toBe("oss-moss-image");++ handed = [];+ ideogram = [[card]];+ failing = new Set(["oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);+ const g = await run("a red fox in deep snow", {}, "oss-ideogram-4");+ expect(g.status).toBe("failed");+ expect(g.error).toBe(BLOCKED_CARD_MESSAGE);+ expect(g.modelId).toBe("oss-ideogram-4");+ expect(g.declinedCards).toHaveLength(1);+ expect(rowsSince(g.id)).toBe(1);+ });});describe("the setting", () => {diff --git a/tests/auto-image.test.ts b/tests/auto-image.test.tsindex 9f7f9193..a5962a2a 100644--- a/tests/auto-image.test.ts+++ b/tests/auto-image.test.ts@@ -4,16 +4,19 @@ import { getModel, MODELS } from "@/lib/catalog";import { planGeneration, estimateCost } from "@/lib/catalog/plan";import { getPreset } from "@/lib/catalog";import {- AUTO_FALLBACKS,AUTO_IMAGE,AUTO_MODELS,+ AUTO_T2I_MODELS,autoCandidates,autoLine,+ autoModelsFor,+ autoNext,autoPatterns,autoPatternsProblems,+ DECLINED_FALLBACKS,DEFAULT_AUTO_PATTERNS,matchedPattern,- nextAutoFallback,+ nextDeclinedFallback,} from "@/lib/auto-image";import { EDIT_STUDIO, IMAGE_STUDIO, INPAINT_STUDIO } from "@/lib/studios";import { withAutoPattern } from "@/components/add-auto-pattern";@@ -26,6 +29,8 @@ import type { Generation } from "@/lib/catalog/types";const defaults = autoPatterns(DEFAULT_AUTO_PATTERNS.join("\n"));const pick = (prompt: string, more: { op?: "t2i" | "edit" | "inpaint" | "outpaint"; images?: number } = {}) => autoCandidates({ prompt, ...more }, defaults);+const KREA_FIRST = ["oss-krea2-realism", "oss-moss-image"];+const MOSS_FIRST = ["oss-moss-image", "oss-krea2-realism"];describe("Auto in the catalog", () => {it("is an open image choice named Auto, next to the models it picks, which keep their names", () => {@@ -43,6 +48,21 @@ describe("Auto in the catalog", () => {// Every model it may pick is in the catalog, as an open image model.for (const id of AUTO_MODELS) expect(getModel(id), id).toMatchObject({ engine: "open", kind: "image" });expect(MODELS.filter((x) => x.name === "Auto")).toHaveLength(1);+ // Its text-to-image route is Krea 2 Realism's (the GPU pre-flight reads it), and it says what it picks.+ expect(m.routes.find((r) => r.op === "t2i")?.endpoint).toBe(getModel("oss-krea2-realism")!.routes[0].endpoint);+ expect(m.tagline).toMatch(/Krea 2 Realism/);+ expect(m.tagline).toMatch(/MOSS-Image/);+ expect(m.tagline).not.toMatch(/Ideogram|FIBO/);+ });++ it("never plans a picture from words on Ideogram 4 or FIBO 2 Dev; both stay in the catalog to pick by hand", () => {+ expect(AUTO_T2I_MODELS).toEqual(KREA_FIRST);+ expect(autoModelsFor("t2i")).toEqual(KREA_FIRST);+ for (const id of ["oss-ideogram-4", "oss-fibo2-dev"]) {+ expect(autoModelsFor("t2i")).not.toContain(id);+ expect(getModel(id)).toMatchObject({ engine: "open", kind: "image" });+ }+ expect(AUTO_MODELS.has("oss-ideogram-4")).toBe(false);});it("is the Image studio's default on the open engine for everyone; Edit and Inpaint keep Qwen-Image 2.1", () => {@@ -70,7 +90,7 @@ describe("what Auto picks", () => {for (const words of ["put the logo on the poster", "a cat in a gown"]) expect(pick(words, { images: 1 }).models).not.toContain("oss-ideogram-4");});- it("lettering, posters, logos, signs and words in quotes: Ideogram 4", () => {+ it("lettering, posters, logos, signs and words in quotes: MOSS-Image, then Krea 2 Realism", () => {for (const words of ["a film poster for a heist movie","a minimal logo for a coffee roaster",@@ -81,10 +101,10 @@ describe("what Auto picks", () => {// Lettering wins over a pattern."a poster of a model in a bikini",])- expect(pick(words), words).toMatchObject({ models: ["oss-ideogram-4", ...AUTO_FALLBACKS], why: "text" });+ expect(pick(words), words).toEqual({ models: MOSS_FIRST, why: "text" });});- it("prompts Ideogram 4's filter often declines: Krea 2 Realism, then FIBO 2 Dev and MOSS-Image, Ideogram 4 last", () => {+ it("a prompt the setting's patterns match: Krea 2 Realism, then MOSS-Image, naming the line", () => {for (const words of ["a cat in an antique-gold paillette gown, studio light, her hair lifting in the wind","a fox wearing a tailored velvet suit at a gala",@@ -96,13 +116,13 @@ describe("what Auto picks", () => {"a nude-tone slip dress","a nude tone slip dress",])- expect(pick(words), words).toMatchObject({ models: [...AUTO_FALLBACKS, "oss-ideogram-4"], why: "trigger" });+ expect(pick(words), words).toMatchObject({ models: KREA_FIRST, why: "trigger" });expect(pick("a cat in an antique-gold paillette gown").pattern).toMatch(/gowns/);});- it("everything else: Ideogram 4 first", () => {+ it("everything else: Krea 2 Realism, then MOSS-Image", () => {for (const words of ["a koi pond at night, neon rain", "a cat asleep on a windowsill", "a dog running on a beach", "a woman in a red evening gown on a staircase", "sheerness of the cliffs", "a swimmer at dawn"])- expect(pick(words), words).toMatchObject({ models: ["oss-ideogram-4", ...AUTO_FALLBACKS], why: "plain" });+ expect(pick(words), words).toEqual({ models: KREA_FIRST, why: "plain" });});it("lettering a prompt only rules out doesn't count as asking for it", () => {@@ -113,28 +133,35 @@ describe("what Auto picks", () => {"a clean product shot, text-free, logo-free","a misty forest, avoid text and labels",])- expect(pick(words), words).toMatchObject({ models: ["oss-ideogram-4", ...AUTO_FALLBACKS], why: "plain" });- const acct = autoCandidates({ prompt: "full-body photograph of a model on a bed, soft daylight, no text, no watermark.", account: true }, defaults);- expect(acct).toMatchObject({ models: [...AUTO_FALLBACKS, "oss-ideogram-4"], why: "plain" });+ expect(pick(words), words).toEqual({ models: KREA_FIRST, why: "plain" });// A prompt that rules some lettering out and asks for other lettering still asks for it.for (const words of ['a poster that says "OPEN", no watermark', "a neon sign above a bar, no logos", "no text on the shirt, a logo on the cap"])expect(pick(words), words).toMatchObject({ why: "text" });});- it("an account's plain prompt starts on Krea 2 Realism; its lettering and edits route as the owner's", () => {- const acct = (prompt: string, more: { op?: "t2i" | "edit"; images?: number } = {}) => autoCandidates({ prompt, ...more, account: true }, defaults);- for (const words of ["a koi pond at night, neon rain", "a woman in a red evening gown on a staircase"])- expect(acct(words), words).toMatchObject({ models: [...AUTO_FALLBACKS, "oss-ideogram-4"], why: "plain" });- expect(acct('a poster that says "OPEN LATE"')).toMatchObject({ models: ["oss-ideogram-4", ...AUTO_FALLBACKS], why: "text" });- expect(acct("make the dress red", { images: 1 }).why).toBe("edit");+ it("whatever the words, Ideogram 4 and FIBO 2 Dev are never among the picks for a picture from words", () => {+ for (const words of ["a koi pond at night", 'a poster that says "OPEN"', "a cat in an antique-gold paillette gown", "a neon sign above a bar", ""]) {+ const c = pick(words);+ expect(c.models, words).not.toContain("oss-ideogram-4");+ expect(c.models, words).not.toContain("oss-fibo2-dev");+ expect([...c.models].sort(), words).toEqual([...KREA_FIRST].sort());+ }+ });++ it("the next model after one fails: the other of the two, each at most once, then none", () => {+ expect(autoNext(KREA_FIRST, ["oss-krea2-realism"])).toEqual(["oss-moss-image"]);+ expect(autoNext(MOSS_FIRST, ["oss-moss-image"])).toEqual(["oss-krea2-realism"]);+ expect(autoNext(KREA_FIRST, ["oss-krea2-realism", "oss-moss-image"])).toEqual([]);+ // An older run that started on Ideogram 4: both are left, in order.+ expect(autoNext(KREA_FIRST, ["oss-ideogram-4"])).toEqual(KREA_FIRST);});- it("after Ideogram 4 declines: Krea 2 Realism, FIBO 2 Dev, MOSS-Image, then none", () => {- expect(AUTO_FALLBACKS).toEqual(["oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);- expect(nextAutoFallback(undefined)).toBe("oss-krea2-realism");- expect(nextAutoFallback("oss-krea2-realism")).toBe("oss-fibo2-dev");- expect(nextAutoFallback("oss-fibo2-dev")).toBe("oss-moss-image");- expect(nextAutoFallback("oss-moss-image")).toBeUndefined();+ it("Ideogram 4 picked by name, after it declines: Krea 2 Realism, FIBO 2 Dev, MOSS-Image, then none", () => {+ expect(DECLINED_FALLBACKS).toEqual(["oss-krea2-realism", "oss-fibo2-dev", "oss-moss-image"]);+ expect(nextDeclinedFallback(undefined)).toBe("oss-krea2-realism");+ expect(nextDeclinedFallback("oss-krea2-realism")).toBe("oss-fibo2-dev");+ expect(nextDeclinedFallback("oss-fibo2-dev")).toBe("oss-moss-image");+ expect(nextDeclinedFallback("oss-moss-image")).toBeUndefined();});});@@ -178,20 +205,23 @@ describe("the line under a run of Auto", () => {({id: "g",status: "succeeded",- modelId: "oss-ideogram-4",- modelName: "Ideogram 4",+ modelId: "oss-krea2-realism",+ modelName: "Krea 2 Realism",made: undefined,...o,request: { feature: "image", modelId: o.requestModel ?? AUTO_IMAGE, prompt: "a cat in a gown", ...(o.auto && { auto: o.auto }) },}) as unknown as Generation;- it("says what made it, and that Ideogram 4 declined when another model made it", () => {- expect(autoLine(run({ auto: { model: "oss-ideogram-4", why: "plain" } }))).toBe("Auto · made with Ideogram 4");- expect(autoLine(run({ modelId: "oss-krea2-realism", modelName: "Krea 2 Realism", auto: { model: "oss-krea2-realism", why: "declined" } }))).toBe(- "Auto · made with Krea 2 Realism · Ideogram 4 declined this one",+ it("says what made it, and that it was Auto's next model when the one before couldn't make it", () => {+ expect(autoLine(run({ auto: { model: "oss-krea2-realism", why: "plain" } }))).toBe("Auto · made with Krea 2 Realism");+ expect(autoLine(run({ modelId: "oss-moss-image", modelName: "MOSS-Image", auto: { model: "oss-moss-image", why: "fallback" } }))).toBe(+ "Auto · made with MOSS-Image · Auto's next model",);- expect(autoLine(run({ status: "running", auto: { model: "oss-ideogram-4", why: "plain" } }))).toBe("Auto · making it with Ideogram 4");- expect(autoLine(run({ status: "failed", auto: { model: "oss-ideogram-4", why: "plain" } }))).toBe("Auto · tried Ideogram 4");+ // An older run Ideogram 4 declined reads the same, naming no model that declined.+ expect(autoLine(run({ auto: { model: "oss-krea2-realism", why: "declined" } }))).toBe("Auto · made with Krea 2 Realism · Auto's next model");+ expect(autoLine(run({ status: "running", auto: { model: "oss-krea2-realism", why: "plain" } }))).toBe("Auto · making it with Krea 2 Realism");+ expect(autoLine(run({ status: "failed", auto: { model: "oss-krea2-realism", why: "plain" } }))).toBe("Auto · tried Krea 2 Realism");+ for (const why of ["plain", "text", "trigger", "fallback", "declined"] as const) expect(autoLine(run({ auto: { model: "oss-krea2-realism", why } }))).not.toMatch(/declined|Ideogram/);// A model picked by name says nothing of Auto.expect(autoLine(run({ requestModel: "oss-ideogram-4" }))).toBeNull();});@@ -199,7 +229,7 @@ describe("the line under a run of Auto", () => {it("shows on the feed card and the run details; the owner's review line only with the cards", () => {const g = run({ modelId: "oss-krea2-realism", modelName: "Krea 2 Realism", auto: { model: "oss-krea2-realism", why: "declined" } });const theirs = renderToStaticMarkup(MadeNote({ g })!);- expect(theirs).toContain("Auto · made with Krea 2 Realism · Ideogram 4 declined this one");+ expect(theirs).toContain("Auto · made with Krea 2 Realism · Auto's next model");expect(theirs).not.toContain("Add a pattern");expect(theirs).not.toContain("Words:");const owners = renderToStaticMarkup(MadeNote({ g: { ...g, declinedCards: [{ url: "/api/files/card.png", spread: 9, grey: 0.9 }] } })!);diff --git a/tests/open-sota-studios.test.ts b/tests/open-sota-studios.test.tsindex a7d5a430..797aaf9e 100644--- a/tests/open-sota-studios.test.ts+++ b/tests/open-sota-studios.test.ts@@ -27,7 +27,7 @@ const openIds = MODELS.filter((m) => m.engine === "open").map((m) => m.id);const before = (a: string, b: string) => expect(openIds.indexOf(a), `${a} before ${b}`).toBeLessThan(openIds.indexOf(b));describe("studio defaults on your GPU", () => {- it("Image opens on Auto (Ideogram 4 for most), Edit and Inpaint on Qwen-Image 2.1", () => {+ it("Image opens on Auto (Krea 2 Realism for most), Edit and Inpaint on Qwen-Image 2.1", () => {expect(IMAGE_STUDIO.defaultModels.open).toBe("oss-auto-image");expect(EDIT_STUDIO.defaultModels.open).toBe("oss-qwen-image-21");expect(INPAINT_STUDIO.defaultModels.open).toBe("oss-qwen-image-21");