Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Originals O10: Marketing, Ads, AI Influencer, Photodump and Fashion default to the Originals

Claude5f7a67b3f5d3
diff --git a/src/app/api/marketing/runs/[id]/compose/route.ts b/src/app/api/marketing/runs/[id]/compose/route.ts
index 8193c8c8..252a7c5c 100644
--- a/src/app/api/marketing/runs/[id]/compose/route.ts
+++ b/src/app/api/marketing/runs/[id]/compose/route.ts
@@ -11,7 +11,7 @@ const Body = z.object({
auto: z.boolean().optional(),
});
-/** Save an open-engine result with its words set in the browser (an uploaded PNG) to the Library. */
+/** Save a result with its words set in the browser (an uploaded PNG: open models, Fuobe Marketing Image) to the Library. */
export async function POST(request: Request, ctx: RouteContext<"/api/marketing/runs/[id]/compose">) {
const { id } = await ctx.params;
const body = await readBody(request, Body, "Upload the image first");
diff --git a/src/components/ads/new-ads.tsx b/src/components/ads/new-ads.tsx
index 3f321dfc..52cf99da 100644
--- a/src/components/ads/new-ads.tsx
+++ b/src/components/ads/new-ads.tsx
@@ -1,11 +1,14 @@
"use client";
import { Loader2, Minus, Plus, Sparkles } from "lucide-react";
-import { useMemo, useState } from "react";
+import { useState } from "react";
import { toast } from "sonner";
import { Button } from "@/components/ui/button";
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { AddFromLink, ProductCard, ProductDialog, UploadProductButton } from "@/components/brand/products";
-import { MAX_ADS_PER_PRODUCT, MAX_PRODUCTS_PER_RUN, type BrandKit, type Product } from "@/lib/catalog/marketing";
+import { AD_VISUAL_MODELS, MAX_ADS_PER_PRODUCT, MAX_PRODUCTS_PER_RUN, type BrandKit, type Product } from "@/lib/catalog/marketing";
+import { useModelAccess } from "@/lib/api";
+import { keepOffered, offered } from "@/lib/model-access";
import { formatCost } from "@/lib/format";
import { useCreativeActions, useEstimate, useProductActions } from "@/components/marketing/hooks";
@@ -49,9 +52,15 @@ export function NewAds({ brand, products, engine, onCreated }: { brand: BrandKit
const [selected, setSelected] = useState<string[]>(() => products.slice(0, MAX_PRODUCTS_PER_RUN).map((p) => p.id));
const [counts, setCounts] = useState<Record<string, number>>({});
const [editing, setEditing] = useState<Product | null>(null);
+ // The picture's model: Fuobe Marketing Image first; partner models as choices (those switched off in Settings leave).
+ const access = useModelAccess();
+ const visuals = keepOffered(AD_VISUAL_MODELS[engine], (c) => offered(access, c.id, engine));
+ const [picked, setPicked] = useState<string>();
+ const visual = visuals.find((c) => c.id === picked) ?? visuals[0];
const items = selected.filter((id) => products.some((p) => p.id === id)).map((productId) => ({ productId, count: counts[productId] ?? 4 }));
const total = items.reduce((n, i) => n + i.count, 0);
- const body = useMemo(() => (items.length ? { brandId: brand.id, engine, items } : null), [brand.id, engine, items]);
+ // useEstimate keys on the body's JSON, so a fresh object each render is fine.
+ const body = items.length ? { brandId: brand.id, engine, items, ...(visual && { modelId: visual.id }) } : null;
const est = useEstimate<BatchEstimate>("/api/ads/estimate", body);
const toggle = (id: string) =>
setSelected((s) => {
@@ -73,7 +82,7 @@ export function NewAds({ brand, products, engine, onCreated }: { brand: BrandKit
onError: (e) => toast.error((e as Error).message),
});
};
- const price = est.data ? (est.data.demo ? "Demo · free" : est.data.costUsd == null ? "price unknown" : `≈ ${formatCost(est.data.costUsd)}`) : "";
+ const price = est.data ? (est.data.demo ? "Demo · free" : est.data.costUsd == null ? "price unknown" : est.data.costUsd === 0 ? "Free" : `≈ ${formatCost(est.data.costUsd)}`) : "";
return (
<div className="space-y-6">
<section className="rounded-2xl border bg-background p-4 sm:p-5">
@@ -124,6 +133,28 @@ export function NewAds({ brand, products, engine, onCreated }: { brand: BrandKit
);
})}
</ul>
+ {visuals.length > 1 && visual && (
+ <div className="mt-4 flex flex-wrap items-center gap-x-3 gap-y-1.5">
+ <label htmlFor="ads-visual" className="text-[13px] font-medium">
+ Pictures by
+ </label>
+ <Select value={visual.id} onValueChange={setPicked}>
+ <SelectTrigger id="ads-visual" size="sm" className="min-w-0 max-w-full sm:w-64" aria-describedby="ads-visual-note">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {visuals.map((c) => (
+ <SelectItem key={c.id} value={c.id}>
+ {c.name ?? c.id}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ <p id="ads-visual-note" className="w-full text-[12px] text-muted-foreground">
+ {visual.note}. Headlines, copy and your logo are set in your brand fonts on top.
+ </p>
+ </div>
+ )}
<div className="mt-5 flex flex-wrap items-center justify-between gap-3 rounded-xl bg-muted/60 px-4 py-3">
<div className="min-w-0 text-[13px]">
<p className="font-medium">
diff --git a/src/components/fashion/fashion-view.tsx b/src/components/fashion/fashion-view.tsx
index 154fbf7b..90ec0e9a 100644
--- a/src/components/fashion/fashion-view.tsx
+++ b/src/components/fashion/fashion-view.tsx
@@ -24,7 +24,9 @@ import { TemplatePreview } from "./template-preview";
const LABELS = ["Select presets", "Character", "Generation", "Clothing", "Photoset"];
const BANNER_KEY = "fuobe.fashion.banner";
+/** The cloud's outfit models: Fuobe Try-On (the Original, FLUX.2 [klein] 4B + a try-on LoRA) first, partners after. */
const OUTFIT_MODELS = [
+ ["fuobe-tryon", "Fuobe Try-On"],
["fashn-tryon", "FASHN Try-On"],
["nano-banana-pro", "Nano Banana Pro"],
] as const;
@@ -64,7 +66,7 @@ export function FashionView() {
const [s, dispatch] = useStoredReducer<FashionState, Parameters<typeof fashionReducer>[1]>("fuobe.fashion", fashionReducer, FASHION_START);
const [engine, setEngine] = useEngine();
const [garment, setGarment] = useState<SlotValue | null>(null);
- const [pickedOutfit, setOutfitModel] = useState<string>("fashn-tryon");
+ const [pickedOutfit, setOutfitModel] = useState<string>("fuobe-tryon");
// Outfit models switched off in Settings → Models & licences leave the choice; the pick falls back to one that is on.
const access = useModelAccess();
const outfitModels = keepOffered(OUTFIT_MODELS, ([id]) => offered(access, id, "cloud"));
diff --git a/src/components/influencer/influencer-builder.tsx b/src/components/influencer/influencer-builder.tsx
index 52d47e0b..8e4cc7a9 100644
--- a/src/components/influencer/influencer-builder.tsx
+++ b/src/components/influencer/influencer-builder.tsx
@@ -49,6 +49,7 @@ const STARTS: [InfluencerStart, string][] = [
];
const CLOUD_MODELS: { id: string; label: string; note: string }[] = [
+ { id: "fuobe-soul", label: "Fuobe Soul", note: "Fuobe Original: a wide sheet in Soul's Realistic look; your face or clothing then go on with Qwen-Image-Edit 2511" },
{ id: "nano-banana-pro", label: "Nano Banana Pro", note: "A wide 2K sheet from your picks, keeps a face and clothing closely" },
{ id: "seedream-5-pro", label: "Seedream 5.0 Pro", note: "Photoreal, from the same picks" },
];
@@ -394,7 +395,7 @@ export function InfluencerBuilder() {
</div>
) : (
<p className="text-[12.5px] text-muted-foreground">
- Open source: Z-Image Turbo draws the sheet (the Soul Cast sheet workflow); with a photo or clothing, Qwen-Image-Edit 2511 then puts them on it. <span className="font-medium text-foreground">Free</span> on your GPU.
+ Fuobe Soul on your GPU: Z-Image Turbo draws the sheet in Soul&apos;s Realistic look (the Soul Cast sheet workflow); with a photo or clothing, Qwen-Image-Edit 2511 then puts them on it. <span className="font-medium text-foreground">Free</span> on your GPU.
</p>
)}
<RunInfo preview={blocker ? undefined : (settled ? preview.data : undefined)} loading={preview.isFetching} blocker={blocker} />
diff --git a/src/components/marketing/marketing-studio.tsx b/src/components/marketing/marketing-studio.tsx
index 4039308a..0180411e 100644
--- a/src/components/marketing/marketing-studio.tsx
+++ b/src/components/marketing/marketing-studio.tsx
@@ -179,7 +179,7 @@ function TextPanel({ draft, set, template }: { draft: Draft; set: (p: Partial<Dr
open={open}
onOpenChange={setOpen}
title="Words on the image"
- description="Set exactly, letter for letter: cloud models draw them; open-source results get them set on top in your brand fonts."
+ description="Set exactly, letter for letter: Fuobe Marketing Image and open-source results get them set on top in your brand fonts; GPT Image, Ideogram and Recraft draw them."
trigger={
<button type="button" className={cn(chipBase, has ? chipOn : chipIdle, "max-w-44")} aria-label="Headline and button text">
<Type className="size-3.5" />
diff --git a/src/components/marketing/runs.tsx b/src/components/marketing/runs.tsx
index e591fc87..5502f293 100644
--- a/src/components/marketing/runs.tsx
+++ b/src/components/marketing/runs.tsx
@@ -62,9 +62,9 @@ const composeRatio = (g?: Generation) => {
const overlayText = (run: MarketingRun) => ({ headline: run.meta.overlay?.headline ?? "", body: run.meta.overlay?.body ?? "", cta: run.meta.overlay?.cta ?? "" });
-/** An open-engine poster / ad whose picture is ready and whose words aren't set yet. */
+/** A poster / ad whose words are set in the browser (open models, Fuobe Marketing Image), its picture ready and its words not set yet. */
function needsCompose(run: MarketingRun): boolean {
- if (run.engine !== "open" || !run.meta.overlay || run.meta.composed || runStatus(run).state !== "done") return false;
+ if (!run.meta.overlay || run.meta.composed || runStatus(run).state !== "done") return false;
return run.generations.some((g) => run.finalIds.includes(g.id) && g.outputs.some((o) => o.kind === "image"));
}
@@ -96,7 +96,7 @@ function RunCard({ run, brand, onOpen, onCompose }: { run: MarketingRun; brand?:
const cost = run.generations.reduce((n, g) => n + (g.costUsd ?? 0), 0);
const ratio = runRatio(run, final);
const format = run.meta.format ? FORMATS[run.meta.format] : null;
- const canCompose = run.engine === "open" && !!run.meta.overlay && status.state === "done" && outputs.some((x) => x.o.kind === "image");
+ const canCompose = !!run.meta.overlay && status.state === "done" && outputs.some((x) => x.o.kind === "image");
// The words are set in the browser right after the picture lands; the card shows that version.
const composed = canCompose ? run.meta.composed : null;
const setting = canCompose && !composed;
diff --git a/src/components/photodump/photodump-view.tsx b/src/components/photodump/photodump-view.tsx
index dc64535f..d80697b0 100644
--- a/src/components/photodump/photodump-view.tsx
+++ b/src/components/photodump/photodump-view.tsx
@@ -29,7 +29,8 @@ const MODEL_NAMES: Record<string, string> = {
"fuobe-soul": "Fuobe Soul + Soul ID",
"nano-banana-pro": "Nano Banana Pro",
"seedream-5-pro": "Seedream 5.0 Pro",
- "oss-qwen-edit": "Qwen-Image-Edit",
+ "qwen-image-edit-2511-cloud": "Qwen-Image-Edit 2511",
+ "oss-qwen-edit": "Qwen-Image-Edit 2511",
};
const TABS = [
["all", "All"],
diff --git a/src/lib/catalog/marketing.ts b/src/lib/catalog/marketing.ts
index e0403984..8bf57a9b 100644
--- a/src/lib/catalog/marketing.ts
+++ b/src/lib/catalog/marketing.ts
@@ -938,10 +938,32 @@ export interface ModelChoice {
id: string;
/** Why it's the pick ("exact text", "keeps the product pixel-exact"). */
note?: string;
+ /** Its name, where the page has no model facts (Ads Studio's picture picker). */
+ name?: string;
}
-/** The models a Marketing Studio format can use on an engine, the default first. */
+/**
+ * Marketing Studio Image's Original (build plan O10): Qwen-Image-Edit 2511 with Fuobe's template prompts on both engines
+ * (Qwen-Image 2512 without a product photo; a Standalone product shot relit by the White_to_Scene LoRA on the open
+ * engine). Its pictures carry no words: the headline and CTA are set over them in the browser, so they come out exact.
+ */
+export const MARKETING_IMAGE_MODEL = "fuobe-marketing-image";
+
+/** The Original's line in the model menus, per engine. */
+export const MARKETING_IMAGE_NOTE: Record<Engine, string> = {
+ open: "Fuobe Original · Qwen-Image-Edit 2511 on your GPU",
+ cloud: "Fuobe Original · Qwen-Image-Edit 2511, hosted",
+};
+
+/**
+ * Whether a run's words are set over the picture in the browser (an open model, or the Original on either engine), not
+ * drawn by the model (GPT Image 2.5, Ideogram, Recraft, Nano Banana Pro in the cloud).
+ */
+export const wordsOnTop = (engine: Engine, modelId: string): boolean => engine === "open" || modelId === MARKETING_IMAGE_MODEL;
+
+/** The models a Marketing Studio format can use on an engine, the default first: the Original for every image format. */
export function formatModels(format: FormatDef, engine: Engine, has: { product: boolean; avatar: boolean }): ModelChoice[] {
+ const original: ModelChoice = { id: MARKETING_IMAGE_MODEL, note: MARKETING_IMAGE_NOTE[engine] };
if (engine === "open") {
switch (format.pipeline) {
case "motion":
@@ -949,22 +971,21 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:
case "ugc":
return [{ id: "oss-infinitetalk", note: "InfiniteTalk presenter" }];
default:
- if (format.id === "poster" && !has.product) return [{ id: "oss-qwen-image", note: "Qwen-Image; your text is set on top" }];
- return [{ id: "oss-qwen-edit", note: format.text ? "Qwen-Image-Edit; your text is set on top" : "Qwen-Image-Edit with your references" }];
+ return [original];
}
}
switch (format.id) {
case "product-standalone":
- return [{ id: "bria-product-shot", note: "Keeps the product pixel-exact" }, { id: "nano-banana-pro" }, { id: "gpt-image-2-5" }, { id: "product-photography", note: "One-tap studio shot" }];
+ return [original, { id: "bria-product-shot", note: "Keeps the product pixel-exact" }, { id: "nano-banana-pro" }, { id: "gpt-image-2-5" }, { id: "product-photography", note: "One-tap studio shot" }];
case "product-with-model":
- return [{ id: "nano-banana-pro", note: "Product + person references" }, { id: "gpt-image-2-5" }];
+ return [original, { id: "nano-banana-pro", note: "Product + person references" }, { id: "gpt-image-2-5" }];
case "ads":
case "marketplace":
- return [{ id: "gpt-image-2-5", note: "Exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }];
+ return [original, { id: "gpt-image-2-5", note: "Draws the exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }];
case "poster":
return has.product
- ? [{ id: "gpt-image-2-5", note: "Exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }]
- : [{ id: "ideogram-3", note: "Exact text in your brand colours" }, { id: "ideogram-4-5" }, { id: "recraft-4-1" }, { id: "gpt-image-2-5" }];
+ ? [original, { id: "gpt-image-2-5", note: "Draws the exact text" }, { id: "nano-banana-pro" }, { id: "ideogram-4-5" }]
+ : [original, { id: "ideogram-3", note: "Exact text in your brand colours" }, { id: "ideogram-4-5" }, { id: "recraft-4-1" }, { id: "gpt-image-2-5" }];
case "ugc-talking":
case "tiktok":
return [{ id: "omnihuman-2", note: "Full-body presenter" }, { id: "kling-avatar" }];
@@ -973,10 +994,22 @@ export function formatModels(format: FormatDef, engine: Engine, has: { product:
}
}
-/** Ads Studio's visual model per engine (the copy and layout are Fuobe's; the picture has no text). */
-export function adVisualModel(engine: Engine, hasProductImage: boolean): string {
- if (engine === "open") return hasProductImage ? "oss-qwen-edit" : "oss-qwen-image";
- return "nano-banana-pro";
+/**
+ * Ads Studio's visual models (the copy and layout are Fuobe's; the picture has no text): Fuobe Marketing Image on both
+ * engines (the product photo as reference, else made from the concept), partner models as choices in the cloud.
+ */
+export const AD_VISUAL_MODELS: Record<Engine, ModelChoice[]> = {
+ open: [{ id: MARKETING_IMAGE_MODEL, name: "Fuobe Marketing Image", note: "Fuobe Original · Qwen-Image-Edit 2511 with your product photo, free on your GPU" }],
+ cloud: [
+ { id: MARKETING_IMAGE_MODEL, name: "Fuobe Marketing Image", note: "Fuobe Original · Qwen-Image-Edit 2511 with your product photo, hosted on fal" },
+ { id: "nano-banana-pro", name: "Nano Banana Pro", note: "Google's Gemini 3 Pro Image, through fal" },
+ { id: "gpt-image-2-5", name: "GPT Image 2.5", note: "OpenAI's GPT Image 2.5 Flare, through fal" },
+ ],
+};
+
+/** Ads Studio's visual model on an engine: the one asked for when this engine offers it, else the Original. */
+export function adVisualModel(engine: Engine, asked?: string | null): string {
+ return asked && AD_VISUAL_MODELS[engine].some((c) => c.id === asked) ? asked : AD_VISUAL_MODELS[engine][0].id;
}
/** Cloud talking-presenter / voice / caption models for UGC pipelines. */
diff --git a/src/lib/catalog/packs.ts b/src/lib/catalog/packs.ts
index aa819399..7a38a91d 100644
--- a/src/lib/catalog/packs.ts
+++ b/src/lib/catalog/packs.ts
@@ -364,11 +364,19 @@ export interface PlanCaps {
/** Fuobe Soul: a character with a trained Soul ID makes its photos there, on either engine (build plan O3). */
export const PHOTODUMP_SOUL = "fuobe-soul";
+/**
+ * Instadump's Original (build plan O10): Qwen-Image-Edit 2511 with the photos as references, one Fuobe prompt per pack
+ * photo — hosted in the cloud, the 3-image graph on your GPU. It also makes a character's photos before a Soul ID.
+ */
+export const PHOTO_EDIT: Record<Engine, string> = { cloud: "qwen-image-edit-2511-cloud", open: "oss-qwen-edit" };
+
export const PHOTODUMP_MODELS: Record<Engine, string[]> = {
- cloud: [PHOTODUMP_SOUL, "nano-banana-pro", "seedream-5-pro"],
- open: [PHOTODUMP_SOUL, "oss-qwen-edit"],
+ cloud: [PHOTODUMP_SOUL, PHOTO_EDIT.cloud, "nano-banana-pro", "seedream-5-pro"],
+ open: [PHOTODUMP_SOUL, PHOTO_EDIT.open],
};
+const EDIT_NAMES: Record<string, string> = { "qwen-image-edit-2511-cloud": "Qwen-Image-Edit 2511", "oss-qwen-edit": "Qwen-Image-Edit 2511", "nano-banana-pro": "Nano Banana Pro", "seedream-5-pro": "Seedream 5.0 Pro" };
+
/** The character's Soul ID that runs on Fuobe Soul on this engine (a demo training's stand-in doesn't count). */
export const soulIdOf = (s: PhotoSubject, engine: Engine): ElementLora | undefined => (s.kind === "element" ? identityFor(s.loras, { id: PHOTODUMP_SOUL, engine }) : undefined);
@@ -380,9 +388,10 @@ export const soulIdOf = (s: PhotoSubject, engine: Engine): ElementLora | undefin
export function photodumpModel(subject: PhotoSubject, engine: Engine, _caps: PlanCaps, pick?: string, custom = false): { modelId: string; note?: string } {
const trained = soulIdOf(subject, engine);
if (!custom && trained && (!pick || pick === PHOTODUMP_SOUL)) return { modelId: PHOTODUMP_SOUL };
- // Say why when the pick (or a character without a Soul ID) ends up on an edit model.
- const fallback = engine === "open" ? "oss-qwen-edit" : pick === "seedream-5-pro" ? "seedream-5-pro" : "nano-banana-pro";
- const name = fallback === "oss-qwen-edit" ? "Qwen-Image-Edit" : fallback === "seedream-5-pro" ? "Seedream 5.0 Pro" : "Nano Banana Pro";
+ // Say why when the pick (or a character without a Soul ID) ends up on an edit model: Qwen-Image-Edit 2511 unless a
+ // partner model is picked in the cloud.
+ const fallback = engine === "cloud" && (pick === "nano-banana-pro" || pick === "seedream-5-pro") ? pick : PHOTO_EDIT[engine];
+ const name = EDIT_NAMES[fallback] ?? fallback;
const note =
pick === PHOTODUMP_SOUL && custom
? `Your own packs recreate each reference photo — ${name} runs them`
@@ -577,8 +586,14 @@ export const FASHION: FashionTemplate[] = FASHION_TEMPLATES.map((t) => ({
}));
export const getTemplate = (id: string) => FASHION.find((t) => t.id === id);
+/**
+ * Fashion Factory's models per step (build plan O10): Fuobe Try-On (FLUX.2 [klein] 4B + the try-on LoRA) dresses the
+ * base shot on both engines, FASHN and Nano Banana Pro stay as cloud choices; Qwen-Image-Edit 2511 makes the photoset.
+ */
+export const TRYON_MODEL = "fuobe-tryon";
export const FASHION_MODELS = {
- outfit: { cloud: ["fashn-tryon", "nano-banana-pro"], open: ["oss-tryon-klein"] },
+ outfit: { cloud: [TRYON_MODEL, "fashn-tryon", "nano-banana-pro"], open: [TRYON_MODEL] },
+ photoset: { cloud: [PHOTO_EDIT.cloud, "nano-banana-pro"], open: [PHOTO_EDIT.open] },
} as const;
const element = (s: PhotoSubject) => (s.kind === "element" ? `@${s.handle}` : "the person in image 1");
@@ -599,14 +614,16 @@ export function fashionBaseRequest(t: FashionTemplate, subject: Extract<PhotoSub
/** Step 4: the base shot wearing the uploaded outfit (try-on, or an edit that dresses them). */
export function fashionOutfitRequest(t: FashionTemplate, base: string, garment: string, engine: Engine, modelId?: string): GenerationRequest {
- const id = engine === "open" ? "oss-tryon-klein" : modelId === "nano-banana-pro" ? "nano-banana-pro" : "fashn-tryon";
+ const id = engine === "cloud" && modelId && (FASHION_MODELS.outfit.cloud as readonly string[]).includes(modelId) ? modelId : TRYON_MODEL;
const tryon = id !== "nano-banana-pro";
return {
feature: "fashion",
modelId: id,
+ // Fuobe Try-On runs on both engines: the run's engine picks its half.
+ ...(id === TRYON_MODEL && { engine }),
op: "edit",
prompt: tryon
- ? "A full-body photo of a person. Replace the outfit with the garment shown in the reference image, with its fabric, colour, pattern, logo and fit."
+ ? "a full-body photo of a person. Replace the outfit with the garment shown in the reference image, with its fabric, colour, pattern, logo and fit. The final image is a full body shot."
: `Dress the person in image 1 in the outfit or product from image 2: its exact fabric, colour, pattern, logo and fit. Keep their face, pose and ${t.name.toLowerCase()} set from image 1.`,
inputs: { images: [base, garment] },
params: { numOutputs: 2, ...(tryon ? {} : { aspectRatio: "3:4" }) },
@@ -614,9 +631,9 @@ export function fashionOutfitRequest(t: FashionTemplate, base: string, garment:
};
}
-/** Step 5: one photo per template shot, from the dressed image. */
-export function fashionPhotosetRequests(t: FashionTemplate, dressed: string, engine: Engine): GenerationRequest[] {
- const modelId = engine === "open" ? "oss-qwen-edit" : "nano-banana-pro";
+/** Step 5: one photo per template shot, from the dressed image (Qwen-Image-Edit 2511, or Nano Banana Pro when picked). */
+export function fashionPhotosetRequests(t: FashionTemplate, dressed: string, engine: Engine, pick?: string): GenerationRequest[] {
+ const modelId = engine === "cloud" && pick && (FASHION_MODELS.photoset.cloud as readonly string[]).includes(pick) ? pick : PHOTO_EDIT[engine];
const n = t.photoset.length;
return t.photoset.map((shot, i) => ({
feature: "fashion",
diff --git a/src/lib/influencer.ts b/src/lib/influencer.ts
index d92a10e6..a3be798f 100644
--- a/src/lib/influencer.ts
+++ b/src/lib/influencer.ts
@@ -794,10 +794,17 @@ export function cleanState(raw: unknown): { state: InfluencerState; problem: str
// ---------------------------------------------------------------------------
// The plan per engine
-/** The cloud models that draw the sheet from the compiled prompt: Nano Banana Pro (the default), Seedream 5.0 Pro. */
-export const INFLUENCER_CLOUD_MODELS = ["nano-banana-pro", "seedream-5-pro"] as const;
+/**
+ * The cloud models that draw the sheet: Fuobe Soul (the default, build plan O10: the sheet in Soul's casting look, then
+ * Qwen-Image-Edit 2511 puts your face and clothing on it), or Nano Banana Pro / Seedream 5.0 Pro in one pass with them.
+ */
+export const INFLUENCER_CLOUD_MODELS = ["fuobe-soul", "nano-banana-pro", "seedream-5-pro"] as const;
export const INFLUENCER_OPEN_MODELS = { sheet: "oss-zimage-soul-cast", edit: "oss-qwen-edit" } as const;
-/** Qwen-Image-Edit 2511 takes three images: the sheet, then the photo and clothing. */
+/** Fuobe Soul's steps in the cloud: the sheet on its hosted half, your face and clothing on hosted Qwen-Image-Edit 2511. */
+export const INFLUENCER_SOUL = { sheet: "fuobe-soul", edit: "qwen-image-edit-2511-cloud" } as const;
+/** The look the sheet is drawn in (Soul Cast's casting look: natural, unretouched skin and fabric). */
+export const INFLUENCER_LOOK = "v1-realistic";
+/** Qwen-Image-Edit 2511 takes three images on your GPU (the sheet, then the photo and clothing); fal takes more. */
const OPEN_EDIT_IMAGES = 3;
export interface InfluencerRun {
@@ -842,10 +849,10 @@ export function influencerBlocker(run: Pick<InfluencerRun, "state" | "direction"
}
/**
- * The jobs for a run. Cloud: Nano Banana Pro (or Seedream 5.0 Pro when asked) draws the sheet from the
- * compiled prompt, with the photo and clothing as references.
- * Open: the Soul Cast sheet workflow (Z-Image Turbo) draws the character; with a photo or clothing,
- * Qwen-Image-Edit 2511 then puts your face and clothes on that sheet, so the sheet keeps its wide shape.
+ * The jobs for a run. Open: the Soul Cast sheet workflow (Z-Image Turbo, with the casting look's LoRAs the server adds)
+ * draws the character; with a photo or clothing, Qwen-Image-Edit 2511 then puts your face and clothes on that sheet, so
+ * the sheet keeps its wide shape. Cloud: the same two steps on Fuobe Soul and hosted Qwen-Image-Edit 2511 by default, or
+ * Nano Banana Pro (Seedream 5.0 Pro when asked) drawing the sheet from the compiled prompt with the photos as references.
*/
export function planInfluencer(run: InfluencerRun, caps: Pick<PlanCaps, "has">): InfluencerPlan {
const blocker = influencerBlocker(run);
@@ -856,17 +863,42 @@ export function planInfluencer(run: InfluencerRun, caps: Pick<PlanCaps, "has">):
const clothing = run.clothing ?? [];
const title = influencerName(state);
const notes: string[] = [];
+ const has = (id: string, engine?: Engine) => !caps.has || caps.has(id, engine);
+ const asked = run.modelId && (INFLUENCER_CLOUD_MODELS as readonly string[]).includes(run.modelId) ? run.modelId : undefined;
+ // Fuobe Soul in the cloud unless another model is asked for (or this install switched Fuobe Soul off there).
+ const cloudSoul = run.engine === "cloud" && (asked ?? INFLUENCER_SOUL.sheet) === INFLUENCER_SOUL.sheet && has(INFLUENCER_SOUL.sheet, "cloud") && has(INFLUENCER_SOUL.edit);
- if (run.engine === "open") {
+ if (run.engine === "open" || cloudSoul) {
+ const open = run.engine === "open";
+ const sheetModel = open ? INFLUENCER_OPEN_MODELS.sheet : INFLUENCER_SOUL.sheet;
+ const editModel = open ? INFLUENCER_OPEN_MODELS.edit : INFLUENCER_SOUL.edit;
const sheet: InfluencerStep = {
key: "sheet",
- request: { feature: FEATURE, modelId: INFLUENCER_OPEN_MODELS.sheet, op: "t2i", prompt: compileCastPrompt({ state, direction }), params: { numOutputs: 1 }, title },
+ request: open
+ ? { feature: FEATURE, modelId: sheetModel, op: "t2i", prompt: compileCastPrompt({ state, direction }), params: { numOutputs: 1 }, title }
+ : {
+ feature: FEATURE,
+ modelId: sheetModel,
+ engine: "cloud",
+ presetId: INFLUENCER_LOOK,
+ op: "t2i",
+ prompt: compileSheetPrompt({ state, direction }),
+ params: { numOutputs: 1, aspectRatio: "16:9", resolution: "1080p" },
+ title,
+ },
};
- if (!photo && !clothing.length) return { steps: [sheet], modelId: INFLUENCER_OPEN_MODELS.sheet, notes };
- const room = OPEN_EDIT_IMAGES - 1 - (photo ? 1 : 0);
+ if (!photo && !clothing.length) return { steps: [sheet], modelId: sheetModel, notes };
+ const room = (open ? OPEN_EDIT_IMAGES : 1 + 1 + MAX_CLOTHING) - 1 - (photo ? 1 : 0);
const used = clothing.slice(0, room);
if (clothing.length > used.length) notes.push(`Qwen-Image-Edit takes 3 images (the sheet${photo ? ", your photo" : ""} and clothing) — the first ${used.length === 1 ? "clothing reference is" : `${used.length} clothing references are`} used`);
- notes.push(photo ? (start === "face" ? "Two steps: Z-Image Turbo draws the sheet, then Qwen-Image-Edit 2511 puts your face on it" : "Two steps: Z-Image Turbo draws the sheet, then Qwen-Image-Edit 2511 matches it to your reference") : "Two steps: Z-Image Turbo draws the sheet, then Qwen-Image-Edit 2511 dresses it in your clothing");
+ const drawer = open ? "Z-Image Turbo" : "Fuobe Soul";
+ notes.push(
+ photo
+ ? start === "face"
+ ? `Two steps: ${drawer} draws the sheet, then Qwen-Image-Edit 2511 puts your face on it`
+ : `Two steps: ${drawer} draws the sheet, then Qwen-Image-Edit 2511 matches it to your reference`
+ : `Two steps: ${drawer} draws the sheet, then Qwen-Image-Edit 2511 dresses it in your clothing`,
+ );
return {
steps: [
{ ...sheet, request: { ...sheet.request, feature: `${FEATURE}-step`, title: `${title} · sheet`, step: { label: "Drawing the sheet", index: 0, of: 2 } } },
@@ -876,7 +908,7 @@ export function planInfluencer(run: InfluencerRun, caps: Pick<PlanCaps, "has">):
chain: [{ slot: "images", position: "first" }],
request: {
feature: FEATURE,
- modelId: INFLUENCER_OPEN_MODELS.edit,
+ modelId: editModel,
op: "edit",
prompt: compileDressPrompt({ state, start, clothing: used.length }),
inputs: { images: [...(photo ? [photo] : []), ...used] },
@@ -886,15 +918,18 @@ export function planInfluencer(run: InfluencerRun, caps: Pick<PlanCaps, "has">):
},
},
],
- modelId: INFLUENCER_OPEN_MODELS.edit,
+ modelId: editModel,
notes,
};
}
- const has = (id: string) => !caps.has || caps.has(id);
- const asked = run.modelId && (INFLUENCER_CLOUD_MODELS as readonly string[]).includes(run.modelId) ? run.modelId : undefined;
const images = [...(photo ? [photo] : []), ...clothing];
- const modelId = asked && has(asked) ? asked : INFLUENCER_CLOUD_MODELS[0];
+ // Nano Banana Pro unless Seedream 5.0 Pro is asked for (Fuobe Soul switched off falls back here too).
+ const modelId = asked && asked !== INFLUENCER_SOUL.sheet && has(asked) ? asked : "nano-banana-pro";
+ if (run.engine === "cloud" && (asked ?? INFLUENCER_SOUL.sheet) === INFLUENCER_SOUL.sheet) {
+ const off = !has(INFLUENCER_SOUL.sheet, "cloud") ? "Fuobe Soul is" : "Qwen-Image-Edit 2511 (hosted) is";
+ notes.push(`${off} switched off in Settings → Models & licences — Nano Banana Pro draws the sheet`);
+ }
return {
steps: [
{
diff --git a/src/server/ads.ts b/src/server/ads.ts
index 59cb6e9e..c19e89be 100644
--- a/src/server/ads.ts
+++ b/src/server/ads.ts
@@ -8,6 +8,7 @@ import {
MAX_ADS_PER_PRODUCT,
MAX_PRODUCTS_PER_RUN,
adVisualModel,
+ MARKETING_IMAGE_MODEL,
type AdConcept,
type AdCreative,
type BrandKit,
@@ -41,6 +42,8 @@ export const BatchBody = z.object({
.max(MAX_PRODUCTS_PER_RUN),
/** What the user asked for in the chat ("holiday setting for our winter sale"). */
direction: z.string().max(1000).optional(),
+ /** The visual model (AD_VISUAL_MODELS); Fuobe Marketing Image when left out or not offered on this engine. */
+ modelId: z.string().max(80).optional(),
});
export type BatchInput = z.infer<typeof BatchBody>;
@@ -146,14 +149,16 @@ export async function writeConcepts(brand: BrandKit, product: Product, count: nu
const NO_TEXT = "No text, letters, words, logos or watermarks anywhere in the picture; leave calm space for a headline";
-export function visualRequest(c: Pick<AdConcept, "visual" | "headline">, product: Product | null, brand: BrandKit, engine: Engine): GenerationRequest {
+export function visualRequest(c: Pick<AdConcept, "visual" | "headline">, product: Product | null, brand: BrandKit, engine: Engine, asked?: string | null): GenerationRequest {
const hero = product?.images[0];
- const modelId = adVisualModel(engine, !!hero);
+ const modelId = adVisualModel(engine, asked);
const model = getModel(modelId);
const aspect = model?.options.aspectRatios?.includes("4:5") ? "4:5" : model?.options.aspectRatios?.includes("3:4") ? "3:4" : undefined;
return {
feature: "ads",
modelId,
+ // Fuobe Marketing Image runs on both engines: the batch's engine picks its half.
+ ...(modelId === MARKETING_IMAGE_MODEL && { engine }),
op: hero ? "edit" : "t2i",
prompt: [
`Advertising photograph: ${c.visual.replace(/[.\s]+$/, "")}`,
@@ -230,7 +235,7 @@ export function estimateBatch(input: BatchInput, draft?: { brand: BrandKit; prod
if (!brand) throw new AdsError("That brand no longer exists");
const total = input.items.reduce((n, i) => n + i.count, 0);
const product = draft ? draft.product : getProduct(input.items[0].productId);
- const p = previewGeneration(visualRequest({ visual: "the product", headline: "Ad" }, product, brand, input.engine));
+ const p = previewGeneration(visualRequest({ visual: "the product", headline: "Ad" }, product, brand, input.engine, input.modelId));
let copy = 0;
try {
copy = previewGeneration({ feature: "ads", modelId: input.engine === "open" ? "oss-text-llm" : "text-llm", op: "write", prompt: "copy" }).costUsd ?? 0;
@@ -317,7 +322,7 @@ async function fillBatch(batchId: string, brand: BrandKit, ids: { id: string; pr
.run(k.angle, k.headline, k.body, k.cta, k.visual, Date.now(), c.id).changes;
if (!ok) return;
try {
- setGen(c.id, createGenerations(visualRequest(k, product, brand, input.engine), { batchId })[0]);
+ setGen(c.id, createGenerations(visualRequest(k, product, brand, input.engine, input.modelId), { batchId })[0]);
} catch (e) {
fail(c.id, (e as Error).message);
}
@@ -445,7 +450,8 @@ export async function retryCreative(id: string): Promise<AdCreative> {
// A baked ad (one drawn whole before build plan O7) is made again the Fuobe way: copy, a visual, your fonts.
let concept: AdConcept = { angle: r.angle ?? "", headline: r.headline ?? "", body: r.body ?? "", cta: r.cta ?? "", visual: r.visual ?? "" };
if (!concept.headline || !concept.visual) concept = (await writeConcepts(brand, product ?? fakeProduct(brand), 1, meta.direction, r.position))[0];
- const g = createGenerations(visualRequest(concept, product, brand, meta.engine), { batchId: r.batch_id })[0];
+ // The batch's own visual model (a baked ad's one-shot model isn't one: Fuobe Marketing Image makes it).
+ const g = createGenerations(visualRequest(concept, product, brand, meta.engine, meta.modelId), { batchId: r.batch_id })[0];
const fresh: CreativeMeta = { ...meta, route: "fuobe", ratio: undefined };
db()
.prepare("UPDATE ad_creatives SET angle = ?, headline = ?, body = ?, cta = ?, visual = ?, meta_json = ? WHERE id = ?")
diff --git a/src/server/influencer.ts b/src/server/influencer.ts
index d4d8dc78..35d7f747 100644
--- a/src/server/influencer.ts
+++ b/src/server/influencer.ts
@@ -1,15 +1,16 @@
import "server-only";
import { getModel } from "@/lib/catalog";
import type { Engine } from "@/lib/catalog/types";
-import { cleanState, planInfluencer, type InfluencerRun, type InfluencerStart } from "@/lib/influencer";
+import { soulRecipe } from "@/lib/catalog/soul";
+import { cleanState, INFLUENCER_LOOK, INFLUENCER_OPEN_MODELS, planInfluencer, type InfluencerRun, type InfluencerStart } from "@/lib/influencer";
import { createPipeline } from "./chains";
import { createGenerations } from "./generations";
import { planCaps, previewRun, runEngine } from "./photodump";
/**
* AI Influencer builder runs (/influencer): the pure plan (src/lib/influencer.ts) for the engine the
- * install allows, priced or created as one batch. On the open engine with a photo or clothing it is
- * two chained jobs: the Soul Cast sheet (a helper step) and the Qwen-Image-Edit pass you see.
+ * install allows, priced or created as one batch. With a photo or clothing it is two chained jobs: the sheet (Fuobe
+ * Soul in the cloud, the Soul Cast sheet graph on your GPU: a helper step) and the Qwen-Image-Edit pass you see.
*/
export interface InfluencerBody {
@@ -26,7 +27,14 @@ export interface InfluencerBody {
function plan(body: InfluencerBody) {
const { state } = cleanState(body.state);
const run: InfluencerRun = { ...body, engine: runEngine(body.engine), state };
- return planInfluencer(run, planCaps());
+ const p = planInfluencer(run, planCaps());
+ // The Soul Cast sheet graph is Fuobe Soul's own base: the casting look's LoRAs and words go on it, as in Cinema's Soul Cast.
+ const steps = p.steps.map((s) => {
+ if (s.request.modelId !== INFLUENCER_OPEN_MODELS.sheet) return s;
+ const recipe = soulRecipe("soul", s.request.prompt ?? "", { look: INFLUENCER_LOOK });
+ return { ...s, request: { ...s.request, prompt: recipe.prompt, ...(recipe.loras.length && { loras: recipe.loras }) } };
+ });
+ return { ...p, steps };
}
/** What a run would make and cost, without starting it (errors come back as `error`). */
diff --git a/src/server/marketing.ts b/src/server/marketing.ts
index 5f7d5628..3f669956 100644
--- a/src/server/marketing.ts
+++ b/src/server/marketing.ts
@@ -14,6 +14,7 @@ import {
FORMATS,
formatModels,
hookById,
+ MARKETING_IMAGE_MODEL,
MAX_PROMPT,
mentionsFor,
MULTIPLIER,
@@ -30,6 +31,7 @@ import {
TEMPLATE_INDEX,
UGC_MODELS,
wordBudget,
+ wordsOnTop,
type BrandKit,
type FormatDef,
type FormatId,
@@ -201,11 +203,14 @@ function productLine(p?: Product | null): string {
const KEEP_PRODUCT = "Keep the product exactly as in the reference photo: its shape, proportions, label, logo, text and colours";
-/** The exact headline/CTA in a prompt (cloud models render text), or room left for the browser to set it (open). */
-function textLine(f: FormatDef, open: boolean, headline?: string, cta?: string, brand?: BrandKit | null): string {
+/**
+ * The exact headline/CTA in a prompt (cloud partner models render text), or room left for the browser to set it (open
+ * models and Fuobe Marketing Image on either engine: wordsOnTop).
+ */
+function textLine(f: FormatDef, onTop: boolean, headline?: string, cta?: string, brand?: BrandKit | null): string {
if (!f.text) return "";
- // Open results get the words set in the browser, in the layout overlayLayout() picks: the picture leaves room for it.
- if (open)
+ // The words are set in the browser, in the layout overlayLayout() picks: the picture leaves room for them.
+ if (onTop)
return overlayLayout(f.id) === "frame"
? "No text, letters, words or logos anywhere in the image; the subject well composed with a little breathing room at the edges"
: "Leave calm, uncluttered space in the lower third for a headline; no text, letters, words or logos anywhere in the image";
@@ -253,12 +258,13 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlan
if (f.pipeline === "image") {
const modelId = input.modelId && choices.some((c) => c.id === input.modelId) ? input.modelId : choices[0].id;
const model = need(modelId);
+ const onTop = wordsOnTop(input.engine, modelId);
const refs = [
...(f.product !== "none" ? productImages.slice(0, 1) : []),
...(input.avatar && f.avatar !== "none" ? [input.avatar] : []),
...(input.reference ? [input.reference] : []),
- // The logo as a reference lets cloud models draw it; open results get it set on top in the browser.
- ...(!open && f.text && brand?.logo && !isSvg(brand.logo) ? [brand.logo] : []),
+ // The logo as a reference lets a partner model draw it; otherwise it is set on top in the browser.
+ ...(!onTop && f.text && brand?.logo && !isSvg(brand.logo) ? [brand.logo] : []),
];
const max = model.options.maxImages ?? (supportsOp(model, "edit") ? 1 : 0);
let images = refs.slice(0, Math.max(0, max));
@@ -288,7 +294,7 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlan
hasProduct && op === "edit" && KEEP_PRODUCT,
input.reference && "Use the last reference photo for the setting and light",
prompt,
- textLine(f, open, headline, cta, brand),
+ textLine(f, onTop, headline, cta, brand),
brandText,
);
// bria-product-shot and Product Photography take the scene alone.
@@ -296,8 +302,12 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlan
const palette = !open && brand?.colors.length && routesFor(model, op).some((r) => r.map?.palette) ? brand.colors.slice(0, 5) : undefined;
const aspect = nearestAspect(input.aspectRatio ?? tpl?.aspect ?? f.defaultAspect, model.options.aspectRatios);
const batch = Math.min(input.batch ?? 1, f.batch);
- meta.overlay = open && f.text && (headline || cta) ? { headline: headline || undefined, cta: cta || undefined } : null;
- if (open && f.text) notes.push("Your headline is set over the picture in your brand fonts, so the words come out exact");
+ meta.overlay = onTop && f.text && (headline || cta) ? { headline: headline || undefined, cta: cta || undefined } : null;
+ if (onTop && f.text) notes.push("Your headline is set over the picture in your brand fonts, so the words come out exact");
+ // On the user's GPU a Standalone shot of one product photo is cut out and relit into the scene (White_to_Scene).
+ const productShot = open && modelId === MARKETING_IMAGE_MODEL && f.id === "product-standalone" && op === "edit" && images.length === 1;
+ if (productShot) notes.push("Your product is cut out and relit into the scene, so it stays as it is");
+ else if (open && op === "edit") notes.push("Qwen-Image-Edit keeps your first photo's shape on your GPU");
return {
feature,
engine: input.engine,
@@ -312,7 +322,7 @@ export function planMarketing(input: MarketingInput, ctx: PlanContext): RunPlan
op,
prompt: model.options.promptless ? undefined : scenePrompt.slice(0, MAX_PROMPT),
inputs: images.length ? { images } : undefined,
- params: { aspectRatio: aspect, numOutputs: batch, ...(palette && { palette }) },
+ params: { aspectRatio: aspect, numOutputs: batch, ...(palette && { palette }), ...(productShot && { extra: { productShot: true } }) },
title,
batchTitle: title,
},
@@ -1216,7 +1226,7 @@ export async function rerun(id: string): Promise<MarketingRun[]> {
}
/**
- * An open-engine poster/ad with its words set in the browser (an uploaded PNG), recorded in the Library
+ * A poster/ad with its words set in the browser (an uploaded PNG: open models, Fuobe Marketing Image), recorded in the Library
* and on the run (the card shows it). `auto`: the first composite the browser makes on its own once the
* picture is ready; a run that has one already keeps it (no duplicate from a second tab).
*/
diff --git a/src/server/photodump.ts b/src/server/photodump.ts
index 47e83936..acb7a9d8 100644
--- a/src/server/photodump.ts
+++ b/src/server/photodump.ts
@@ -331,12 +331,13 @@ function sheetRequest(input: SheetRun): { request: GenerationRequest; notes: str
notes: modelId === "nano-banana-pro" ? ["Fuobe Soul is switched off in Settings → Models & licences — Nano Banana Pro draws the sheet"] : [],
};
}
- // A description: the AI Influencer app (Nano Banana Pro in the cloud, the Soul Cast sheet graph on your GPU).
+ // A description: the AI Influencer app (Fuobe Soul in the cloud, the Soul Cast sheet graph on your GPU).
if (!input.prompt.trim()) throw new Error("Describe your character first");
const route = engine === "open" ? getPreset(AI_INFLUENCER)?.open : getPreset(AI_INFLUENCER)?.cloud;
- const modelId = route?.modelId ?? (engine === "open" ? "oss-zimage-soul-cast" : "nano-banana-pro");
+ const modelId = route?.modelId ?? (engine === "open" ? "oss-zimage-soul-cast" : SOUL_BUILDER_MODEL);
return {
- request: { feature: "app:app-ai-influencer", presetId: AI_INFLUENCER, modelId, prompt: input.prompt.trim() },
+ // Fuobe Soul runs on both engines: the app's cloud route names it, so the run says which.
+ request: { feature: "app:app-ai-influencer", presetId: AI_INFLUENCER, modelId, ...(modelId === SOUL_BUILDER_MODEL && { engine }), prompt: input.prompt.trim() },
notes: [],
};
}
diff --git a/tests/assist-studio-routes.test.ts b/tests/assist-studio-routes.test.ts
index 98f11afc..5f08c13d 100644
--- a/tests/assist-studio-routes.test.ts
+++ b/tests/assist-studio-routes.test.ts
@@ -323,7 +323,8 @@ describe("Ads Studio", () => {
const p = await priced(() => plan("create_ads", { brief: "Spring race season", brand_id: kit.id, product_id: product.id, count: 3 }));
const est = await priced(async () => (await adsEstimateRoute.POST(json("POST", { brandId: kit.id, engine: "cloud", items: [{ productId: product.id, count: 3 }], direction: "Spring race season", ratio: "4:5" }))).json());
expect(p).toMatchObject({ studio: "Ads Studio", href: "/ads" });
- expect(p.jobs).toEqual([expect.objectContaining({ modelId: "nano-banana-pro", op: "edit", count: 3, costUsd: est.costUsd, demo: false })]);
+ // The picture is Fuobe Marketing Image's (build plan O10), priced as the studio prices it.
+ expect(p.jobs).toEqual([expect.objectContaining({ modelId: "fuobe-marketing-image", op: "edit", count: 3, costUsd: est.costUsd, demo: false })]);
expect(est.costUsd).toBeGreaterThan(0);
// A product from another brand isn't taken.
expect(plan("create_ads", { brief: "x", brand_id: "nope" }).fallback).toMatch(/brand kit isn't in Ads Studio/);
diff --git a/tests/image-studios-api.test.ts b/tests/image-studios-api.test.ts
index c7cd4b0f..8467c7b6 100644
--- a/tests/image-studios-api.test.ts
+++ b/tests/image-studios-api.test.ts
@@ -259,7 +259,8 @@ describe("photodump, fashion factory and character sheet runs", () => {
it("prices and makes an Instadump from one selfie as one batch", async () => {
const selfie = upload();
const preview = await (await photodumpRoute.POST(json("POST", { packId: "winter-special", engine: "cloud", selfie, aspectRatio: "3:4" }, "http://x/api/photodump?preview=1"))).json();
- expect(preview).toMatchObject({ modelId: "nano-banana-pro", count: 9, demo: true });
+ // Instadump's Original: Qwen-Image-Edit 2511 (hosted) with the selfie as reference.
+ expect(preview).toMatchObject({ modelId: "qwen-image-edit-2511-cloud", count: 9, demo: true });
const res = await photodumpRoute.POST(json("POST", { packId: "winter-special", engine: "cloud", selfie, aspectRatio: "3:4" }));
expect(res.status).toBe(201);
const { batchId, items } = await res.json();
@@ -319,10 +320,15 @@ describe("photodump, fashion factory and character sheet runs", () => {
it("runs the Fashion Factory steps", async () => {
const el = createElement({ name: "Ines", kind: "character", references: [upload()] });
const base = await (await fashionRoute.POST(json("POST", { step: "base", templateId: "red-room", elementId: el.id, engine: "cloud" }))).json();
- expect(base.items[0]).toMatchObject({ modelId: "nano-banana-pro", feature: "fashion" });
+ expect(base.items[0]).toMatchObject({ modelId: "qwen-image-edit-2511-cloud", feature: "fashion" });
expect(base.items[0].request.params).toMatchObject({ aspectRatio: "3:4", numOutputs: 4 });
const outfit = await (await fashionRoute.POST(json("POST", { step: "outfit", templateId: "red-room", base: upload(), garment: upload(), engine: "cloud" }))).json();
- expect(outfit.items[0].modelId).toBe("fashn-tryon");
+ // Fuobe Try-On in the cloud: FLUX.2 [klein] 4B with the try-on LoRA, its trigger leading the words.
+ expect(outfit.items[0]).toMatchObject({ modelId: "fuobe-tryon", engine: "cloud" });
+ const outfitPreview = await (await fashionRoute.POST(json("POST", { step: "outfit", templateId: "red-room", base: upload(), garment: upload(), engine: "cloud" }, "http://x/api/fashion?preview=1"))).json();
+ expect(outfitPreview).toMatchObject({ modelId: "fuobe-tryon", demo: true });
+ const partner = await (await fashionRoute.POST(json("POST", { step: "outfit", templateId: "red-room", base: upload(), garment: upload(), engine: "cloud", modelId: "fashn-tryon" }))).json();
+ expect(partner.items[0].modelId).toBe("fashn-tryon");
const set = await (await fashionRoute.POST(json("POST", { step: "photoset", templateId: "red-room", dressed: upload(), engine: "open" }))).json();
expect(set.items).toHaveLength(9);
expect(set.items.every((g: { modelId: string; batchId: string }) => g.modelId === "oss-qwen-edit" && g.batchId === set.batchId)).toBe(true);
@@ -348,7 +354,8 @@ describe("photodump, fashion factory and character sheet runs", () => {
expect(soul.notes ?? []).toEqual([]);
const described = await (await characterRoute.POST(json("POST", { mode: "describe", engine: "cloud", prompt: "a surfer from Lisbon" }))).json();
expect(described.error).toBeUndefined();
- expect(described.items[0]).toMatchObject({ presetId: "app-ai-influencer", modelId: "nano-banana-pro", feature: "app:app-ai-influencer" });
+ // The AI Influencer app's sheet is Fuobe Soul's in the cloud (build plan O10), in the casting look.
+ expect(described.items[0]).toMatchObject({ presetId: "app-ai-influencer", modelId: "fuobe-soul", engine: "cloud", feature: "app:app-ai-influencer", status: "queued" });
const app = await (await characterRoute.POST(json("POST", { mode: "describe", engine: "open", prompt: "a surfer from Lisbon" }))).json();
expect(app.items[0]).toMatchObject({ presetId: "app-ai-influencer", modelId: "oss-zimage-soul-cast", feature: "app:app-ai-influencer" });
});
diff --git a/tests/image-studios.test.ts b/tests/image-studios.test.ts
index 674e927a..fbf22c9c 100644
--- a/tests/image-studios.test.ts
+++ b/tests/image-studios.test.ts
@@ -470,7 +470,10 @@ describe("Photodump packs and planning", () => {
it("plans one single-image request per photo, on the identity's own model when it has one", () => {
const pack = getPack("winter-special")!;
const cloud = planPhotodump({ pack, subject: maya, engine: "cloud", aspectRatio: "3:4" }, {});
- expect(cloud.modelId).toBe("nano-banana-pro");
+ // Before a Soul ID: Instadump's Original, Qwen-Image-Edit 2511 hosted, with the character's photos (build plan O10).
+ expect(cloud.modelId).toBe("qwen-image-edit-2511-cloud");
+ expect(planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "nano-banana-pro" }, {}).modelId).toBe("nano-banana-pro");
+ expect(planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "seedream-5-pro" }, {}).modelId).toBe("seedream-5-pro");
expect(cloud.requests).toHaveLength(9);
expect(cloud.requests[2].step).toEqual({ label: "Photo 3 of 9", index: 2, of: 9 });
expect(cloud.requests.every((r) => r.params?.numOutputs === 1 && r.params.aspectRatio === "3:4" && r.feature === "photodump")).toBe(true);
@@ -483,9 +486,9 @@ describe("Photodump packs and planning", () => {
expect(run.requests.every((r) => r.engine === engine)).toBe(true);
}
const oldSoulId: PhotoSubject = { ...maya, loras: [{ engine: "cloud", modelId: "soul-2", file: "", trigger: "", referenceId: "ref-123" }] };
- expect(planPhotodump({ pack, subject: oldSoulId, engine: "cloud" }, {}).modelId).toBe("nano-banana-pro");
+ expect(planPhotodump({ pack, subject: oldSoulId, engine: "cloud" }, {}).modelId).toBe("qwen-image-edit-2511-cloud");
const untrained = planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "fuobe-soul" }, {});
- expect(untrained.modelId).toBe("nano-banana-pro");
+ expect(untrained.modelId).toBe("qwen-image-edit-2511-cloud");
expect(untrained.notes[0]).toMatch(/No Soul ID yet/);
expect(planPhotodump({ pack, subject: soulMaya, engine: "cloud", modelId: "seedream-5-pro" }, {}).modelId).toBe("seedream-5-pro");
expect(planPhotodump({ pack, subject: maya, engine: "cloud", modelId: "seedream-5-pro" }, {}).modelId).toBe("seedream-5-pro");
@@ -494,7 +497,7 @@ describe("Photodump packs and planning", () => {
const loraMaya: PhotoSubject = { ...maya, loras: [{ engine: "open", modelId: "oss-z-image-turbo", file: "maya.safetensors", trigger: "mayfz" }] };
expect(planPhotodump({ pack, subject: loraMaya, engine: "open" }, {}).modelId).toBe("fuobe-soul");
// A GPU-only LoRA (no copy Fuobe can send) stays off the cloud: reference photos there.
- expect(planPhotodump({ pack, subject: loraMaya, engine: "cloud" }, {}).modelId).toBe("nano-banana-pro");
+ expect(planPhotodump({ pack, subject: loraMaya, engine: "cloud" }, {}).modelId).toBe("qwen-image-edit-2511-cloud");
const qwen = planPhotodump({ pack, subject: selfie, engine: "open", aspectRatio: "auto" }, {});
expect(qwen.modelId).toBe("oss-qwen-edit");
expect(qwen.requests[0].inputs?.images).toEqual([selfie.url]);
@@ -540,8 +543,10 @@ describe("Photodump: model choice and retries", () => {
const selfie: PhotoSubject = { kind: "selfie", url: "/api/files/uploads/me.png" };
it("says why a pick that can't run ends up on another model", () => {
- expect(photodumpModel(selfie, "open", {}, "fuobe-soul")).toEqual({ modelId: "oss-qwen-edit", note: "Fuobe Soul needs a character with a trained Soul ID — Qwen-Image-Edit works from your photo" });
- expect(photodumpModel(selfie, "cloud", {}, "fuobe-soul").note).toMatch(/Nano Banana Pro works from your photo/);
+ expect(photodumpModel(selfie, "open", {}, "fuobe-soul")).toEqual({ modelId: "oss-qwen-edit", note: "Fuobe Soul needs a character with a trained Soul ID — Qwen-Image-Edit 2511 works from your photo" });
+ expect(photodumpModel(selfie, "cloud", {}, "fuobe-soul")).toEqual({ modelId: "qwen-image-edit-2511-cloud", note: "Fuobe Soul needs a character with a trained Soul ID — Qwen-Image-Edit 2511 works from your photo" });
+ expect(photodumpModel(selfie, "cloud", {}, "nano-banana-pro").modelId).toBe("nano-banana-pro");
+ expect(photodumpModel(selfie, "cloud", {}).modelId).toBe("qwen-image-edit-2511-cloud");
expect(photodumpModel(selfie, "open", {}, "fuobe-soul", true).note).toMatch(/Your own packs recreate each reference photo/);
expect(photodumpModel(selfie, "open", {}).note).toBeUndefined();
// A demo training's stand-in isn't a Soul ID.
@@ -570,21 +575,32 @@ describe("Fashion Factory", () => {
it("plans the three generating steps on both engines", () => {
const t = FASHION[0];
const base = fashionBaseRequest(t, maya, "cloud", {});
- expect(base).toMatchObject({ modelId: "nano-banana-pro", params: { aspectRatio: "3:4", numOutputs: 4 } });
+ // No Soul ID yet: Qwen-Image-Edit 2511 from the character's photos (with one, Fuobe Soul and the LoRA).
+ expect(base).toMatchObject({ modelId: "qwen-image-edit-2511-cloud", params: { aspectRatio: "3:4", numOutputs: 4 } });
expect(base.prompt).toMatch(/@Maya in a bold, saturated colour-blocked studio set/);
expect(fashionBaseRequest(t, maya, "open", {}).modelId).toBe("oss-qwen-edit");
+ // Fuobe Try-On on both engines (FLUX.2 [klein] 4B + the try-on LoRA); FASHN and Nano Banana Pro stay cloud choices.
const outfit = fashionOutfitRequest(t, "/api/files/base.png", "/api/files/shirt.png", "cloud");
- expect(outfit).toMatchObject({ modelId: "fashn-tryon", op: "edit", inputs: { images: ["/api/files/base.png", "/api/files/shirt.png"] } });
- expect(plan(outfit).op).toBe("edit");
+ expect(outfit).toMatchObject({ modelId: "fuobe-tryon", engine: "cloud", op: "edit", inputs: { images: ["/api/files/base.png", "/api/files/shirt.png"] } });
+ const cloudPlan = planGeneration(outfit, (id) => (id === "fuobe-tryon" ? onEngine(getModel(id)!, "cloud") : getModel(id)), getPreset);
+ expect(cloudPlan.op).toBe("edit");
+ expect(cloudPlan.prompt).toMatch(/^TRYON a full-body photo of a person\. Replace the outfit/);
+ expect(cloudPlan.loras).toEqual([expect.objectContaining({ file: "tryon-klein-4b.safetensors", strength: 1, licence: expect.objectContaining({ commercial: true, hostedOk: true }) })]);
+ expect(cloudPlan.loras[0].url).toMatch(/^https:\/\/huggingface\.co\/xocialize\/tryon-FLUX\.2-klein-4B-lora\/resolve\/[0-9a-f]{40}\/tryon-klein-4b\.safetensors$/);
+ expect(fashionOutfitRequest(t, "b", "g", "cloud", "fashn-tryon").modelId).toBe("fashn-tryon");
expect(fashionOutfitRequest(t, "b", "g", "cloud", "nano-banana-pro").prompt).toMatch(/Dress the person in image 1/);
const openOutfit = fashionOutfitRequest(t, "/api/files/base.png", "/api/files/shirt.png", "open");
- expect(openOutfit.modelId).toBe("oss-tryon-klein");
- expect(() => plan(openOutfit)).not.toThrow();
+ expect(openOutfit).toMatchObject({ modelId: "fuobe-tryon", engine: "open" });
+ // A partner pick means nothing on the user's GPU.
+ expect(fashionOutfitRequest(t, "b", "g", "open", "fashn-tryon").modelId).toBe("fuobe-tryon");
+ const openPlan = planGeneration(openOutfit, (id) => (id === "fuobe-tryon" ? onEngine(getModel(id)!, "open") : getModel(id)), getPreset);
+ expect(openPlan.model.routes).toEqual([expect.objectContaining({ provider: "comfyui", endpoint: "tryon-flux2-klein-4b" })]);
const set = fashionPhotosetRequests(t, "/api/files/dressed.png", "cloud");
expect(set).toHaveLength(t.shots);
- expect(set[0]).toMatchObject({ modelId: "nano-banana-pro", inputs: { images: ["/api/files/dressed.png"] }, step: { label: `Photoset 1 of ${t.shots}` } });
+ expect(set[0]).toMatchObject({ modelId: "qwen-image-edit-2511-cloud", inputs: { images: ["/api/files/dressed.png"] }, step: { label: `Photoset 1 of ${t.shots}` } });
+ expect(fashionPhotosetRequests(t, "/api/files/dressed.png", "cloud", "nano-banana-pro")[0].modelId).toBe("nano-banana-pro");
expect(fashionPhotosetRequests(t, "/api/files/dressed.png", "open")[0].modelId).toBe("oss-qwen-edit");
});
diff --git a/tests/influencer-api.test.ts b/tests/influencer-api.test.ts
index 48574a14..73f8fa52 100644
--- a/tests/influencer-api.test.ts
+++ b/tests/influencer-api.test.ts
@@ -13,6 +13,8 @@ const gens = await import("@/server/generations");
const { saveFile } = await import("@/server/storage");
const route = await import("@/app/api/influencer/route");
const { compileCastPrompt } = await import("@/lib/influencer");
+const { soulRecipe } = await import("@/lib/catalog/soul");
+const { CAST_LOOK } = await import("@/lib/catalog/soul-cards");
const { retryPhoto } = await import("@/server/photodump");
beforeAll(() => {
@@ -40,10 +42,13 @@ async function settle(id: string, ms = 40_000) {
}
describe("/api/influencer", () => {
- it("prices a cloud sheet on Nano Banana Pro (Seedream 5.0 Pro when asked); a retired model id runs the default", async () => {
+ it("prices a cloud sheet on Fuobe Soul (Nano Banana Pro or Seedream 5.0 Pro when asked); a retired model id runs the default", async () => {
const cloud = await (await post({ engine: "cloud", state, start: "scratch" }, true)).json();
- expect(cloud).toMatchObject({ modelId: "nano-banana-pro", modelName: "Nano Banana Pro", count: 1, steps: 1, demo: true });
- expect((await (await post({ engine: "cloud", state, start: "scratch", modelId: "ai-influencer" }, true)).json()).modelId).toBe("nano-banana-pro");
+ expect(cloud).toMatchObject({ modelId: "fuobe-soul", modelName: "Fuobe Soul", count: 1, steps: 1, demo: true });
+ expect((await (await post({ engine: "cloud", state, start: "scratch", modelId: "ai-influencer" }, true)).json()).modelId).toBe("fuobe-soul");
+ const face = await (await post({ engine: "cloud", state, start: "face", photo: upload() }, true)).json();
+ expect(face).toMatchObject({ modelId: "qwen-image-edit-2511-cloud", count: 1, steps: 2 });
+ expect((await (await post({ engine: "cloud", state, start: "scratch", modelId: "nano-banana-pro" }, true)).json()).modelId).toBe("nano-banana-pro");
const seedream = await (await post({ engine: "cloud", state, start: "scratch", modelId: "seedream-5-pro" }, true)).json();
expect(seedream.modelId).toBe("seedream-5-pro");
});
@@ -64,7 +69,10 @@ describe("/api/influencer", () => {
["influencer-step", "oss-zimage-soul-cast"],
["influencer", "oss-qwen-edit"],
]);
- expect(run.items[0].prompt).toBe(compileCastPrompt({ state: state as never, direction: "A potter from Porto" }));
+ // The Soul Cast sheet graph runs in Fuobe Soul's casting look: its words and LoRAs around the compiled character.
+ expect(run.items[0].prompt).toContain(compileCastPrompt({ state: state as never, direction: "A potter from Porto" }));
+ expect(run.items[0].prompt).toBe(soulRecipe("soul", compileCastPrompt({ state: state as never, direction: "A potter from Porto" }), { look: CAST_LOOK }).prompt);
+ expect(run.items[0].request.presetId).toBeUndefined();
expect(run.sheet.id).toBe(run.items[1].id);
expect(run.items.map((g: { request: { step?: { label: string } } }) => g.request.step?.label)).toEqual(["Drawing the sheet", "With your face"]);
expect(new Set(run.items.map((g: { batchId: string }) => g.batchId))).toEqual(new Set([run.batchId]));
@@ -144,6 +152,6 @@ describe("/api/influencer", () => {
expect((await post({ engine: "cloud", state: conflict, start: "scratch" })).status).toBe(422);
// Picks the tier doesn't show are dropped, not refused.
const hidden = await (await post({ engine: "open", state: { tier: "normal", picks: { hair: ["hs_wings"] } }, start: "scratch" })).json();
- expect(hidden.items[0].prompt).toBe(compileCastPrompt({ state: { tier: "normal", picks: {}, locked: [] } }));
+ expect(hidden.items[0].prompt).toContain(compileCastPrompt({ state: { tier: "normal", picks: {}, locked: [] } }));
});
});
diff --git a/tests/influencer.test.ts b/tests/influencer.test.ts
index b98908df..7e4687c5 100644
--- a/tests/influencer.test.ts
+++ b/tests/influencer.test.ts
@@ -3,6 +3,7 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import { getModel, getPreset } from "@/lib/catalog";
import { planGeneration } from "@/lib/catalog/plan";
+import { CAST_LOOK } from "@/lib/catalog/soul-cards";
import {
categoriesFor,
cleanState,
@@ -17,6 +18,7 @@ import {
faceOfRun,
getOption,
INFLUENCER_CATEGORIES,
+ INFLUENCER_LOOK,
INFLUENCER_START,
influencerBlocker,
influencerName,
@@ -459,8 +461,37 @@ describe("the plan per engine", () => {
const ALL = { has: () => true };
const valid = (p: ReturnType<typeof planInfluencer>) => p.steps.map((s) => planGeneration(s.request, getModel, getPreset));
- it("cloud: Nano Banana Pro draws a wide sheet from the compiled prompt, Seedream 5.0 Pro when asked", () => {
- const p = planInfluencer(run({ start: "face", photo: face, clothing: [clothes[0]] }), ALL);
+ it("cloud: Fuobe Soul draws the wide sheet, then hosted Qwen-Image-Edit 2511 puts your face and clothing on it", () => {
+ const p = planInfluencer(run({ start: "face", photo: face, clothing: clothes }), ALL);
+ expect(p.modelId).toBe("qwen-image-edit-2511-cloud");
+ expect(p.notes).toEqual(["Two steps: Fuobe Soul draws the sheet, then Qwen-Image-Edit 2511 puts your face on it"]);
+ expect(p.steps.map((s) => [s.key, s.request.feature, s.request.modelId, s.after])).toEqual([
+ ["sheet", "influencer-step", "fuobe-soul", undefined],
+ ["dress", "influencer", "qwen-image-edit-2511-cloud", "sheet"],
+ ]);
+ // The sheet in Soul's casting look, wide and 1080p; fal's Qwen edit takes the face and all three clothing references.
+ expect(p.steps[0].request).toMatchObject({ engine: "cloud", presetId: INFLUENCER_LOOK, op: "t2i", prompt: compileSheetPrompt({ state }), params: { aspectRatio: "16:9", resolution: "1080p", numOutputs: 1 } });
+ expect(p.steps[1].request.inputs?.images).toEqual([face, ...clothes]);
+ expect(p.steps[1].request.prompt).toContain("the face of the person in image 2");
+ expect(p.steps[1].request.prompt).toContain("clothing shown in images 3, 4 and 5");
+ expect(p.steps[1].chain).toEqual([{ slot: "images", position: "first" }]);
+ const [sheet] = valid(p);
+ expect(sheet.model.id).toBe("fuobe-soul");
+ expect(sheet.soul?.look).toBe(INFLUENCER_LOOK);
+ const scratch = planInfluencer(run({ direction: "A potter from Porto" }), ALL);
+ expect(scratch.modelId).toBe("fuobe-soul");
+ expect(scratch.steps).toHaveLength(1);
+ expect(scratch.steps[0].request).toMatchObject({ feature: "influencer", op: "t2i", prompt: compileSheetPrompt({ state, direction: "A potter from Porto" }) });
+ valid(scratch);
+ // Fuobe Soul switched off in the cloud (or the hosted edit): Nano Banana Pro draws it in one pass, and says why.
+ const off = planInfluencer(run({ start: "face", photo: face }), { has: (id, engine) => !(id === "fuobe-soul" && engine === "cloud") });
+ expect(off.modelId).toBe("nano-banana-pro");
+ expect(off.notes).toEqual(["Fuobe Soul is switched off in Settings → Models & licences — Nano Banana Pro draws the sheet"]);
+ expect(INFLUENCER_LOOK).toBe(CAST_LOOK);
+ });
+
+ it("cloud partners: Nano Banana Pro draws a wide sheet from the compiled prompt, Seedream 5.0 Pro when asked", () => {
+ const p = planInfluencer(run({ modelId: "nano-banana-pro", start: "face", photo: face, clothing: [clothes[0]] }), ALL);
expect(p.modelId).toBe("nano-banana-pro");
expect(p.notes).toEqual([]);
expect(p.steps).toHaveLength(1);
@@ -468,19 +499,15 @@ describe("the plan per engine", () => {
expect(p.steps[0].request.prompt).toContain("the face of the person in image 1");
expect(p.steps[0].request.prompt).toContain("clothing shown in image 2");
valid(p);
- const scratch = planInfluencer(run({ direction: "A potter from Porto" }), ALL);
- expect(scratch.steps[0].request).toMatchObject({ op: "t2i", prompt: compileSheetPrompt({ state, direction: "A potter from Porto" }) });
- expect(scratch.steps[0].request.inputs).toBeUndefined();
- valid(scratch);
const seedream = planInfluencer(run({ modelId: "seedream-5-pro", clothing: clothes }), ALL);
expect(seedream.modelId).toBe("seedream-5-pro");
expect(seedream.steps[0].request.params).toEqual({ numOutputs: 1, aspectRatio: "16:9" });
expect(seedream.steps[0].request.inputs?.images).toEqual(clothes);
valid(seedream);
- // Nothing else is asked for: not Higgsfield's AI Influencer, not a model the builder doesn't list.
+ // Nothing else is asked for: not Higgsfield's AI Influencer, not a model the builder doesn't list: the default runs.
for (const modelId of ["ai-influencer", "flux-3-max"]) {
const other = planInfluencer(run({ modelId }), ALL);
- expect(other.modelId).toBe("nano-banana-pro");
+ expect(other.modelId).toBe("fuobe-soul");
expect(other.steps[0].request.params?.extra).toBeUndefined();
}
// Seedream missing from the install: Nano Banana Pro.
diff --git a/tests/marketing-api.test.ts b/tests/marketing-api.test.ts
index 79aacc5c..af6ac6b3 100644
--- a/tests/marketing-api.test.ts
+++ b/tests/marketing-api.test.ts
@@ -255,26 +255,51 @@ describe("brand kits", () => {
const b = brand.getBrand(brandId)!;
const product = brand.listProducts(brandId)[0];
const ctx = { product, brand: b };
+ // Fuobe Marketing Image (build plan O10) on both engines: the words are set over the picture in the browser.
const cloudAd = mk.planMarketing({ engine: "cloud", format: "ads", templateId: "ad-hero-headline" }, ctx);
const r = cloudAd.steps[0].request;
- expect(r).toMatchObject({ modelId: "gpt-image-2-5", op: "edit", feature: "marketing", params: { aspectRatio: "4:5", numOutputs: 1 } });
- expect(r.prompt).toContain("“Meet Maple Pecan Granola”");
- expect(r.prompt).toContain("“Shop now”");
- expect(r.inputs?.images).toEqual([product.images[0]]); // the SVG logo isn't sent to the model
- expect(cloudAd.meta.overlay).toBeNull();
+ expect(r).toMatchObject({ modelId: "fuobe-marketing-image", op: "edit", feature: "marketing", params: { aspectRatio: "4:5", numOutputs: 1 } });
+ expect(r.prompt).toMatch(/no text, letters/);
+ expect(r.prompt).not.toContain("“Meet Maple Pecan Granola”");
+ expect(r.inputs?.images).toEqual([product.images[0]]);
+ expect(r.params?.extra).toBeUndefined();
+ expect(cloudAd.meta.overlay).toEqual({ headline: "Meet Maple Pecan Granola", cta: "Shop now" });
+ expect(cloudAd.notes).toContain("Your headline is set over the picture in your brand fonts, so the words come out exact");
+
+ // GPT Image 2.5 stays a choice: it draws the exact words itself.
+ const gptAd = mk.planMarketing({ engine: "cloud", format: "ads", templateId: "ad-hero-headline", modelId: "gpt-image-2-5" }, ctx);
+ const g = gptAd.steps[0].request;
+ expect(g).toMatchObject({ modelId: "gpt-image-2-5", op: "edit", feature: "marketing", params: { aspectRatio: "4:5", numOutputs: 1 } });
+ expect(g.prompt).toContain("“Meet Maple Pecan Granola”");
+ expect(g.prompt).toContain("“Shop now”");
+ expect(g.inputs?.images).toEqual([product.images[0]]); // the SVG logo isn't sent to the model
+ expect(gptAd.meta.overlay).toBeNull();
const openAd = mk.planMarketing({ engine: "open", format: "ads", templateId: "ad-hero-headline", headline: "Crunch, sorted" }, ctx);
- expect(openAd.steps[0].request).toMatchObject({ modelId: "oss-qwen-edit", op: "edit" });
+ expect(openAd.steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "edit" });
expect(openAd.steps[0].request.prompt).toMatch(/no text, letters/);
expect(openAd.meta.overlay).toEqual({ headline: "Crunch, sorted", cta: "Shop now" });
+ expect(openAd.notes).toContain("Qwen-Image-Edit keeps your first photo's shape on your GPU");
+ // A poster without a product: Qwen-Image 2512 (the Original's text-to-image) by default, Ideogram 3.0 with the palette when picked.
const poster = mk.planMarketing({ engine: "cloud", format: "poster", templateId: "po-swiss-grid", prompt: "Autumn launch" }, { ...ctx, product: null });
- expect(poster.steps[0].request).toMatchObject({ modelId: "ideogram-3", op: "t2i", params: { palette: b.colors.slice(0, 5) } });
- expect(mk.planMarketing({ engine: "open", format: "poster", prompt: "Autumn" }, { ...ctx, product: null }).steps[0].request).toMatchObject({ modelId: "oss-qwen-image", op: "t2i" });
-
+ expect(poster.steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "t2i" });
+ expect(poster.steps[0].request.params?.palette).toBeUndefined();
+ const ideogram = mk.planMarketing({ engine: "cloud", format: "poster", templateId: "po-swiss-grid", prompt: "Autumn launch", modelId: "ideogram-3" }, { ...ctx, product: null });
+ expect(ideogram.steps[0].request).toMatchObject({ modelId: "ideogram-3", op: "t2i", params: { palette: b.colors.slice(0, 5) } });
+ expect(mk.planMarketing({ engine: "open", format: "poster", prompt: "Autumn" }, { ...ctx, product: null }).steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "t2i" });
+
+ // A Standalone product shot: the Original by default; on the user's GPU one product photo is cut out and relit
+ // (product-shot-qwen-edit-2509); Bria Product Shot stays a cloud choice.
const shot = mk.planMarketing({ engine: "cloud", format: "product-standalone", templateId: "ps-ice-bath" }, ctx);
- expect(shot.steps[0].request.modelId).toBe("bria-product-shot");
- expect(shot.steps[0].request.prompt).toMatch(/^The product is half buried in crushed ice/);
+ expect(shot.steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "edit" });
+ expect(shot.steps[0].request.params?.extra).toBeUndefined();
+ const openShot = mk.planMarketing({ engine: "open", format: "product-standalone", templateId: "ps-ice-bath" }, ctx);
+ expect(openShot.steps[0].request).toMatchObject({ modelId: "fuobe-marketing-image", op: "edit", params: { extra: { productShot: true } } });
+ expect(openShot.notes).toContain("Your product is cut out and relit into the scene, so it stays as it is");
+ const bria = mk.planMarketing({ engine: "cloud", format: "product-standalone", templateId: "ps-ice-bath", modelId: "bria-product-shot" }, ctx);
+ expect(bria.steps[0].request.modelId).toBe("bria-product-shot");
+ expect(bria.steps[0].request.prompt).toMatch(/^The product is half buried in crushed ice/);
expect(() => mk.planMarketing({ engine: "cloud", format: "product-standalone" }, { ...ctx, product: null })).toThrow("Attach a product to generate");
expect(() => mk.planMarketing({ engine: "cloud", format: "product-with-model" }, { ...ctx, product: null })).toThrow("Attach reference or product");
expect(() => mk.planMarketing({ engine: "cloud", format: "ads", templateId: "po-swiss-grid" }, ctx)).toThrow(/another format/);
@@ -317,7 +342,7 @@ describe("brand kits", () => {
it("runs a template in demo mode and lists the run with its generations", async () => {
const product = brand.listProducts(brandId)[0];
const est = await (await estimateRoute.POST(json("POST", { engine: "cloud", format: "ads", templateId: "ad-offer-burst", productId: product.id, brandId, batch: 2 }))).json();
- expect(est).toMatchObject({ demo: true, runs: 1, steps: [{ key: "image", modelId: "gpt-image-2-5" }] });
+ expect(est).toMatchObject({ demo: true, runs: 1, steps: [{ key: "image", modelId: "fuobe-marketing-image" }] });
const blocked = await (await estimateRoute.POST(json("POST", { engine: "cloud", format: "ads" }))).json();
expect(blocked.blocker).toBe("Attach a product to generate");
@@ -502,7 +527,12 @@ describe("Ads Studio", () => {
{ productId: products[1].id, count: 2 },
];
const est = await (await adsEstimate.POST(json("POST", { brandId, engine: "open", items }))).json();
- expect(est).toMatchObject({ modelId: "oss-qwen-edit", total: 5, demo: true });
+ // Fuobe Marketing Image on the user's GPU: free.
+ expect(est).toMatchObject({ modelId: "fuobe-marketing-image", modelName: "Fuobe Marketing Image", total: 5, demo: true });
+ // In the cloud Nano Banana Pro and GPT Image 2.5 stay choices; a model the studio doesn't offer runs the Original.
+ expect((await (await adsEstimate.POST(json("POST", { brandId, engine: "cloud", items }))).json()).modelId).toBe("fuobe-marketing-image");
+ expect((await (await adsEstimate.POST(json("POST", { brandId, engine: "cloud", items, modelId: "nano-banana-pro" }))).json()).modelId).toBe("nano-banana-pro");
+ expect((await (await adsEstimate.POST(json("POST", { brandId, engine: "cloud", items, modelId: "flux-3" }))).json()).modelId).toBe("fuobe-marketing-image");
const { batchId, creatives, run } = ads.createBatch({ brandId, engine: "open", items });
expect(creatives).toHaveLength(5);
expect(creatives.every((c) => c.status === "writing")).toBe(true);
@@ -510,7 +540,7 @@ describe("Ads Studio", () => {
const written = ads.listCreatives({ brandId, batchId });
expect(written.every((c) => c.headline && c.generationId)).toBe(true);
const g = await settle(written[0].generationId!);
- expect(g.request).toMatchObject({ feature: "ads", modelId: "oss-qwen-edit", op: "edit" });
+ expect(g.request).toMatchObject({ feature: "ads", modelId: "fuobe-marketing-image", engine: "open", op: "edit" });
expect(g.request.prompt).toMatch(/No text, letters/);
for (const c of written) await settle(c.generationId!);
const ready = await (await creativesRoute.GET(json("GET", undefined, `http://x/api/ads/creatives?brand=${brandId}&batch=${batchId}`))).json();
diff --git a/tests/marketing-catalog.test.ts b/tests/marketing-catalog.test.ts
index 469ce12c..5ac2ac5c 100644
--- a/tests/marketing-catalog.test.ts
+++ b/tests/marketing-catalog.test.ts
@@ -1,4 +1,5 @@
import { describe, expect, it } from "vitest";
+import { enginesOf } from "@/lib/catalog/engines";
import { getModel, supportsOp } from "@/lib/catalog";
import {
AD_STYLES,
@@ -65,7 +66,8 @@ describe("marketing catalog", () => {
for (const c of list) {
const m = getModel(c.id);
expect(m, c.id).toBeDefined();
- expect(m!.engine).toBe(engine);
+ // A Fuobe Original runs on both engines.
+ expect(enginesOf(m!), c.id).toContain(engine);
}
}
}
diff --git a/tests/no-higgsfield.test.ts b/tests/no-higgsfield.test.ts
index 113ef489..05b94d49 100644
--- a/tests/no-higgsfield.test.ts
+++ b/tests/no-higgsfield.test.ts
@@ -295,7 +295,10 @@ describe("REPLACED_BY", () => {
expect(note).toMatch(/Fuobe Soul/);
// An engine asked for stays.
expect(migrateRequest({ ...old, engine: "open" as const }).request.engine).toBe("open");
- expect(migrateRequest({ modelId: "marketing-studio-image", params: { extra: { template_id: "t" } } }).request).toEqual({ modelId: "gpt-image-2-5", params: {} });
+ // Marketing Studio Image runs on its Original (build plan O10), wherever the install runs Originals.
+ expect(migrateRequest({ modelId: "marketing-studio-image", params: { extra: { template_id: "t" } } }).request).toEqual({ modelId: "fuobe-marketing-image", params: {} });
+ expect(migrateRequest({ modelId: "ads-studio", op: "edit" as const }).request).toEqual({ modelId: "fuobe-marketing-image", op: "edit" });
+ expect(migrateRequest({ modelId: "ai-influencer", prompt: "a surfer" }).request).toEqual({ modelId: "fuobe-soul", prompt: "a surfer" });
// A current model's request comes back as it was.
const current = { modelId: "nano-banana-pro", params: { extra: { style_id: "x" } } };
expect(migrateRequest(current)).toEqual({ request: current });
@@ -428,7 +431,7 @@ describe("stored ids resolve where they are read", () => {
const [again] = retryPhoto(sheet);
expect(again).toMatchObject({ modelId: "fuobe-soul", feature: "character-sheet", request: { modelId: "fuobe-soul" } });
const app = storedRow({ feature: "app:app-ai-influencer", model: "ai-influencer", provider: "higgsfield", op: "t2i", status: "canceled", request: { feature: "app:app-ai-influencer", modelId: "ai-influencer", op: "t2i", prompt: "a character" } });
- expect(retryPhoto(app)[0]).toMatchObject({ modelId: "nano-banana-pro" });
+ expect(retryPhoto(app)[0]).toMatchObject({ modelId: "fuobe-soul" });
});
it("fails a job still running on a retired model with the way forward, not 'no longer exists'", async () => {