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
Video upscale: passes shown as steps, and ESRGAN twice as fast
Adarsh6707d2ec69df
diff --git a/scripts/comfy/hand-built/upscale-video-esrgan-chunked.json b/scripts/comfy/hand-built/upscale-video-esrgan-chunked.jsonindex c8ea25ef..d4a744d4 100644--- a/scripts/comfy/hand-built/upscale-video-esrgan-chunked.json+++ b/scripts/comfy/hand-built/upscale-video-esrgan-chunked.json@@ -37,19 +37,21 @@}},"4": {- "class_type": "ImageUpscaleWithModel",+ "class_type": "ImageUpscaleWithModelBatched","inputs": {"upscale_model": ["3",0],- "image": [+ "images": ["1",0- ]+ ],+ "per_batch": 1,+ "precision": "float16"},"_meta": {- "title": "Upscale this pass's frames (tiled)"+ "title": "Upscale this pass's frames (whole frames in fp16; the provider swaps in the tiled core node when the GPU is small)"}},"5": {diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjsindex 7783a1ac..dc529e88 100644--- a/scripts/comfy/library.spec.mjs+++ b/scripts/comfy/library.spec.mjs@@ -347,7 +347,7 @@ export const PACK_CLASSES = {'ComfyUI-H3-FaceRefine': /^H3Face(TrackCrop|MaskSAM|Stitch)$/,'ComfyUI-Impact-Pack': /^SAMLoader$/,comfyui_controlnet_aux: /^Metric3D-NormalMapPreprocessor$/,- 'ComfyUI-KJNodes': /^VRAM_Debug$/,+ 'ComfyUI-KJNodes': /^(VRAM_Debug|ImageUpscaleWithModelBatched)$/,'ComfyUI-Qwen-Watermark': /^QWM(Detect|ResidualDetect|RefineMask|Prepare|Composite|Final)$/,};@@ -5990,6 +5990,7 @@ export const SPEC = [title: 'Video Upscale (Real-ESRGAN 4x) in passes of a few frames: memory stays flat whatever the length (VHS meta-batch)',capability: 'upscale-video',handBuilt: 'hand-built/upscale-video-esrgan-chunked.json',+ packs: ['ComfyUI-KJNodes'],bindings: {video: [b('1', 'video')], framesPerBatch: [b('2', 'frames_per_batch')], upscaleModel: [b('3', 'model_name')], shortSide: [b('5', 'resize_type.shorter_size')],},@@ -6000,7 +6001,7 @@ export const SPEC = [license: 'Real-ESRGAN weights (BSD-3-Clause); VideoHelperSuite GPL-3.0 code',notes:'R4-38: upscale-video-esrgan decodes the whole film (about 38 GB of float frames for 30 s at 480p before the 4x model). This one decodes framesPerBatch frames per pass (VHS_BatchManager re-queues the prompt ' +- 'until the clip is done, as mixed-media-zimage-frames does), upscales them with the model (tiled), scales them so the shorter edge is shortSide px (params.resolution: 1080p -> 1080, the shape kept) and pipes them ' ++ 'until the clip is done, as mixed-media-zimage-frames does), upscales them with the model (whole frames in fp16 through KJNodes\x27 ImageUpscaleWithModelBatched, about twice as fast as the core node; the provider swaps in the core node\x27s fp32 tiles when the GPU has no room for whole frames or its memory is unknown), scales them so the shorter edge is shortSide px (params.resolution: 1080p -> 1080, the shape kept) and pipes them ' +'into one ffmpeg H.264 encode that stays open across passes; the last pass writes the file with the source\'s sound at the source frame rate. The provider follows the passes by their filename prefix. ' +'framesPerBatch: the provider sizes it from the clip\'s header so a pass holds about 1.5 GB of frames (16 by default). Any spandrel model in models/upscale_models works as upscaleModel (x2 / x4). ' +'Tested on CPU with an x4 ESRGAN network: 30 s 256x144 25 fps with sound -> 1920x1080, 750 frames, AAC, 47 passes of 16 frames in 417 s, ComfyUI\'s RSS peaked 0.87 GB above idle (upscale-video-esrgan on 10 s of the same clip, 4x to 1024x576 only, peaked 3.0 GB above idle); through Fuobe a silent 2 s 24 fps clip -> 1280x720, 48 frames, no audio link.',diff --git a/src/lib/av/video-finish.ts b/src/lib/av/video-finish.tsindex eec20d25..84127d60 100644--- a/src/lib/av/video-finish.ts+++ b/src/lib/av/video-finish.ts@@ -81,6 +81,23 @@ export function framesPerPass(clip: ClipFacts, o: { shortSide?: number; modelScareturn n;}+/**+ * ESRGAN video upscale's fast node (KJNodes' ImageUpscaleWithModelBatched): whole frames in fp16, one at a time, about+ * twice as fast as the core node's tiles in fp32. Its graphics memory for each megapixel of the source (Real-ESRGAN x4plus:+ * a 1344x768 frame took about 6.3 GB on the worker's RTX 5090).+ */+export const ESRGAN_WHOLE_FRAME_BYTES_PER_MP = 6.5 * 2 ** 30;++/**+ * Whether ESRGAN may upscale whole frames on this card: their memory at most 60 % of the card's (the rest stays for+ * ComfyUI and whatever else the card holds). Without the clip's size or the card's memory: no (the tiled core node,+ * which fits any card).+ */+export function esrganWholeFrames(clip: ClipFacts, vramBytes: number | undefined): boolean {+ if (!clip.width || !clip.height || !vramBytes || vramBytes <= 0) return false;+ return ((clip.width * clip.height) / 1e6) * ESRGAN_WHOLE_FRAME_BYTES_PER_MP <= 0.6 * vramBytes;+}+/** The workflow of RTX Video Super Resolution (Upscale → Video's Quick · RTX). */export const RTX_UPSCALE_WORKFLOW = "upscale-video-rtx";diff --git a/src/lib/comfy-compose.ts b/src/lib/comfy-compose.tsindex d82304d8..d2fb79df 100644--- a/src/lib/comfy-compose.ts+++ b/src/lib/comfy-compose.ts@@ -82,7 +82,7 @@ import { expandInbetweenWorkflow, type InbetweenPass } from "@/lib/av/inbetween-import { gapPrompt, requestTiming, type InbetweenTiming } from "@/lib/inbetween";import { expandTimelineWorkflow, readTimeline } from "@/lib/av/timeline";import { expandWorldWorkflow, readWorld, WorldGraphError, worldProblem, type WorldScript } from "@/lib/world";-import { exportValues, framesPerPass, hdrColorSpace, RTX_UPSCALE_WORKFLOW, rtxScale, upscaleShortSide, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";+import { esrganWholeFrames, exportValues, framesPerPass, hdrColorSpace, RTX_UPSCALE_WORKFLOW, rtxScale, upscaleShortSide, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";import { keyFormatValues } from "@/lib/av/keying";import { factorTier } from "@/lib/av/upscale";import { CHARACTER_SWAP, packResolution, samCoords, swapPrompt, SWAP_LORAS, windowPlan } from "@/lib/catalog/character-swap";@@ -1312,6 +1312,12 @@ export async function composeWorkflow(endpointTemplate: string, input: GenInput,const id = Object.keys(wf).find((k) => wf[k].class_type === "FrameInterpolate" || wf[k].class_type === "RTXVideoFrameGeneration");if (id) wf = bypassNode(wf, id, "images", outputIds);}+ // ESRGAN video upscale: whole frames in fp16 on a card with room for them, else the core node's tiles (any card).+ const wholeFrames = Object.keys(wf).find((k) => wf[k].class_type === "ImageUpscaleWithModelBatched");+ if (wholeFrames && !esrganWholeFrames(clipFacts(clip), await ctx.vram?.().catch(() => undefined))) {+ const n = wf[wholeFrames];+ wf = { ...wf, [wholeFrames]: { ...n, class_type: "ImageUpscaleWithModel", inputs: { upscale_model: n.inputs.upscale_model, image: n.inputs.images } } };+ }if (surroundSource(sourceChannels)) wf = dbsSurroundBed(wf);// Zen Image Edit's loader (Qwen-Image 2.1 on a small GPU) reads paths, not names: the adapter where the server keeps it// in models/text_encoders, and Qwen3.5-0.8B's pinned folder there when it has one (else the loader fetches it by id).diff --git a/src/lib/computer-runner.ts b/src/lib/computer-runner.tsindex 977a1939..6d62f150 100644--- a/src/lib/computer-runner.ts+++ b/src/lib/computer-runner.ts@@ -321,6 +321,39 @@ const retryAfter = (res: Response) => Math.min(30, Math.max(1, Number(res.headerconst hasPrefix = (prompt: unknown, prefix: string) =>!!prompt && typeof prompt === "object" && Object.values(prompt as Record<string, { inputs?: Record<string, unknown> }>).some((n) => n?.inputs?.filename_prefix === prefix);+type GraphLike = Record<string, { class_type?: unknown; inputs?: Record<string, unknown> } | undefined>;++/**+ * A meta-batch graph's passes: its VHS_BatchManager (`node`), the frames each pass takes, and the loader that reads the+ * clip pass by pass (its progress counts the clip's frames, `max` = all of them). Null for any other graph.+ */+export function batchPlan(graph: unknown): { node: string; perPass: number; loader: string } | null {+ const g = graph && typeof graph === "object" ? (graph as GraphLike) : {};+ for (const [id, n] of Object.entries(g)) {+ if (n?.class_type !== "VHS_BatchManager") continue;+ const perPass = Number(n.inputs?.frames_per_batch);+ if (!Number.isFinite(perPass) || perPass < 1) continue;+ const loader = Object.entries(g).find(([, m]) => {+ const link = m?.inputs?.meta_batch;+ return typeof m?.class_type === "string" && /^VHS_Load/.test(m.class_type) && Array.isArray(link) && link[0] === id;+ });+ if (loader) return { node: id, perPass: Math.floor(perPass), loader: loader[0] };+ }+ return null;+}++/**+ * A meta-batch job's progress as passes: `done` passes of all it takes (the clip's `frames` ÷ the frames a pass takes),+ * in the shape of a sampler's steps, so the run's card reads "Step 3 of 21" and fills by pass. Without the frame count+ * yet (its loader hasn't reported), only the node: the run shows it is working.+ */+export function passProgress(plan: { node: string; perPass: number }, frames: number | undefined, done: number): { value?: number; max?: number; node: string; nodesDone: number } {+ // One node "done" for every report: the passes are one stage of the run, never a node after another.+ if (!frames || !Number.isFinite(frames) || frames <= 0) return { node: plan.node, nodesDone: 1 };+ const max = Math.max(1, Math.ceil(Math.round(frames) / plan.perPass));+ return { value: Math.max(0, Math.min(done, max)), max, node: plan.node, nodesDone: 1 };+}+/** Every string inside a value with its absolute paths as base names (engine-error.ts). */function pathsOut<T>(v: T, depth = 0): T {if (typeof v === "string") return withoutLocalPaths(v) as T;@@ -352,7 +385,9 @@ export class ComputerRunner {private stopping = new Set<string>();private ws: SocketLike | null = null;private wsOpen = false;- private events = new Map<string, { value?: number; max?: number; node?: string; nodesDone: number; done?: boolean }>();+ private events = new Map<string, { value?: number; max?: number; node?: string; nodesDone: number; done?: boolean; maxes?: Record<string, number> }>();+ /** A meta-batch job's progress as passes (passProgress), by task: what its reports and beats send instead of a pass's own steps. */+ private batchShown = new Map<string, ReturnType<typeof passProgress>>();/** Each prompt's node times from the socket (a worker sends them with its "finished" report); the latest few. */private clocks = new Map<string, NodeClock>();private factsSentAt = 0;@@ -500,7 +535,11 @@ export class ComputerRunner {const e = parseComfyText(m.data);if (!e || !("promptId" in e) || !e.promptId) return;const cur = this.events.get(e.promptId) ?? { nodesDone: 0 };- if (e.type === "progress") Object.assign(cur, { value: e.value, max: e.max, node: e.node });+ if (e.type === "progress") {+ Object.assign(cur, { value: e.value, max: e.max, node: e.node });+ // Each node's step count (a meta-batch loader's is the clip's frames: passProgress).+ if (e.node && typeof e.max === "number") cur.maxes = { ...cur.maxes, [e.node]: e.max };+ }else if (e.type === "executing" && e.node) Object.assign(cur, { node: e.node, nodesDone: cur.nodesDone + 1, value: undefined, max: undefined });else if (e.type === "success" || e.type === "error" || e.type === "interrupted" || (e.type === "executing" && !e.node)) cur.done = true;this.events.set(e.promptId, cur);@@ -626,7 +665,8 @@ export class ComputerRunner {const running = this.view.jobs.filter((j) => j.phase !== "done" && j.phase !== "failed").map((j) => {- const ev = this.events.get(this.promptOf.get(j.taskId) ?? "");+ // A meta-batch job: its passes (passProgress), never its first pass's own steps.+ const ev = this.batchShown.get(j.taskId) ?? this.events.get(this.promptOf.get(j.taskId) ?? "");return { task: j.taskId, ...(j.position !== undefined && { position: j.position }), ...(j.phase === "running" && ev && { value: ev.value, max: ev.max, nodesDone: ev.nodesDone }) };});const stopped = [...this.stoppedDone];@@ -763,6 +803,7 @@ export class ComputerRunner {} finally {this.madeOf.delete(t.id);this.finishMade.delete(t.id);+ this.batchShown.delete(t.id);const why = this.whyOf.get(t.id);this.whyOf.delete(t.id);const phase = this.view.jobs.find((j) => j.taskId === t.id)?.phase;@@ -1219,6 +1260,25 @@ export class ComputerRunner {let lastPreview: Blob | undefined;let lastPreviewAt = -Infinity;let following: string | undefined;+ // A meta-batch job shows its passes as its steps (passProgress): the prompts its passes ran under, and how many ended.+ const batch = t.metaBatch ? batchPlan(t.graph) : null;+ const passIds = new Set<string>([t.promptId]);+ let passesDone = 0;+ let passKey = "";+ const frames = () => {+ for (const id of passIds) {+ const m = batch && this.events.get(id)?.maxes?.[batch.loader];+ if (m) return m;+ }+ return undefined;+ };+ const batchNow = (done: number) => {+ const p = passProgress(batch!, frames(), done);+ this.batchShown.set(t.id, p);+ return p;+ };+ // From the start, its beats carry its passes too, never its first pass's own steps.+ if (batch) batchNow(0);// A worker's watchdog: when the job last moved (a step, a node, its place, a pass).let movedAt = this.now();let moveKey = "";@@ -1265,10 +1325,27 @@ export class ComputerRunner {moved(JSON.stringify([queued.map((r) => r[1]), passes.length, ev?.value, ev?.node, ev?.nodesDone]));if (!running && worker) await this.keep(t, { kind: "passes", entries: passes, execMs: execOf(passes) });const passWhy = running ? null : entryReason(passes, { graph: t.graph });- const a = await this.report(t, { event: "passes", running, entries: running ? [] : passes.map(slim), ...(!running && exec(execOf(passes))), ...(passWhy && { why: passWhy }) });+ let shown: ReturnType<typeof passProgress> | null = null;+ if (running && batch) {+ for (const r of queued) passIds.add(String(r[1]));+ // A pass started or ended: count the ended ones again (its ComfyUI's history keeps every pass of the job).+ const key = JSON.stringify(queued.map((r) => r[1]));+ if (key !== passKey) {+ passKey = key;+ const h = await this.read<Record<string, HistoryEntryLike>>(`/history?max_items=${META_BATCH_HISTORY}`).catch(() => null);+ if (h) passesDone = Object.values(h).filter((e) => hasPrefix(e.prompt?.[2], following!) && e.status?.completed).length;+ }+ shown = batchNow(passesDone);+ }+ // While a pass runs, a meta-batch job with a pass plan reports its passes as its progress (a "running" report,+ // which any studio takes); without one, only that a pass still runs.+ const a = await this.report(+ t,+ shown ? { event: "running", ...shown } : { event: "passes", running, entries: running ? [] : passes.map(slim), ...(!running && exec(execOf(passes))), ...(passWhy && { why: passWhy }) },+ );if (a.stop) throw new Stopped();if (!running) return { entries: passes, answer: a };- this.job(t, { phase: "running" });+ this.job(t, { phase: "running", ...(shown?.max && { value: shown.value, max: shown.max }) });await this.sleep(POLL_MS * 2);continue;}@@ -1305,7 +1382,10 @@ export class ComputerRunner {if (w.s === "running") runningSince ??= this.now();const ev = this.events.get(t.promptId);moved(JSON.stringify([w.s, w.s === "pending" ? w.ahead : null, ev?.value, ev?.max, ev?.node, ev?.nodesDone]));- const report: ReportEvent = w.s === "pending" ? { event: "queued", position: w.ahead } : { event: "running", value: ev?.value, max: ev?.max, node: ev?.node, nodesDone: ev?.nodesDone };+ // A meta-batch job's first pass: no pass has ended yet (its own steps would read as most of the run).+ const first = batch && w.s === "running" ? batchNow(0) : null;+ const report: ReportEvent =+ w.s === "pending" ? { event: "queued", position: w.ahead } : first ? { event: "running", ...first } : { event: "running", value: ev?.value, max: ev?.max, node: ev?.node, nodesDone: ev?.nodesDone };const key = JSON.stringify(report);// A worker sends its ComfyUI's latest preview with its progress, when the claim asks for one: a small JPEG, at most// one every 2 s.@@ -1321,7 +1401,7 @@ export class ComputerRunner {lastSent = this.now();if (preview) lastPreviewAt = this.now();}- this.job(t, w.s === "pending" ? { phase: "queued", position: w.ahead } : { phase: "running", value: ev?.value, max: ev?.max });+ this.job(t, w.s === "pending" ? { phase: "queued", position: w.ahead } : first ? { phase: "running", value: first.value, max: first.max } : { phase: "running", value: ev?.value, max: ev?.max });// The socket says when steps move; without it, a read a second.await this.sleep(this.wsOpen ? PROGRESS_EVERY_MS : POLL_MS);}diff --git a/tests/computer-relay.test.ts b/tests/computer-relay.test.tsindex a63b4bae..9cb9916c 100644--- a/tests/computer-relay.test.ts+++ b/tests/computer-relay.test.ts@@ -56,7 +56,7 @@ afterAll(async () => {});beforeEach(() => {resetRates();- Object.assign(fake.opts, { failNext: undefined, outputs: ["image"], metaBatch: undefined, steps: 3, stepMs: 10 });+ Object.assign(fake.opts, { failNext: undefined, outputs: ["image"], metaBatch: undefined, metaFrames: undefined, steps: 3, stepMs: 10 });db().prepare("UPDATE generations SET status = 'canceled' WHERE status IN ('queued', 'running')").run();db().prepare("DELETE FROM relay_runners").run();});@@ -566,4 +566,40 @@ describe("a run on the ComfyUI on the person's own computer", () => {expect(fake.posts() - posts).toBe(1);expect([...fake.history.values()].filter((h) => JSON.stringify(h.prompt).includes("fuobe/meta-gen"))).toHaveLength(3);});++ it("shows a meta-batch job's passes as its steps, never its first pass's own steps", async () => {+ const { createTask } = await import("@/server/computer/tasks");+ const now = Date.now();+ db()+ .prepare("INSERT INTO generations (id, feature, model_id, engine, provider, op, kind, status, request_json, external_id, external_meta_json, outputs_json, created_at, updated_at) VALUES ('meta-steps', 'video', 'oss-x', 'open', 'comfyui', 'upscale-video', 'video', 'queued', ?, NULL, '{}', '[]', ?, ?)")+ .run(JSON.stringify({ account: a }), now, now);+ // 7 frames, 2 a pass: 4 passes. The upscale node has steps of its own in each pass.+ const graph = {+ "1": { class_type: "VHS_LoadVideoFFmpeg", inputs: { meta_batch: ["2", 0] } },+ "2": { class_type: "VHS_BatchManager", inputs: { frames_per_batch: 2 } },+ "4": { class_type: "KSampler", inputs: { image: ["1", 0] } },+ "9": { class_type: "VHS_VideoCombine", inputs: { images: ["4", 0], filename_prefix: "fuobe/meta-steps", meta_batch: ["2", 0] } },+ };+ const task = createTask({ principal: `acct:${a}`, generationId: "meta-steps", graph, prefix: "fuobe/meta-steps", metaBatch: true, preview: false });+ Object.assign(fake.opts, { metaBatch: 4, metaFrames: 7, outputs: ["video"], steps: 3, stepMs: 40 });+ const reported: Record<string, unknown>[] = [];+ const post = routes.report.POST;+ const spied = { ...routes, report: { POST: async (req: Request, ctx: never) => (reported.push(await req.clone().json()), post(req, ctx)) } };+ const t = tab(spied as typeof routes, cookie, fake.port);+ await t.runner.beat();+ await t.runner.claimAndRun();+ expect((db().prepare("SELECT state FROM relay_tasks WHERE id = ?").get(task.id) as { state: string }).state).toBe("done");+ const running = reported.filter((r) => r.event === "running");+ // Every progress report counts passes (the batch manager's node, 4 in all) once the loader said the clip's frames.+ expect(running.length).toBeGreaterThan(1);+ for (const r of running) expect(r).toMatchObject({ node: "2", nodesDone: 1 });+ const counted = running.filter((r) => r.max !== undefined);+ expect(counted.length).toBeGreaterThan(0);+ for (const r of counted) expect(r.max).toBe(4);+ const values = counted.map((r) => r.value as number);+ expect(values).toEqual([...values].sort((x, y) => x - y));+ expect(Math.max(...values)).toBeGreaterThanOrEqual(2);+ // The first pass's own steps (3 of them) never reach the studio as the run's.+ expect(running.some((r) => r.max === 3)).toBe(false);+ });});diff --git a/tests/computer-runner.test.ts b/tests/computer-runner.test.tsindex c8c7bbcb..efb9f537 100644--- a/tests/computer-runner.test.ts+++ b/tests/computer-runner.test.ts@@ -3,7 +3,7 @@* the studio is busy, what it shows once a result is saved, and how it carries a job's token.*/import { describe, expect, it } from "vitest";-import { ComputerRunner, tileJob } from "@/lib/computer-runner";+import { batchPlan, ComputerRunner, passProgress, tileJob } from "@/lib/computer-runner";import { jobWords } from "@/lib/relay";const TASK = { id: "AAAAAAAAAAAAAAAA", generationId: "g-1", lease: "a".repeat(64), graph: {}, promptId: "00000000-0000-4000-8000-000000000000", preview: false, inputs: [] };@@ -79,3 +79,29 @@ describe("a report", () => {expect(s.reports[0]).toEqual({ event: "queued", position: 0 });});});++describe("a meta-batch job's passes", () => {+ const graph = {+ "1": { class_type: "VHS_LoadVideoFFmpeg", inputs: { video: "in.mp4", meta_batch: ["2", 0] } },+ "2": { class_type: "VHS_BatchManager", inputs: { frames_per_batch: 6 } },+ "4": { class_type: "ImageUpscaleWithModel", inputs: { image: ["1", 0] } },+ "7": { class_type: "VHS_VideoCombine", inputs: { images: ["4", 0], meta_batch: ["2", 0], filename_prefix: "fuobe/x" } },+ };++ it("finds the batch manager, its frames a pass and the loader that reads the clip", () => {+ expect(batchPlan(graph)).toEqual({ node: "2", perPass: 6, loader: "1" });+ expect(batchPlan({ "1": { class_type: "KSampler", inputs: {} } })).toBeNull();+ // A batch manager no loader reads: no plan (its passes can't be counted).+ expect(batchPlan({ "2": graph["2"], "7": graph["7"] })).toBeNull();+ expect(batchPlan(null)).toBeNull();+ });++ it("counts passes from the clip's frames: 124 frames at 6 a pass are 21", () => {+ const plan = batchPlan(graph)!;+ expect(passProgress(plan, 124, 0)).toEqual({ value: 0, max: 21, node: "2", nodesDone: 1 });+ expect(passProgress(plan, 124, 5)).toEqual({ value: 5, max: 21, node: "2", nodesDone: 1 });+ expect(passProgress(plan, 124, 30)).toMatchObject({ value: 21, max: 21 });+ // Before the loader said the frames: the node only.+ expect(passProgress(plan, undefined, 0)).toEqual({ node: "2", nodesDone: 1 });+ });+});diff --git a/tests/helpers/fake-local-comfy.ts b/tests/helpers/fake-local-comfy.tsindex 24dd68e8..12c39048 100644--- a/tests/helpers/fake-local-comfy.ts+++ b/tests/helpers/fake-local-comfy.ts@@ -42,6 +42,11 @@ export interface LocalComfyOptions {outputs?: ("image" | "video" | "audio" | "exr" | "text" | "fake-png")[];/** VHS meta-batch: the job finishes without outputs and queues this many more passes (the last one saves the clip). */metaBatch?: number;+ /**+ * The clip a meta-batch job's loader reads (a VHS_Load* node with a meta_batch input): its frames. Each pass's loader+ * reports the frames read so far of all of them, as VHS's does (one progress bar across the passes).+ */+ metaFrames?: number;/** Embedded Python (portable / Easy-Install). */portable?: boolean;loras?: string[];@@ -363,6 +368,13 @@ export function startLocalComfy(given: LocalComfyOptions, port = 0): Promise<Locconst started = Date.now();const begin: [string, Record<string, unknown>] = ["execution_start", { prompt_id: job.id, timestamp: started }];event(job.clientId, "execution_start", { prompt_id: job.id });+ const loader = opts.metaFrames ? Object.keys(job.graph).find((k) => /^VHS_Load/.test(job.graph[k].class_type) && Array.isArray(job.graph[k].inputs?.meta_batch)) : undefined;+ if (loader) {+ const bm = job.graph[(job.graph[loader].inputs!.meta_batch as [string, number])[0]];+ const per = Number(bm?.inputs?.frames_per_batch) || 1;+ event(job.clientId, "executing", { node: loader, prompt_id: job.id });+ event(job.clientId, "progress", { value: Math.min(opts.metaFrames!, (job.pass ?? 1) * per), max: opts.metaFrames, prompt_id: job.id, node: loader });+ }event(job.clientId, "executing", { node, prompt_id: job.id });let step = 0;const next = () => {diff --git a/tests/video-finish.test.ts b/tests/video-finish.test.tsindex ca89409a..8fe7e211 100644--- a/tests/video-finish.test.ts+++ b/tests/video-finish.test.ts@@ -5,7 +5,7 @@ import { beforeAll, describe, expect, it, vi } from "vitest";import { FORMAT_INFO, formatList, formatsOf } from "@/lib/av/formats";import { DEFAULT_FPS_TARGET, FPS_TARGETS, fpsFrames, fpsPlan, fpsSummary } from "@/lib/av/fps";import { targetShortEdge, upscaledSize, upscaleFactorFor, upscaleTier } from "@/lib/av/upscale";-import { exportValues, framesPerPass, hdrColorSpace, upscaleShortSide, wholeClipBytes, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";+import { esrganWholeFrames, exportValues, framesPerPass, hdrColorSpace, upscaleShortSide, wholeClipBytes, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";import { getModel } from "@/lib/catalog";import { buildPayload } from "@/lib/catalog/payload";import { estimateCost, planGeneration } from "@/lib/catalog/plan";@@ -370,8 +370,8 @@ const gens = await import("@/server/generations");const { saveFile } = await import("@/server/storage");const clip = (o: Partial<MediaInfo>): MediaInfo => ({ container: "mp4", hasVideo: true, hasAudio: true, duration: 4, videoDuration: 4, width: 1280, height: 720, fps: 24, frames: 96, ...o });-async function prep(endpoint: string, op: Operation, input: GenInput, info: MediaInfo = clip({}), ram = 64 * 2 ** 30) {- return prepareWorkflow(endpoint, { video: "clip.mp4", seed: 7, ...input }, { generationId: "gen1", op, upload: async (_d, _t, n) => `up_${n}`, media: (n) => (n === "clip.mp4" ? info : undefined), serverRam: async () => ram });+async function prep(endpoint: string, op: Operation, input: GenInput, info: MediaInfo = clip({}), ram = 64 * 2 ** 30, vram?: number) {+ return prepareWorkflow(endpoint, { video: "clip.mp4", seed: 7, ...input }, { generationId: "gen1", op, upload: async (_d, _t, n) => `up_${n}`, media: (n) => (n === "clip.mp4" ? info : undefined), serverRam: async () => ram, vram: async () => vram });}const byClass = (wf: ComfyWorkflow, type: string) => Object.entries(wf).filter(([, n]) => n.class_type === type);const one = (wf: ComfyWorkflow, type: string) => {@@ -520,6 +520,23 @@ describe("chunked open upscaling (R4-38)", () => {expect(one(wf, "VHS_BatchManager").inputs.frames_per_batch).toBe(1);});+ it("ESRGAN upscales whole frames in fp16 on a card with room for them, else the core node's tiles", async () => {+ const h3 = clip({ width: 1344, height: 768 });+ const big = await prep("upscale-video-esrgan-chunked", "upscale-video", { resolution: "1080p" }, h3, undefined, 32 * 2 ** 30);+ expect(one(big.workflow, "ImageUpscaleWithModelBatched").inputs).toEqual({ upscale_model: ["3", 0], images: ["1", 0], per_batch: 1, precision: "float16" });+ expect(byClass(big.workflow, "ImageUpscaleWithModel")).toHaveLength(0);+ // An 8 GB card, or a card nobody knows: the tiled core node, the same links.+ for (const vram of [8 * 2 ** 30, undefined]) {+ const { workflow: wf } = await prep("upscale-video-esrgan-chunked", "upscale-video", { resolution: "1080p" }, h3, undefined, vram);+ expect(byClass(wf, "ImageUpscaleWithModelBatched"), String(vram)).toHaveLength(0);+ expect(one(wf, "ImageUpscaleWithModel").inputs).toEqual({ upscale_model: ["3", 0], image: ["1", 0] });+ }+ expect(esrganWholeFrames({ width: 1920, height: 1080 }, 32 * 2 ** 30)).toBe(true);+ expect(esrganWholeFrames({ width: 3840, height: 2160 }, 32 * 2 ** 30)).toBe(false);+ expect(esrganWholeFrames({ width: 1344, height: 768 }, 12 * 2 ** 30)).toBe(true);+ expect(esrganWholeFrames({}, 32 * 2 ** 30)).toBe(false);+ });+it("SeedVR2: passes of 4n+1 frames", async () => {const { workflow: wf } = await prep("upscale-video-seedvr2-chunked", "upscale-video", { resolution: "1080p" });expect(one(wf, "VHS_BatchManager").inputs.frames_per_batch).toBe(33);diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.jsonindex 87615aa2..0b3ed59a 100644--- a/workflows/comfyui/manifest.json+++ b/workflows/comfyui/manifest.json@@ -26470,6 +26470,10 @@}],"customNodes": [+ {+ "name": "ComfyUI-KJNodes",+ "repo": "https://github.com/kijai/ComfyUI-KJNodes"+ },{"name": "ComfyUI-VideoHelperSuite","repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"@@ -26478,7 +26482,7 @@"vramGb": 4,"license": "Real-ESRGAN weights (BSD-3-Clause); VideoHelperSuite GPL-3.0 code","validated": true,- "notes": "R4-38: upscale-video-esrgan decodes the whole film (about 38 GB of float frames for 30 s at 480p before the 4x model). This one decodes framesPerBatch frames per pass (VHS_BatchManager re-queues the prompt until the clip is done, as mixed-media-zimage-frames does), upscales them with the model (tiled), scales them so the shorter edge is shortSide px (params.resolution: 1080p -> 1080, the shape kept) and pipes them into one ffmpeg H.264 encode that stays open across passes; the last pass writes the file with the source's sound at the source frame rate. The provider follows the passes by their filename prefix. framesPerBatch: the provider sizes it from the clip's header so a pass holds about 1.5 GB of frames (16 by default). Any spandrel model in models/upscale_models works as upscaleModel (x2 / x4). Tested on CPU with an x4 ESRGAN network: 30 s 256x144 25 fps with sound -> 1920x1080, 750 frames, AAC, 47 passes of 16 frames in 417 s, ComfyUI's RSS peaked 0.87 GB above idle (upscale-video-esrgan on 10 s of the same clip, 4x to 1024x576 only, peaked 3.0 GB above idle); through Fuobe a silent 2 s 24 fps clip -> 1280x720, 48 frames, no audio link."+ "notes": "R4-38: upscale-video-esrgan decodes the whole film (about 38 GB of float frames for 30 s at 480p before the 4x model). This one decodes framesPerBatch frames per pass (VHS_BatchManager re-queues the prompt until the clip is done, as mixed-media-zimage-frames does), upscales them with the model (whole frames in fp16 through KJNodes' ImageUpscaleWithModelBatched, about twice as fast as the core node; the provider swaps in the core node's fp32 tiles when the GPU has no room for whole frames or its memory is unknown), scales them so the shorter edge is shortSide px (params.resolution: 1080p -> 1080, the shape kept) and pipes them into one ffmpeg H.264 encode that stays open across passes; the last pass writes the file with the source's sound at the source frame rate. The provider follows the passes by their filename prefix. framesPerBatch: the provider sizes it from the clip's header so a pass holds about 1.5 GB of frames (16 by default). Any spandrel model in models/upscale_models works as upscaleModel (x2 / x4). Tested on CPU with an x4 ESRGAN network: 30 s 256x144 25 fps with sound -> 1920x1080, 750 frames, AAC, 47 passes of 16 frames in 417 s, ComfyUI's RSS peaked 0.87 GB above idle (upscale-video-esrgan on 10 s of the same clip, 4x to 1024x576 only, peaked 3.0 GB above idle); through Fuobe a silent 2 s 24 fps clip -> 1280x720, 48 frames, no audio link."},{"id": "upscale-video-seedvr2-chunked",diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.jsonindex 18eca66d..33f0600a 100644--- a/workflows/comfyui/requirements.json+++ b/workflows/comfyui/requirements.json@@ -1,9 +1,9 @@{"v": 1,- "hash": "9ea1eebd8268e1f4469856b1e1b88320a86c9307b47105893c1f79225d9af831",+ "hash": "5f03c439bab8ec850fcbbb4adb724259f1c35493bf3bbf15afdca0149a62963e","comfyui": {"min":"0.42.0","testedCommit":"5841c187"},"folders": ["Hi3D","RMBG","audio_encoders","background_removal","checkpoints","clip_vision","dbs","detection","diffusion_models","facerestore_models","foley","frame_interpolation","geometry_estimation","insightface","kandinsky6_audio_vae","latent_upscale_models","loras","mmaudio","model_patches","optical_flow","reuse","sams","text_encoders","thinksound","ultralytics","upscale_models","vae"],- "sentinels": ["AILab_FeyNoBg","AILab_Qwen3ASRSubtitle","AILab_Qwen3TTSVoiceClone_Advanced","AILab_Qwen3TTSVoiceDesign_Advanced","AILab_VRMBG","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_MaskByTouch","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","AuKGenerateEdit","AuKModelLoader","BodyDoubleFit","BodyDoubleLook","CFGOverride","ClothesSegment","ComfyMathExpression","CorridorKey2","CropFuobeLive","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3AdvancedSwapPlan","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3ClipShots","H3FaceChunks","H3FaceJoin","H3FaceMaskSAM","H3FaceStitch","H3FaceTrackCrop","H3FillShots","H3GreyMannequins","H3ObjectSwapPlan","H3PeopleMask","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3RoleMask","H3SLAAttention","H3SoundtrackOrSilence","H3SourceSlice","H3SubjectPrompt","H3TrackCrops","H3TrackRoles","Hi3DLoadMesh","Hi3DModelLoader","Hi3DRefine","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","HyperFlowGGUFLoader","HyperFlowSigmas","INTConstant","Ideogram4Scheduler","IdolCamera","IdolPreprocessImage","IdolPruneSplat","ImageBatchExtendWithOverlap","ImageDetailContrast","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","InstantHMRLoader","InstantHMRPredict","Kandinsky6AudioVAEDecode","Kandinsky6AudioVAELoader","Kandinsky6BeautifyPrompt","Kandinsky6EmptyLatent","Kandinsky6ImageToVideoAudio","Kandinsky6LatentUpscalerLoader","Kandinsky6RemoveReferenceLatent","Kandinsky6SRVAELoader","Kandinsky6Sampler","Kandinsky6TextEncode","Kandinsky6VSRUpscale","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadImageFuobeLive","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","Metric3D-NormalMapPreprocessor","MiniMaxH3ChainAssemble","MiniMaxH3ChainContext","MiniMaxH3ChainCurrent","MiniMaxH3ChainLoopEnd","MiniMaxH3ChainLoopStart","MiniMaxH3ChainPlanModern","MiniMaxH3ChainReview","MiniMaxH3ChainSegmentSave","MiniMaxH3ContexMaskedTarget","MiniMaxH3FantasticVideoEditLatent","MiniMaxH3GenerationProfile","MiniMaxH3LoopTrim","MiniMaxH3SourceTimeline","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","NomasCameraPath","NomasWorldContinue","NomasWorldGenerate","NomasWorldPrompt","OpenH3LoadRefinedLatent","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","Orion4D_FXMax_DCTLToneMapper","PasteBackFuobeLive","QWMComposite","QWMDetect","QWMFinal","QWMPrepare","QWMRefineMask","QWMResidualDetect","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","RTXTrueHDR","RTXVideoFrameGeneration","RTXVideoSuperResolution","ReActorFaceSwap","RemakeConditioning","RemakeKeyframeUntil","RemakeNoise","RemoveBackground","SAM3DBody_Loader","SAM3DBody_Render","SAM3DBody_Smooth","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SAMLoader","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","SolarRendererConditioning","SolarRendererLoraLoader","SolarRendererModel","SolarRendererSigmas","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","UnetLoaderGGUF","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_LoadVideoFFmpeg","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VRAM_Debug","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","ViggleTurboLora","ViggleTurboSigmas","VoxCPM2_Clone","VoxCPM2_TTS","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader","ZenImage21AdapterLoader","ZenImage21TextEncode"],+ "sentinels": ["AILab_FeyNoBg","AILab_Qwen3ASRSubtitle","AILab_Qwen3TTSVoiceClone_Advanced","AILab_Qwen3TTSVoiceDesign_Advanced","AILab_VRMBG","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_MaskByTouch","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","AuKGenerateEdit","AuKModelLoader","BodyDoubleFit","BodyDoubleLook","CFGOverride","ClothesSegment","ComfyMathExpression","CorridorKey2","CropFuobeLive","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3AdvancedSwapPlan","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3ClipShots","H3FaceChunks","H3FaceJoin","H3FaceMaskSAM","H3FaceStitch","H3FaceTrackCrop","H3FillShots","H3GreyMannequins","H3ObjectSwapPlan","H3PeopleMask","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3RoleMask","H3SLAAttention","H3SoundtrackOrSilence","H3SourceSlice","H3SubjectPrompt","H3TrackCrops","H3TrackRoles","Hi3DLoadMesh","Hi3DModelLoader","Hi3DRefine","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","HyperFlowGGUFLoader","HyperFlowSigmas","INTConstant","Ideogram4Scheduler","IdolCamera","IdolPreprocessImage","IdolPruneSplat","ImageBatchExtendWithOverlap","ImageDetailContrast","ImageGridtoBatch","ImageResizeKJv2","ImageUpscaleWithModelBatched","IndexTTS2Simple","InstantHMRLoader","InstantHMRPredict","Kandinsky6AudioVAEDecode","Kandinsky6AudioVAELoader","Kandinsky6BeautifyPrompt","Kandinsky6EmptyLatent","Kandinsky6ImageToVideoAudio","Kandinsky6LatentUpscalerLoader","Kandinsky6RemoveReferenceLatent","Kandinsky6SRVAELoader","Kandinsky6Sampler","Kandinsky6TextEncode","Kandinsky6VSRUpscale","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadImageFuobeLive","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","Metric3D-NormalMapPreprocessor","MiniMaxH3ChainAssemble","MiniMaxH3ChainContext","MiniMaxH3ChainCurrent","MiniMaxH3ChainLoopEnd","MiniMaxH3ChainLoopStart","MiniMaxH3ChainPlanModern","MiniMaxH3ChainReview","MiniMaxH3ChainSegmentSave","MiniMaxH3ContexMaskedTarget","MiniMaxH3FantasticVideoEditLatent","MiniMaxH3GenerationProfile","MiniMaxH3LoopTrim","MiniMaxH3SourceTimeline","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","NomasCameraPath","NomasWorldContinue","NomasWorldGenerate","NomasWorldPrompt","OpenH3LoadRefinedLatent","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","Orion4D_FXMax_DCTLToneMapper","PasteBackFuobeLive","QWMComposite","QWMDetect","QWMFinal","QWMPrepare","QWMRefineMask","QWMResidualDetect","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","RTXTrueHDR","RTXVideoFrameGeneration","RTXVideoSuperResolution","ReActorFaceSwap","RemakeConditioning","RemakeKeyframeUntil","RemakeNoise","RemoveBackground","SAM3DBody_Loader","SAM3DBody_Render","SAM3DBody_Smooth","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SAMLoader","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","SolarRendererConditioning","SolarRendererLoraLoader","SolarRendererModel","SolarRendererSigmas","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","UnetLoaderGGUF","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_LoadVideoFFmpeg","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VRAM_Debug","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","ViggleTurboLora","ViggleTurboSigmas","VoxCPM2_Clone","VoxCPM2_TTS","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader","ZenImage21AdapterLoader","ZenImage21TextEncode"],"packs": {"ComfyUI-AuK": {"repo":"https://github.com/Tencent-Hunyuan/AuK","commit":"0d40366b1039e37c6cad008ab4713f6ad6d954b7","classes":["AuKGenerateEdit","AuKModelLoader"],"folders":[],"isolated":false,"subdir":"comfyui/ComfyUI-AuK","requirementsTxt":false,"install":"manual"},"ComfyUI-BodyDouble": {"repo":"https://github.com/workingprototype/Fuobe","commit":"26d386bdacb371d06aa2325ac1b90373a11ff6b7","classes":["BodyDoubleFit","BodyDoubleLook"],"folders":[],"isolated":false,"subdir":"comfy-nodes/ComfyUI-BodyDouble","requirementsTxt":false,"install":"manual"},@@ -20,7 +20,7 @@"ComfyUI-Impact-Pack": {"repo":"https://github.com/ltdrdata/ComfyUI-Impact-Pack","commit":"","registry":{"id":"comfyui-impact-pack","version":"8.28.3"},"classes":["SAMLoader"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"registry"},"ComfyUI-IndexTTS2": {"repo":"https://github.com/snicolast/ComfyUI-IndexTTS2","commit":"5b33e02bc0112b8aaf1fc823d5e5a609ca07fc27","classes":["IndexTTS2Simple"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},"ComfyUI-InstantHMR": {"repo":"https://github.com/workingprototype/Fuobe","commit":"e4b74735062298af07bb931aed280a440d1b2958","classes":["InstantHMRLoader","InstantHMRPredict"],"folders":["detection"],"isolated":false,"subdir":"comfy-nodes/ComfyUI-InstantHMR","requirementsTxt":false,"install":"manual"},- "ComfyUI-KJNodes": {"repo":"https://github.com/kijai/ComfyUI-KJNodes","commit":"17195fcfa8a05f601b766a0f09c9733284f47416","registry":{"id":"comfyui-kjnodes","version":""},"classes":["GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","INTConstant","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","VRAM_Debug"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},+ "ComfyUI-KJNodes": {"repo":"https://github.com/kijai/ComfyUI-KJNodes","commit":"17195fcfa8a05f601b766a0f09c9733284f47416","registry":{"id":"comfyui-kjnodes","version":""},"classes":["GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","INTConstant","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","ImageUpscaleWithModelBatched","VRAM_Debug"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},"ComfyUI-Krea2-Ostris-Edit": {"repo":"https://github.com/ostris/ComfyUI-Krea2-Ostris-Edit","commit":"7756566160c4a1b24bb1bd9f0ff3ced1a83d7547","registry":{"id":"comfyui-krea2-ostris-edit","version":""},"classes":["Krea2OstrisEditModelPatch","TextEncodeKrea2OstrisEdit"],"folders":[],"isolated":false,"requirementsTxt":false,"install":"manual"},"ComfyUI-LTXVideo": {"repo":"https://github.com/Lightricks/ComfyUI-LTXVideo","commit":"220e1d45aa0469f518e982102fca4dca92a61862","registry":{"id":"ComfyUI-LTXVideo","version":""},"classes":["LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVTiledFusionSampler"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},"ComfyUI-LatentSyncWrapper": {"repo":"https://github.com/ShmuelRonen/ComfyUI-LatentSyncWrapper","commit":"360d5283d7276aee68b4237b1387e594e4ce640e","classes":["LatentSyncNode","VideoLengthAdjuster"],"folders":[],"isolated":true,"requirementsTxt":true,"install":"manual"},@@ -524,7 +524,7 @@"upscale-image-esrgan": {"core":["ImageScaleBy","ImageUpscaleWithModel","LoadImage","SaveImage","UpscaleModelLoader"],"packs":{},"files":["upscale_models/RealESRGAN_x4plus.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},"upscale-image-seedvr2": {"core":["JoinImageWithAlpha","KSampler","LoadImage","ResizeImageMaskNode","SaveImage","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","UNETLoader","VAEDecodeTiled","VAEEncodeTiled","VAELoader"],"packs":{},"files":["diffusion_models/seedvr2_7b_int8_convrot.safetensors","vae/seedvr2_ema_vae_fp16.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},"upscale-video-esrgan": {"core":["CreateVideo","GetVideoComponents","ImageUpscaleWithModel","LoadVideo","SaveVideo","UpscaleModelLoader"],"packs":{},"files":["upscale_models/RealESRGAN_x4plus.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},- "upscale-video-esrgan-chunked": {"core":["ImageUpscaleWithModel","ResizeImageMaskNode","UpscaleModelLoader"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideoFFmpeg","VHS_VideoCombine","VHS_VideoInfo"]},"files":["upscale_models/RealESRGAN_x4plus.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},+ "upscale-video-esrgan-chunked": {"core":["ResizeImageMaskNode","UpscaleModelLoader"],"packs":{"ComfyUI-KJNodes":["ImageUpscaleWithModelBatched"],"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideoFFmpeg","VHS_VideoCombine","VHS_VideoInfo"]},"files":["upscale_models/RealESRGAN_x4plus.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},"upscale-video-rtx": {"core":["ComfyMathExpression","PrimitiveInt","ResizeImageMaskNode"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideoFFmpeg","VHS_VideoCombine","VHS_VideoInfo"],"ComfyUI_Nvidia_VFX_Nodes":["RTXVideoSuperResolution"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"gpu":"nvidia-rtx","firstRun":[]},"upscale-video-seedvr2": {"core":["CreateVideo","GetVideoComponents","KSampler","LoadVideo","ResizeImageMaskNode","SaveVideo","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","UNETLoader","VAEDecodeTiled","VAEEncodeTiled","VAELoader"],"packs":{},"files":["diffusion_models/seedvr2_3b_int8_convrot.safetensors","vae/seedvr2_ema_vae_fp16.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},"upscale-video-seedvr2-chunked": {"core":["KSampler","ResizeImageMaskNode","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","UNETLoader","VAEDecodeTiled","VAEEncodeTiled","VAELoader"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideoFFmpeg","VHS_VideoCombine","VHS_VideoInfo"]},"files":["diffusion_models/seedvr2_3b_int8_convrot.safetensors","vae/seedvr2_ema_vae_fp16.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},diff --git a/workflows/comfyui/upscale-video-esrgan-chunked.json b/workflows/comfyui/upscale-video-esrgan-chunked.jsonindex c8ea25ef..d4a744d4 100644--- a/workflows/comfyui/upscale-video-esrgan-chunked.json+++ b/workflows/comfyui/upscale-video-esrgan-chunked.json@@ -37,19 +37,21 @@}},"4": {- "class_type": "ImageUpscaleWithModel",+ "class_type": "ImageUpscaleWithModelBatched","inputs": {"upscale_model": ["3",0],- "image": [+ "images": ["1",0- ]+ ],+ "per_batch": 1,+ "precision": "float16"},"_meta": {- "title": "Upscale this pass's frames (tiled)"+ "title": "Upscale this pass's frames (whole frames in fp16; the provider swaps in the tiled core node when the GPU is small)"}},"5": {