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
Runs: the owner's own jobs on the workers show their preview picture too
Adarsh31f53b647211
diff --git a/src/components/studio/feed.tsx b/src/components/studio/feed.tsxindex 1890627a..8acb3512 100644--- a/src/components/studio/feed.tsx+++ b/src/components/studio/feed.tsx@@ -85,8 +85,8 @@ export function PendingTile({ g, ratio }: { g: Generation; ratio: number }) {// The bar: the steps, or how much of the result has reached the studio.const bar = saving ? Math.round((local.job.phase === "done" ? 1 : (local.job.saved ?? 0)) * 100) : pct;const where = local ? (local.here ? "Keep this tab open" : "Running in another Fuobe tab") : null;- // A live frame: from the ComfyUI on this computer, or (Working on this studio's GPUs) the latest preview picture.- const frame = local?.preview ?? (pool && !inLine ? g.preview : undefined);+ // A live frame: from the ComfyUI on this computer, or (Working on the workers) the latest preview picture.+ const frame = local?.preview ?? (g.status === "running" ? g.preview : undefined);return (// max-w-full: in a grid row stretched by a taller neighbour (a card with a footer), h-full + aspect-ratio would// otherwise make the tile wider than its column and spill over the next card.diff --git a/tests/hosted-run-tiles.test.ts b/tests/hosted-run-tiles.test.tsindex fb9f74a9..04f721db 100644--- a/tests/hosted-run-tiles.test.ts+++ b/tests/hosted-run-tiles.test.ts@@ -67,6 +67,17 @@ describe("a run's tile on this studio's GPUs", () => {expect(html).toContain(">Working<");expect(html).toContain("40%");});+ it("working with a preview picture: the picture shows under Working; in line, none", () => {+ const src = "/api/generations/g1/preview?at=123";+ const working = render(createElement(PendingTile, { g: gen({ place: "pool", status: "running", message: POOL_WORDS.working, progress: 0.4, preview: src }), ratio: 1 }));+ expect(working).toContain(`src="${src}"`);+ expect(working).toContain(">Working<");+ const inLine = render(createElement(PendingTile, { g: gen({ place: "pool", status: "queued", message: POOL_WORDS.inLine, preview: src }), ratio: 1 }));+ expect(inLine).not.toContain("<img");+ // The owner's own job on the workers shows its picture too.+ const owner = render(createElement(PendingTile, { g: gen({ status: "running", message: "Generating", progress: 0.4, preview: src }), ratio: 1 }));+ expect(owner).toContain(`src="${src}"`);+ });it("a run that can't finish: one plain sentence, and Retry", () => {const html = render(createElement(FailedTile, { g: gen({ place: "pool", status: "failed", error: POOL_WORDS.failed, notCharged: true }), ratio: 1, onRetry: () => {} }));expect(html).toContain(POOL_WORDS.failed.replace("'", "'"));