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
Studios: Upscale's first steps, Kandinsky 6.0 Pro, H3 at 2K and the viewer's actions carry their setup label
Adarshcf27f7f60cda
diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsxindex 54f4b3ac..d6785076 100644--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@ -23,6 +23,7 @@ import { poolRunState, quoteBody, useHostedQuote, useSettled, type RunOn } fromimport { composerOnPool, composerPlace } from "@/lib/run-place";import { PoolNote } from "./pool-note";import { modelOwnSetup, poolRunsModel } from "@/lib/pool-rules";+import { controlSetup } from "@/lib/own-setup-controls";import { OwnSetupChip, useOwnSetupPress, useOwnSetupViewer } from "@/components/own-setup";import { HoldFilesCtx } from "@/lib/held-files";import { pendingStep } from "@/lib/guest-draft";@@ -1293,7 +1294,7 @@ export function Composer({ docked }: { docked: boolean }) {onStrength={(v) => setDraft({ presetStrength: v })}/>)}- {shownControls.length > 0 && <ControlsChip controls={shownControls} values={p.extra ?? {}} onChange={setExtra} title={config.controlsTitle} op={effectiveOp} />}+ {shownControls.length > 0 && <ControlsChip controls={shownControls} values={p.extra ?? {}} onChange={setExtra} title={config.controlsTitle} op={effectiveOp} setupOf={setupViewer ? (param, v) => controlSetup(model?.id, param, v) : undefined} />}{opts.lightSphere && <LightSphereChip value={draft.slots.image} onChange={setLight} />}{effectiveOp === "insert-moment" && <InsertRangeChip clip={facts?.duration} start={p.startTime} resume={p.endTime} onChange={setInsertRange} />}</>diff --git a/src/components/studio/model-controls.tsx b/src/components/studio/model-controls.tsxindex 3f8c2def..f7412bad 100644--- a/src/components/studio/model-controls.tsx+++ b/src/components/studio/model-controls.tsx@@ -6,6 +6,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@import type { ModelOptions } from "@/lib/catalog/types";import { controlsFor } from "@/lib/composer";import { Chip } from "./chip";+import { OwnSetupChip } from "@/components/own-setup";import { cn } from "@/lib/utils";const label = (v: string | number) =>@@ -37,6 +38,7 @@ export function ControlsChip({onChange,title: named,op,+ setupOf,}: {controls: NonNullable<ModelOptions["controls"]>;values: Record<string, unknown>;@@ -45,6 +47,8 @@ export function ControlsChip({title?: string;/** The run's operation: values offered on other operations only (Qwen-Image 2.1's Turbo speed: edits) are left out. */op?: string;+ /** A value that runs on the visitor's own setup only (an own-setup.ts id, Kandinsky 6.0's Pro): its label beside it. */+ setupOf?: (param: string, value: string | number) => string | undefined;}) {const controls = controlsFor(all, op);const title = named ?? (controls.length && controls.every((c) => c.param === "quality") ? "Quality" : "Director");@@ -76,6 +80,7 @@ export function ControlsChip({{c.values.map((v) => (<SelectItem key={String(v)} value={String(v)}>{c.labels?.[String(v)] ?? label(v)}+ <OwnSetupChip setup={setupOf?.(c.param, v)} className="ml-1" /></SelectItem>))}</SelectContent>diff --git a/src/components/studio/settings-panel.tsx b/src/components/studio/settings-panel.tsxindex 14a62946..f4804e9c 100644--- a/src/components/studio/settings-panel.tsx+++ b/src/components/studio/settings-panel.tsx@@ -7,6 +7,8 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/componentimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";import { Switch } from "@/components/ui/switch";import { useLikelyVisitor } from "@/lib/api";+import { OwnSetupChip } from "@/components/own-setup";+import { wantsH3TwoK } from "@/lib/catalog/regenerate";import { FORMAT_INFO } from "@/lib/av/formats";import { OPERATION_LABELS, type GenParams, type ModelDef, type Operation, type VideoFormat } from "@/lib/catalog/types";import { colormapLabel, durationLabel, formatOf, hiddenChanges, MATTE_OUTPUT_LABELS, settingsSummary, videoToolNote, type SettingsShape } from "@/lib/composer";@@ -283,6 +285,13 @@ function SettingsBody({ model, op, shape, params: p, setP, setExtra, negativeProvalue={p.resolution ?? d.resolution ?? shape.resolution[0]}onChange={(v) => setP({ resolution: v })}/>+ {/* MiniMax H3 (open) at 2K finishes with Open-H3 Regenerate: a visitor runs it on its own GPU (own-setup.ts). */}+ {visitor && model && shape.resolution.find((r) => wantsH3TwoK(model.id, r)) && (+ <p className="mt-1.5 flex flex-wrap items-center gap-1.5 text-[12px] text-muted-foreground">+ {shape.resolution.find((r) => wantsH3TwoK(model.id, r))}+ <OwnSetupChip setup="regenerate:h3-2k" />+ </p>+ )}</Section>)}{shape.fps && (diff --git a/src/components/studio/studio-page.tsx b/src/components/studio/studio-page.tsxindex b4b8a3ce..cfbc454d 100644--- a/src/components/studio/studio-page.tsx+++ b/src/components/studio/studio-page.tsx@@ -1,6 +1,7 @@"use client";import { ArrowRight, ArrowUp, Loader2, Upload, Zap } from "lucide-react";+import { OwnSetupChip } from "@/components/own-setup";import Link from "next/link";import dynamic from "next/dynamic";import { useSearchParams } from "next/navigation";@@ -490,10 +491,10 @@ function StudioBody({ header, tabs, examples }: { header?: React.ReactNode; tabsconst [engine, setEngine, engineMode] = useEngine();// The engine is the browser's own: a link that names its model (Lipsync → Kandinsky) waits for it, so the page hydrates as rendered.const hydrated = useHydrated();- // A GPU-only step isn't offered while the install runs paid APIs only. A guest or an account sees none: each step- // opens a tool that runs on a self-hosted Fuobe only.+ // A GPU-only step isn't offered while the install runs paid APIs only. A guest or an account sees the steps that run on+ // its own setup, each with its label (src/lib/own-setup.ts); a step whose tool runs on a self-hosted Fuobe only stays out.const visitor = useLikelyVisitor();- const firstSteps = visitor ? undefined : config.firstSteps?.filter((f) => !f.openOnly || engineMode !== "cloud");+ const firstSteps = config.firstSteps?.filter((f) => (!f.openOnly || engineMode !== "cloud") && (!visitor || !!f.ownSetup));const feed = useGenerations(config.feed);const bridge = useComposerBridge();const [dragging, setDragging] = useState(false);@@ -599,6 +600,7 @@ function StudioBody({ header, tabs, examples }: { header?: React.ReactNode; tabsclassName="inline-flex items-center gap-1 rounded-full bg-muted px-3 py-1 text-[12px] font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none">{f.label}+ {visitor && <OwnSetupChip setup={f.ownSetup} />}<ArrowRight className="size-3" /></Link><span id={`first-step-${f.id}`} className="text-[12px] text-pretty text-muted-foreground">diff --git a/src/components/studio/viewer.tsx b/src/components/studio/viewer.tsxindex 614db192..b5bb923b 100644--- a/src/components/studio/viewer.tsx+++ b/src/components/studio/viewer.tsx@@ -19,6 +19,7 @@ import { cn } from "@/lib/utils";import { copyWithToast } from "@/lib/clipboard";import { CompareSlider } from "./compare-slider";import { ACTION_ICONS, downloadUrl, SaveElementForm, useActionRunner } from "./result-actions";+import { OwnSetupChip } from "@/components/own-setup";import { LayersStack, ModelViewer, TextReader, VideoFileCard } from "./result-media";import { ReviewSelect } from "@/components/library/review";import { PlaceholderChip } from "@/components/demo-mode";@@ -253,6 +254,8 @@ export function Viewer({const icon = <Icon className={cn(a.id === "favorite" && g.favorite && "fill-current text-highlight")} />;const cls = cn(a.destructive && "text-destructive hover:text-destructive", opts.className);const variant = a.destructive ? "ghost" : (opts.variant ?? "secondary");+ // An action that runs on the visitor's own setup (src/lib/own-setup.ts) says what it needs beside its name.+ const setup = <OwnSetupChip setup={a.ownSetup} />;if (a.href && a.download !== undefined) {return (<Button key={a.id} asChild variant={variant} size="sm" className={cls}>@@ -267,6 +270,7 @@ export function Viewer({<Button key={a.id} asChild variant={variant} size="sm" className={cls}><Link href={a.href} prefetch={false}>{icon} {label}+ {setup}</Link></Button>);@@ -298,6 +302,7 @@ export function Viewer({}}>{icon} {label}+ {setup}</Button>);};diff --git a/src/lib/own-setup-controls.ts b/src/lib/own-setup-controls.tsnew file mode 100644index 00000000..fae926e4--- /dev/null+++ b/src/lib/own-setup-controls.ts@@ -0,0 +1,10 @@+/**+ * Model settings whose value runs on a visitor's own setup only, by the own-setup.ts id each value is asked by (the+ * server asks the same ids of a run: src/server/pool-own-setup.ts requestSetupIds). A picker shows that id's label+ * beside the value.+ */+export function controlSetup(modelId: string | undefined, param: string, value: string | number): string | undefined {+ // Kandinsky 6.0 (open) at Pro quality.+ if (modelId === "oss-kandinsky6" && param === "quality" && value === "pro") return "oss-kandinsky6:pro";+ return undefined;+}diff --git a/src/server/pool-own-setup.ts b/src/server/pool-own-setup.tsindex bf63f8b1..7ef266b0 100644--- a/src/server/pool-own-setup.ts+++ b/src/server/pool-own-setup.ts@@ -5,6 +5,7 @@ import { directRunFeatures } from "@/lib/catalog/genjutsu";import { ENHANCE_FEATURES, REGEN_MODEL, wantsH3TwoK } from "@/lib/catalog/regenerate";import { wantsVoiceFirst } from "@/lib/av/voice-first";import { ownSetupOnly, type OwnSetup } from "@/lib/own-setup";+import { controlSetup } from "@/lib/own-setup-controls";import { RTX_CLASSES, rtxCardOf } from "@/lib/catalog/rtx-video";import { gpuFits } from "@/lib/gpu/readiness";import { loadIndex } from "./gpu/index-file";@@ -28,7 +29,11 @@ export function requestSetupIds(req: Pick<GenerationRequest, "modelId" | "op" |const extra = req.params?.extra ?? {};if (wantsH3TwoK(req.modelId, req.params?.resolution)) ids.push("regenerate:h3-2k");if (req.modelId === REGEN_MODEL && req.feature && ENHANCE_FEATURES.has(req.feature)) ids.push("regenerate:enhance");- if (req.modelId === "oss-kandinsky6" && extra.quality === "pro") ids.push("oss-kandinsky6:pro");+ // A model setting whose value has an id of its own (Kandinsky 6.0 at Pro): the one table the pickers read too.+ for (const [param, v] of Object.entries(extra)) {+ const id = typeof v === "string" || typeof v === "number" ? controlSetup(req.modelId, param, v) : undefined;+ if (id) ids.push(id);+ }if (wantsVoiceFirst(req)) ids.push("sound:clean-voice-first");const genjutsu = extra.openjutsu;const features = directRunFeatures(req.modelId, genjutsu && typeof genjutsu === "object" ? (genjutsu as Record<string, unknown>) : {});diff --git a/tests/own-setup-labels.test.ts b/tests/own-setup-labels.test.tsindex 163987df..d620401e 100644--- a/tests/own-setup-labels.test.ts+++ b/tests/own-setup-labels.test.ts@@ -183,3 +183,16 @@ describe("the reason never appears in a visitor's words", () => {}});});++describe("beside a setting's value", () => {+ it("Kandinsky 6.0's Pro quality carries its label, and the server asks the run by the same id", async () => {+ const { controlSetup } = await import("@/lib/own-setup-controls");+ const { requestSetupIds } = await import("@/server/pool-own-setup");+ expect(controlSetup("oss-kandinsky6", "quality", "pro")).toBe("oss-kandinsky6:pro");+ expect(controlSetup("oss-kandinsky6", "quality", "lite")).toBeUndefined();+ expect(controlSetup("oss-minimax-h3", "quality", "pro")).toBeUndefined();+ expect(ownSetupLabel(ownSetupOnly("oss-kandinsky6:pro")!)).toBe("Runs on your own GPU · 80 GB");+ expect(requestSetupIds({ feature: "video", modelId: "oss-kandinsky6", op: "t2v", params: { extra: { quality: "pro" } } })).toContain("oss-kandinsky6:pro");+ expect(requestSetupIds({ feature: "video", modelId: "oss-kandinsky6", op: "t2v", params: { extra: { quality: "lite" } } })).not.toContain("oss-kandinsky6:pro");+ });+});