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.

Image studios: polish from the browser pass

Claude2127da3b2deb
diff --git a/src/components/fashion/character-sheet.tsx b/src/components/fashion/character-sheet.tsx
index 5a8dc776..b9742e2e 100644
--- a/src/components/fashion/character-sheet.tsx
+++ b/src/components/fashion/character-sheet.tsx
@@ -141,7 +141,8 @@ export function CharacterSheetView({ fields, defaults }: { fields: CastFieldData
const [over, setOver] = useState(false);
const run = useRun<Record<string, unknown>>("/api/photodump/character");
const { data } = useGenerations({ features: ["character-sheet", "app:app-ai-influencer"], limit: 60 });
- const mine = useMemo(() => (data ?? []).filter((g) => ids.includes(g.id)), [data, ids]);
+ // This visit's sheets; after a reload, the most recent ones.
+ const mine = useMemo(() => (ids.length ? (data ?? []).filter((g) => ids.includes(g.id)) : (data ?? []).slice(0, 2)), [data, ids]);
const latest = mine.find((g) => g.status === "succeeded");
const uploading = photos.some((p) => p.uploading);
@@ -263,6 +264,7 @@ export function CharacterSheetView({ fields, defaults }: { fields: CastFieldData
<section className="min-w-0 space-y-3" aria-label="Your sheets">
{mine.length ? (
<>
+ {!ids.length && <p className="text-[13px] font-medium text-muted-foreground">Recent sheets</p>}
<ResultsGrid items={mine} ratio={16 / 9} className="sm:grid-cols-1 lg:grid-cols-1" />
{latest && (
<SaveCharacter
diff --git a/src/components/fashion/fashion-view.tsx b/src/components/fashion/fashion-view.tsx
index 6522eebd..00a53d51 100644
--- a/src/components/fashion/fashion-view.tsx
+++ b/src/components/fashion/fashion-view.tsx
@@ -245,7 +245,7 @@ export function FashionView() {
))}
</div>
)}
- <RunLine preview={outfitBody && !s.outfit ? preview.data : undefined} loading={preview.isFetching} />
+ <RunLine preview={outfitBody && !s.outfit ? preview.data : undefined} loading={!s.outfit && preview.isFetching} />
<Button className="w-full" variant={s.outfitIds.length ? "outline" : "default"} onClick={startOutfit} disabled={outfit.isPending}>
{outfit.isPending ? <Loader2 className="animate-spin" /> : <Sparkles />} {outfit.isPending ? "Generating..." : "Generate outfit"}
</Button>
diff --git a/src/components/moodboards/cards.tsx b/src/components/moodboards/cards.tsx
index 412d5a23..6aadd640 100644
--- a/src/components/moodboards/cards.tsx
+++ b/src/components/moodboards/cards.tsx
@@ -23,8 +23,8 @@ export function StatusBadge({ status, className }: { status: MoodboardStatus; cl
return (
<span
className={cn(
- "inline-flex h-5 items-center gap-1 rounded-full px-2 text-[11px] font-medium",
- status === "complete" ? "bg-success/15 text-success" : status === "failed" ? "bg-destructive/10 text-destructive" : "bg-background/90 text-foreground",
+ "inline-flex h-5 items-center gap-1 rounded-full bg-background/95 px-2 text-[11px] font-medium shadow-soft",
+ status === "complete" ? "text-success" : status === "failed" ? "text-destructive" : "text-foreground",
className,
)}
>
diff --git a/src/components/moodboards/moodboards-view.tsx b/src/components/moodboards/moodboards-view.tsx
index 60aad7a9..fa0c3494 100644
--- a/src/components/moodboards/moodboards-view.tsx
+++ b/src/components/moodboards/moodboards-view.tsx
@@ -185,9 +185,9 @@ export function MoodboardsView() {
</button>
))}
</div>
- <label className="flex h-9 min-w-0 flex-1 items-center gap-2 rounded-full border bg-background px-3 focus-within:border-primary sm:max-w-xs">
+ <label className="flex h-9 w-full min-w-0 items-center gap-2 rounded-full border bg-background px-3 focus-within:border-primary sm:w-auto sm:max-w-xs sm:flex-1">
<Search className="size-4 text-muted-foreground" />
- <input value={q} onChange={(e) => setQ(e.target.value)} placeholder="Search presets..." aria-label="Search moodboards" className="min-w-0 flex-1 bg-transparent text-[13px] outline-none" />
+ <input value={q} onChange={(e) => setQ(e.target.value)} placeholder="Search moodboards..." aria-label="Search moodboards" className="min-w-0 flex-1 bg-transparent text-[13px] outline-none" />
</label>
</div>
diff --git a/src/components/palettes/color-signature-panel.tsx b/src/components/palettes/color-signature-panel.tsx
index d8a9f467..47718bf7 100644
--- a/src/components/palettes/color-signature-panel.tsx
+++ b/src/components/palettes/color-signature-panel.tsx
@@ -37,7 +37,13 @@ function FromImages({ files, setFiles, onSaved }: { files: File[]; setFiles: (f:
const [saving, setSaving] = useState(false);
const { create } = usePaletteActions();
const urls = useMemo(() => files.map((f) => URL.createObjectURL(f)), [files]);
- useEffect(() => () => urls.forEach((u) => URL.revokeObjectURL(u)), [urls]);
+ // Previews of a replaced list are released (not on unmount: React's dev double-mount would revoke the live ones).
+ const shown = useRef<string[]>([]);
+ useEffect(() => {
+ const old = shown.current;
+ shown.current = urls;
+ if (old !== urls) old.forEach((u) => URL.revokeObjectURL(u));
+ }, [urls]);
useEffect(() => {
if (!files.length) return;
let live = true;
diff --git a/src/components/photodump/covers.tsx b/src/components/photodump/covers.tsx
index a1dcd120..7eae0255 100644
--- a/src/components/photodump/covers.tsx
+++ b/src/components/photodump/covers.tsx
@@ -7,9 +7,15 @@ import { cn } from "@/lib/utils";
* A drawn pack cover (Fuobe ships no copies of Higgsfield's sample photos): a 2×2 contact sheet of
* soft tiles in the pack's hue family, its name and photo count.
*/
-export function PackCover({ id, name, count, className, refs }: { id: string; name: string; count: number; className?: string; refs?: string[] }) {
+export function PackCover({ id, name, count, className, refs, bare }: { id: string; name: string; count: number; className?: string; refs?: string[]; bare?: boolean }) {
const h = hueOf(id);
- const tiles = [0, 40, 200, 320].map((d, i) => `linear-gradient(${140 + i * 30}deg, oklch(0.8 0.1 ${(h + d) % 360}), oklch(0.5 0.13 ${(h + d + 40) % 360}))`);
+ // One hue family per pack (a little drift and different light per tile), so packs read apart at a glance.
+ const tiles = [
+ [0, 0.82],
+ [18, 0.66],
+ [-16, 0.58],
+ [34, 0.74],
+ ].map(([d, l], i) => `linear-gradient(${140 + i * 35}deg, oklch(${l} 0.11 ${(h + d + 360) % 360}), oklch(${l - 0.24} 0.13 ${(h + d + 30 + 360) % 360}))`);
return (
<span className={cn("relative block overflow-hidden bg-muted", className)}>
<span className="grid size-full grid-cols-2 grid-rows-2 gap-0.5">
@@ -22,11 +28,15 @@ export function PackCover({ id, name, count, className, refs }: { id: string; na
),
)}
</span>
- <span className="absolute inset-0 bg-gradient-to-t from-black/65 via-black/10 to-transparent" />
- <span className="absolute inset-x-2.5 bottom-2.5 text-white">
- <span className="block font-heading text-[19px] leading-tight drop-shadow-sm">{name}</span>
- <span className="text-[11.5px] font-medium opacity-90">{count} photos</span>
- </span>
+ {!bare && (
+ <>
+ <span className="absolute inset-0 bg-gradient-to-t from-black/65 via-black/10 to-transparent" />
+ <span className="absolute inset-x-2.5 bottom-2.5 text-white">
+ <span className="block font-heading text-[19px] leading-tight drop-shadow-sm">{name}</span>
+ <span className="text-[11.5px] font-medium opacity-90">{count} photos</span>
+ </span>
+ </>
+ )}
</span>
);
}
diff --git a/src/components/photodump/photodump-view.tsx b/src/components/photodump/photodump-view.tsx
index 0bc046da..7ee19019 100644
--- a/src/components/photodump/photodump-view.tsx
+++ b/src/components/photodump/photodump-view.tsx
@@ -210,7 +210,7 @@ export function PhotodumpView() {
</button>
))}
</div>
- <label className="flex h-9 min-w-0 flex-1 items-center gap-2 rounded-full border bg-background px-3 focus-within:border-primary sm:max-w-xs">
+ <label className="flex h-9 w-full min-w-0 items-center gap-2 rounded-full border bg-background px-3 focus-within:border-primary sm:w-auto sm:max-w-xs sm:flex-1">
<Search className="size-4 text-muted-foreground" />
<input value={q} onChange={(e) => setQ(e.target.value)} placeholder="Search packs" aria-label="Search packs" className="min-w-0 flex-1 bg-transparent text-[13px] outline-none" />
</label>
@@ -320,7 +320,7 @@ export function PhotodumpView() {
</div>
<aside className="space-y-5 rounded-2xl border p-4 lg:sticky lg:top-6 lg:self-start">
<div className="flex items-center gap-3">
- <PackCover id={pack.id} name="" count={pack.count} refs={pack.refs} className="size-14 shrink-0 rounded-lg" />
+ <PackCover id={pack.id} name={pack.name} count={pack.count} refs={pack.refs} bare className="size-14 shrink-0 rounded-lg" />
<div className="min-w-0">
<p className="truncate text-[14px] font-medium">{pack.name}</p>
<p className="text-[12px] text-muted-foreground">{pack.count} photos</p>
diff --git a/src/lib/catalog/packs.ts b/src/lib/catalog/packs.ts
index 81ecf025..bf735614 100644
--- a/src/lib/catalog/packs.ts
+++ b/src/lib/catalog/packs.ts
@@ -403,10 +403,11 @@ const KEEP_FACE = "Keep their exact face, identity, skin tone and hair; a new ph
/** One photo's prompt for a subject: an @mention for saved characters, image 1 for a selfie. */
export function shotPrompt(pack: Pick<Pack, "look" | "custom">, shot: string, subject: PhotoSubject, refIndex?: number): string {
- const who = subject.kind === "element" ? `@${subject.handle}` : "The person in image 1";
+ const who = subject.kind === "element" ? `@${subject.handle}` : "the person in image 1";
const look = pack.look ? ` ${pack.look}.` : "";
if (pack.custom && refIndex) {
- return `${who} recreated in image ${refIndex}: ${shot}. Replace the person in image ${refIndex} with them. ${KEEP_FACE}.${look}`.trim();
+ const lead = who.charAt(0).toUpperCase() + who.slice(1);
+ return `${lead} recreated in image ${refIndex}: ${shot}. Replace the person in image ${refIndex} with them. ${KEEP_FACE}.${look}`.trim();
}
return `A photo of ${who}, ${shot}.${look}${subject.kind === "selfie" ? ` ${KEEP_FACE}.` : ""}`;
}
diff --git a/src/lib/catalog/palettes.ts b/src/lib/catalog/palettes.ts
index 7ca5ecb7..fb388819 100644
--- a/src/lib/catalog/palettes.ts
+++ b/src/lib/catalog/palettes.ts
@@ -434,10 +434,10 @@ export function applySignature(req: GenerationRequest, sig: Signature | undefine
const collages = mb.collages?.length ? mb.collages : refs.slice(0, 2);
if (model.engine === "cloud") {
if (model.family === "recraft" && mb.styleId) {
- move(SIGNATURE_MODELS.recraftSaved, `Runs on {model} with “${mb.name}”'s saved Recraft style`);
+ move(SIGNATURE_MODELS.recraftSaved, `Runs on {model} with the saved “${mb.name}” Recraft style`);
r = { ...r, params: { ...r.params, styleId: mb.styleId } };
} else if (model.family === "recraft") {
- move(SIGNATURE_MODELS.recraftStyle, `Runs on {model}, styled by “${mb.name}”'s images`);
+ move(SIGNATURE_MODELS.recraftStyle, `Runs on {model}, styled by the “${mb.name}” images`);
r = { ...r, op: "edit", inputs: { ...r.inputs, images: refs.slice(0, 10) } };
} else {
let budget = Math.min(refBudget(model, existing), 6);
@@ -450,10 +450,10 @@ export function applySignature(req: GenerationRequest, sig: Signature | undefine
r = { ...r, op: "edit", inputs: { ...r.inputs, images: [...(r.inputs?.images ?? []), ...take] }, prompt: join(r.prompt, styleLegend(existing + 1, existing + take.length)) };
}
} else if (mb.loraHandle && (model.id === SIGNATURE_MODELS.openTurbo || model.family !== "style-reference")) {
- move(SIGNATURE_MODELS.openTurbo, `Runs on {model} with “${mb.name}”'s trained style LoRA`);
+ move(SIGNATURE_MODELS.openTurbo, `Runs on {model} with the trained “${mb.name}” style LoRA`);
r = { ...r, prompt: join(r.prompt, `In the style of @${mb.loraHandle}.`) };
} else {
- if (model.family !== "style-reference") move(SIGNATURE_MODELS.openStyle, `Runs on {model} with “${mb.name}”'s collages`);
+ if (model.family !== "style-reference") move(SIGNATURE_MODELS.openStyle, `Runs on {model} with the “${mb.name}” collages`);
const max = model.options.maxImages ?? 2;
const pool = max >= 4 ? refs : collages;
const take = pool.slice(0, Math.max(0, max - existing));
diff --git a/tests/image-studios.test.ts b/tests/image-studios.test.ts
index 0ef6f179..d80cd07c 100644
--- a/tests/image-studios.test.ts
+++ b/tests/image-studios.test.ts
@@ -290,7 +290,7 @@ describe("Photodump packs and planning", () => {
it("builds per-photo prompts: @mention for a character, image 1 for a selfie, the reference photo in user packs", () => {
const pack = getPack("zen")!;
expect(shotPrompt(pack, pack.shots[0], maya)).toMatch(/^A photo of @Maya, seated cross-legged/);
- expect(shotPrompt(pack, pack.shots[0], selfie)).toMatch(/^A photo of The person in image 1, .*Keep their exact face/);
+ expect(shotPrompt(pack, pack.shots[0], selfie)).toMatch(/^A photo of the person in image 1, .*Keep their exact face/);
const mine = customPack({ id: "user-1", name: "Mine", refs: ["/api/files/uploads/a.png", "/api/files/uploads/b.png"] });
expect(mine.count).toBe(2);
expect(shotPrompt(mine, mine.shots[0], selfie, 2)).toMatch(/^The person in image 1 recreated in image 2: .*Replace the person in image 2/);