The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Genjutsu: the Finish link shows in the menus once one of its tools is open
Adarsh69379ee98637
diff --git a/src/lib/nav-model.ts b/src/lib/nav-model.tsindex 0aa31f31..5ede6b6b 100644--- a/src/lib/nav-model.ts+++ b/src/lib/nav-model.ts@@ -5,6 +5,7 @@* covers are preset ids (src/lib/nav-covers.ts resolves them on the server). Every href is a route that exists; none* is renamed here.*/+import GPU_TESTED from "../../workflows/comfyui/gpu-tested.json";import { HUB_MODES, modeHref, type HubKind } from "./hubs";import { navActive, NEW_CREATION_HREF } from "./nav";@@ -94,6 +95,15 @@ const ACCOUNT: readonly ViewerKind[] = ["account"];const GUEST: readonly ViewerKind[] = ["guest"];const VISITORS: readonly ViewerKind[] = ["guest", "account"];+/**+ * Genjutsu's Finish mode is everyone's once one of its tools (Fix faces, Fix colours) has passed its GPU test, as the+ * studio's page shows it (modeOpen in src/lib/catalog/genjutsu.ts, from src/server/genjutsu-live.ts, which reads the+ * same record with the workflows' manifest; tests/nav-subfeatures.test.ts holds the two to the same answer). Until+ * then its link is the owner's.+ */+const passedOnGpu = (feature: string) => (GPU_TESTED.features as Record<string, { passed?: boolean } | undefined>)[feature]?.passed === true;+const FINISH_OPEN = passedOnGpu("finish-faces") || passedOnGpu("finish-colours");+/** Where the source lives (as connections.ts says it; kept here so this module imports nothing heavy). */const REPO = "https://github.com/workingprototype/fuobe";/** A "do this" entry that isn't a page: the palette toggles the theme. */@@ -342,7 +352,7 @@ const STUDIO_FEATURES: NavEntry[] = [] as const).map(([id, label, what, kw]) => feature("genjutsu", "WandSparkles", id, `/genjutsu?mode=${id}`, label, what, kw)),feature("genjutsu", "WandSparkles", "picture", "/genjutsu?mode=picture", "From picture", "Your picture's setting, moving", "from picture photo setting animate motion", OWNER),- feature("genjutsu", "WandSparkles", "finish", "/genjutsu?mode=finish", "Finish", "Fix faces and colours", "finish fix faces colours colors", OWNER),+ feature("genjutsu", "WandSparkles", "finish", "/genjutsu?mode=finish", "Finish", "Fix faces and colours", "finish fix faces colours colors", FINISH_OPEN ? undefined : OWNER),...([["reference", "From Reference", "A sheet from your photos", "reference photo upload face sheet"],@@ -695,7 +705,7 @@ export interface StudioSubs {tall?: 800 | 880 | 960;/** Below `tall`: "line" shows them as one wrapped line of names instead of hiding them (Genjutsu's modes). */short?: "line";- /** The owner's own features in the list (Genjutsu's From picture and Finish) show from this height. */+ /** The owner's own features in the list (Genjutsu's modes not open to everyone yet) show from this height. */ownerTall?: 880 | 960;}diff --git a/tests/nav-areas.test.ts b/tests/nav-areas.test.tsindex 1ddf0af7..dc2196bb 100644--- a/tests/nav-areas.test.ts+++ b/tests/nav-areas.test.ts@@ -127,7 +127,7 @@ describe("/studios", () => {expect(subsOf("film", "video-tools")).not.toContain("video-tools-matte"); // Video tools' first mode is the studio's own page// Ads Studio is a studio with a card or pill of its own here: Marketing Studio's row has the other two.expect(subsOf("sell", "marketing")).toEqual(["marketing-click-to-ad", "ads-multiplier"]);- expect(subsOf("people", "genjutsu")).toEqual(["genjutsu-motion", "genjutsu-character", "genjutsu-swap", "genjutsu-restyle", "genjutsu-insert"]);+ expect(subsOf("people", "genjutsu")).toEqual(["genjutsu-motion", "genjutsu-character", "genjutsu-swap", "genjutsu-restyle", "genjutsu-insert", "genjutsu-finish"]);expect(subsOf("people", "character-sheet")).toEqual(["character-sheet-reference", "character-sheet-cast", "character-sheet-describe"]);expect(subsOf("sound", "audio")).not.toContain("audio-music"); // a card of its ownfor (const s of sections) {diff --git a/tests/nav-bar.test.ts b/tests/nav-bar.test.tsindex d6e9a32f..d1009b28 100644--- a/tests/nav-bar.test.ts+++ b/tests/nav-bar.test.ts@@ -172,7 +172,7 @@ describe("the launcher's columns", () => {.find((e) => e.id === id)?.subs?.map((s) => s.label);expect(subs("marketing")).toEqual(["Click to Ad", "Ads Studio", "Ad Multiplier"]);- expect(subs("genjutsu")).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert"]);+ expect(subs("genjutsu")).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert", "Finish"]);expect(subs("upscale")).toEqual(["Image", "Video", "FPS Boost", "SDR to HDR", "Export"]);expect(subs("audio")).toEqual(["Speech", "Dialogue", "Voice change", "See all 14"]);expect(subs("video-tools")).toEqual(["Relight", "Captions", "Remove object", "See all 11"]);diff --git a/tests/nav-subfeatures.test.ts b/tests/nav-subfeatures.test.tsindex 108f07e4..8f8bd1dd 100644--- a/tests/nav-subfeatures.test.ts+++ b/tests/nav-subfeatures.test.ts@@ -2,7 +2,7 @@ import fs from "node:fs";import path from "node:path";import { describe, expect, it } from "vitest";import { MODEL3D_MODES, readModel3dLink } from "@/lib/av/model3d";-import { GENJUTSU_MODES } from "@/lib/catalog/genjutsu";+import { GENJUTSU_MODES, modeOpen } from "@/lib/catalog/genjutsu";import { HUB_MODES, type HubKind } from "@/lib/hubs";import { megaSubs, studiosMenu } from "@/lib/mega-menus";import { megaCurrent } from "@/components/nav/mega-launcher";@@ -22,6 +22,7 @@ import {type ViewerKind,} from "@/lib/nav-model";import { navSearchEntries, searchNav } from "@/lib/nav-search";+import { genjutsuLive } from "@/server/genjutsu-live";/** What each studio holds inside (its tabs and modes) in the top nav: the catalogue (STUDIO_SUBS) and the links the@@ -115,7 +116,7 @@ describe("the catalogue of studio features", () => {describe("who sees a studio's features", () => {it("keeps the owner's own modes the owner's, in every place", () => {- for (const id of ["genjutsu-picture", "genjutsu-finish", "cinema-blockout", "canvas-skills", "assist-memory", "assist-scheduled", "audio-song", "video-tools-restore"]) {+ for (const id of ["genjutsu-picture", "cinema-blockout", "canvas-skills", "assist-memory", "assist-scheduled", "audio-song", "video-tools-restore"]) {expect(entry(id)!.visibility, id).toEqual(["owner"]);for (const kind of VISITORS) expect(entriesFor(kind).some((e) => e.id === id), `${kind}: ${id}`).toBe(false);}@@ -130,6 +131,19 @@ describe("who sees a studio's features", () => {}});+ it("links Genjutsu's Finish for everyone exactly when its page shows it to everyone", () => {+ const live = genjutsuLive();+ const open = modeOpen("finish", (f) => live[f]);+ expect(open).toBe(true);+ const finish = entry("genjutsu-finish")!;+ for (const kind of VISITORS) {+ expect(visibleTo(finish, kind), kind).toBe(open);+ expect(studioSubs("genjutsu", kind, "sheet").some((e) => e.id === finish.id), kind).toBe(open);+ const menu = studiosMenu(kind).columns.flatMap((c) => [c.lead!, ...c.rows]).flatMap((e) => e.subs ?? []);+ expect(menu.some((s) => s.id === finish.id), kind).toBe(open);+ }+ });+it("links a feature a visitor may open but not run here (its page says so) in the menus and sheets for the owner only", () => {for (const id of OWNER_RUNS) {for (const kind of VISITORS) {@@ -186,7 +200,7 @@ describe("finding a studio's features", () => {const inside = (kind: ViewerKind | undefined, q: string) => find(kind, q).groups[0];expect(find("guest", "genjutsu").best[0]).toMatchObject({ id: "genjutsu" });expect(inside("guest", "genjutsu")).toMatchObject({ label: "In Genjutsu" });- expect(inside("guest", "genjutsu").hits.map((h) => h.label)).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert"]);+ expect(inside("guest", "genjutsu").hits.map((h) => h.label)).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert", "Finish"]);expect(inside("owner", "genjutsu").hits.map((h) => h.label)).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert", "From picture", "Finish"]);expect(inside("guest", "character sheet").hits.map((h) => h.label)).toEqual(["From Reference", "Build from scratch", "From a description"]);// Not a tab that is the studio's own page (Upscale's Image), nor one already among the best matches.diff --git a/tests/phone-nav.test.ts b/tests/phone-nav.test.tsindex 0988393a..3de9e95b 100644--- a/tests/phone-nav.test.ts+++ b/tests/phone-nav.test.ts@@ -250,7 +250,7 @@ describe("the Studios sheet", () => {expect(pills(sell)).toEqual(["Click to Ad", "Ad Multiplier"]);expect(words(sell)).toContain("Marketing Studio");const people = at("/", () => sheet({ group: "people" }));- expect(pills(people)).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert"]);+ expect(pills(people)).toEqual(["Motion transfer", "Character swap", "Object swap", "Restyle", "Insert", "Finish"]);// Pages that say "isn't available here" to a visitor, and the owner's own modes, aren't linked for them.for (const w of ["From a selfie", "From Reference", "From picture", "Split soundtrack", "Remove dialogue", "From an image", "Blockout"]) {for (const g of LAUNCHER_GROUPS) expect(pills(at("/", () => sheet({ group: g.id }))), `${g.id}: ${w}`).not.toContain(w);