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
Apps run without a note on both engines; 3D cards show their turntable
Clauded66b9f8480de
diff --git a/src/components/model3d/model3d-studio.tsx b/src/components/model3d/model3d-studio.tsxindex f900f684..4f98f23a 100644--- a/src/components/model3d/model3d-studio.tsx+++ b/src/components/model3d/model3d-studio.tsx@@ -116,7 +116,12 @@ function ModelCard({ g }: { g: Generation }) {live = false;};}, []);- useEffect(() => () => void (recorded && URL.revokeObjectURL(recorded.url)), [recorded]);+ // The recorded clip's blob URL lives until another recording replaces it (saving it doesn't change it).+ const recordedUrl = recorded?.url;+ useEffect(() => () => void (recordedUrl && URL.revokeObjectURL(recordedUrl)), [recordedUrl]);+ // The turntable that came with the model (TRELLIS.2, demo) or the one recorded here, shown in place of the 3D view.+ const clip = view.turntable ?? recordedUrl;+ const [show, setShow] = useState<"3d" | "video">("3d");const record = async () => {if (!viewer) return;setRecording(0);@@ -139,7 +144,9 @@ function ModelCard({ g }: { g: Generation }) {return (<article className="overflow-hidden rounded-2xl border bg-background shadow-soft"><div className="relative aspect-[4/3] bg-[radial-gradient(circle_at_50%_40%,var(--muted),var(--background))]">- {failed ? (+ {show === "video" && clip ? (+ <video src={clip} controls loop muted playsInline autoPlay preload="metadata" aria-label={`Turntable of the ${g.modelName ?? "3D"} model`} className="size-full bg-media object-contain" />+ ) : failed ? (<div className="grid size-full place-items-center p-6 text-center text-[13px] text-muted-foreground">Couldn't load the 3D viewer — download the .glb to open it.</div>) : !ready || !view.glb ? (<div className="grid size-full place-items-center text-muted-foreground">@@ -166,6 +173,22 @@ function ModelCard({ g }: { g: Generation }) {</div>)}{g.provider === "mock" && <span className="absolute top-3 left-3 rounded-full bg-highlight/40 px-2 py-0.5 text-[11px] font-medium">Demo</span>}+ {clip && recording === null && (+ <div role="radiogroup" aria-label="Show" className="absolute top-3 right-3 inline-flex rounded-full bg-background/85 p-0.5 shadow-soft backdrop-blur">+ {(["3d", "video"] as const).map((v) => (+ <button+ key={v}+ type="button"+ role="radio"+ aria-checked={show === v}+ onClick={() => setShow(v)}+ className={cn("h-6 rounded-full px-2.5 text-[11px] font-medium transition", show === v ? "bg-foreground text-background" : "text-muted-foreground hover:text-foreground")}+ >+ {v === "3d" ? "3D" : "Turntable"}+ </button>+ ))}+ </div>+ )}</div><div className="space-y-2 p-3"><p className="truncate text-[13px] text-muted-foreground">{g.modelName}</p>@@ -187,15 +210,9 @@ function ModelCard({ g }: { g: Generation }) {</a></Button>))}- {view.turntable ? (- <Button asChild variant="outline" size="sm" className="rounded-full">- <a href={view.turntable} download={`${name} turntable.mp4`}>- <Video className="size-3.5" /> Turntable- </a>- </Button>- ) : recorded ? (+ {clip ? (<Button asChild variant="outline" size="sm" className="rounded-full">- <a href={recorded.url} download={`${name} turntable.webm`}>+ <a href={clip} download={`${name} turntable.${view.turntable ? "mp4" : "webm"}`} aria-label="Download the turntable video"><Video className="size-3.5" /> Turntable</a></Button>@@ -212,7 +229,6 @@ function ModelCard({ g }: { g: Generation }) {</Button>)}</div>- {view.turntable && <video src={view.turntable} muted loop playsInline autoPlay className="hidden" aria-hidden />}</div></article>);diff --git a/src/lib/av/katana.ts b/src/lib/av/katana.tsindex a67bf658..e12e7602 100644--- a/src/lib/av/katana.ts+++ b/src/lib/av/katana.ts@@ -24,6 +24,10 @@ export interface MotionModel {maxRefs: number;}+/**+ * Gemini Omni Flash's edit endpoint is left out on purpose: it takes the clip and a text instruction only+ * (no reference images), so it can't put the subject from your photos into the segment.+ */export const MOTION_MODELS: Record<Engine, MotionModel[]> = {cloud: [{ id: "kling-o3", label: "Kling O3 edit", op: "v2v", min: 3, max: 10, maxRefs: 4 },diff --git a/src/lib/catalog/apps.ts b/src/lib/catalog/apps.tsindex bcb7c6e9..b67cfe1c 100644--- a/src/lib/catalog/apps.ts+++ b/src/lib/catalog/apps.ts@@ -283,7 +283,9 @@ export const APPS: Preset[] = [userPrompt: "optional",placeholder: "Anything to keep in mind (optional)",prompt: "Show the exact same scene and subject as a {option:angle}, {option:height}, {option:distance}, as if the camera physically moved. Keep identity, outfit, props, lighting and environment consistent. {prompt}",- cloud: { modelId: "qwen-multiple-angles", op: "edit", promptTemplate: "{prompt}" },+ // fal builds the camera words from the sliders; this goes in as its additional_prompt (never empty, so the+ // app runs without a note).+ cloud: { modelId: "qwen-multiple-angles", op: "edit", promptTemplate: "Keep the same subject, identity, outfit, lighting and environment. {prompt}" },open: {modelId: "oss-qwen-edit",op: "edit",@@ -503,7 +505,8 @@ export const APPS: Preset[] = [icon: "Aperture",hue: 30,badges: ["new"],- inputs: [product, { key: "image2", label: "Scene reference", hint: "Optional: a photo of the setting you want", accept: "image", required: false }],+ // Described scenes only: Bria takes a scene description or a reference photo, never both.+ inputs: [product],options: [opt("scene", "Scene", [["Marble counter", "on a white marble kitchen counter, soft morning window light"],@@ -519,7 +522,7 @@ export const APPS: Preset[] = [prompt: "The product {option:scene}. {prompt}",cloud: { modelId: "bria-product-shot", op: "edit" },open: { modelId: "oss-product-shot", op: "edit" },- parity: "The open version cuts the product out, puts it on white and relights it into the scene with Qwen-Image-Edit 2509 + the White_to_Scene LoRA; the scene reference photo is used on the cloud only",+ parity: "The open version cuts the product out, puts it on white and relights it into the scene with Qwen-Image-Edit 2509 + the White_to_Scene LoRA",}),app({name: "Product Placement",diff --git a/tests/av-tools.test.ts b/tests/av-tools.test.tsindex d40d5f60..66c12e27 100644--- a/tests/av-tools.test.ts+++ b/tests/av-tools.test.ts@@ -1,6 +1,7 @@import { describe, expect, it } from "vitest";import { buildPayload, extractOutputs } from "@/lib/catalog/payload";-import { getModel } from "@/lib/catalog";+import { getModel, getPreset } from "@/lib/catalog";+import { planGeneration } from "@/lib/catalog/plan";import { burnRequest, burnRouteFor, CAPTION_STYLES, nearestColorName, OPEN_FONT_SIZE, previewText, styleById, usesCues, type CaptionLook } from "@/lib/av/captions";import { animateSpinHref, model3dRequest, model3dView, MODELS_3D } from "@/lib/av/model3d";import { frameParams, frameRequest } from "@/lib/av/frames";@@ -125,3 +126,43 @@ describe("extract frame on both engines", () => {expect(getModel("oss-extract-frame")?.routes[0]).toMatchObject({ provider: "comfyui", endpoint: "frame-extract", op: "frame" });});});++describe("apps on the new models", () => {+ // Every app this package routes runs with only its inputs on both engines: no note needed, the pinned model, its settings.+ const ids = ["app-virtual-try-on", "app-angles", "app-product-shot", "app-image-to-3d", "app-hook-frame"];+ const plan = (id: string, engine: "cloud" | "open", presetOptions?: Record<string, string>) => {+ const preset = getPreset(id)!;+ const route = engine === "cloud" ? preset.cloud! : preset.open!;+ const images = (preset.inputs ?? []).filter((s) => s.accept === "image").map((_, i) => `/api/files/in${i}.png`);+ return planGeneration({ feature: `app:${id}`, presetId: id, modelId: route.modelId, inputs: { images }, presetOptions }, getModel, getPreset);+ };++ it.each(ids.flatMap((id) => [[id, "cloud"] as const, [id, "open"] as const]))("%s plans on %s without a prompt", (id, engine) => {+ expect(() => plan(id, engine)).not.toThrow();+ });++ it("pins the dedicated models", () => {+ expect(plan("app-virtual-try-on", "cloud").model.id).toBe("fashn-tryon");+ expect(plan("app-virtual-try-on", "open").model.id).toBe("oss-tryon-klein");+ expect(plan("app-product-shot", "cloud").model.id).toBe("bria-product-shot");+ expect(plan("app-product-shot", "open").model.id).toBe("oss-product-shot");+ expect(plan("app-image-to-3d", "cloud").model.id).toBe("hunyuan-3d-3-1-pro");+ expect(plan("app-image-to-3d", "open").model.id).toBe("oss-trellis2");+ });++ it("Angles: the choices set the camera sliders on the cloud and the LoRA's words on the open engine", () => {+ const choice = { angle: "back-left", height: "high-angle", distance: "close-up" };+ const cloud = plan("app-angles", "cloud", choice);+ expect(cloud.model.id).toBe("qwen-multiple-angles");+ expect(cloud.params.extra).toMatchObject({ horizontal_angle: 225, vertical_angle: 60, zoom: 10 });+ expect(cloud.prompt.length).toBeGreaterThan(0);+ const open = plan("app-angles", "open", choice);+ expect(open.prompt).toMatch(/^<sks> back-left quarter view high-angle shot close-up/);+ expect(open.loras[0]?.file).toMatch(/multiple-angles/);+ });++ it("Product Shot sends a scene description only (Bria takes a description or a reference photo, never both)", () => {+ expect(plan("app-product-shot", "cloud", { scene: "beach" }).prompt).toMatch(/^The product on warm sand at the beach/);+ expect(getPreset("app-product-shot")!.inputs!.some((s) => s.key === "image2")).toBe(false);+ });+});