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.

Home and Assist: Start offers the engine that is connected, and take numbers sit beside Demo

Claude22d7bd1b9646
diff --git a/src/components/assist/transcript.tsx b/src/components/assist/transcript.tsx
index 85f2314e..db804bf2 100644
--- a/src/components/assist/transcript.tsx
+++ b/src/components/assist/transcript.tsx
@@ -208,10 +208,15 @@ export function GenerationCards({ ids, all, storyboard, onOpen }: { ids: string[
>
{/* A text card says "Demo" in its own header row: on a narrow tile a corner badge would cover its label. */}
<MediaThumb output={o} className="transition duration-300 group-hover:scale-[1.02]" tag={g.provider === "mock" && o.kind === "text" ? "Demo" : undefined} />
- {g.provider === "mock" && o.kind !== "text" && <span className="absolute top-2 right-2 rounded-full bg-background/80 px-2 py-0.5 text-[10px] font-medium">Demo</span>}
- {n > 0 && (
- <span aria-hidden className="absolute bottom-2 left-2 grid size-6 place-items-center rounded-full bg-background/85 text-[12px] font-medium tabular-nums shadow-soft">
- {n}
+ {/* Top right, next to "Demo": the other corners hold the picture's own caption on demo stills. */}
+ {(n > 0 || (g.provider === "mock" && o.kind !== "text")) && (
+ <span className="absolute top-2 right-2 flex items-center gap-1">
+ {n > 0 && (
+ <span aria-hidden className="grid size-6 place-items-center rounded-full bg-background/85 text-[12px] font-medium tabular-nums shadow-soft">
+ {n}
+ </span>
+ )}
+ {g.provider === "mock" && o.kind !== "text" && <span className="rounded-full bg-background/80 px-2 py-0.5 text-[10px] font-medium">Demo</span>}
</span>
)}
</button>
diff --git a/src/components/home-view.tsx b/src/components/home-view.tsx
index ec7e883a..b0e2dac3 100644
--- a/src/components/home-view.tsx
+++ b/src/components/home-view.tsx
@@ -177,12 +177,14 @@ export function HomeView({
const go = () => router.push(`${mode.href}${prompt.trim() ? `?prompt=${encodeURIComponent(prompt.trim())}&go=1` : ""}`);
// What Start will run, and what it costs, before it's pressed.
const quote = quotes?.[mode.id];
- const runsFor = (() => {
+ const runsFor = ((): { text: string; other?: "cloud" | "open" | null } | null => {
if (!status || nothingConnected || !quote) return null;
const engines = connectedEngines(status);
const then = mode.id === "image" ? "" : mode.id === "edit" ? " after you add the photo" : "";
- if (engine === "open") return engines.open && quote.open ? `Start runs ${quote.open.name} on your GPU${then} · Free` : "ComfyUI isn't connected, so Start runs a free demo";
- return engines.cloud && quote.cloud ? `Start runs ${quote.cloud.name}${then} · ${quote.cloud.price}` : "No paid API is connected, so Start runs a free demo";
+ // The other engine is connected: offer it rather than a demo run.
+ const other = engineMode === "both" ? (engine === "open" ? engines.cloud && "cloud" : engines.open && "open") || null : null;
+ if (engine === "open") return engines.open && quote.open ? { text: `Start runs ${quote.open.name} on your GPU${then} · Free` } : { text: "ComfyUI isn't connected, so Start runs a free demo", other };
+ return engines.cloud && quote.cloud ? { text: `Start runs ${quote.cloud.name}${then} · ${quote.cloud.price}` } : { text: "No paid API is connected, so Start runs a free demo", other };
})();
const focusComposer = () => requestAnimationFrame(() => box.current?.focus());
@@ -242,7 +244,19 @@ export function HomeView({
</div>
</div>
</div>
- {runsFor && <p className="mt-2 text-[12px] text-muted-foreground">{runsFor}</p>}
+ {runsFor && (
+ <p className="mt-2 text-[12px] text-muted-foreground">
+ {runsFor.text}
+ {runsFor.other && (
+ <>
+ {" · "}
+ <button type="button" onClick={() => setEngine(runsFor.other!)} className="text-brand-text underline underline-offset-2 hover:no-underline">
+ {runsFor.other === "open" ? "Run it free on your GPU" : "Use your paid key"}
+ </button>
+ </>
+ )}
+ </p>
+ )}
{firstRun && status ? (
<GetStarted
className="mt-6 max-w-[960px]"