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
Connect your GPU: the card says what the item needs under its title
Adarsh6efb7f03e930
diff --git a/src/components/guest-prompt.tsx b/src/components/guest-prompt.tsxindex c9d7ecd9..af61e459 100644--- a/src/components/guest-prompt.tsx+++ b/src/components/guest-prompt.tsx@@ -57,6 +57,7 @@ export function GuestPrompt() {const [needs, setNeeds] = useState<ConnectNeeds>("gpu");// Opened by a tool only a GPU runs: no key offers on this card.const [gpuOnly, setGpuOnly] = useState(false);+ const [requirement, setRequirement] = useState<string | undefined>(undefined);const close = useCallback(() => {setOpen(false);setRetry(null);@@ -116,6 +117,7 @@ export function GuestPrompt() {setLook(!!d.look);setNeeds(d.needs ?? "gpu");setGpuOnly(!!d.gpuOnly);+ setRequirement(typeof d.requirement === "string" && d.requirement ? d.requirement : undefined);};window.addEventListener(GUEST_PROMPT_EVENT, guest);// A run started from a toast (not a page's own button): the lists show it.@@ -168,6 +170,8 @@ export function GuestPrompt() {<>{action === "connect" && !reason ? "Your runs go to the ComfyUI on your computer. It's free and private." : "Fuobe runs this on the ComfyUI on your computer. It's free and private."}</>)}</DialogDescription>+ {/* What the item asked for needs (its own-setup label). */}+ {requirement && <p className="text-[13px] font-medium text-brand-text">{requirement}</p>}{/* Paid models run on the account's own key instead (Your keys), when the studio allows them. */}{viewer?.kind === "account" && keysAllowed && !!viewer.keys?.length && (<p className="text-[13px] text-muted-foreground">{`Or switch to Cloud to use your ${viewer.keys.map((k) => CLOUD_KEY[k].label).join(" or ")} key.`}</p>diff --git a/src/components/own-setup.tsx b/src/components/own-setup.tsxindex efa784f7..61dd7464 100644--- a/src/components/own-setup.tsx+++ b/src/components/own-setup.tsx@@ -70,8 +70,11 @@ export function useOwnSetupViewer(): OwnSetupViewer | null {return { kind: v.kind, gpu: v.gpu, keys: v.keys };}-/** Opens what a step asks for. True when it opened something (the run waits); false for `run`. */-export function openOwnSetupStep(step: OwnSetupStep): boolean {+/**+ * Opens what a step asks for. True when it opened something (the run waits); false for `run`. `requirement`: the+ * item's label, said on "Connect your GPU".+ */+export function openOwnSetupStep(step: OwnSetupStep, requirement?: string): boolean {switch (step.kind) {case "sign-up":askToSignUp("run");@@ -80,7 +83,9 @@ export function openOwnSetupStep(step: OwnSetupStep): boolean {openAddKey(step.provider);return true;case "connect-gpu":- window.dispatchEvent(new CustomEvent<ConnectGpuDetail>(CONNECT_GPU_EVENT, { detail: { action: "run", ...(step.gpuOnly ? { gpuOnly: true, needs: "gpu" } : { needs: "any" }) } }));+ window.dispatchEvent(+ new CustomEvent<ConnectGpuDetail>(CONNECT_GPU_EVENT, { detail: { action: "run", ...(step.gpuOnly ? { gpuOnly: true, needs: "gpu" } : { needs: "any" }), ...(requirement && { requirement }) } }),+ );return true;default:return false;@@ -96,7 +101,7 @@ export function useOwnSetupPress(): (item: OwnSetup | string | null | undefined,return useCallback((item, run) => {const o = typeof item === "string" ? ownSetupOnly(item) : (item ?? null);- if (openOwnSetupStep(ownSetupStep(o, viewer))) return false;+ if (openOwnSetupStep(ownSetupStep(o, viewer), o ? ownSetupLabel(o) : undefined)) return false;run?.();return true;},diff --git a/src/lib/api.ts b/src/lib/api.tsindex 8faf7f12..7b62bac6 100644--- a/src/lib/api.ts+++ b/src/lib/api.ts@@ -1336,6 +1336,8 @@ export interface ConnectGpuDetail extends RefusalDetail {needs?: ConnectNeeds;/** A tool only a GPU runs (no fal.ai or Replicate key can): the card offers the GPU alone, to accounts too. */gpuOnly?: boolean;+ /** What the item needs, in its own-setup label's words ("Runs on your own GPU · 48 GB"): said under the card's title. */+ requirement?: string;}export type ConnectNeeds = "gpu" | "key" | "any";const asNeeds = (v: string | null): ConnectNeeds | undefined => (v === "gpu" || v === "key" || v === "any" ? v : undefined);diff --git a/tests/own-setup-labels.test.ts b/tests/own-setup-labels.test.tsindex d620401e..0f79ba94 100644--- a/tests/own-setup-labels.test.ts+++ b/tests/own-setup-labels.test.ts@@ -92,6 +92,9 @@ describe("a model over the memory of this install's GPUs", () => {win.window = target;expect(openOwnSetupStep(ownSetupStep(setup, ACCOUNT))).toBe(true);expect(seen).toEqual([{ type: "fuobe:connect-gpu", detail: { action: "run", gpuOnly: true, needs: "gpu" } }]);+ // With the item's label, the card says what it needs under its title.+ openOwnSetupStep(ownSetupStep(setup, ACCOUNT), ownSetupLabel(setup));+ expect(seen[1]?.detail).toMatchObject({ requirement: "Runs on your own GPU · 48 GB" });});it("an app's own tool says the label and sends Run to the setup, never a refusal", () => {