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
Cinema Studio: a 3D scene's depth map is never the project's cover
Clauded16ba2b792b2
diff --git a/src/components/cinema/cinema-feed.tsx b/src/components/cinema/cinema-feed.tsxindex 2cb20dc4..6d11b3a0 100644--- a/src/components/cinema/cinema-feed.tsx+++ b/src/components/cinema/cinema-feed.tsx@@ -567,7 +567,8 @@ export function CinemaFeed({const filtered = useMemo(() => {const age = { today: 86_400_000, "7d": 7 * 86_400_000, "30d": 30 * 86_400_000 } as const;return items.filter((g) => {- if (prefs.type !== "all" && !(g.outputs.some((o) => o.kind === prefs.type) || (g.status !== "succeeded" && g.kind === prefs.type))) return false;+ // A 3D scene is neither an image nor a video (its depth map is an image output): it shows under All types.+ if (prefs.type !== "all" && (g.feature === "cinema-scene" || !(g.outputs.some((o) => o.kind === prefs.type) || (g.status !== "succeeded" && g.kind === prefs.type)))) return false;if (prefs.date === "today" && dayLabel(g.createdAt) !== "Today") return false;if (prefs.date !== "all" && prefs.date !== "today" && now - g.createdAt > age[prefs.date]) return false;if (prefs.status === "liked" && !g.favorite) return false;diff --git a/src/server/cinema.ts b/src/server/cinema.tsindex 66c2bf99..00657c24 100644--- a/src/server/cinema.ts+++ b/src/server/cinema.ts@@ -160,7 +160,10 @@ export function spentUsd(projectId: string): number {return round3(r.s);}-/** Newest finished image (or video) of a project: the card cover when none was picked. One query. */+/**+ * Newest finished image (or video) of a project: the card cover when none was picked. One query. A 3D scene's+ * depth map is an image output too, but not a picture of the project: it is skipped.+ */function autoCover(projectId: string): string | null {const rows = db().prepare(@@ -170,8 +173,8 @@ function autoCover(projectId: string): string | null {.all(projectId) as { outputs_json: string }[];let video: string | null = null;for (const r of rows) {- const outs = parse<{ url: string; kind: string }[]>(r.outputs_json, []);- const img = outs.find((o) => o.kind === "image");+ const outs = parse<{ url: string; kind: string; meta?: { role?: unknown } }[]>(r.outputs_json, []);+ const img = outs.find((o) => o.kind === "image" && o.meta?.role !== "depth");if (img) return img.url;video ??= outs.find((o) => o.kind === "video")?.url ?? null;}diff --git a/tests/cinema-scene.test.ts b/tests/cinema-scene.test.tsindex e50f0119..8fdcac56 100644--- a/tests/cinema-scene.test.ts+++ b/tests/cinema-scene.test.ts@@ -151,6 +151,19 @@ describe("Cinema API: scene and recomposition in demo mode", () => {]);}, 60_000);+ it("keeps the still as the project's cover, not the scene's depth map", async () => {+ const p = cinema.createProject({ name: "Cover" });+ const made = generateInProject(p.id, { ...base, engine: "cloud", mode: "image", action: "generate", prompt: "A lighthouse at dusk", settings: { camera: "modern", lens: "clean-sharp", focal: "24mm" } }, null);+ const still = await settle(made.items[0].id);+ const cover = () => cinema.listProjects().find((x) => x.id === p.id)!.stats!.cover;+ expect(cover()).toBe(still.outputs[0].url);+ for (const engine of ["cloud", "open"] as const) {+ const s = generateInProject(p.id, { ...base, engine, action: "scene", source: { url: still.outputs[0].url, kind: "image" } }, null);+ expect((await settle(s.items[0].id)).status).toBe("succeeded");+ expect(cover()).toBe(still.outputs[0].url);+ }+ }, 60_000);+it("re-renders a capture into a new take that remembers the camera", async () => {const p = cinema.createProject({ name: "Recompose" });const still = upload("still.png");