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 O2: pick a Soul look, see it on both engines, and get its grade and overlay

Claude81bdbdb2c733
diff --git a/scripts/gen-soul-originals.py b/scripts/gen-soul-originals.py
index a2bfcdc9..1fbe5519 100644
--- a/scripts/gen-soul-originals.py
+++ b/scripts/gen-soul-originals.py
@@ -37,6 +37,8 @@ RECIPES = json.loads((ROOT / "docs/research/fuobe-originals-recipes-5.json").rea
LOOKS = json.loads((ROOT / "docs/research/higgsfield-image-studios.json").read_text(encoding="utf-8"))
GRADE_TS = (ROOT / "src/lib/grade.ts").read_text(encoding="utf-8")
OUT = ROOT / "src/lib/catalog/soul-originals.generated.ts"
+# The pickers' slim list (no LoRA detail, safe for the browser bundle): cards, tabs and the old-id map.
+CARDS_OUT = ROOT / "src/lib/catalog/soul-looks.generated.ts"
# Soul's picker tabs, in Soul's order (generic words; scripts/gen-higgsfield-presets.py uses the same lists).
V1_TABS = ["New", "TikTok Core", "Instagram Aesthetics", "Camera Presets", "Beauty", "Mood", "Surreal", "Graphic Art"]
@@ -268,4 +270,42 @@ export const SOUL_CATEGORIES: Record<"v1" | "v2", string[]> = {ts(categories)};
export const SOUL_ORIGINALS: SoulLook[] = {ts(looks)};
"""
OUT.write_text(out, encoding="utf-8")
+
+
+def hue(look_id):
+ """The look's cover hue (src/lib/catalog/soul.ts lookHue): no preview media is copied from anywhere."""
+ h = 0
+ for ch in look_id:
+ h = (h * 31 + ord(ch)) % 360
+ return h
+
+
+cards = []
+for l in looks:
+ card = {"id": l["id"], "name": l["name"], "family": l["family"], "categories": l["categories"], "description": l["look"], "hue": hue(l["id"])}
+ if l.get("grade"):
+ card["grade"] = l["grade"]
+ if l.get("overlay"):
+ card["overlay"] = l["overlay"]
+ card["civitai"] = any(library[x["key"]].get("download") == "civitai-token" for x in l["loras"])
+ card["hd"] = l["base"] == "qwen-2512"
+ cards.append(card)
+legacy = {l["legacyStyleId"]: l["id"] for l in looks}
+cards_out = f"""// Generated by scripts/gen-soul-originals.py from docs/research/fuobe-originals-recipes-5.json — do not edit by hand.
+// The Soul looks as picker cards: safe for the browser bundle (no LoRA or recipe detail; that is soul-originals.generated.ts).
+import type {{ SoulLookCard }} from "./soul-cards";
+
+/** The 139 looks as cards: Fuobe's id, name, family, tabs, the look in words, a drawn cover's hue, its grade. */
+export const SOUL_LOOK_CARDS: SoulLookCard[] = {ts(cards)};
+
+/** The picker's category tabs per family, in Soul's order. */
+export const SOUL_LOOK_CATEGORIES: Record<"v1" | "v2", string[]> = {ts(categories)};
+
+/**
+ * Higgsfield's old style ids → Fuobe look ids, one way: a request, a moodboard pick or a Reuse saved before the
+ * Originals still finds its look. Nothing sends these ids anywhere.
+ */
+export const SOUL_LEGACY_IDS: Record<string, string> = {ts(legacy)};
+"""
+CARDS_OUT.write_text(cards_out, encoding="utf-8")
print(f"wrote {len(looks)} Soul looks ({sum(1 for l in looks if l['family'] == 'v1')} v1, {sum(1 for l in looks if l['family'] == 'v2')} v2) to {OUT.relative_to(ROOT)}")
diff --git a/src/app/api/generations/[id]/finish/route.ts b/src/app/api/generations/[id]/finish/route.ts
new file mode 100644
index 00000000..6aecfc51
--- /dev/null
+++ b/src/app/api/generations/[id]/finish/route.ts
@@ -0,0 +1,25 @@
+import { FinishError, finishOutput } from "@/server/generations";
+
+const MAX_BYTES = 64 * 1024 * 1024;
+const PNG_MAGIC = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
+
+/**
+ * Fuobe Soul's finished picture (the look's grade and overlay, made in the browser): it replaces the raw output,
+ * which stays as meta.original. Form fields: file (PNG), index (the output's place).
+ */
+export async function POST(request: Request, ctx: RouteContext<"/api/generations/[id]/finish">) {
+ const { id } = await ctx.params;
+ const form = await request.formData().catch(() => null);
+ const file = form?.get("file");
+ const index = Number(form?.get("index"));
+ if (!(file instanceof File)) return Response.json({ error: "No file" }, { status: 400 });
+ if (file.size > MAX_BYTES) return Response.json({ error: "That picture is too large (64 MB max)" }, { status: 413 });
+ const data = Buffer.from(await file.arrayBuffer());
+ if (file.type !== "image/png" || !data.subarray(0, 8).equals(PNG_MAGIC)) return Response.json({ error: "Finished pictures are PNG images" }, { status: 415 });
+ try {
+ return Response.json(finishOutput(id, index, data));
+ } catch (e) {
+ if (e instanceof FinishError) return Response.json({ error: e.message }, { status: e.status });
+ throw e;
+ }
+}
diff --git a/src/components/moodboards/cards.tsx b/src/components/moodboards/cards.tsx
index fe08627a..934438a0 100644
--- a/src/components/moodboards/cards.tsx
+++ b/src/components/moodboards/cards.tsx
@@ -7,9 +7,8 @@ import { DrawnTile } from "@/components/photodump/covers";
import { STATUS_LABEL, type CuratedMoodboard, type Moodboard } from "./logic";
/**
- * A curated look's cover: Higgsfield's preview when its live list loaded (a key is set), otherwise
- * drawn in the look's hue and treatment — grain for black and white, a flash hotspot, gels… (no
- * Higgsfield images are hot-linked without a key); its name on top.
+ * A curated look's cover: a rendered cover once the evaluation harness made one (Fuobe's own renders), otherwise
+ * drawn in the look's hue and treatment — grain for black and white, a flash hotspot, gels…; its name on top.
*/
export function CuratedCover({ m, className }: { m: Pick<CuratedMoodboard, "name" | "hue" | "preview" | "tone">; className?: string }) {
return (
diff --git a/src/components/moodboards/hooks.ts b/src/components/moodboards/hooks.ts
index 024504c0..02a383fd 100644
--- a/src/components/moodboards/hooks.ts
+++ b/src/components/moodboards/hooks.ts
@@ -2,23 +2,12 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { useCallback, useMemo } from "react";
-import type { SoulPresetModel } from "@/lib/catalog/higgsfield-presets.generated";
import type { Engine } from "@/lib/catalog/types";
-import { CURATED_SETS, withLive, type CuratedMoodboard, type LivePresets, type Moodboard } from "./logic";
+import { CURATED_SETS, type CuratedMoodboard, type CuratedSource, type Moodboard } from "./logic";
-/**
- * A curated set (Soul 2.0's looks or Soul's styles): the built-in list at once, with Higgsfield's
- * preview images (and newer presets) once its live list loads with a key. Shares the style
- * picker's cache (the same request).
- */
-export function useCuratedSet(source: SoulPresetModel, enabled = true): CuratedMoodboard[] {
- const live = useQuery({
- queryKey: ["provider-presets", source],
- queryFn: async () => (await (await fetch(`/api/providers/higgsfield/presets?source=${source}`)).json()) as LivePresets,
- staleTime: 60 * 60 * 1000,
- enabled,
- });
- return useMemo(() => withLive(CURATED_SETS[source], live.data, source), [source, live.data]);
+/** A curated set (Fuobe Soul's Soul 2.0 looks or its Soul looks): built in, nothing to fetch. */
+export function useCuratedSet(source: CuratedSource): CuratedMoodboard[] {
+ return CURATED_SETS[source];
}
async function json<T>(res: Response): Promise<T> {
diff --git a/src/components/moodboards/logic.ts b/src/components/moodboards/logic.ts
index 8e617fc2..92c957dc 100644
--- a/src/components/moodboards/logic.ts
+++ b/src/components/moodboards/logic.ts
@@ -3,8 +3,8 @@
* Higgsfield's limits and exact copy, the status a board shows while its cover job runs, which
* images best represent a board, and the 2×2 collages open-source style models take.
*/
-import { SOUL_CATEGORIES, SOUL_PRESETS, type SoulPreset, type SoulPresetModel } from "@/lib/catalog/higgsfield-presets.generated";
-import { coverTone, getSoulPreset, hueOf, spreadHue, type CoverTone } from "@/lib/catalog/packs";
+import { coverTone, hueOf, spreadHue, type CoverTone } from "@/lib/catalog/packs";
+import { lookCard, lookSet, type SoulLookCard } from "@/lib/catalog/soul-cards";
import { kmeans, suggestName, type MoodboardPick, type MoodboardStatus, type RGB } from "@/lib/catalog/palettes";
import type { Engine, Generation } from "@/lib/catalog/types";
@@ -39,75 +39,55 @@ export interface CuratedMoodboard {
tone?: CoverTone;
/** Soul's styles: every category the preset is in (Soul 2.0's looks have one). */
categories?: string[];
- /** Whose preset: Soul 2.0's looks (the default) or Soul's styles. */
- source?: SoulPresetModel;
- /** Higgsfield's preview image (only when a Higgsfield key is set; otherwise the cover is drawn). */
+ /** Whose look: Soul 2.0's looks (the default) or Soul's. */
+ source?: CuratedSource;
+ /** A rendered cover, once the evaluation harness made one (otherwise the cover is drawn). */
preview?: string;
}
-const toCurated = (p: SoulPreset, i: number): CuratedMoodboard => ({
- id: p.id,
- name: p.name,
- category: p.categories[0] ?? "All presets",
- categories: p.categories,
- description: p.description,
+/** The curated sets: Fuobe Soul's Soul 2.0 looks and its Soul (v1) looks. */
+export type CuratedSource = "soul-v1" | "soul-v2";
+
+const toCurated = (c: SoulLookCard, i: number): CuratedMoodboard => ({
+ id: c.id,
+ name: c.name,
+ category: c.categories[0] ?? "All presets",
+ categories: c.categories,
+ description: c.description,
hue: spreadHue(i),
- tone: coverTone(p.name, p.description),
- ...(p.model === "soul-v1" && { source: p.model }),
+ tone: coverTone(c.name, c.description),
+ ...(c.family === "v1" && { source: "soul-v1" as const }),
});
/**
- * The curated sets of the Moodboard panel, from the built-in list: Soul 2.0's 33 looks, and Soul's
- * 106 styles. Each is `style_id` on its own model and its description as words on every other model
- * (the open route's prompt template).
+ * The curated sets of the Moodboard panel: Fuobe Soul's looks (src/lib/catalog/soul-cards.ts), Soul 2.0's 33 and
+ * Soul's 106. On Fuobe Soul a pick is the look itself (its words and LoRAs); on every other model its words.
*/
-export const CURATED_SETS: Record<SoulPresetModel, CuratedMoodboard[]> = {
- "soul-v2": SOUL_PRESETS.filter((p) => p.model === "soul-v2").map(toCurated),
- "soul-v1": SOUL_PRESETS.filter((p) => p.model === "soul-v1").map(toCurated),
+export const CURATED_SETS: Record<CuratedSource, CuratedMoodboard[]> = {
+ "soul-v2": lookSet("v2").items.map(toCurated),
+ "soul-v1": lookSet("v1").items.map(toCurated),
};
export const SOUL_STYLES = CURATED_SETS["soul-v1"];
const LOOKS = new Map([...CURATED_SETS["soul-v2"], ...CURATED_SETS["soul-v1"]].map((c) => [c.id, c]));
/** A curated look's drawn cover by id (the composer chip's dot); unknown ids get a hue of their own. */
export const curatedLook = (id: string): { hue: number; tone: CoverTone } => {
- const c = LOOKS.get(id);
+ const c = LOOKS.get(lookCard(id)?.id ?? id);
return c ? { hue: c.hue, tone: c.tone ?? "plain" } : { hue: hueOf(id), tone: "plain" };
};
-/** What GET /api/providers/higgsfield/presets returns (Higgsfield's live list, or the built-in one as `fallback`). */
-export interface LivePresets {
- items?: { id: string; name: string; preview?: string }[];
- fallback?: boolean;
-}
-
-/**
- * A curated set with Higgsfield's live list on top (a Higgsfield key is set and the list loaded):
- * its preview images, and any preset it has that the built-in list doesn't, at the end.
- */
-export function withLive(base: CuratedMoodboard[], live: LivePresets | undefined, source: SoulPresetModel): CuratedMoodboard[] {
- if (!live?.items?.length || live.fallback) return base;
- const byId = new Map(live.items.map((p) => [p.id, p]));
- const known = new Set(base.map((b) => b.id));
- return [
- ...base.map((b) => (byId.get(b.id)?.preview ? { ...b, preview: byId.get(b.id)!.preview } : b)),
- ...live.items
- .filter((p) => !known.has(p.id))
- .map((p) => ({ id: p.id, name: p.name, category: "All presets", categories: [], description: "", hue: hueOf(p.id), preview: p.preview, ...(source === "soul-v1" && { source }) })),
- ];
-}
-
/** The category pills of each curated set ("All presets" first). */
-export const CURATED_TABS: Record<SoulPresetModel, string[]> = {
- "soul-v2": ["All presets", ...SOUL_CATEGORIES["soul-v2"]],
- "soul-v1": ["All presets", ...SOUL_CATEGORIES["soul-v1"]],
+export const CURATED_TABS: Record<CuratedSource, string[]> = {
+ "soul-v2": ["All presets", ...lookSet("v2").categories],
+ "soul-v1": ["All presets", ...lookSet("v1").categories],
};
export const inCuratedTab = (c: Pick<CuratedMoodboard, "category" | "categories">, tab: string) => tab === "All presets" || (c.categories ?? [c.category]).includes(tab);
-/** Any Soul preset (either model) as a curated pick, by Higgsfield's style id (a reused run's `style_id`). */
+/** A Fuobe Soul look as a curated pick, by its id (or Higgsfield's old style id: a run or a link saved before the Originals). */
export function soulPick(id: string): MoodboardPick | undefined {
- const p = getSoulPreset(id);
- return p && { id: p.id, kind: "curated", name: p.name, description: p.description, status: "complete", ...(p.model === "soul-v1" && { source: p.model }) };
+ const c = lookCard(id);
+ return c && { id: c.id, kind: "curated", name: c.name, description: c.description, status: "complete", ...(c.family === "v1" && { source: "soul-v1" as const }) };
}
export const MOODBOARD_LIMITS = { min: 5, max: 80, minPx: 256, nameMax: 100, refs: 10, collages: 2 } as const;
diff --git a/src/components/moodboards/moodboard-panel.tsx b/src/components/moodboards/moodboard-panel.tsx
index a2d358bc..973bd0b1 100644
--- a/src/components/moodboards/moodboard-panel.tsx
+++ b/src/components/moodboards/moodboard-panel.tsx
@@ -20,7 +20,7 @@ const SETS = [
type CuratedSet = (typeof SETS)[number][0];
/**
- * The composer's Moodboard panel: Curated (Soul 2.0's 33 looks, and Soul's 106 styles) and My
+ * The composer's Moodboard panel: Curated (Fuobe Soul's looks: Soul 2.0's 33 and Soul's 106) and My
* moodboards, search, Create moodboard. It opens on the model's own preset list (Soul's styles on Soul).
*/
export function MoodboardPanel({ value, onPick, presetSource }: { value?: MoodboardPick; onPick: (m?: MoodboardPick) => void; presetSource?: string }) {
@@ -31,7 +31,7 @@ export function MoodboardPanel({ value, onPick, presetSource }: { value?: Moodbo
const [q, setQ] = useState("");
const [creating, setCreating] = useState(false);
const needle = q.trim().toLowerCase();
- const looks = useCuratedSet(set, tab === "curated");
+ const looks = useCuratedSet(set);
const curated = useMemo(
() => looks.filter((c) => (needle ? `${c.name} ${c.description}`.toLowerCase().includes(needle) : inCuratedTab(c, cat))),
[looks, needle, cat],
@@ -164,7 +164,7 @@ export function MoodboardPanel({ value, onPick, presetSource }: { value?: Moodbo
</div>
)}
<p className="text-[11.5px] text-muted-foreground">
- Soul and Soul 2.0 take their own presets natively; other models get the look in words, or your board&apos;s images as style references.{" "}
+ Fuobe Soul applies a curated look whole (its LoRAs and words); other models get the look in words, or your board&apos;s images as style references.{" "}
<Link href="/moodboards" className="text-brand-text underline underline-offset-2">
Manage moodboards
</Link>
diff --git a/src/components/moodboards/moodboards-view.tsx b/src/components/moodboards/moodboards-view.tsx
index 637f488f..8edefaee 100644
--- a/src/components/moodboards/moodboards-view.tsx
+++ b/src/components/moodboards/moodboards-view.tsx
@@ -22,7 +22,7 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSepara
import { Input } from "@/components/ui/input";
import { Skeleton } from "@/components/ui/skeleton";
import { EngineSwitch } from "@/components/studio/engine-switch";
-import { useEngine, useStatus } from "@/lib/api";
+import { useEngine } from "@/lib/api";
import { cn } from "@/lib/utils";
import { BoardCover, CuratedCover, StatusBadge } from "./cards";
import { CreateMoodboardDialog } from "./create-moodboard";
@@ -149,7 +149,7 @@ function BoardCard({ m, onRename, onDelete }: { m: Moodboard; onRename: () => vo
export function MoodboardsView() {
const { data, isLoading } = useMoodboards();
const { rename, remove } = useMoodboardActions();
- const [engine, setEngine, mode] = useEngine();
+ const [engine, setEngine] = useEngine();
const [tab, setTab] = useState<"mine" | "curated">("mine");
const [cat, setCat] = useState("All presets");
const [q, setQ] = useState("");
@@ -159,10 +159,8 @@ export function MoodboardsView() {
const [deleting, setDeleting] = useState<Moodboard | null>(null);
const needle = q.trim().toLowerCase();
const mine = useMemo(() => (data?.items ?? []).filter((m) => !needle || m.name.toLowerCase().includes(needle)), [data, needle]);
- const looks = useCuratedSet("soul-v2", tab === "curated");
- // Curated looks are Soul 2.0 presets: with Higgsfield connected (cloud), they open on Soul 2.0 itself.
- const status = useStatus();
- const onSoul = engine === "cloud" && mode !== "open" && !!status.data?.providers.higgsfield?.configured;
+ const looks = useCuratedSet("soul-v2");
+ // Curated looks are Fuobe Soul's: they open on Fuobe Soul, which applies the whole look on either engine.
const curated = useMemo(
() => looks.filter((c) => (needle ? `${c.name} ${c.description}`.toLowerCase().includes(needle) : inCuratedTab(c, cat))),
[looks, needle, cat],
@@ -266,7 +264,7 @@ export function MoodboardsView() {
{curated.map((c) => (
<Link
key={c.id}
- href={`/image?${onSoul ? "model=soul-2&" : ""}moodboard=curated:${c.id}`}
+ href={`/image?model=fuobe-soul&moodboard=curated:${c.id}`}
aria-label={`Use ${c.name} in the Image studio${c.description ? ` — ${c.description}` : ""}`}
className="group/cur min-w-0 rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
>
@@ -278,7 +276,7 @@ export function MoodboardsView() {
</div>
{!curated.length && <p className="py-16 text-center text-[14px] text-muted-foreground">No presets match “{q}”</p>}
<p className="mt-6 text-[12.5px] text-muted-foreground">
- Curated looks are Soul 2.0 presets: Higgsfield Soul 2.0 takes them as its style{onSoul ? " (they open on Soul 2.0)" : ""}; other models, including the open-source ones, get each look as a prompt.
+ Curated looks are Fuobe Soul looks: Fuobe Soul applies each one whole (its LoRAs and words), free on your GPU or in the cloud. Other models get the look in words.
</p>
</>
)}
diff --git a/src/components/studio/catalog.tsx b/src/components/studio/catalog.tsx
index e9f803dd..d4f99140 100644
--- a/src/components/studio/catalog.tsx
+++ b/src/components/studio/catalog.tsx
@@ -1,7 +1,9 @@
"use client";
import { createContext, useContext, useEffect, useMemo, useState, useSyncExternalStore } from "react";
+import { onEngine } from "@/lib/catalog/engines";
import type { ModelDef, Preset } from "@/lib/catalog/types";
+import { useEngine } from "@/lib/api";
import type { StudioCatalog } from "@/lib/studio-catalog";
import type { StudioConfig } from "./studio-context";
@@ -60,6 +62,9 @@ export function useCatalog(): CatalogApi {
export function CatalogProvider({ catalog, config, children }: { catalog?: StudioCatalog; config: StudioConfig; children: React.ReactNode }) {
const fullCatalog = useFullCatalog();
+ // A Fuobe Original runs on both engines: the studio sees it as it runs on the engine switched to (its routes,
+ // its price or "Free"), so it is in both engines' model lists.
+ const [engine] = useEngine();
// Studios rendered from client code (an element's page) have no server slice: compute it from the lazy chunk.
const [lazy, setLazy] = useState<StudioCatalog | null>(null);
useEffect(() => {
@@ -72,16 +77,17 @@ export function CatalogProvider({ catalog, config, children }: { catalog?: Studi
}, [catalog, config]);
const slice = catalog ?? lazy;
const value = useMemo<CatalogApi>(() => {
- const models = slice?.models ?? [];
+ const models = (slice?.models ?? []).map((m) => onEngine(m, engine));
const index = new Map([...models, ...(slice?.lookup ?? [])].map((m) => [m.id, m]));
+ const view = (m: ModelDef | undefined) => (m ? onEngine(m, engine) : undefined);
return {
ready: !!slice,
models,
- getModel: (id) => index.get(id) ?? fullCatalog?.getModel(id),
+ getModel: (id) => index.get(id) ?? view(fullCatalog?.getModel(id)),
getPreset: (id) => (config.preset?.id === id ? config.preset : fullCatalog?.getPreset(id)),
presets: fullCatalog ? { motion: fullCatalog.MOTIONS, effect: fullCatalog.EFFECTS } : null,
complete: !!fullCatalog,
};
- }, [slice, fullCatalog, config.preset]);
+ }, [slice, fullCatalog, config.preset, engine]);
return <Ctx.Provider value={value}>{children}</Ctx.Provider>;
}
diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsx
index 1ddc61e4..24e5d0a5 100644
--- a/src/components/studio/composer.tsx
+++ b/src/components/studio/composer.tsx
@@ -10,7 +10,8 @@ import { Button } from "@/components/ui/button";
import { Kbd } from "@/components/ui/kbd";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { estimateCost, planGeneration, routesFor } from "@/lib/catalog/plan";
-import type { GenerationRequest, MediaKind, ModelDef, Operation, Preset, VideoFormat } from "@/lib/catalog/types";
+import type { Engine, GenerationRequest, MediaKind, ModelDef, Operation, Preset, VideoFormat } from "@/lib/catalog/types";
+import { dualEngine } from "@/lib/catalog/engines";
import { formatsOf } from "@/lib/av/formats";
import { enhance, useClipFacts, useCreateGeneration, useElements, useEngine, useHydrated, useStatus } from "@/lib/api";
import { applyMentions, type StudioElement } from "@/lib/catalog/elements";
@@ -81,6 +82,11 @@ const PresetChips = dynamic(() => import("./preset-chips"), {
loading: () => <span aria-hidden className="h-8 w-32 shrink-0 animate-pulse rounded-full bg-secondary" />,
});
+/** Fuobe Soul's Look picker (the look cards): its own chunk. */
+const LookChip = dynamic(() => import("./look-chip"), {
+ loading: () => <span aria-hidden className="h-8 w-28 shrink-0 animate-pulse rounded-full bg-secondary" />,
+});
+
/** Color signature + Moodboard chips (studios with `signature`): their own chunk too. */
const SignatureChips = dynamic(() => import("../palettes/signature-chips"), {
loading: () => <span aria-hidden className="h-8 w-40 shrink-0 animate-pulse rounded-full bg-secondary" />,
@@ -111,6 +117,8 @@ function buildRequest(
promptSuffix?: string,
refKind: MediaKind = "image",
frames?: FramesContext,
+ /** A Fuobe Original (runs on both engines): the engine switched to. */
+ engine?: Engine,
): GenerationRequest {
const s = draft.slots;
const refs = draft.refs.filter((x) => !!x?.ref).map((x) => x.ref);
@@ -149,9 +157,15 @@ function buildRequest(
presetOptions: draft.presetOptions,
...(draft.presetId && draft.presetStrength !== undefined && draft.presetStrength < 1 && { presetStrength: draft.presetStrength }),
...(draft.presetId && draft.mix && { mix: draft.mix }),
+ ...(engine && { engine }),
};
}
+/** Leaving a model that takes looks (Fuobe Soul) for one that doesn't: the look (its presetId) doesn't come along. */
+function lookCleared(from: ModelDef | undefined, to: ModelDef): Partial<Draft> {
+ return from?.options.looks && !to.options.looks ? { presetId: undefined, presetStrength: undefined } : {};
+}
+
/** Docked and collapsed, the composer hides its tiles: this event asks it to open first. */
const EXPAND_EVENT = "composer:expand";
@@ -218,12 +232,16 @@ export function Composer({ docked }: { docked: boolean }) {
return () => el?.removeEventListener(EXPAND_EVENT, expand);
}, []);
- const preset: Preset | undefined = draft.presetId ? catalog.getPreset(draft.presetId) : config.preset;
- const lockedModel = preset?.type === "app";
const pickerOps = config.pickerOps ?? config.ops;
const models = useMemo(() => filterModels(catalog.models, { kind: config.kind, ops: pickerOps }), [catalog.models, config.kind, pickerOps]);
const model: ModelDef | undefined = catalog.getModel(draft.modelId);
- const presetLoading = !!draft.presetId && !preset && !catalog.complete;
+ // Fuobe Soul's presetId is a look (its own chip), not an app, motion or effect.
+ const takesLook = !!model?.options.looks;
+ const preset: Preset | undefined = draft.presetId && !takesLook ? catalog.getPreset(draft.presetId) : config.preset;
+ const lockedModel = preset?.type === "app";
+ const presetLoading = !!draft.presetId && !takesLook && !preset && !catalog.complete;
+ /** The engine a request names: only a model that runs on both (a Fuobe Original) needs it. */
+ const engineFor = (id: string) => (dualEngine(catalog.getModel(id)) ? engine : undefined);
// Presets handed over in the URL, a Mix, or a model outside this studio's slice: fetch the full catalog.
const needsFull = presetLoading || (!!draft.mix && !catalog.getPreset(draft.mix.presetId)) || (catalog.ready && !model);
@@ -236,7 +254,7 @@ export function Composer({ docked }: { docked: boolean }) {
if (!model || model.engine === engine) return;
const next = lockedModel ? (engine === "open" ? preset?.open?.modelId : preset?.cloud?.modelId) : config.defaultModels[engine];
const m = next ? catalog.getModel(next) : undefined;
- if (m) setDraft((d) => ({ modelId: m.id, params: { ...m.defaults, numOutputs: d.params.numOutputs, enhancePrompt: d.params.enhancePrompt } }));
+ if (m) setDraft((d) => ({ modelId: m.id, params: { ...m.defaults, numOutputs: d.params.numOutputs, enhancePrompt: d.params.enhancePrompt }, ...lookCleared(model, m) }));
}, [engine, model, lockedModel, preset, config.defaultModels, setDraft, catalog]);
// Single-purpose studios (Extend, Reframe, Edit video…) pin their operation.
@@ -277,7 +295,7 @@ export function Composer({ docked }: { docked: boolean }) {
// A picked palette / moodboard routes the request (and can move it to another model) before anything else.
const signature = useSignature(!!config.signature, draft.signature);
const prepare = (d: typeof draft) => {
- const signed = signature.apply(buildRequest(config.feature, d, studioOp, config.promptSuffix, config.multiRef?.kind, framesCtx));
+ const signed = signature.apply(buildRequest(config.feature, d, studioOp, config.promptSuffix, config.multiRef?.kind, framesCtx, engineFor(d.modelId)));
// Planned with the signature's sentences in the prompt (as the server runs it); sent with them apart.
const raw = signed.worded;
const m = catalog.getModel(raw.modelId) ?? model;
@@ -322,7 +340,8 @@ export function Composer({ docked }: { docked: boolean }) {
});
const plan = planGeneration({ ...planned, prompt: planned.prompt || (config.promptOptional ? " " : "") }, catalog.getModel, catalog.getPreset);
op = plan.op;
- cost = estimateCost(plan.model, plan.params, plan.jobs, plan.op);
+ // A run with LoRAs (a Soul look) goes to the route's LoRA endpoint, which has its own price.
+ cost = estimateCost(plan.model, plan.params, plan.jobs, plan.op, plan.loras.length > 0 && routesFor(plan.model, plan.op).some((r) => !!r.loraEndpoint));
} catch (e) {
planError = (e as Error).message;
}
@@ -365,7 +384,7 @@ export function Composer({ docked }: { docked: boolean }) {
setRecent((r) => pushRecent(r, draft.modelId));
// The server resolves @mentions and drawings itself; only pin the operation when there are none.
// No "Queued" toast: the new card (and the "1 generating ↑" pill when it's off-screen) says it.
- const sent = signature.apply(buildRequest(config.feature, draft, resolvesOnServer ? studioOp : op, config.promptSuffix, config.multiRef?.kind, framesCtx));
+ const sent = signature.apply(buildRequest(config.feature, draft, resolvesOnServer ? studioOp : op, config.promptSuffix, config.multiRef?.kind, framesCtx, engineFor(draft.modelId)));
// Open palette lock: the images are recoloured to the palette by a chained step (POST /api/palettes/lock).
if (sent.lock) return signature.lock.mutate({ request: sent.request, colors: sent.lock.colors }, { onError: (e) => toast.error((e as Error).message) });
create.mutate(sent.request, {
@@ -498,7 +517,7 @@ export function Composer({ docked }: { docked: boolean }) {
}, [step, startRequest, blockedSlot]);
const pickModel = (m: ModelDef) => {
- setDraft((d) => ({ modelId: m.id, params: { ...m.defaults, numOutputs: d.params.numOutputs, enhancePrompt: d.params.enhancePrompt, seed: d.params.seed } }));
+ setDraft((d) => ({ modelId: m.id, params: { ...m.defaults, numOutputs: d.params.numOutputs, enhancePrompt: d.params.enhancePrompt, seed: d.params.seed }, ...lookCleared(model, m) }));
if (m.engine !== engine) setEngine(m.engine);
};
@@ -605,12 +624,25 @@ export function Composer({ docked }: { docked: boolean }) {
/>
)}
{opts.presets && !soulStyles && <ProviderPresetChip spec={opts.presets} value={p.extra?.[opts.presets.param] as string | undefined} onChange={(id) => setExtra(opts.presets!.param, id)} />}
+ {opts.looks && (
+ <LookChip
+ value={draft.presetId}
+ strength={draft.presetStrength ?? 1}
+ onChange={(id, look) => {
+ // A lettering look runs best on Fuobe Soul HD: move there when it's in this studio.
+ const hd = look?.hd && model?.id !== "fuobe-soul-hd" ? catalog.getModel("fuobe-soul-hd") : undefined;
+ if (hd) toast(`${look!.name} runs on Fuobe Soul HD (cleaner lettering)`);
+ setDraft((d) => ({ presetId: id, presetStrength: id ? d.presetStrength : undefined, ...(hd && { modelId: hd.id }) }));
+ }}
+ onStrength={(v) => setDraft({ presetStrength: v })}
+ />
+ )}
{opts.controls && <ControlsChip controls={opts.controls} values={p.extra ?? {}} onChange={setExtra} title={config.controlsTitle} />}
</>
);
const hasSecondary =
!!config.frames ||
- (!!model && (!!opts.voices?.length || !!opts.voiceClone || !!opts.languages || !!opts.presets || !!opts.controls)) ||
+ (!!model && (!!opts.voices?.length || !!opts.voiceClone || !!opts.languages || !!opts.presets || !!opts.controls || !!opts.looks)) ||
!!config.presetPicker ||
!!config.signature ||
preset?.type === "motion" ||
diff --git a/src/components/studio/feed.tsx b/src/components/studio/feed.tsx
index c3c4b5ae..736366f7 100644
--- a/src/components/studio/feed.tsx
+++ b/src/components/studio/feed.tsx
@@ -14,6 +14,7 @@ import {
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { OPERATION_LABELS, type Generation } from "@/lib/catalog/types";
import { useCreateGeneration, useGenerationActions } from "@/lib/api";
+import { useSoulFinish } from "./soul-finish";
import { elapsed, formatCost, leftLabel, notePace, ratioValue, timeAgo, timeLeft } from "@/lib/format";
import { downloadHref, downloadName, userTitle } from "@/lib/library";
import { isLayered, nextSteps, shownOutputs } from "@/lib/output-actions";
@@ -364,6 +365,8 @@ export function Feed({
}) {
const [open, setOpen] = useState<{ id: string; index: number } | null>(null);
const create = useCreateGeneration();
+ // Fuobe Soul results get their look's grade and overlay here, once.
+ useSoulFinish(items);
// Groups get stable callbacks that read the latest props through refs.
const createRef = useRef(create);
const reuseRef = useRef(onReuse);
diff --git a/src/components/studio/look-chip.tsx b/src/components/studio/look-chip.tsx
new file mode 100644
index 00000000..189cc2e6
--- /dev/null
+++ b/src/components/studio/look-chip.tsx
@@ -0,0 +1,175 @@
+"use client";
+
+import { KeyRound, Search, Sparkles } from "lucide-react";
+import { useMemo, useState } from "react";
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
+import { Slider } from "@/components/ui/slider";
+import { DEFAULT_LOOK, lookCard, lookSet, type SoulLookCard } from "@/lib/catalog/soul-cards";
+import { cn } from "@/lib/utils";
+import { Chip, ClearableChip } from "./chip";
+
+/**
+ * Fuobe Soul's Look picker: Soul's 106 looks and Soul 2.0's 33 (the request's presetId), with the look's
+ * strength (presetStrength scales its LoRAs). Covers are drawn (no preview media is copied from anywhere).
+ * Loaded as its own chunk, with the look cards.
+ */
+
+const FAMILIES = [
+ ["v2", "Soul 2.0"],
+ ["v1", "Soul"],
+] as const;
+
+/** A drawn cover: the look's hue as a soft gradient with its initials. */
+function LookCover({ look, className }: { look: Pick<SoulLookCard, "name" | "hue">; className?: string }) {
+ const initials = look.name
+ .replace(/[^\p{L}\p{N} ]/gu, "")
+ .split(/\s+/)
+ .filter(Boolean)
+ .slice(0, 2)
+ .map((w) => w[0]?.toUpperCase())
+ .join("");
+ return (
+ <span
+ aria-hidden
+ className={cn("grid place-items-center font-heading text-white/90", className)}
+ style={{ background: `linear-gradient(150deg, oklch(0.74 0.12 ${look.hue}), oklch(0.46 0.15 ${(look.hue + 50) % 360}))` }}
+ >
+ {initials}
+ </span>
+ );
+}
+
+const pct = (n: number) => `${Math.round(n * 100)}%`;
+
+export default function LookChip({
+ value,
+ strength,
+ onChange,
+ onStrength,
+}: {
+ /** The look's id (Soul's default look when unset). */
+ value?: string;
+ strength: number;
+ onChange: (id: string | undefined, look?: SoulLookCard) => void;
+ onStrength: (v: number) => void;
+}) {
+ const [open, setOpen] = useState(false);
+ const picked = lookCard(value ?? DEFAULT_LOOK);
+ const [family, setFamily] = useState<"v1" | "v2">(picked?.family ?? "v2");
+ const [tab, setTab] = useState("All presets");
+ const [q, setQ] = useState("");
+ const set = useMemo(() => lookSet(family), [family]);
+ const tabs = ["All presets", ...set.categories];
+ const items = useMemo(() => {
+ const words = q.trim().toLowerCase();
+ // A search looks through both families.
+ const pool = words ? [...lookSet("v2").items, ...lookSet("v1").items] : set.items;
+ return pool.filter((l) => (words ? `${l.name} ${l.description}`.toLowerCase().includes(words) : tab === "All presets" || l.categories.includes(tab)));
+ }, [q, set, tab]);
+ return (
+ <ClearableChip active={!!value} onClear={() => onChange(undefined)} clearLabel="Back to the General look">
+ <Popover open={open} onOpenChange={setOpen}>
+ <PopoverTrigger asChild>
+ <Chip icon={picked ? undefined : Sparkles} active={!!value} aria-label={`Look: ${picked?.name ?? "General"}`}>
+ {picked && <LookCover look={picked} className="size-4 rounded-full text-[0px]" />}
+ <span className="max-w-32 truncate">{picked?.name ?? "Look"}</span>
+ {value && strength < 1 && <span className="text-muted-foreground tabular-nums">{pct(strength)}</span>}
+ </Chip>
+ </PopoverTrigger>
+ <PopoverContent className="w-[min(92vw,480px)] p-2" align="start" side="top" collisionPadding={12} aria-label="Looks">
+ <div className="mb-2 flex flex-wrap items-center gap-2">
+ <div role="tablist" aria-label="Soul version" className="inline-flex shrink-0 rounded-full bg-muted p-0.5">
+ {FAMILIES.map(([f, label]) => (
+ <button
+ key={f}
+ type="button"
+ role="tab"
+ aria-selected={family === f}
+ onClick={() => {
+ setFamily(f);
+ setTab("All presets");
+ }}
+ className={cn(
+ "h-7 rounded-full px-3 text-[12px] font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50",
+ family === f ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground",
+ )}
+ >
+ {label}
+ </button>
+ ))}
+ </div>
+ <label className="relative min-w-0 flex-1">
+ <Search className="pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-muted-foreground" aria-hidden />
+ <input
+ value={q}
+ onChange={(e) => setQ(e.target.value)}
+ placeholder="Search looks"
+ aria-label="Search looks"
+ className="h-8 w-full min-w-0 rounded-md border bg-background pr-2 pl-7 text-sm outline-none focus:border-primary"
+ />
+ </label>
+ </div>
+ {!q && (
+ <div role="tablist" aria-label="Look categories" className="scrollbar-none -mx-0.5 mb-2 flex gap-1 overflow-x-auto px-0.5">
+ {tabs.map((t) => (
+ <button
+ key={t}
+ type="button"
+ role="tab"
+ aria-selected={tab === t}
+ onClick={() => setTab(t)}
+ className={cn(
+ "h-7 shrink-0 rounded-full px-2.5 text-[12px] font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50",
+ tab === t ? "bg-brand-faint text-brand-text" : "text-muted-foreground hover:bg-accent",
+ )}
+ >
+ {t}
+ </button>
+ ))}
+ </div>
+ )}
+ <div className="grid max-h-80 grid-cols-3 gap-1.5 overflow-y-auto sm:grid-cols-4">
+ {items.map((l) => (
+ <button
+ key={l.id}
+ type="button"
+ aria-pressed={picked?.id === l.id}
+ title={l.description}
+ onClick={() => {
+ onChange(l.id === DEFAULT_LOOK ? undefined : l.id, l);
+ setOpen(false);
+ }}
+ className={cn("group flex min-w-0 flex-col gap-1 rounded-lg p-1 text-left ring-primary transition hover:bg-accent", picked?.id === l.id && "ring-2")}
+ >
+ <span className="relative aspect-[3/4] w-full overflow-hidden rounded-md">
+ <LookCover look={l} className="size-full text-[22px] transition-transform duration-300 group-hover:scale-105" />
+ {l.civitai && (
+ <span className="absolute right-1 bottom-1 grid size-4 place-items-center rounded-full bg-black/45 text-white" title="Its LoRA downloads from civitai: add your free civitai key in Settings → LoRAs">
+ <KeyRound className="size-2.5" aria-hidden />
+ </span>
+ )}
+ </span>
+ <span className="truncate px-0.5 text-[12px] font-medium">{l.name}</span>
+ </button>
+ ))}
+ {!items.length && <p className="col-span-full py-8 text-center text-[13px] text-muted-foreground">No looks match “{q}”</p>}
+ </div>
+ {picked && (
+ <div className="mt-2 space-y-2 border-t pt-2">
+ <p className="line-clamp-2 px-0.5 text-[12px] text-muted-foreground">
+ <span className="font-medium text-foreground">{picked.name}.</span> {picked.description}
+ {picked.civitai && " Its LoRA downloads from civitai: add your free civitai key in Settings → LoRAs (without it the look's words still apply)."}
+ {picked.hd && " Made for Fuobe Soul HD (cleaner lettering)."}
+ </p>
+ <label className="flex items-center gap-3 px-0.5">
+ <span className="shrink-0 text-[12px] text-muted-foreground">Strength</span>
+ <Slider value={[Math.round(strength * 100)]} min={0} max={100} step={5} onValueChange={([v]) => onStrength(v / 100)} aria-label="Look strength" className="flex-1" />
+ <span className="w-9 shrink-0 text-right text-[12px] tabular-nums">{pct(strength)}</span>
+ </label>
+ </div>
+ )}
+ </PopoverContent>
+ </Popover>
+ </ClearableChip>
+ );
+}
diff --git a/src/components/studio/soul-finish.ts b/src/components/studio/soul-finish.ts
new file mode 100644
index 00000000..c2e43efe
--- /dev/null
+++ b/src/components/studio/soul-finish.ts
@@ -0,0 +1,101 @@
+"use client";
+
+import { useQueryClient } from "@tanstack/react-query";
+import { useEffect } from "react";
+import { applyPreset, PRESETS } from "@/lib/grade";
+import type { Generation } from "@/lib/catalog/types";
+import { finishSteps, outputsToFinish, overlayLayout, type FinishSteps } from "@/lib/soul-post";
+
+/**
+ * Fuobe Soul's post steps in the browser (research §4.4): when a result with a look arrives, its grade (the
+ * WebGL grade of the Color grading tool) and its overlay are applied once, and the finished picture is kept
+ * on the server in place of the raw one (the raw one stays as meta.original). Any open studio feed does it;
+ * the server takes the first and answers the others 409.
+ */
+
+const started = new Set<string>();
+
+function load(url: string): Promise<HTMLImageElement> {
+ return new Promise((resolve, reject) => {
+ const img = new Image();
+ img.crossOrigin = "anonymous";
+ img.onload = () => resolve(img);
+ img.onerror = () => reject(new Error("The picture didn't load"));
+ img.src = url;
+ });
+}
+
+const FONTS = { mono: '"Courier New", ui-monospace, monospace', serif: 'Georgia, "Times New Roman", serif' } as const;
+
+/** The finished picture: graded, then its overlay drawn (a print border, a date stamp, a CCTV caption). */
+async function finish(url: string, steps: FinishSteps, when: Date): Promise<Blob> {
+ const img = await load(url);
+ let canvas = document.createElement("canvas");
+ canvas.width = img.naturalWidth;
+ canvas.height = img.naturalHeight;
+ canvas.getContext("2d")!.drawImage(img, 0, 0);
+ const preset = steps.grade ? PRESETS.find((p) => p.id === steps.grade) : undefined;
+ if (preset) {
+ const { LayerGrader } = await import("@/components/layers/grade-gl");
+ const grader = new LayerGrader();
+ try {
+ canvas = grader.grade(canvas, applyPreset(preset));
+ } finally {
+ grader.dispose();
+ }
+ }
+ if (steps.overlay) {
+ const layout = overlayLayout(steps.overlay, canvas.width, canvas.height, when);
+ const out = document.createElement("canvas");
+ out.width = layout.width;
+ out.height = layout.height;
+ const ctx = out.getContext("2d")!;
+ if (layout.paper) {
+ ctx.fillStyle = layout.paper;
+ ctx.fillRect(0, 0, out.width, out.height);
+ }
+ ctx.drawImage(canvas, layout.photo.x, layout.photo.y);
+ for (const t of layout.texts) {
+ ctx.font = `${t.font === "mono" ? "700 " : ""}${t.size}px ${FONTS[t.font]}`;
+ ctx.textAlign = t.align;
+ ctx.textBaseline = t.baseline;
+ ctx.fillStyle = t.color;
+ ctx.shadowColor = t.glow ?? "transparent";
+ ctx.shadowBlur = t.glow ? Math.max(2, t.size * 0.35) : 0;
+ ctx.fillText(t.text, t.x, t.y);
+ }
+ canvas = out;
+ }
+ return await new Promise<Blob>((resolve, reject) => canvas.toBlob((b) => (b ? resolve(b) : reject(new Error("Couldn't encode the picture"))), "image/png"));
+}
+
+/** Finish every Soul result in `items` that still needs it (once per output, in the background). */
+export function useSoulFinish(items: Generation[]) {
+ const qc = useQueryClient();
+ useEffect(() => {
+ if (typeof document === "undefined" || document.visibilityState === "hidden") return;
+ for (const g of items) {
+ for (const i of outputsToFinish(g)) {
+ const key = `${g.id}:${i}`;
+ if (started.has(key)) continue;
+ started.add(key);
+ const steps = finishSteps(g.outputs[i])!;
+ void (async () => {
+ try {
+ const png = await finish(g.outputs[i].url, steps, new Date(g.createdAt));
+ const form = new FormData();
+ form.append("file", new File([png], `soul-${g.id}-${i}.png`, { type: "image/png" }));
+ form.append("index", String(i));
+ const res = await fetch(`/api/generations/${g.id}/finish`, { method: "POST", body: form });
+ // The live stream brings the finished row; a feed without it refetches.
+ if (res.ok) void qc.invalidateQueries({ queryKey: ["generations"] });
+ } catch (e) {
+ // The raw picture stays; it is finished next time a feed shows it.
+ started.delete(key);
+ console.warn(`[fuobe] couldn't finish ${g.id}: ${(e as Error).message}`);
+ }
+ })();
+ }
+ }
+ }, [items, qc]);
+}
diff --git a/src/components/studio/viewer.tsx b/src/components/studio/viewer.tsx
index d414adff..5e5dc341 100644
--- a/src/components/studio/viewer.tsx
+++ b/src/components/studio/viewer.tsx
@@ -10,6 +10,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "@/components/ui/sheet";
import { OPERATION_LABELS, type Generation, type OutputFile } from "@/lib/catalog/types";
import { formatCost, timeAgo } from "@/lib/format";
+import { PRESETS as GRADE_PRESETS } from "@/lib/grade";
import { trashDaysLeft, userTitle } from "@/lib/library";
import { editOnlyFormat, isLayered, layerInfo, outputActions, type OutputAction } from "@/lib/output-actions";
import { cn } from "@/lib/utils";
@@ -84,7 +85,8 @@ function Details({ g, index }: { g: Generation; index: number }) {
<Row label="Model" value={g.modelName ?? g.modelId} />
<Row label="Engine" value={g.provider === "mock" ? "Demo" : g.provider === "local" ? "In your browser" : g.engine === "open" ? "Open source · ComfyUI" : `Cloud · ${g.provider}`} />
<Row label="Mode" value={OPERATION_LABELS[g.op]} />
- <Row label="Preset" value={g.presetName} />
+ <Row label={g.modelId.startsWith("fuobe-soul") ? "Look" : "Preset"} value={g.presetName} />
+ <Row label="Finish" value={finishText(g.outputs[index])} />
<Row label="Step" value={g.request.step?.label} />
{isLayered(g) && <Row label="Layer" value={`${layerInfo(g.outputs[index], index).name} · ${index + 1} of ${g.outputs.length}`} />}
<Row label="Stem" value={metaText(g.outputs[index], "stem")} />
@@ -103,6 +105,16 @@ function Details({ g, index }: { g: Generation; index: number }) {
);
}
+/** A Fuobe Soul result's post steps: the grade preset and the overlay, applied in the browser (or still to come). */
+function finishText(o: OutputFile | undefined): string | undefined {
+ const m = o?.meta;
+ if (!m || (!m.grade && !m.overlay)) return undefined;
+ const grade = typeof m.grade === "string" ? (GRADE_PRESETS.find((p) => p.id === m.grade)?.name ?? m.grade) : undefined;
+ const overlay = m.overlay === "date-stamp" ? "date stamp" : m.overlay === "cctv" ? "CCTV caption" : m.overlay === "photo-booth" ? "photo-booth print" : undefined;
+ const what = [grade && `${grade} grade`, overlay].filter(Boolean).join(" + ");
+ return m.finished ? what : `${what} (applied when it opens in a studio)`;
+}
+
function LayerList({ g, index, all, onPick, onAll }: { g: Generation; index: number; all: boolean; onPick: (i: number) => void; onAll: () => void }) {
const layers = g.outputs.map((o, i) => ({ o, i, ...layerInfo(o, i) })).sort((a, b) => b.z - a.z);
const item = "flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-[13px] transition-colors hover:bg-accent";
diff --git a/src/lib/catalog/palettes.ts b/src/lib/catalog/palettes.ts
index d3a3d153..3d9e3e79 100644
--- a/src/lib/catalog/palettes.ts
+++ b/src/lib/catalog/palettes.ts
@@ -12,9 +12,9 @@
* palette's slug as `color_palette`; every other model: the hex list written into the prompt. Open
* engine: Z-Image Turbo becomes Z-Image Turbo · Palette (hex in the prompt + a ColorTransfer lock to
* a swatch); other open models can add a palette-transfer post-step (oss-palette-image, chained).
- * - Moodboard → curated: the Soul preset's `style_id` on a model whose own preset picker is that list
- * (options.presets.source: Soul 2.0's 33 looks on soul-2, Soul's 106 styles on soul-1), its
- * description as words on every other model (the open route; Soul Cinema ignores style ids).
+ * - Moodboard → curated: a Fuobe Soul look (Soul 2.0's 33, Soul's 106; src/lib/catalog/soul-cards.ts). On a model
+ * that takes looks (Fuobe Soul, Soul HD: options.looks) it is the look itself (presetId: its words and its LoRAs);
+ * on every other model its words. Picks saved with Higgsfield's old style ids still find their look.
* Personal: cloud = the board's Recraft style id (Recraft models) or its most representative images
* as style references (Nano Banana Pro and other multi-reference models); open = the board's collages
* on Qwen-Image-Edit Style Reference (or the style-reference model picked), or its trained style LoRA
@@ -23,6 +23,7 @@
* `request.prompt`: they ride in `request.signature.words`, which the server adds when it plans the
* run, so feeds, Library titles and Reuse keep the user's own words.
*/
+import { lookCard, SOUL_MODEL_IDS } from "./soul-cards";
import type { GenerationRequest, GenParams, ModelDef, Operation } from "./types";
export type RGB = [number, number, number];
@@ -484,16 +485,16 @@ export function applySignature(req: GenerationRequest, sig: Signature | undefine
if (mb) {
if (mb.kind === "personal" && mb.status !== "complete") return { request: req, modelId: req.modelId, notes: [], blocker: mb.status === "failed" ? "This moodboard failed to build — retry it on the Moodboards page" : NOT_READY };
if (mb.kind === "curated") {
- const source = mb.source ?? "soul-v2";
- // Native wherever the model's own preset picker is this preset's list (Soul's styles, Soul 2.0's looks).
- const presets = model.options.presets;
- if (presets?.source === source) r = setExtra(r, presets.param, mb.id);
+ // A look picked before the Originals carries Higgsfield's old id: it reads as its Fuobe look.
+ const card = lookCard(mb.id);
+ const look = card ? { ...mb, id: card.id, name: card.name, description: card.description } : mb;
+ if (model.options.looks && card) r = { ...r, presetId: card.id };
else {
- words.push(styleWords(mb));
+ words.push(styleWords(look));
notes.push(
- model.family === "soul" && !presets
- ? `${model.name} has one fixed look and no presets — ${mb.name} is described in words`
- : `${mb.name} is a ${source === "soul-v1" ? "Soul" : "Soul 2.0"} preset — described in words on ${model.name}`,
+ model.id === SOUL_MODEL_IDS.cinema
+ ? `${model.name} has one fixed look — ${look.name} is described in words`
+ : `${look.name} is a Fuobe Soul look — described in words on ${model.name} (Fuobe Soul applies it with its LoRAs)`,
);
}
styled = true;
diff --git a/src/lib/catalog/soul-cards.ts b/src/lib/catalog/soul-cards.ts
new file mode 100644
index 00000000..7d545e9d
--- /dev/null
+++ b/src/lib/catalog/soul-cards.ts
@@ -0,0 +1,53 @@
+/**
+ * Fuobe Soul's looks as the pickers show them (the composer's Look chip, the Moodboard panel's curated sets).
+ * Browser-safe: cards only, no LoRAs or recipes (src/lib/catalog/soul.ts builds the run on the server).
+ */
+import { SOUL_LEGACY_IDS, SOUL_LOOK_CARDS, SOUL_LOOK_CATEGORIES } from "./soul-looks.generated";
+
+export interface SoulLookCard {
+ /** Fuobe's id: family + the name as a slug ("v1-general"). */
+ id: string;
+ name: string;
+ family: "v1" | "v2";
+ categories: string[];
+ /** The look in words (Fuobe's own wording). */
+ description: string;
+ /** A drawn cover's hue (no preview media is copied from anywhere). */
+ hue: number;
+ /** The grade preset applied after generation. */
+ grade?: string;
+ /** Drawn on the result in the browser: a date stamp, a CCTV caption, a photo-booth print. */
+ overlay?: "date-stamp" | "cctv" | "photo-booth";
+ /** Some of its LoRAs download from civitai (needs the user's free civitai key). */
+ civitai: boolean;
+ /** Made for Fuobe Soul HD (Qwen-Image 2512: lettering). */
+ hd: boolean;
+}
+
+/** The Soul Originals' model ids (Soul Cinema has one fixed look). */
+export const SOUL_MODEL_IDS = { soul: "fuobe-soul", hd: "fuobe-soul-hd", cinema: "fuobe-soul-cinema" } as const;
+
+/** The look a Fuobe Soul run uses when none is picked: Soul's own default. */
+export const DEFAULT_LOOK = "v1-general";
+
+const BY_ID = new Map(SOUL_LOOK_CARDS.map((c) => [c.id, c]));
+
+/** A look's card by its Fuobe id, or by Higgsfield's old style id (settings saved before the Originals). */
+export function lookCard(id: string | null | undefined): SoulLookCard | undefined {
+ if (!id) return undefined;
+ return BY_ID.get(id) ?? BY_ID.get(SOUL_LEGACY_IDS[id.toLowerCase()] ?? "");
+}
+
+/** The looks of a family and its tabs ("All presets" first), in Soul's order. */
+export function lookSet(family: "v1" | "v2"): { items: SoulLookCard[]; categories: string[] } {
+ return { items: SOUL_LOOK_CARDS.filter((c) => c.family === family), categories: SOUL_LOOK_CATEGORIES[family] };
+}
+
+/** A stable hue per look id for its drawn cover. */
+export function lookHue(id: string): number {
+ let h = 0;
+ for (const c of id) h = (h * 31 + c.charCodeAt(0)) % 360;
+ return h;
+}
+
+export { SOUL_LOOK_CARDS };
diff --git a/src/lib/catalog/soul-looks.generated.ts b/src/lib/catalog/soul-looks.generated.ts
new file mode 100644
index 00000000..75622344
--- /dev/null
+++ b/src/lib/catalog/soul-looks.generated.ts
@@ -0,0 +1,1783 @@
+// Generated by scripts/gen-soul-originals.py from docs/research/fuobe-originals-recipes-5.json — do not edit by hand.
+// The Soul looks as picker cards: safe for the browser bundle (no LoRA or recipe detail; that is soul-originals.generated.ts).
+import type { SoulLookCard } from "./soul-cards";
+
+/** The 139 looks as cards: Fuobe's id, name, family, tabs, the look in words, a drawn cover's hue, its grade. */
+export const SOUL_LOOK_CARDS: SoulLookCard[] = [
+ {
+ "id": "v1-general",
+ "name": "General",
+ "family": "v1",
+ "categories": [],
+ "description": "Clean, balanced and natural look, soft daylight, true-to-life colours.",
+ "hue": 46,
+ "grade": "natural",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-iphone",
+ "name": "iPhone",
+ "family": "v1",
+ "categories": [
+ "Instagram Aesthetics",
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "Shot on an iPhone, natural light, casual framing, soft HDR glow, looks real but a little better.",
+ "hue": 135,
+ "grade": "natural",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-realistic",
+ "name": "Realistic",
+ "family": "v1",
+ "categories": [
+ "Instagram Aesthetics"
+ ],
+ "description": "No filters, flawless clarity, light, pores and fabric weave exactly as they are.",
+ "hue": 92,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-digitalcam",
+ "name": "DigitalCam",
+ "family": "v1",
+ "categories": [
+ "TikTok Core",
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "2007 point-and-shoot digital camera, harsh on-camera flash, raw textures.",
+ "hue": 81,
+ "overlay": "date-stamp",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-flight-mode",
+ "name": "Flight mode",
+ "family": "v1",
+ "categories": [
+ "New",
+ "TikTok Core",
+ "Instagram Aesthetics"
+ ],
+ "description": "Airport terminal, modern architecture, clean lines, travel outfit, departures board, main character leaves town.",
+ "hue": 86,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-sunset-beach",
+ "name": "Sunset beach",
+ "family": "v1",
+ "categories": [
+ "New",
+ "TikTok Core",
+ "Instagram Aesthetics",
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "Golden-hour beach, sky melting from purple to peach, backlit rim light, glowy skin, luxury swimwear, candid pose.",
+ "hue": 110,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-mt-fuji",
+ "name": "Mt. Fuji",
+ "family": "v1",
+ "categories": [
+ "New",
+ "Mood",
+ "Surreal"
+ ],
+ "description": "Postcard surrealism, crystal-blue sky, symmetrical Mt. Fuji behind a Japanese convenience store, playful drama.",
+ "hue": 42,
+ "grade": "pop",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-street-view",
+ "name": "Street view",
+ "family": "v1",
+ "categories": [
+ "New",
+ "TikTok Core",
+ "Mood"
+ ],
+ "description": "Candid street-level shot, as if caught by a passing camera on a city sidewalk.",
+ "hue": 133,
+ "grade": "natural",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-tokyo-streetstyle",
+ "name": "Tokyo Streetstyle",
+ "family": "v1",
+ "categories": [],
+ "description": "Tokyo street style, layered looks, sharp silhouettes, fearless colour, street-level runway.",
+ "hue": 157,
+ "grade": "pop",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-bimbocore",
+ "name": "Bimbocore",
+ "family": "v1",
+ "categories": [
+ "TikTok Core"
+ ],
+ "description": "Hyperfeminine Bimbocore, glossy lips, tiny skirt, plastic-fantastic pink styling, confident pose.",
+ "hue": 48,
+ "grade": "pop",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-cctv",
+ "name": "CCTV",
+ "family": "v1",
+ "categories": [
+ "TikTok Core",
+ "Instagram Aesthetics",
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "Grainy CCTV surveillance still from a high corner camera, wide angle, low resolution, green-grey cast, motion smear.",
+ "hue": 44,
+ "grade": "cold-steel",
+ "overlay": "cctv",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-elevator-mirror",
+ "name": "Elevator Mirror",
+ "family": "v1",
+ "categories": [],
+ "description": "Full-body mirror selfie in a brushed-steel elevator, phone in hand, flash bouncing off the mirror.",
+ "hue": 260,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-y2k",
+ "name": "Y2K",
+ "family": "v1",
+ "categories": [
+ "TikTok Core"
+ ],
+ "description": "Y2K gloss and glitter, baby tee, flip phone, shiny early-2000s maximalism.",
+ "hue": 160,
+ "grade": "pop",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-ringselfie",
+ "name": "RingSelfie",
+ "family": "v1",
+ "categories": [],
+ "description": "Close-up selfie of manicured hands with rings, glossy lips, direct flash catching the sparkle.",
+ "hue": 346,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-spotlight",
+ "name": "Spotlight",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Direct spotlight, high-contrast drama, paparazzi flash, deep shadows, instant icon energy.",
+ "hue": 2,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-y2k-posters",
+ "name": "Y2K Posters",
+ "family": "v1",
+ "categories": [
+ "TikTok Core"
+ ],
+ "description": "Early-internet teen bedroom poster, chrome bubble text, airbrushed skin, floating objects, glossy print.",
+ "hue": 209,
+ "grade": "pop",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-nail-check",
+ "name": "Nail Check",
+ "family": "v1",
+ "categories": [
+ "Surreal"
+ ],
+ "description": "Macro close-up of hands showing nail art, rings and textures, precise beauty with attitude.",
+ "hue": 347,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-gorpcore",
+ "name": "Gorpcore",
+ "family": "v1",
+ "categories": [],
+ "description": "Gorpcore, technical fabrics, bulky trail sneakers, colour-blocked outdoor gear that looks runway-ready.",
+ "hue": 87,
+ "grade": "natural",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-90s-grain",
+ "name": "90s Grain",
+ "family": "v1",
+ "categories": [
+ "Beauty"
+ ],
+ "description": "1990s film photo, warm tones, soft blur, heavy film grain, retro mood.",
+ "hue": 16,
+ "grade": "portra",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-0-5-selfie",
+ "name": "0.5 Selfie",
+ "family": "v1",
+ "categories": [],
+ "description": "0.5x ultra-wide front-camera selfie, half body, wide-angle distortion, real-life lighting.",
+ "hue": 15,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-0-5-outfit",
+ "name": "0.5 Outfit",
+ "family": "v1",
+ "categories": [],
+ "description": "Shot from the waist down with a 0.5x ultra-wide phone lens, outfit check, casual and candid.",
+ "hue": 290,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-medieval",
+ "name": "Medieval",
+ "family": "v1",
+ "categories": [],
+ "description": "Chainmail, velvet drapes, candle-lit castle hall, courtly intrigue, cinematic weight.",
+ "hue": 91,
+ "grade": "old-lens",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-japandi",
+ "name": "Japandi",
+ "family": "v1",
+ "categories": [],
+ "description": "Japandi interior, minimalism with warmth, clean lines, light oak and linen, natural light, serene balance.",
+ "hue": 249,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-coquette-core",
+ "name": "Coquette core",
+ "family": "v1",
+ "categories": [],
+ "description": "Coquette core, soft focus, lace, bows, blush tones, sweetness with a wink.",
+ "hue": 266,
+ "grade": "soft-skin",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-sand",
+ "name": "Sand",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Sculptural silhouettes in windswept sand dunes, neutral tones, high fashion lost in a dust storm.",
+ "hue": 94,
+ "grade": "faded",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-2000s-cam",
+ "name": "2000s Cam",
+ "family": "v1",
+ "categories": [
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "Early-2000s paparazzi digital snapshot, low-rise jeans, rhinestones, harsh flash.",
+ "hue": 61,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-quiet-luxury",
+ "name": "Quiet luxury",
+ "family": "v1",
+ "categories": [],
+ "description": "Quiet luxury, neutral cashmere, tailored lines, no logos, old-money ease.",
+ "hue": 96,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-giant-accessory",
+ "name": "Giant Accessory",
+ "family": "v1",
+ "categories": [
+ "Surreal"
+ ],
+ "description": "One accessory blown up to a surreal giant scale, bag, bow or earring dwarfing the subject.",
+ "hue": 320,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-hairclips",
+ "name": "HairClips",
+ "family": "v1",
+ "categories": [],
+ "description": "Chunky, colourful or pearl-lined hair clips framing the face, playful precision, close-up.",
+ "hue": 271,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-505room",
+ "name": "505room",
+ "family": "v1",
+ "categories": [],
+ "description": "Moody hotel room, low warm lamp light, late night, rumpled sheets.",
+ "hue": 211,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-eating-food",
+ "name": "Eating Food",
+ "family": "v1",
+ "categories": [],
+ "description": "Candid close-up mid-bite, casual food-diary energy, phone camera.",
+ "hue": 143,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-rainy-day",
+ "name": "Rainy Day",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Moody rainy day, reflections in wet pavement, soft sweater, slow cinematic quiet.",
+ "hue": 42,
+ "grade": "cold-steel",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-foggy-morning",
+ "name": "Foggy Morning",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Foggy morning, muted colours, blurred horizon, quiet early light, dreamlike stillness.",
+ "hue": 149,
+ "grade": "faded",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-avant-garde",
+ "name": "Avant-garde",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Avant-garde sculptural fashion, unexpected forms, bold shapes, gallery light.",
+ "hue": 20,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-tumblr",
+ "name": "Tumblr",
+ "family": "v1",
+ "categories": [],
+ "description": "2013 Tumblr photo, grainy, soft blur, blue-toned melancholy, effortlessly curated.",
+ "hue": 214,
+ "grade": "faded",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-through-the-glass",
+ "name": "Through The Glass",
+ "family": "v1",
+ "categories": [],
+ "description": "Seen through a fogged-up café window, condensation and reflections, a quiet unstaged moment.",
+ "hue": 190,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-vintage-photobooth",
+ "name": "Vintage PhotoBooth",
+ "family": "v1",
+ "categories": [],
+ "description": "Vintage photo booth snapshot, flash glare, grain, a kiss of chaos.",
+ "hue": 61,
+ "overlay": "photo-booth",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-fisheye",
+ "name": "Fisheye",
+ "family": "v1",
+ "categories": [
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "Fisheye lens, exaggerated depth and playful proportions, face up close, background stretched to infinity.",
+ "hue": 31,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-geominimal",
+ "name": "Geominimal",
+ "family": "v1",
+ "categories": [],
+ "description": "Geominimal, clean lines, geometric overlays, sharp modern minimalist set.",
+ "hue": 250,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-7",
+ "name": "7\\",
+ "family": "v1",
+ "categories": [],
+ "description": "Distorted eerie realism, uncanny wide grin, glitch edits, cult-classic weirdness.",
+ "hue": 237,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-selfcare",
+ "name": "Selfcare",
+ "family": "v1",
+ "categories": [],
+ "description": "Self-care evening, candles, skincare, bathrobe, glowing calm, muted soft light.",
+ "hue": 359,
+ "grade": "soft-skin",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-babydoll-makeup",
+ "name": "Babydoll MakeUp",
+ "family": "v1",
+ "categories": [],
+ "description": "Babydoll makeup, fluttery lashes, pouty lips, porcelain skin, hyper-feminine glow.",
+ "hue": 211,
+ "grade": "soft-skin",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-fairycore",
+ "name": "Fairycore",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Fairycore, glittery woodland fantasy, soft pastels, magical sparkles.",
+ "hue": 66,
+ "grade": "soft-skin",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-office-beach",
+ "name": "Office beach",
+ "family": "v1",
+ "categories": [],
+ "description": "Office beach, business suit on sand, spreadsheets and sunglasses, sun-bleached chaos.",
+ "hue": 236,
+ "grade": "faded",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-swords-hill",
+ "name": "Swords Hill",
+ "family": "v1",
+ "categories": [],
+ "description": "High fantasy on a mountain slope, capes, steel, wind-blown drama, part legend part editorial.",
+ "hue": 126,
+ "grade": "teal-orange",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-amalfi-summer",
+ "name": "Amalfi Summer",
+ "family": "v1",
+ "categories": [],
+ "description": "Amalfi summer, lemon light, sun-kissed skin, linen dress fluttering on cobblestones by the sea.",
+ "hue": 160,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-creatures",
+ "name": "Creatures",
+ "family": "v1",
+ "categories": [
+ "Surreal"
+ ],
+ "description": "Animalistic details fused with human features, strange, eerie and beautiful.",
+ "hue": 106,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-grunge",
+ "name": "Grunge",
+ "family": "v1",
+ "categories": [],
+ "description": "Grunge, distressed denim, oversized flannel, don't-care hair, moody and messy.",
+ "hue": 260,
+ "grade": "faded",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-glazed-doll-skin-makeup",
+ "name": "Glazed doll skin makeup",
+ "family": "v1",
+ "categories": [],
+ "description": "Glazed doll skin makeup, glass-like high-shine skin, dewy, flawlessly unreal.",
+ "hue": 325,
+ "grade": "soft-skin",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-invertethereal",
+ "name": "Invertethereal",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Negative tones and ghostly hues, light turned inside out, dreamlike and eerie.",
+ "hue": 218,
+ "grade": "invert",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-indie-sleaze",
+ "name": "Indie sleaze",
+ "family": "v1",
+ "categories": [],
+ "description": "Indie sleaze, flash-lit nightlife chaos, smudged eyeliner, blurry rebellion.",
+ "hue": 12,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-mixed-media",
+ "name": "Mixed Media",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Mixed-media collage of photo, paint, text and texture, chaotic elegance.",
+ "hue": 344,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-paper-face",
+ "name": "Paper Face",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "A face collaged from torn paper, cutouts and textures, raw edges, mixed-media surrealism.",
+ "hue": 232,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-2000s-fashion",
+ "name": "2000s Fashion",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "2000s fashion, flashy fits, shiny textures, Y2K icons, low-rise and high-attitude.",
+ "hue": 350,
+ "grade": "pop",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-movie",
+ "name": "Movie",
+ "family": "v1",
+ "categories": [],
+ "description": "Widescreen film still, cinematic lighting and grade, anamorphic feel.",
+ "hue": 246,
+ "grade": "teal-orange",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-overexposed",
+ "name": "Overexposed",
+ "family": "v1",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Overexposed, washed-out whites, crushed detail, intense brightness, accidental and emotional.",
+ "hue": 186,
+ "grade": "faded",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-long-legs",
+ "name": "Long legs",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Elongated limbs and stretched proportions from a very low camera angle, runway edge.",
+ "hue": 156,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-night-beach",
+ "name": "Night Beach",
+ "family": "v1",
+ "categories": [],
+ "description": "Night beach, moonlit waves, dark silhouettes, salt in the air, a little unreal.",
+ "hue": 4,
+ "grade": "cold-steel",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-90-s-editorial",
+ "name": "90’s Editorial",
+ "family": "v1",
+ "categories": [],
+ "description": "1990s fashion magazine editorial, film grain, soft blur, moody colours, nostalgia.",
+ "hue": 129,
+ "grade": "portra",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-sitting-on-the-street",
+ "name": "Sitting on the Street",
+ "family": "v1",
+ "categories": [],
+ "description": "Sitting on a city curb, laid-back pose, city grit, candid and unbothered.",
+ "hue": 282,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-glitch",
+ "name": "Glitch",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Glitch art, pixel drag, colour distortion, digital noise, beautiful errors.",
+ "hue": 127,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-fashionshow",
+ "name": "FashionShow",
+ "family": "v1",
+ "categories": [],
+ "description": "Backstage at a fashion show, flashes going off, bold looks, runway energy.",
+ "hue": 115,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-artwork",
+ "name": "Artwork",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Framed artwork with painterly depth, a still life of emotion, texture and light.",
+ "hue": 210,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-graffiti",
+ "name": "Graffiti",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Graffiti, spray-paint textures, bold lines, rebellious colour on a city wall.",
+ "hue": 66,
+ "civitai": false,
+ "hd": true
+ },
+ {
+ "id": "v1-angel-wings",
+ "name": "Angel Wings",
+ "family": "v1",
+ "categories": [],
+ "description": "Soft dreamy look with delicate feathered angel wings, weightless.",
+ "hue": 98,
+ "grade": "soft-skin",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-pixeletedface",
+ "name": "PixeletedFace",
+ "family": "v1",
+ "categories": [],
+ "description": "Retro early-internet portrait with the face pixelated into large blocks.",
+ "hue": 15,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-grillz-selfie",
+ "name": "Grillz Selfie",
+ "family": "v1",
+ "categories": [],
+ "description": "Flash-heavy close-up of shiny gold grillz, bold attitude, underground luxury.",
+ "hue": 79,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-shoe-check",
+ "name": "Shoe Check",
+ "family": "v1",
+ "categories": [
+ "Surreal"
+ ],
+ "description": "Shoe check, footwear in focus, top-down or ground-level angle.",
+ "hue": 328,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-bleached-brows",
+ "name": "Bleached Brows",
+ "family": "v1",
+ "categories": [],
+ "description": "Bleached barely-there brows, futuristic blank-canvas face, alien glam.",
+ "hue": 2,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-object-makeup",
+ "name": "Object Makeup",
+ "family": "v1",
+ "categories": [],
+ "description": "Collage-style object makeup: an object below, makeup above, colours duplicated, surreal face art.",
+ "hue": 301,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-360-cam",
+ "name": "360 cam",
+ "family": "v1",
+ "categories": [
+ "Camera Presets",
+ "Beauty"
+ ],
+ "description": "360 camera wrap-around perspective, immersive warped distortion, everything in frame.",
+ "hue": 85,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-giant-people",
+ "name": "Giant People",
+ "family": "v1",
+ "categories": [],
+ "description": "Surreal scale: the subject towers over a miniature city, tilt-shift look.",
+ "hue": 233,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-help-it-s-too-big",
+ "name": "Help It's Too Big",
+ "family": "v1",
+ "categories": [],
+ "description": "Comedic oversized prop or garment dwarfing the subject.",
+ "hue": 357,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-duplicate",
+ "name": "Duplicate",
+ "family": "v1",
+ "categories": [
+ "Graphic Art"
+ ],
+ "description": "Duplicate: echoed figures, mirrored forms, repeated poses, surreal symmetry.",
+ "hue": 177,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-library",
+ "name": "Library",
+ "family": "v1",
+ "categories": [
+ "New"
+ ],
+ "description": "Cosy academia library, soft indoor light, timeless knits, stillness between the shelves.",
+ "hue": 249,
+ "grade": "portra",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-escalator",
+ "name": "Escalator",
+ "family": "v1",
+ "categories": [
+ "New"
+ ],
+ "description": "Mall escalator paparazzi look, structured outfit, steel gradients, motion frozen.",
+ "hue": 60,
+ "grade": "cold-steel",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-gallery",
+ "name": "Gallery",
+ "family": "v1",
+ "categories": [
+ "New"
+ ],
+ "description": "Gallery, neutral walls, subject framed like a work of art, minimal and polished.",
+ "hue": 304,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-crossing-the-street",
+ "name": "Crossing the street",
+ "family": "v1",
+ "categories": [
+ "New"
+ ],
+ "description": "Crossing the street mid-stride, overhead angle, harsh midday shadows, boss-walk energy.",
+ "hue": 208,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-sunbathing",
+ "name": "Sunbathing",
+ "family": "v1",
+ "categories": [
+ "New"
+ ],
+ "description": "Sunbathing, clear turquoise water, woven bag, towel texture, heat-soaked skin.",
+ "hue": 237,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-subway",
+ "name": "Subway",
+ "family": "v1",
+ "categories": [
+ "New"
+ ],
+ "description": "Fluorescent-lit subway car or platform, candid commuter.",
+ "hue": 9,
+ "grade": "cold-steel",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-birthday-mess",
+ "name": "birthday mess",
+ "family": "v1",
+ "categories": [],
+ "description": "Flash-lit party aftermath with cake, balloons and confetti.",
+ "hue": 262,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-static-glow",
+ "name": "static glow",
+ "family": "v1",
+ "categories": [],
+ "description": "Soft TV-static haze, analog light bloom, CRT glow.",
+ "hue": 266,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-clouded-dream",
+ "name": "Clouded Dream",
+ "family": "v1",
+ "categories": [],
+ "description": "Dreamy pastel sky, soft clouds, airy haze.",
+ "hue": 344,
+ "grade": "soft-skin",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-double-take",
+ "name": "Double take",
+ "family": "v1",
+ "categories": [],
+ "description": "The same person appears twice in one frame.",
+ "hue": 233,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-red-balloon",
+ "name": "Red balloon",
+ "family": "v1",
+ "categories": [],
+ "description": "Minimal scene with a single red balloon as the only accent colour.",
+ "hue": 25,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-tokyo-drift",
+ "name": "tokyo drift",
+ "family": "v1",
+ "categories": [],
+ "description": "Neon Tokyo night streets, car culture, motion-blurred lights.",
+ "hue": 280,
+ "grade": "teal-orange",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-rhyme-blues",
+ "name": "Rhyme & blues",
+ "family": "v1",
+ "categories": [],
+ "description": "1990s R&B album cover, deep blues, soft spotlight.",
+ "hue": 325,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-bike-mafia",
+ "name": "Bike mafia",
+ "family": "v1",
+ "categories": [],
+ "description": "Crew posing with motorbikes, gritty street attitude.",
+ "hue": 248,
+ "grade": "faded",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-dmv",
+ "name": "dmv",
+ "family": "v1",
+ "categories": [],
+ "description": "Flat, harsh frontal flash, driver's-licence ID photo, plain blue-grey backdrop, passport framing.",
+ "hue": 179,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-sea-breeze",
+ "name": "Sea breeze",
+ "family": "v1",
+ "categories": [],
+ "description": "Windswept seaside portrait, linen and salt air.",
+ "hue": 187,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-it-s-french",
+ "name": "It’s french",
+ "family": "v1",
+ "categories": [],
+ "description": "Parisian chic, Breton stripes, beret, café terrace.",
+ "hue": 188,
+ "grade": "portra",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-fish-eye-twin",
+ "name": "Fish-eye twin",
+ "family": "v1",
+ "categories": [],
+ "description": "Fisheye close-up with a mirrored twin.",
+ "hue": 271,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-hallway-noir",
+ "name": "hallway noir",
+ "family": "v1",
+ "categories": [],
+ "description": "Dark hallway, one hard light source, noir shadows.",
+ "hue": 11,
+ "grade": "noir",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-burgundy-suit",
+ "name": "burgundy suit",
+ "family": "v1",
+ "categories": [],
+ "description": "Tailored burgundy suit editorial on a muted backdrop.",
+ "hue": 330,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-nicotine-glow",
+ "name": "Nicotine glow",
+ "family": "v1",
+ "categories": [],
+ "description": "Warm smoky low light, amber haze, late-night mood.",
+ "hue": 325,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-green-editorial",
+ "name": "green editorial",
+ "family": "v1",
+ "categories": [],
+ "description": "Fashion editorial built around saturated greens.",
+ "hue": 123,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-afterparty-cam",
+ "name": "afterparty cam",
+ "family": "v1",
+ "categories": [],
+ "description": "Direct-flash point-and-shoot snaps from the after-party.",
+ "hue": 182,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-2049",
+ "name": "2049",
+ "family": "v1",
+ "categories": [],
+ "description": "Dystopian sci-fi haze in orange and teal, vast brutalist scale.",
+ "hue": 149,
+ "grade": "teal-orange",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-fireproof",
+ "name": "Fireproof",
+ "family": "v1",
+ "categories": [],
+ "description": "Posing amid flames and sparks, heat-haze drama.",
+ "hue": 164,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-night-rider",
+ "name": "Night rider",
+ "family": "v1",
+ "categories": [],
+ "description": "Night ride under streetlights with motion streaks.",
+ "hue": 219,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-chrome-exit",
+ "name": "chrome exit",
+ "family": "v1",
+ "categories": [],
+ "description": "Chrome and metallic surfaces, futuristic styling.",
+ "hue": 47,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-brick-shade",
+ "name": "brick shade",
+ "family": "v1",
+ "categories": [],
+ "description": "Streetwear portrait against a brick wall in hard shade.",
+ "hue": 247,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-blackout-fit",
+ "name": "blackout fit",
+ "family": "v1",
+ "categories": [],
+ "description": "All-black monochrome outfit, sleek silhouette.",
+ "hue": 53,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v1-cocktail",
+ "name": "cocktail",
+ "family": "v1",
+ "categories": [],
+ "description": "Glamorous cocktail bar, warm bar light, drink in hand.",
+ "hue": 214,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-mount-view",
+ "name": "mount view",
+ "family": "v1",
+ "categories": [],
+ "description": "Mountain-top portrait with a panoramic vista.",
+ "hue": 243,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v1-sunburnt",
+ "name": "Sunburnt",
+ "family": "v1",
+ "categories": [],
+ "description": "Sun-baked warm tones, flushed skin, harsh midday light.",
+ "hue": 59,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-general",
+ "name": "General",
+ "family": "v2",
+ "categories": [],
+ "description": "Neutral default look, natural light, true colour.",
+ "hue": 287,
+ "grade": "natural",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-warm-ambient",
+ "name": "Warm ambient",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Warm ambient interior, golden practical lamps.",
+ "hue": 353,
+ "grade": "golden-hour",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-y2k-studio",
+ "name": "Y2K studio",
+ "family": "v2",
+ "categories": [
+ "Camera"
+ ],
+ "description": "Glossy early-2000s studio shoot on coloured seamless paper.",
+ "hue": 330,
+ "grade": "pop",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-swag-era",
+ "name": "Swag era",
+ "family": "v2",
+ "categories": [
+ "Mood"
+ ],
+ "description": "2010s swag streetwear, snapbacks, bling, flash.",
+ "hue": 194,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-theatrical-light",
+ "name": "Theatrical light",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Stage spotlighting, deep shadows, theatrical drama.",
+ "hue": 261,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-y2k-street",
+ "name": "Y2K street",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Early-2000s street fashion snapped outdoors.",
+ "hue": 359,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-flash-editorial",
+ "name": "Flash editorial",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Direct on-camera flash fashion editorial.",
+ "hue": 121,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-old-smartphone",
+ "name": "Old smartphone",
+ "family": "v2",
+ "categories": [
+ "Camera"
+ ],
+ "description": "Low-resolution early camera-phone photo, noise, soft focus, blown highlights.",
+ "hue": 76,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-street-photography",
+ "name": "Street photography",
+ "family": "v2",
+ "categories": [
+ "Camera"
+ ],
+ "description": "Candid documentary street photography.",
+ "hue": 116,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-retro-bw",
+ "name": "Retro BW",
+ "family": "v2",
+ "categories": [
+ "Camera"
+ ],
+ "description": "Grainy black-and-white film portrait.",
+ "hue": 341,
+ "grade": "noir",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-asian-nostalgia",
+ "name": "Asian nostalgia",
+ "family": "v2",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Nostalgic East Asian film tones and settings.",
+ "hue": 64,
+ "grade": "portra",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-surreal-solarization",
+ "name": "Surreal solarization",
+ "family": "v2",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Solarised, partly inverted tones, surreal glow.",
+ "hue": 115,
+ "grade": "solarize",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-subtle-flash",
+ "name": "Subtle flash",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Gentle fill flash, natural editorial snap.",
+ "hue": 209,
+ "grade": "natural",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-digital-camera",
+ "name": "Digital camera",
+ "family": "v2",
+ "categories": [
+ "Camera"
+ ],
+ "description": "2000s compact digital camera, harsh flash.",
+ "hue": 139,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-siren",
+ "name": "Siren",
+ "family": "v2",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Dark alluring siren makeup, moody glamour.",
+ "hue": 68,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-mystique-city",
+ "name": "Mystique city",
+ "family": "v2",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Mysterious night city, haze and neon.",
+ "hue": 66,
+ "grade": "teal-orange",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-candy-pop",
+ "name": "Candy pop",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Bright candy-coloured pop styling.",
+ "hue": 160,
+ "grade": "pop",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-double-exposure",
+ "name": "Double exposure",
+ "family": "v2",
+ "categories": [
+ "Mood"
+ ],
+ "description": "Two images blended in-camera, double exposure.",
+ "hue": 314,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-2000s-band",
+ "name": "2000s band",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Early-2000s band promo photo.",
+ "hue": 102,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-frutiger-aero",
+ "name": "Frutiger aero",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Frutiger Aero, glossy aqua, bubbles, sky blue, 2000s tech optimism.",
+ "hue": 23,
+ "grade": "pop",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-drain",
+ "name": "Drain",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Washed-out melancholic emo-rap aesthetic.",
+ "hue": 319,
+ "grade": "faded",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-extraterrestrial",
+ "name": "Extraterrestrial",
+ "family": "v2",
+ "categories": [],
+ "description": "Otherworldly sci-fi light, alien landscape.",
+ "hue": 72,
+ "grade": "teal-orange",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-editorial-street-style",
+ "name": "Editorial street style",
+ "family": "v2",
+ "categories": [
+ "Styles"
+ ],
+ "description": "Fashion-week street-style snap.",
+ "hue": 54,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-nature-light",
+ "name": "Nature light",
+ "family": "v2",
+ "categories": [],
+ "description": "Natural outdoor daylight, soft and true to life.",
+ "hue": 129,
+ "grade": "natural",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-new-indie",
+ "name": "New Indie",
+ "family": "v2",
+ "categories": [],
+ "description": "Modern indie look, film grain, candid framing, soft colour.",
+ "hue": 29,
+ "grade": "faded",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-underwater",
+ "name": "Underwater",
+ "family": "v2",
+ "categories": [],
+ "description": "Submerged underwater portrait, caustic light, bubbles.",
+ "hue": 192,
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-80s-horror",
+ "name": "80s horror",
+ "family": "v2",
+ "categories": [],
+ "description": "1980s horror lighting, red and blue gels, fog.",
+ "hue": 245,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-disposable-camera",
+ "name": "Disposable camera",
+ "family": "v2",
+ "categories": [],
+ "description": "Disposable film camera flash snapshot.",
+ "hue": 137,
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-neutral-pastel-film",
+ "name": "Neutral pastel film",
+ "family": "v2",
+ "categories": [],
+ "description": "Film stock with neutral pastel tones.",
+ "hue": 129,
+ "grade": "faded",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-warm-vivid-film",
+ "name": "Warm vivid film",
+ "family": "v2",
+ "categories": [],
+ "description": "Saturated warm film stock.",
+ "hue": 242,
+ "grade": "pop",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-bw-film",
+ "name": "BW film",
+ "family": "v2",
+ "categories": [],
+ "description": "Classic black-and-white film stock.",
+ "hue": 59,
+ "grade": "noir",
+ "civitai": true,
+ "hd": false
+ },
+ {
+ "id": "v2-warm-contrast-film",
+ "name": "Warm contrast film",
+ "family": "v2",
+ "categories": [],
+ "description": "Warm high-contrast film.",
+ "hue": 64,
+ "grade": "16mm",
+ "civitai": false,
+ "hd": false
+ },
+ {
+ "id": "v2-muted-cool-film",
+ "name": "Muted cool film",
+ "family": "v2",
+ "categories": [],
+ "description": "Desaturated cool-toned film.",
+ "hue": 229,
+ "grade": "cold-steel",
+ "civitai": false,
+ "hd": false
+ }
+];
+
+/** The picker's category tabs per family, in Soul's order. */
+export const SOUL_LOOK_CATEGORIES: Record<"v1" | "v2", string[]> = {
+ "v1": [
+ "New",
+ "TikTok Core",
+ "Instagram Aesthetics",
+ "Camera Presets",
+ "Beauty",
+ "Mood",
+ "Surreal",
+ "Graphic Art"
+ ],
+ "v2": [
+ "Mood",
+ "Styles",
+ "Camera"
+ ]
+};
+
+/**
+ * Higgsfield's old style ids → Fuobe look ids, one way: a request, a moodboard pick or a Reuse saved before the
+ * Originals still finds its look. Nothing sends these ids anywhere.
+ */
+export const SOUL_LEGACY_IDS: Record<string, string> = {
+ "464ea177-8d40-4940-8d9d-b438bab269c7": "v1-general",
+ "1b798b54-03da-446a-93bf-12fcba1050d7": "v1-iphone",
+ "1cb4b936-77bf-4f9a-9039-f3d349a4cdbe": "v1-realistic",
+ "ca4e6ad3-3e93-4e03-81a0-d1722d2c128b": "v1-digitalcam",
+ "3f90dc5b-f474-4259-95c4-d29fbd6be645": "v1-flight-mode",
+ "26241c54-ed78-4ea7-b1bf-d881737c9feb": "v1-sunset-beach",
+ "de0118ba-7c27-49f7-9841-38abe2aae8e1": "v1-mt-fuji",
+ "a13917c7-02a4-450f-b007-e72d53151980": "v1-street-view",
+ "99de6fc5-1177-49b9-b2e9-19e17d95bcaf": "v1-tokyo-streetstyle",
+ "f96913e8-2fcf-4358-8545-75dd6c34c518": "v1-bimbocore",
+ "07a85fb3-4407-4122-a4eb-42124e57734c": "v1-cctv",
+ "524be50a-4388-4ff5-a843-a73d2dd7ef87": "v1-elevator-mirror",
+ "6b9e6b4d-325a-4a78-a0fb-a00ddf612380": "v1-y2k",
+ "9de8ed26-c8dd-413c-a5e3-47eec97bc243": "v1-ringselfie",
+ "40ff999c-f576-443c-b5b3-c7d1391a666e": "v1-spotlight",
+ "cbefda85-0f76-49bd-82d7-9bcd65be00ca": "v1-y2k-posters",
+ "4b66c2db-8166-4293-b1aa-5269c9effb07": "v1-nail-check",
+ "96758335-d1d1-42b7-9c21-5ac38c433485": "v1-gorpcore",
+ "f5c094c7-4671-4d86-90d2-369c8fdbd7a5": "v1-90s-grain",
+ "8dd89de9-1cff-402e-88a8-580c29d91473": "v1-0-5-selfie",
+ "71fecd8c-6696-42df-b5eb-f69e4150ca01": "v1-0-5-outfit",
+ "1fc861ed-5923-41a6-9963-b9f04681dddd": "v1-medieval",
+ "0089e17c-d0f0-4d0c-b522-6d25c88a29fc": "v1-japandi",
+ "bd78cfc6-9b92-4889-9347-f21dbf0a269c": "v1-coquette-core",
+ "ba3d7634-447e-455c-98e3-63705d5403b8": "v1-sand",
+ "181b3796-008a-403b-b31e-a9b760219f17": "v1-2000s-cam",
+ "ff1ad8a2-94e7-4e70-a12f-e992ca9a0d36": "v1-quiet-luxury",
+ "70fbb531-5ee2-492e-8c53-5dbd6923e8c2": "v1-giant-accessory",
+ "ea6f4dc0-d6dd-4bdf-a8cf-94ed1db91ab2": "v1-hairclips",
+ "673cf0d4-c193-4fa2-8ad3-b4db4611e3ae": "v1-505room",
+ "7df83cc9-1e13-4bd0-b6ff-1e6a456b9e5a": "v1-eating-food",
+ "53bdadfa-8eb6-4eaa-8923-ebece4faa91c": "v1-rainy-day",
+ "0fe8ad66-ff61-411f-9186-b392e140b18c": "v1-foggy-morning",
+ "0c636e12-3411-4a65-8d86-67858caf2fa7": "v1-avant-garde",
+ "0367d609-dfa1-4a81-a983-b2b19ecd6480": "v1-tumblr",
+ "1900111a-4ce8-42a7-9394-7367f0e0385c": "v1-through-the-glass",
+ "83caff04-691c-468c-b4a0-fd6bbabe062b": "v1-vintage-photobooth",
+ "cc4e7248-dcfe-4c93-b264-2ab418a7556b": "v1-fisheye",
+ "372cc37b-9add-4952-a415-53db3998139f": "v1-geominimal",
+ "5659c554-9367-4a27-8c66-333c072cbbc2": "v1-7",
+ "d24c016c-9fb1-47d0-9909-19f57a2830d4": "v1-selfcare",
+ "b7c621b5-9d3c-46a3-8efb-4cdfbc592271": "v1-babydoll-makeup",
+ "7f21e7bd-4df6-4cef-a9a9-9746bceaea1d": "v1-fairycore",
+ "e454956b-caf2-4913-a398-dbc03f1cbedf": "v1-office-beach",
+ "5b6f467e-f509-4afe-a8db-4c07a6f3770d": "v1-swords-hill",
+ "dab472a6-23f4-4cf8-98fe-f3e256f1b549": "v1-amalfi-summer",
+ "b3c8075a-cb4c-42de-b8b3-7099dd2df672": "v1-creatures",
+ "ad9de607-3941-4540-81ea-ba978ef1550b": "v1-grunge",
+ "a2a42ada-75cc-42a9-be12-cb16c1dec2a8": "v1-glazed-doll-skin-makeup",
+ "82edba1e-b093-4484-a25e-9276e0454999": "v1-invertethereal",
+ "5a72fec7-a12e-43db-8ef3-1d193b4f7ab4": "v1-indie-sleaze",
+ "2fcf02e2-919a-4642-8b31-d58bde5e6bd9": "v1-mixed-media",
+ "7fa63380-64b7-48b1-b684-4c9ef37560a9": "v1-paper-face",
+ "facaafeb-4ab5-4384-92a1-b4086180e9ac": "v1-2000s-fashion",
+ "811de7ab-7aaf-4a6b-b352-cdea6c34c8f1": "v1-movie",
+ "d8a35238-ba42-48a0-a76a-186a97734b9d": "v1-overexposed",
+ "12eda704-18e5-4783-aa0f-deba5296cc83": "v1-long-legs",
+ "62ba1751-63af-4648-a11c-711ac64e216a": "v1-night-beach",
+ "710f9073-f580-48dc-b5c3-9bbc7cbb7f37": "v1-90-s-editorial",
+ "7696fd45-6e67-47d7-b800-096ce21cd449": "v1-sitting-on-the-street",
+ "62355e77-7096-45ae-9bea-e7c5b88c3b70": "v1-glitch",
+ "86fc814e-856a-4af0-98b0-d4da75d0030b": "v1-fashionshow",
+ "b9e2d7dc-78e6-4f7d-95dd-b62690e7b200": "v1-artwork",
+ "0b4dac9a-f73a-4e5b-a5a7-1a40ee40d6ac": "v1-graffiti",
+ "4c24b43b-1984-407a-a0ae-c514f29b7e66": "v1-angel-wings",
+ "34c50302-83ff-487d-b3a9-e35e501d80a7": "v1-pixeletedface",
+ "255f4045-d68b-42b1-9e4c-f49d3263a9d7": "v1-grillz-selfie",
+ "30458874-d9c0-4d5a-b2b7-597e0eee2404": "v1-shoe-check",
+ "cc099663-9621-422e-8626-c8ee68953a0c": "v1-bleached-brows",
+ "b7908955-2868-4e35-87a0-35e50cb92e5d": "v1-object-makeup",
+ "294bb3ee-eaef-4d2a-93e3-164268803db4": "v1-360-cam",
+ "a5f63c3b-70eb-4979-af5e-98c7ee1e18e8": "v1-giant-people",
+ "5ad23bca-4a4b-4316-8c59-b80d7709d8ee": "v1-help-it-s-too-big",
+ "88126a43-86fb-4047-a2d6-c9146d6ca6ce": "v1-duplicate",
+ "6fb3e1f5-d721-4523-ac38-9902f2b2b850": "v1-library",
+ "bab6e4bd-9093-4bb5-a371-01ef6cbd58ad": "v1-escalator",
+ "36061eb7-4907-4cba-afb1-47afcf699873": "v1-gallery",
+ "d3e2b71d-b24b-462e-bd96-12f7a22b5142": "v1-crossing-the-street",
+ "bc00b419-f8ca-4887-a990-e2760c3cb761": "v1-sunbathing",
+ "d2e8ba04-9935-4dee-8bc4-39ac789746fc": "v1-subway",
+ "2d47f079-c021-4b8e-b2c0-3b927a80fc31": "v1-birthday-mess",
+ "fb9cee2b-632f-4fd4-ae4f-4664deecc0f4": "v1-static-glow",
+ "493bda5b-bb4b-46fe-9343-7d5e414534ef": "v1-clouded-dream",
+ "2a1898d0-548f-4433-8503-5721157b93a1": "v1-double-take",
+ "3de71b9e-3973-4828-b246-a34c606e25a7": "v1-red-balloon",
+ "ce9a88c2-c962-45e2-abaa-c8979d48f8d5": "v1-tokyo-drift",
+ "c7ea4e7a-c40c-498d-948c-1f6919631f60": "v1-rhyme-blues",
+ "90df2935-3ded-477f-8253-1d67dd939cbe": "v1-bike-mafia",
+ "923e4fb0-d4ea-480c-876d-ac7cad862b9d": "v1-dmv",
+ "71ac929c-4002-4640-9b65-cb06402844c6": "v1-sea-breeze",
+ "79bfaa63-4e12-4ea2-8ada-7d4406eecece": "v1-it-s-french",
+ "d4775423-d214-4862-b061-47baa1978208": "v1-fish-eye-twin",
+ "a643a36a-85e6-4e3d-80db-13e4997203cc": "v1-hallway-noir",
+ "84c23cef-7eda-4f8f-9931-e3e6af8192d9": "v1-burgundy-suit",
+ "5dbb6a20-0541-4f06-8352-a2408d8781dc": "v1-nicotine-glow",
+ "91abc4fe-1cf8-4a77-8ade-d36d46699014": "v1-green-editorial",
+ "5765d07d-1525-4d4d-ae06-9091e2bdac2d": "v1-afterparty-cam",
+ "53959c8a-4323-4b78-9888-e9f6fb0f6b98": "v1-2049",
+ "373420f7-489e-4a5d-930e-cc4ecfcc23cc": "v1-fireproof",
+ "1fba888b-9ab0-447f-a6a4-9ce5251ec2a6": "v1-night-rider",
+ "5e01339d-745e-4bba-96f7-e8ce4af79f17": "v1-chrome-exit",
+ "f3968a4f-a125-4c16-8673-45ce9874520e": "v1-brick-shade",
+ "f8dac072-d11f-438a-b283-fd52fe8aa744": "v1-blackout-fit",
+ "aed71142-673c-4908-a6a7-326d5252eb06": "v1-cocktail",
+ "3c975998-cb5b-4980-80fc-7977e4c60972": "v1-mount-view",
+ "e439bd89-8176-4729-b6a4-a9977120507d": "v1-sunburnt",
+ "3db34ab5-3439-4317-9e03-08dc30852e69": "v2-general",
+ "fafd3087-0d0f-4fb1-9af6-91b7d304687c": "v2-warm-ambient",
+ "7ee16ff3-c0b0-4f5f-a0e1-e7fc46144230": "v2-y2k-studio",
+ "6dffca48-f9fe-43f2-8589-da58a172fa3e": "v2-swag-era",
+ "7876c2a5-aa83-4530-ad09-2b368bbb5e95": "v2-theatrical-light",
+ "d7e58c26-b74e-4a72-8c78-d061d600c9a5": "v2-y2k-street",
+ "5e87c5bd-86b6-491a-94ab-046891d1e35e": "v2-flash-editorial",
+ "a7cb654b-eba7-4e9b-af41-8eaa482bf7c9": "v2-old-smartphone",
+ "95151de0-e0e5-4e04-bd45-c58c8a4ac023": "v2-street-photography",
+ "069f5a5f-8c4b-4591-a3dd-bde488672228": "v2-retro-bw",
+ "99716f25-c133-438a-829a-ec53258980b4": "v2-asian-nostalgia",
+ "26bb19d1-25cc-4455-9a80-522eb136a4de": "v2-surreal-solarization",
+ "e62e75c2-b1bb-433d-9192-f1196faed74e": "v2-subtle-flash",
+ "74abc530-cec8-4c13-88a6-2b3f78bfd0ff": "v2-digital-camera",
+ "cfd92ced-4801-42c4-b8ca-e096a405ff1a": "v2-siren",
+ "d6371f60-a70c-4a43-9393-6e3d8206590c": "v2-mystique-city",
+ "cd55643f-812c-461d-9837-baa9a88dff2e": "v2-candy-pop",
+ "7a42d44e-0dab-4dd1-be49-c83fec827251": "v2-double-exposure",
+ "330789e8-cb50-410c-a31f-b1ba10188176": "v2-2000s-band",
+ "599d96ce-be5b-4071-9ee0-5b3494f6c757": "v2-frutiger-aero",
+ "8261de31-258b-4a58-997c-b65bbd6d367f": "v2-drain",
+ "82e55816-3b41-4f01-8500-d36f235e08e6": "v2-extraterrestrial",
+ "3d5584b2-4d15-48d2-8a09-c1073259f4c6": "v2-editorial-street-style",
+ "dbe816eb-c651-4361-aee3-9386f8372121": "v2-nature-light",
+ "184401c9-65d8-4d4b-b2e1-fd6a87a5b60c": "v2-new-indie",
+ "04022c41-6164-47d9-b33f-cf241f0b5e15": "v2-underwater",
+ "313f3e05-0d79-4d2f-a56a-d9d289321fd8": "v2-80s-horror",
+ "7ef8747e-c925-4851-b9e9-6400ddb19df9": "v2-disposable-camera",
+ "adbca234-bfff-4c19-835f-f8647655d295": "v2-neutral-pastel-film",
+ "dbaabc25-7fee-438c-bd65-ae4d1775d4ab": "v2-warm-vivid-film",
+ "3ece570b-a9a3-4b86-8c20-8eaa7c58cc4f": "v2-bw-film",
+ "2c109e42-bf29-47a2-ae16-aa6cbbba8b8a": "v2-warm-contrast-film",
+ "a15510bf-2439-4964-a2cc-0e35d1b5e70f": "v2-muted-cool-film"
+};
diff --git a/src/lib/catalog/soul.ts b/src/lib/catalog/soul.ts
index 0746cdbc..3f2bf8ef 100644
--- a/src/lib/catalog/soul.ts
+++ b/src/lib/catalog/soul.ts
@@ -18,7 +18,8 @@
* (`legacyStyleId`); they are never sent anywhere.
*/
import { loraEntry, loraRef } from "./loras";
-import { SOUL_CATEGORIES, SOUL_CINEMA, SOUL_CORE_LORAS, SOUL_ORIGINALS, SOUL_SIZES, SOUL_TAILS } from "./soul-originals.generated";
+import { DEFAULT_LOOK, SOUL_MODEL_IDS } from "./soul-cards";
+import { SOUL_CINEMA, SOUL_CORE_LORAS, SOUL_ORIGINALS, SOUL_SIZES, SOUL_TAILS } from "./soul-originals.generated";
import type { LoraRef, ModelDef } from "./types";
export type SoulTail = "photo" | "phone" | "flash" | "cine" | "art";
@@ -64,11 +65,9 @@ export interface SoulCinemaRecipe {
}
/** The Soul Originals' model ids. */
-export const SOUL_MODELS = { soul: "fuobe-soul", hd: "fuobe-soul-hd", cinema: "fuobe-soul-cinema" } as const;
+export const SOUL_MODELS = SOUL_MODEL_IDS;
export type SoulModelId = (typeof SOUL_MODELS)[keyof typeof SOUL_MODELS];
-
-/** The look a Fuobe Soul run uses when none is picked: Soul's own default ("General"). */
-export const DEFAULT_LOOK = "v1-general";
+export { DEFAULT_LOOK };
/** Which Soul a model is (none for other models). */
export function soulKind(model: Pick<ModelDef, "id"> | string | undefined): "soul" | "hd" | "cinema" | undefined {
@@ -101,50 +100,9 @@ export function soulLook(key: string | undefined | null): SoulLook | undefined {
/** The looks of one family, in Soul's order. */
export const soulLooks = (family?: "v1" | "v2"): SoulLook[] => (family ? SOUL_ORIGINALS.filter((l) => l.family === family) : SOUL_ORIGINALS);
-/** A look as a picker card: no LoRA detail, just what the tile shows. */
-export interface SoulLookCard {
- id: string;
- name: string;
- family: "v1" | "v2";
- categories: string[];
- description: string;
- hue: number;
- grade?: string;
- /** Some of its LoRAs download from civitai (a free civitai key in Settings → LoRAs). */
- civitai: boolean;
- /** It runs on Fuobe Soul HD (lettering). */
- hd: boolean;
-}
-
-/** A stable hue per look for its drawn cover (no preview media is copied from anywhere). */
-export function lookHue(id: string): number {
- let h = 0;
- for (const c of id) h = (h * 31 + c.charCodeAt(0)) % 360;
- return h;
-}
-
/** Does any of this look's LoRAs need the user's civitai key to download? */
export const needsCivitai = (look: Pick<SoulLook, "loras">): boolean => look.loras.some((l) => loraEntry(l.key)?.download === "civitai-token");
-export function lookCard(l: SoulLook): SoulLookCard {
- return {
- id: l.id,
- name: l.name,
- family: l.family,
- categories: l.categories,
- description: l.look,
- hue: lookHue(l.id),
- ...(l.grade && { grade: l.grade }),
- civitai: needsCivitai(l),
- hd: l.base === "qwen-2512",
- };
-}
-
-/** The picker's list for a family: cards and its category tabs (All first). */
-export function soulLookList(family: "v1" | "v2"): { items: SoulLookCard[]; categories: string[] } {
- return { items: soulLooks(family).map(lookCard), categories: SOUL_CATEGORIES[family] };
-}
-
// ---------------------------------------------------------------------------
// Sizes
diff --git a/src/lib/soul-post.ts b/src/lib/soul-post.ts
new file mode 100644
index 00000000..dd8f5efc
--- /dev/null
+++ b/src/lib/soul-post.ts
@@ -0,0 +1,109 @@
+/**
+ * Fuobe Soul's post steps (research §4.4), the part that runs in the browser when a result arrives: the look's
+ * grade (src/lib/grade.ts presets, WebGL) and the text or frame some looks add, which diffusion draws badly
+ * (a camera's date stamp, a CCTV caption, a photo-booth print). Pure: the layout of what to draw, and which
+ * outputs still need it. src/components/studio/soul-finish.ts draws it; the server keeps the finished picture
+ * (POST /api/generations/<id>/finish) and the original beside it (meta.original).
+ */
+import type { Generation, OutputFile } from "@/lib/catalog/types";
+
+export type SoulOverlay = "date-stamp" | "cctv" | "photo-booth";
+
+/** What an output asks for after generation (the server writes it as meta when the job succeeds). */
+export interface FinishSteps {
+ grade?: string;
+ overlay?: SoulOverlay;
+}
+
+const OVERLAYS = new Set<SoulOverlay>(["date-stamp", "cctv", "photo-booth"]);
+
+/** The steps one output still needs (none once it is finished, or for anything but an image). */
+export function finishSteps(o: Pick<OutputFile, "kind" | "meta">): FinishSteps | null {
+ if (o.kind !== "image" || !o.meta || o.meta.finished) return null;
+ const grade = typeof o.meta.grade === "string" && o.meta.grade ? o.meta.grade : undefined;
+ const overlay = OVERLAYS.has(o.meta.overlay as SoulOverlay) ? (o.meta.overlay as SoulOverlay) : undefined;
+ return grade || overlay ? { ...(grade && { grade }), ...(overlay && { overlay }) } : null;
+}
+
+/** Which outputs of a finished job still need their post steps (indexes into outputs). */
+export function outputsToFinish(g: Pick<Generation, "status" | "outputs" | "provider">): number[] {
+ if (g.status !== "succeeded") return [];
+ return g.outputs.flatMap((o, i) => (finishSteps(o) ? [i] : []));
+}
+
+export type OverlayText = {
+ text: string;
+ /** Position in the output picture's pixels. */
+ x: number;
+ y: number;
+ size: number;
+ color: string;
+ align: "left" | "right" | "center";
+ baseline: "top" | "bottom" | "middle";
+ font: "mono" | "serif";
+ /** A soft glow (an LCD date stamp) or a shadow for legibility. */
+ glow?: string;
+};
+
+export interface OverlayLayout {
+ /** The finished picture's size (a photo-booth print is bigger than the photo). */
+ width: number;
+ height: number;
+ /** Where the photo goes in it. */
+ photo: { x: number; y: number };
+ /** The print's paper, when there is one. */
+ paper?: string;
+ texts: OverlayText[];
+}
+
+const pad = (n: number) => String(n).padStart(2, "0");
+
+/**
+ * What an overlay draws on a `width` × `height` picture made at `when`:
+ * - date-stamp: an orange LCD date bottom right ('26 10 25), as a 2000s point-and-shoot printed it;
+ * - cctv: a camera number top left, the date and time top right, a REC mark bottom left;
+ * - photo-booth: a white print border with a deeper bottom edge and the date on it.
+ */
+export function overlayLayout(kind: SoulOverlay, width: number, height: number, when: Date): OverlayLayout {
+ const short = Math.min(width, height);
+ const yy = pad(when.getFullYear() % 100);
+ const date = `${when.getFullYear()}-${pad(when.getMonth() + 1)}-${pad(when.getDate())}`;
+ if (kind === "date-stamp") {
+ const size = Math.round(short * 0.045);
+ const m = Math.round(short * 0.045);
+ return {
+ width,
+ height,
+ photo: { x: 0, y: 0 },
+ texts: [{ text: `’${yy} ${pad(when.getMonth() + 1)} ${pad(when.getDate())}`, x: width - m, y: height - m, size, color: "#FF9A2E", align: "right", baseline: "bottom", font: "mono", glow: "rgba(255,120,20,0.85)" }],
+ };
+ }
+ if (kind === "cctv") {
+ const size = Math.round(short * 0.034);
+ const m = Math.round(short * 0.035);
+ const shadow = "rgba(0,0,0,0.9)";
+ const time = `${pad(when.getHours())}:${pad(when.getMinutes())}:${pad(when.getSeconds())}`;
+ return {
+ width,
+ height,
+ photo: { x: 0, y: 0 },
+ texts: [
+ { text: "CAM 03", x: m, y: m, size, color: "#F4F4F4", align: "left", baseline: "top", font: "mono", glow: shadow },
+ { text: `${date} ${time}`, x: width - m, y: m, size, color: "#F4F4F4", align: "right", baseline: "top", font: "mono", glow: shadow },
+ { text: "● REC", x: m, y: height - m, size, color: "#FF3B30", align: "left", baseline: "bottom", font: "mono", glow: shadow },
+ ],
+ };
+ }
+ // A photo-booth print: an even border, a deeper bottom edge with the date on it.
+ const border = Math.round(short * 0.05);
+ const bottom = Math.round(short * 0.16);
+ const W = width + border * 2;
+ const H = height + border + bottom;
+ return {
+ width: W,
+ height: H,
+ photo: { x: border, y: border },
+ paper: "#F5F2EA",
+ texts: [{ text: `PHOTO BOOTH · ${date}`, x: W / 2, y: height + border + bottom / 2, size: Math.round(short * 0.032), color: "#6B6459", align: "center", baseline: "middle", font: "serif" }],
+ };
+}
diff --git a/src/server/generations.ts b/src/server/generations.ts
index ad1180d5..69e87499 100644
--- a/src/server/generations.ts
+++ b/src/server/generations.ts
@@ -14,7 +14,8 @@ import { estimateCost, inferOperation, planGeneration, routeLoras, routesFor } f
import { framedLength, keepMatte } from "@/lib/catalog/payload";
import { fitLoras, lorasFit } from "@/lib/catalog/loras";
import { dualEngine, onEngine, pickEngine } from "@/lib/catalog/engines";
-import { promptWithLoras, soulPostSteps } from "@/lib/catalog/soul";
+import { promptWithLoras, soulKind, soulLook, soulPostSteps } from "@/lib/catalog/soul";
+import { finishSteps } from "@/lib/soul-post";
import {
LAST_FRAME_CHAIN,
OPERATION_OUTPUT,
@@ -120,7 +121,8 @@ export function toGeneration(r: Row): Generation {
updatedAt: r.updated_at,
completedAt: r.completed_at,
modelName: model?.name ?? r.model_id,
- presetName: r.preset_id ? (getPreset(r.preset_id)?.name ?? null) : null,
+ // A Fuobe Soul look is named like a preset ("Look · Y2K" in the viewer).
+ presetName: r.preset_id ? (getPreset(r.preset_id)?.name ?? (soulKind(r.model_id) ? (soulLook(r.preset_id)?.name ?? null) : null)) : null,
aspectRatio: ar && ar !== "auto" ? ar : null,
deletedAt: lib.deleted_at ?? null,
folderId: lib.folder_id ?? null,
@@ -1192,6 +1194,38 @@ export async function cancelGeneration(id: string): Promise<void> {
update(id, { status: "canceled", completed_at: Date.now(), message: null });
}
+// ---------------------------------------------------------------------------
+// Fuobe Soul's post steps (the look's grade and overlay), made in the browser when the result arrives.
+
+export class FinishError extends Error {
+ constructor(
+ message: string,
+ readonly status: number,
+ ) {
+ super(message);
+ }
+}
+
+/**
+ * Keep the finished picture of a Soul result in place of the raw one: the raw one stays as meta.original (its
+ * file is still the generation's), meta.finished marks it done. The first finished copy wins: another tab's
+ * answer is 409, and an output with nothing left to do is refused.
+ */
+export function finishOutput(id: string, index: number, png: Buffer): Generation {
+ const r = db().prepare("SELECT * FROM generations WHERE id = ?").get(id) as Row | undefined;
+ if (!r) throw new FinishError("Not found", 404);
+ if (r.status !== "succeeded") throw new FinishError("The result isn't ready yet", 409);
+ const outputs = JSON.parse(r.outputs_json) as OutputFile[];
+ const o = outputs[index];
+ if (!o || !Number.isInteger(index)) throw new FinishError("No such output", 404);
+ if (o.meta?.finished) throw new FinishError("Already finished", 409);
+ if (!finishSteps(o)) throw new FinishError("This output has no grade or overlay to apply", 400);
+ const asset = saveFile({ data: png, contentType: "image/png", name: `${id}-${index}-finished.png`, source: "generation", generationId: id });
+ outputs[index] = { ...o, url: asset.url, assetId: asset.id, contentType: "image/png", meta: { ...o.meta, finished: true, original: o.url } };
+ update(id, { outputs_json: JSON.stringify(outputs) });
+ return getGeneration(id, { includeDeleted: true })!;
+}
+
// ---------------------------------------------------------------------------
// Results made in the browser (colour grading): stored as finished generations.
diff --git a/tests/image-studios.test.ts b/tests/image-studios.test.ts
index 76b518ca..34437638 100644
--- a/tests/image-studios.test.ts
+++ b/tests/image-studios.test.ts
@@ -72,7 +72,6 @@ import {
representativeOrder,
SOUL_STYLES,
soulPick,
- withLive,
} from "@/components/moodboards/logic";
// The caps GET /api/palettes sends (src/server/palettes.ts signatureCaps, checked against the catalog in image-studios-api.test.ts).
@@ -236,14 +235,19 @@ describe("palettes: routing per model", () => {
describe("moodboards: routing per model", () => {
const refs = Array.from({ length: 12 }, (_, i) => `/api/files/uploads/r${i}.png`);
const board: MoodboardPick = { id: "mb1", kind: "personal", name: "Neon Haze", status: "complete", refs: refs.slice(0, 10), collages: ["/api/files/uploads/c1.jpg", "/api/files/uploads/c2.jpg"] };
- const curated: MoodboardPick = { id: CURATED_MOODBOARDS[0].id, kind: "curated", name: CURATED_MOODBOARDS[0].name, description: "Soul 2.0's neutral default look", status: "complete" };
+ const curated: MoodboardPick = { id: CURATED_SETS["soul-v2"][0].id, kind: "curated", name: CURATED_SETS["soul-v2"][0].name, description: CURATED_SETS["soul-v2"][0].description, status: "complete" };
const req = (modelId: string, images?: string[]): GenerationRequest => ({ feature: "image", modelId, prompt: "a rooftop party", inputs: images ? { images } : undefined, params: { numOutputs: 1 } });
- it("curated looks are Soul 2.0's style_id on soul-2, words elsewhere (the open route's prompt template)", () => {
- const soul = applySignature(req("soul-2"), { moodboard: curated }, ctx);
- expect(soul.request.params?.extra?.style_id).toBe(curated.id);
+ it("curated looks are Fuobe Soul looks: the look itself on Fuobe Soul, its words elsewhere", () => {
+ const soul = applySignature(req("fuobe-soul"), { moodboard: curated }, ctx);
+ expect(soul.request.presetId).toBe("v2-general");
expect(soul.request.prompt).toBe("a rooftop party");
expect(soul.request.signature?.words).toBeUndefined();
+ expect(soul.notes).toEqual([]);
+ // Higgsfield's Soul 2.0 gets the words (never a Fuobe id as its style_id), and a hint where the look runs whole.
+ const higgs = applySignature(req("soul-2"), { moodboard: curated }, ctx);
+ expect(higgs.request.params?.extra?.style_id).toBeUndefined();
+ expect(higgs.notes[0]).toMatch(/General is a Fuobe Soul look — described in words on .*Fuobe Soul applies it with its LoRAs/);
const open = applySignature(req("oss-z-image-turbo"), { moodboard: curated }, ctx);
expect(open.modelId).toBe("oss-z-image-turbo");
expect(open.request.prompt).toBe("a rooftop party");
@@ -292,39 +296,34 @@ describe("moodboards: routing per model", () => {
expect(said(lora)).toBe("a rooftop party. In the style of @Neon_Haze.");
});
- it("Soul's 106 styles are curated picks too: style_id on soul-1, words on Soul 2.0 and everything else", () => {
+ it("Soul's 106 looks are curated picks too: the look on Fuobe Soul, words everywhere else", () => {
expect(SOUL_STYLES).toHaveLength(106);
expect(CURATED_TABS["soul-v1"]).toEqual(["All presets", "New", "TikTok Core", "Instagram Aesthetics", "Camera Presets", "Beauty", "Mood", "Surreal", "Graphic Art"]);
- // Soul's presets sit in several categories at once.
+ // Soul's looks sit in several categories at once.
const sunset = SOUL_STYLES.find((s) => s.name === "Sunset beach")!;
+ expect(sunset.id).toBe("v1-sunset-beach");
expect(["New", "Camera Presets", "Beauty"].every((c) => inCuratedTab(sunset, c))).toBe(true);
const pick = curatedPick(sunset);
expect(pick.source).toBe("soul-v1");
expect(soulPick(sunset.id)).toEqual(pick);
- expect(soulPick(CURATED_MOODBOARDS[0].id)?.source).toBeUndefined();
+ // A pick saved with Higgsfield's old style id reads as its Fuobe look.
+ expect(soulPick(CURATED_MOODBOARDS.find((p) => p.name === "General")!.id)?.id).toBe("v2-general");
expect(soulPick("not-a-preset")).toBeUndefined();
+ const soul = applySignature(req("fuobe-soul"), { moodboard: pick }, ctx);
+ expect(soul.request.presetId).toBe("v1-sunset-beach");
const soul1 = applySignature(req("soul-1"), { moodboard: pick }, ctx);
- expect(soul1.request.params?.extra?.style_id).toBe(sunset.id);
- expect(soul1.notes).toEqual([]);
- const soul2 = applySignature(req("soul-2"), { moodboard: pick }, ctx);
- expect(soul2.request.params?.extra?.style_id).toBeUndefined();
- expect(soul2.notes[0]).toBe("Sunset beach is a Soul preset — described in words on Higgsfield Soul 2.0");
+ expect(soul1.request.params?.extra?.style_id).toBeUndefined();
const turbo = applySignature(req("oss-z-image-turbo"), { moodboard: pick }, ctx);
expect(said(turbo)).toBe(presetPrompt(sunset, "a rooftop party"));
});
- it("curated sets come from the built-in list, with Higgsfield's live previews (and newer presets) on top", () => {
- expect(CURATED_SETS["soul-v2"].map((c) => c.id)).toEqual(CURATED_MOODBOARDS.map((p) => p.id));
+ it("curated sets are Fuobe's own looks: Fuobe ids and words, no Higgsfield description or preview", () => {
const base = CURATED_SETS["soul-v2"];
- // No key: the route answers with the built-in list as a fallback — nothing changes.
- expect(withLive(base, { items: [{ id: base[0].id, name: "General", preview: "https://x/p.jpg" }], fallback: true }, "soul-v2")).toBe(base);
- const live = withLive(base, { items: [{ id: base[1].id, name: base[1].name, preview: "https://x/1.jpg" }, { id: "new-look", name: "Brand new" }] }, "soul-v2");
- expect(live).toHaveLength(base.length + 1);
- expect(live[1].preview).toBe("https://x/1.jpg");
- expect(live[0].preview).toBeUndefined();
- expect(live.at(-1)).toMatchObject({ id: "new-look", name: "Brand new", category: "All presets" });
- expect(curatedPick(withLive(CURATED_SETS["soul-v1"], { items: [{ id: "v1-new", name: "New one" }] }, "soul-v1").at(-1)!).source).toBe("soul-v1");
+ expect(base).toHaveLength(33);
+ expect(base.every((c) => c.id.startsWith("v2-") && !c.preview)).toBe(true);
+ const higgs = new Map(CURATED_MOODBOARDS.map((p) => [p.name, p.description]));
+ expect(base.every((c) => c.description !== higgs.get(c.name))).toBe(true);
});
it("an older run that kept the sentences in its prompt isn't styled twice; Run again doesn't add the board twice", () => {
@@ -337,22 +336,17 @@ describe("moodboards: routing per model", () => {
expect(again.request.inputs?.images).toEqual(nano.request.inputs?.images);
});
- it("Soul presets go native wherever the model's own preset list is theirs; Soul Cinema (no presets) gets words", () => {
+ it("a look goes native on every model that takes looks; Fuobe Soul Cinema (one fixed look) gets words", () => {
const style = SOUL_STYLES[0];
const pick = curatedPick(style);
- const cinema = applySignature(req("soul-cinema"), { moodboard: pick }, ctx);
- expect(cinema.request.params?.extra?.style_id).toBeUndefined();
- expect(cinema.notes[0]).toBe(`Higgsfield Soul Cinema has one fixed look and no presets — ${style.name} is described in words`);
+ const cinema = applySignature(req("fuobe-soul-cinema"), { moodboard: pick }, ctx);
+ expect(cinema.request.presetId).toBeUndefined();
+ expect(cinema.notes[0]).toBe(`Fuobe Soul Cinema has one fixed look — ${style.name} is described in words`);
expect(said(cinema)).toMatch(/In the style of/);
- // A model whose preset picker is Soul's list takes the style id natively, whatever its id.
- const soul1 = getModel("soul-1")!;
- const twin = { ...soul1, id: "soul-twin", options: { ...soul1.options, presets: { ...soul1.options.presets!, param: "style_id" } } };
- const ctx2 = { caps: CAPS, getModel: (id: string) => (id === "soul-twin" ? twin : getModel(id)) };
- const native = applySignature(req("soul-twin"), { moodboard: pick }, ctx2);
- expect(native.request.params?.extra?.style_id).toBe(style.id);
- expect(native.request.prompt).toBe("a rooftop party");
- expect(native.request.signature?.words).toBeUndefined();
- expect(native.notes).toEqual([]);
+ const hd = applySignature(req("fuobe-soul-hd"), { moodboard: pick }, ctx);
+ expect(hd.request.presetId).toBe(style.id);
+ expect(hd.request.signature?.words).toBeUndefined();
+ expect(hd.notes).toEqual([]);
});
it("Recraft V4 Styles keeps your own images first and fills up to 10 with the board's", () => {
@@ -420,13 +414,13 @@ describe("style signature: the request record and Reuse", () => {
expect(back.signature.moodboard?.id).toBe("mb1");
const look = curatedPick(CURATED_SETS["soul-v2"][3]);
- const soul = applySignature(req("soul-2"), { moodboard: look }, ctx);
- expect(soul.request.params?.extra?.style_id).toBe(look.id);
+ const soul = applySignature(req("fuobe-soul"), { moodboard: look }, ctx);
+ expect(soul.request.presetId).toBe(look.id);
const soulBack = reuseSignature(soul.request)!;
expect(soulBack.params.extra).toBeUndefined();
expect(soulBack.signature.moodboard).toEqual(look);
// A run without a signature isn't touched.
- expect(reuseSignature(req("soul-2"))).toBeNull();
+ expect(reuseSignature(req("fuobe-soul"))).toBeNull();
});
});
diff --git a/tests/soul-originals.test.ts b/tests/soul-originals.test.ts
index ca405a02..88c86064 100644
--- a/tests/soul-originals.test.ts
+++ b/tests/soul-originals.test.ts
@@ -6,10 +6,8 @@ import { loraEntry } from "@/lib/catalog/loras";
import {
characterScale,
composeSoulPrompt,
- lookCard,
promptWithLoras,
soulLook,
- soulLookList,
soulMegapixels,
soulPostSteps,
soulRecipe,
@@ -17,7 +15,9 @@ import {
SOUL_ASPECTS,
} from "@/lib/catalog/soul";
import { SOUL_CINEMA, SOUL_CORE_LORAS, SOUL_ORIGINALS, SOUL_SAMPLER, SOUL_SIZES, SOUL_TAILS } from "@/lib/catalog/soul-originals.generated";
-import { PRESETS } from "@/lib/grade";
+import { applyPreset, FRAGMENT, isNeutral, NEUTRAL, PRESETS, uniforms } from "@/lib/grade";
+import { finishSteps, outputsToFinish, overlayLayout } from "@/lib/soul-post";
+import { lookCard, lookSet, SOUL_LOOK_CARDS } from "@/lib/catalog/soul-cards";
const ROOT = path.resolve(__dirname, "..");
const research = JSON.parse(fs.readFileSync(path.join(ROOT, "docs/research/fuobe-originals-recipes-5.json"), "utf8"));
@@ -82,11 +82,16 @@ describe("Soul looks (soul-originals.generated.ts)", () => {
expect(soulLook("464ea177-8d40-4940-8d9d-b438bab269c7")?.id).toBe("v1-general");
expect(soulLook("General")?.id).toBe("v1-general");
expect(soulLook("nope")).toBeUndefined();
- const { items, categories } = soulLookList("v1");
+ const { items, categories } = lookSet("v1");
expect(items).toHaveLength(106);
expect(categories[0]).toBe("New");
- expect(lookCard(soulLook("v1-y2k")!).civitai).toBe(true);
- expect(lookCard(soulLook("v1-general")!).civitai).toBe(false);
+ expect(lookCard("v1-y2k")!.civitai).toBe(true);
+ expect(lookCard("v1-general")!.civitai).toBe(false);
+ // The browser's cards: the old Higgsfield id still finds its look; the words are Fuobe's.
+ expect(lookCard("464ea177-8d40-4940-8d9d-b438bab269c7")?.id).toBe("v1-general");
+ expect(lookCard("v1-general")?.description).toBe(soulLook("v1-general")!.look);
+ expect(lookCard("v1-graffiti")?.hd).toBe(true);
+ expect(SOUL_LOOK_CARDS.map((c) => c.id)).toEqual(SOUL_ORIGINALS.map((l) => l.id));
});
it("lays out sizes on a 16-pixel grid, the longest side at most 2048, for 7 aspect ratios in two tiers", () => {
@@ -179,10 +184,51 @@ describe("Soul recipe (soul.ts)", () => {
});
describe("gen-soul-originals.py", () => {
- it("writes what is committed (the generated file matches the research)", () => {
- const file = path.join(ROOT, "src/lib/catalog/soul-originals.generated.ts");
- const before = fs.readFileSync(file, "utf8");
+ it("writes what is committed (the generated files match the research)", () => {
+ const files = ["src/lib/catalog/soul-originals.generated.ts", "src/lib/catalog/soul-looks.generated.ts"].map((f) => path.join(ROOT, f));
+ const before = files.map((f) => fs.readFileSync(f, "utf8"));
execFileSync("python3", ["scripts/gen-soul-originals.py"], { cwd: ROOT });
- expect(fs.readFileSync(file, "utf8")).toBe(before);
+ expect(files.map((f) => fs.readFileSync(f, "utf8"))).toEqual(before);
+ });
+});
+
+describe("Soul post steps (soul-post.ts)", () => {
+ it("finds the outputs that still need a grade or an overlay", () => {
+ const g = {
+ status: "succeeded" as const,
+ provider: "comfyui" as const,
+ outputs: [
+ { url: "/a.png", kind: "image" as const, meta: { grade: "portra" } },
+ { url: "/b.png", kind: "image" as const, meta: { grade: "portra", finished: true } },
+ { url: "/c.png", kind: "image" as const },
+ { url: "/d.mp4", kind: "video" as const, meta: { grade: "portra" } },
+ { url: "/e.png", kind: "image" as const, meta: { overlay: "cctv" } },
+ ],
+ };
+ expect(outputsToFinish(g)).toEqual([0, 4]);
+ expect(finishSteps(g.outputs[4])).toEqual({ overlay: "cctv" });
+ expect(outputsToFinish({ ...g, status: "running" as const })).toEqual([]);
+ });
+
+ it("lays out the overlays: an LCD date stamp, a CCTV caption, a photo-booth print", () => {
+ const when = new Date(2026, 9, 25, 22, 14, 7);
+ const stamp = overlayLayout("date-stamp", 1000, 800, when);
+ expect(stamp.texts[0]).toMatchObject({ text: "’26 10 25", align: "right", baseline: "bottom" });
+ expect(stamp.texts[0].x).toBeLessThan(1000);
+ const cctv = overlayLayout("cctv", 1344, 768, when);
+ expect(cctv.texts.map((t) => t.text)).toEqual(["CAM 03", "2026-10-25 22:14:07", "● REC"]);
+ const booth = overlayLayout("photo-booth", 896, 1152, when);
+ expect(booth.width).toBeGreaterThan(896);
+ expect(booth.height - 1152 - booth.photo.y).toBeGreaterThan(booth.photo.y);
+ expect(booth.paper).toBeTruthy();
+ });
+
+ it("has the invert and solarize curves as grade presets with their sliders", () => {
+ expect(PRESETS.find((p) => p.id === "invert")?.grade.invert).toBe(100);
+ expect(PRESETS.find((p) => p.id === "solarize")?.grade.solarize).toBe(100);
+ expect(uniforms(applyPreset(PRESETS.find((p) => p.id === "invert")!))).toMatchObject({ u_invert: 1, u_solarize: 0 });
+ expect(isNeutral(NEUTRAL)).toBe(true);
+ expect(FRAGMENT).toMatch(/u_invert/);
+ expect(FRAGMENT).toMatch(/u_solarize/);
});
});
diff --git a/tests/soul-runs.test.ts b/tests/soul-runs.test.ts
index cd3e9458..4c4999a0 100644
--- a/tests/soul-runs.test.ts
+++ b/tests/soul-runs.test.ts
@@ -171,6 +171,22 @@ describe("Fuobe Soul through the server", () => {
setSetting("falKey", "");
});
+ it("keeps the finished picture (grade, overlay) in place of the raw one, once", async () => {
+ const { finishOutput, getGeneration } = await import("@/server/generations");
+ const { db } = await import("@/server/db");
+ const [g] = createGenerations({ feature: "image", modelId: "fuobe-soul", prompt: "a fox", engine: "open", presetId: "v1-90s-grain" });
+ expect(g.presetName).toBe("90s Grain");
+ const raw = { url: "/api/files/outputs/raw.png", kind: "image", meta: { look: "v1-90s-grain", grade: "portra" } };
+ db().prepare("UPDATE generations SET status = 'succeeded', outputs_json = ? WHERE id = ?").run(JSON.stringify([raw]), g.id);
+ const png = Buffer.from("89504e470d0a1a0a0000000d49484452", "hex");
+ const done = finishOutput(g.id, 0, png);
+ expect(done.outputs[0]).toMatchObject({ kind: "image", meta: { grade: "portra", finished: true, original: raw.url } });
+ expect(done.outputs[0].url).not.toBe(raw.url);
+ expect(() => finishOutput(g.id, 0, png)).toThrow(/Already finished/);
+ expect(() => finishOutput(g.id, 3, png)).toThrow(/No such output/);
+ expect(getGeneration(g.id)!.outputs[0].meta?.finished).toBe(true);
+ });
+
it("remembers the engine on the row, and the engine mode still holds", () => {
const [g] = createGenerations({ feature: "image", modelId: "fuobe-soul", prompt: "a fox", engine: "cloud" });
expect(g.engine).toBe("cloud");