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
Upscale: plain Regenerate copy for visitors, the 16:9 / 9:16 line, and Describe the clip for me on a clip with no words
Claude5308d5160c7a
diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsxindex 394a15b1..9bc481e8 100644--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@ -96,6 +96,8 @@ import { MediaSlot, SlotPreview, type SlotValue } from "./media-slot";import { ControlsChip } from "./model-controls";import { ModelPicker } from "./model-picker";import { FinishChoices } from "./finish-choices";+import { waitForGeneration } from "@/components/genjutsu/hooks";+import { REGEN_DESCRIBE_MODEL, REGEN_MODEL, regenDescribeRequest, regenDescription } from "@/lib/catalog/regenerate";import { ELEMENT_ICONS, PromptInput, type PromptInputHandle } from "./prompt-input";import { radioKeys, radioTab } from "./radio-keys";import { SettingsChip } from "./settings-panel";@@ -298,6 +300,12 @@ export function Composer({ docked }: { docked: boolean }) {// travels with the request (params.sourceDuration), with its rate for a route billed by frames (params.sourceFps);// a clip swapped since a Reuse never keeps the old one's.const facts = useClipFacts(config.clipFacts && !typed.slots.video?.uploading ? typed.slots.video?.ref : undefined).data;+ // Regenerate · creative needs words: a clip with none (an upload) can have Fuobe's reading model on your GPU describe it,+ // into the prompt box to edit before the run. A second instance, so the composer's own Generate state isn't touched.+ const describeRun = useCreateGeneration();+ const [describing, setDescribing] = useState(false);+ const describeAlive = useRef<AbortController | null>(null);+ useEffect(() => () => describeAlive.current?.abort(), []);// Lipsync: a talking avatar is as long as its voice (the voice's header prices it and goes with the request); not while a// video is attached (lip re-sync keeps the clip's length).const voiceRef = config.voiceFacts && !typed.slots.video?.ref && !typed.slots.audio?.uploading ? typed.slots.audio?.ref : undefined;@@ -751,6 +759,29 @@ export function Composer({ docked }: { docked: boolean }) {}};+ const describeClip = async () => {+ const video = draft.slots.video?.ref;+ if (!video || describing) return;+ describeAlive.current?.abort();+ const ctl = new AbortController();+ describeAlive.current = ctl;+ setDescribing(true);+ try {+ const [read] = await describeRun.mutateAsync(regenDescribeRequest(video, facts?.duration));+ const done = await waitForGeneration(read.id, { signal: ctl.signal });+ const words = regenDescription(done.outputs.find((o) => o.kind === "text")?.text);+ if (ctl.signal.aborted) return;+ if (words) {+ setDraft((d) => (d.prompt.trim() ? {} : { prompt: words }));+ promptRef.current?.focus();+ } else toast("Couldn't put the clip into words", { description: "Describe it in a sentence or two: what is in it, how it moves, the light." });+ } catch (e) {+ if (!ctl.signal.aborted && !(e as { gpuSetup?: boolean }).gpuSetup) toastError(e);+ } finally {+ if (describeAlive.current === ctl) setDescribing(false);+ }+ };+// Paste images, clips or audio from the clipboard (text pastes as usual).const onPaste = (e: React.ClipboardEvent) => {const files = [...e.clipboardData.files].filter((f) => /^(image|video|audio)\//.test(f.type));@@ -1275,6 +1306,12 @@ export function Composer({ docked }: { docked: boolean }) {engineMode={engineMode}offered={(id) => (catalog.offered(id, "open") ? catalog.getModel(id) : undefined)}onPick={pickModel}+ onDescribe={+ model?.id === REGEN_MODEL && engine === "open" && draft.slots.video?.ref && !draft.slots.video.uploading && !draft.prompt.trim() && catalog.offered(REGEN_DESCRIBE_MODEL, "open")+ ? () => void describeClip()+ : undefined+ }+ describing={describing}/>)}diff --git a/src/components/studio/finish-choices.tsx b/src/components/studio/finish-choices.tsxindex a4f560a5..dbf5dca6 100644--- a/src/components/studio/finish-choices.tsx+++ b/src/components/studio/finish-choices.tsx@@ -1,8 +1,9 @@"use client";-import { Cpu } from "lucide-react";+import { Cpu, Loader2, Sparkles } from "lucide-react";import type { Engine, ModelDef } from "@/lib/catalog/types";import { REGEN_COPY, REGEN_MODEL, type FINISH_CHOICES } from "@/lib/catalog/regenerate";+import { useIsOwner } from "@/lib/api";import { cn } from "@/lib/utils";import { radioKeys, radioTab } from "./radio-keys";@@ -10,6 +11,8 @@ import { radioKeys, radioTab } from "./radio-keys";* Upscale → Video's two open finishing steps side by side (StudioConfig.finishChoices): SeedVR2 "Restore · faithful" and* Open-H3 "Regenerate · creative". On the cloud engine (both engines on) Regenerate says it runs on your GPU, with a* button that takes the composer there; with Engine mode "Paid APIs only" nothing shows. GPU-only: nobody hosts it.+ * With Regenerate picked: the GPU line (the install detail for the owner only), the 16:9 / 9:16 shape, and for a clip with+ * no words yet a button that has Fuobe's reading model describe it (`onDescribe`).*/export function FinishChoices({choices,@@ -18,6 +21,8 @@ export function FinishChoices({engineMode,offered,onPick,+ onDescribe,+ describing,}: {choices: typeof FINISH_CHOICES;model: ModelDef | undefined;@@ -26,7 +31,11 @@ export function FinishChoices({/** The choices Settings → Models & licences leaves on (and this catalog has). */offered: (id: string) => ModelDef | undefined;onPick: (m: ModelDef) => void;+ /** Writes the clip's words into the prompt box (shown while it has none). */+ onDescribe?: () => void;+ describing?: boolean;}) {+ const owner = useIsOwner();if (engineMode === "cloud") return null;const regen = offered(REGEN_MODEL);if (engine === "cloud") {@@ -74,7 +83,24 @@ export function FinishChoices({);})}</div>- {model?.id === REGEN_MODEL && <p className="mt-1.5 px-1 text-[11px] leading-snug text-pretty text-muted-foreground">Free on your GPU · {REGEN_COPY.gpu}</p>}+ {model?.id === REGEN_MODEL && (+ <>+ <p className="mt-1.5 px-1 text-[11px] leading-snug text-pretty text-muted-foreground">+ {owner ? `Free on your GPU · ${REGEN_COPY.gpu}` : REGEN_COPY.gpuVisitor} {REGEN_COPY.shape}+ </p>+ {(onDescribe || describing) && (+ <button+ type="button"+ onClick={onDescribe}+ disabled={describing}+ className="mt-1.5 inline-flex h-7 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium text-foreground transition-colors outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 disabled:opacity-70"+ >+ {describing ? <Loader2 className="size-3.5 animate-spin" aria-hidden /> : <Sparkles className="size-3.5" aria-hidden />}+ {describing ? "Watching the clip…" : "Describe the clip for me"}+ </button>+ )}+ </>+ )}</div>);}diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 47ffae85..8c4c7fe6 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -780,7 +780,7 @@ const open: ModelDef[] = [kind: "video",tagline: "Redraws a soft clip at 1080p, 2K or 4K. Details may change; motion and layout stay.",badges: ["new", "4k", "audio"],- routes: [comfy("upscale-video", REGEN_WORKFLOW, "MiniMax H3 with NVIDIA's refiner LoRA: 3 steps from the clip at 24 fps, up to 15 s a pass, its sound kept")],+ routes: [comfy("upscale-video", REGEN_WORKFLOW, "Built on MiniMax H3: redraws the clip at 24 fps, up to 15 s a pass, keeping its sound")],options: {seed: true,resolutions: [...REGEN_TIERS],