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: Finish's hint names only the tools a visitor can use
Adarsh5f1cf30bb0e5
diff --git a/src/components/genjutsu/genjutsu-studio.tsx b/src/components/genjutsu/genjutsu-studio.tsxindex 8e636f5b..6e59a740 100644--- a/src/components/genjutsu/genjutsu-studio.tsx+++ b/src/components/genjutsu/genjutsu-studio.tsx@@ -47,6 +47,7 @@ import {makersFor,qualityFor,MODE_TARGETS,+ modeHint,OPEN_TARGET_PROBLEM,resolutionWords,SCENE_ACTIONS,@@ -640,12 +641,13 @@ export function GenjutsuStudio({ examples, live }: { examples?: ExampleRowData |};const modeInfo = getMode(mode);+ const hint = modeHint(mode, open);const tabs = <ModeTabsRow modes={GENJUTSU_MODES.filter((m) => modeOpen(m.id, open))} mode={mode} onMode={setMode} onlyYou={(m) => owner && !modeOpen(m, (f) => !!live?.[f])} />;return (<ToolShell title="Genjutsu" tabs={tabs} fadeKey={mode} header={<SetupCode setup={setup} onPaste={apply} />} wide selfHostedOnly>{!clip && (- <ToolHero title={modeInfo.label} subtitle={`${modeInfo.hint}${visitor ? "" : " Free on your own ComfyUI."}`}>+ <ToolHero title={modeInfo.label} subtitle={`${hint}${visitor ? "" : " Free on your own ComfyUI."}`}>{isCharacter && (<Link href="/character-swap" className="mt-3 inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline">Whole clips, shot by shot? Open in Character Swap Studio@@ -832,7 +834,7 @@ export function GenjutsuStudio({ examples, live }: { examples?: ExampleRowData |<Panel className="space-y-4 lg:sticky lg:top-[calc(var(--chrome-top)+1rem)]">{mode === "picture" && <PictureSteps stage={pictureStage} />}- <p className="text-[13px] text-pretty text-muted-foreground">{modeInfo.hint}</p>+ <p className="text-[13px] text-pretty text-muted-foreground">{hint}</p>{mode === "finish" && <FinishFields value={finish} onChange={setFinish} open={open} ownerOnly={ownerOnly} seed={seed} onSeed={setSeed} />}diff --git a/src/lib/catalog/genjutsu.ts b/src/lib/catalog/genjutsu.tsindex 52e98569..e90d8649 100644--- a/src/lib/catalog/genjutsu.ts+++ b/src/lib/catalog/genjutsu.ts@@ -179,6 +179,16 @@ export const GENJUTSU_FEATURE_KEYS = Object.keys(GENJUTSU_FEATURES) as GenjutsuF/** Which features are open to this viewer: everything for the owner (and in tests), else what has passed. */export type FeatureCheck = (f: GenjutsuFeature) => boolean;++/** A mode's hint for this viewer: Finish names only the tools that are open to them. */+export function modeHint(mode: GenjutsuMode, open: FeatureCheck): string {+ if (mode !== "finish") return getMode(mode).hint;+ const faces = open("finish-faces");+ const colours = open("finish-colours");+ if (faces && !colours) return "Give a finished video sharper faces.";+ if (colours && !faces) return "Give a finished video a soft film finish.";+ return getMode(mode).hint;+}export const ALL_FEATURES: FeatureCheck = () => true;/** Whether a mode shows for this viewer (the new modes need one of their features open). */diff --git a/tests/e2e/genjutsu-openjutsu.mjs b/tests/e2e/genjutsu-openjutsu.mjsindex 17759e74..4ece9538 100644--- a/tests/e2e/genjutsu-openjutsu.mjs+++ b/tests/e2e/genjutsu-openjutsu.mjs@@ -75,8 +75,9 @@ try {check(`${width}: ?mode=${m} lands on ${want} for a guest`, (await selected()) === want, String(await selected()));if (m === "finish" && OPEN_MODES.finish) {const body = await page.evaluate(() => document.body.innerText);- check(`${width}: Finish offers Fix colours to a guest`, body.includes("Fix colours") === live("finish-colours"));- check(`${width}: Finish offers Fix faces only once it is open`, body.includes("Fix faces") === live("finish-faces"));+ // The hint names only the open tools (the tool switch shows once a video is in).+ check(`${width}: Finish names the film finish once Fix colours is open`, body.includes("soft film finish") === live("finish-colours"));+ check(`${width}: Finish names sharper faces only once Fix faces is open`, body.includes("sharper faces") === live("finish-faces"));check(`${width}: Finish fits the screen`, (await sideways()) <= 0);await shot("guest-finish");}diff --git a/tests/genjutsu-openjutsu.test.ts b/tests/genjutsu-openjutsu.test.tsindex a12aaa11..3de1fdde 100644--- a/tests/genjutsu-openjutsu.test.ts+++ b/tests/genjutsu-openjutsu.test.ts@@ -9,7 +9,9 @@ import {GENJUTSU_MODES,genjutsuProblem,getMaker,+ getMode,makersFor,+ modeHint,modeOpen,MOTION_H3,ORIGINALS,@@ -199,6 +201,14 @@ describe("Genjutsu: the Openjutsu modes", () => {expect(roleFromPin({ x: 0.9, y: 0.1 })).toBe("the person on the right at the back");});+ it("Finish's hint names only the tools open to the viewer", () => {+ const only = (k: string) => (f: string) => f === k;+ expect(modeHint("finish", only("finish-colours") as never)).toBe("Give a finished video a soft film finish.");+ expect(modeHint("finish", only("finish-faces") as never)).toBe("Give a finished video sharper faces.");+ expect(modeHint("finish", () => true)).toBe("Give a finished video sharper faces or a soft film finish.");+ expect(modeHint("motion", () => false)).toBe(getMode("motion").hint);+ });+it("every step of the new modes plans without a prompt: their words travel in the settings", () => {const ids = ["oss-h3-group-swap", "oss-h3-scene-edit", "oss-from-picture-frame", "oss-scene-describe", "oss-from-picture", "oss-h3-fix-faces", "oss-fix-colours"];for (const id of ids) {