The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
GPU check: Bria VRMBG 3.0's weights are found in models/RMBG, which ComfyUI-RMBG lists as "rmbg"
Claude94d651d45ef2
diff --git a/src/lib/gpu/gather.ts b/src/lib/gpu/gather.tsindex dbdc0225..07073a5d 100644--- a/src/lib/gpu/gather.ts+++ b/src/lib/gpu/gather.ts@@ -313,17 +313,20 @@ export async function gatherInventory(t: ComfyTransport, idx: RequirementIndex,note("models", e);return;}+ // A pack may name the folder in another case from its directory (ComfyUI-RMBG lists models/RMBG as "rmbg").+ const lower = new Map([...present].map((p) => [p.toLowerCase(), p]));await Promise.all(listFolders.map(async (folder) => {- if (!present.has(folder)) {+ const listed = present.has(folder) ? folder : lower.get(folder.toLowerCase());+ if (!listed) {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);+ const r = await getJson<unknown>(`/experiment/models/${encodeURIComponent(listed)}`, 15_000, 8 * 1024 * 1024);if (r.status === 404) {- const plain = await getJson<unknown>(`/models/${encodeURIComponent(folder)}`, 15_000, 8 * 1024 * 1024);+ const plain = await getJson<unknown>(`/models/${encodeURIComponent(listed)}`, 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 }) =>@@ -354,7 +357,8 @@ export async function gatherInventory(t: ComfyTransport, idx: RequirementIndex,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));+ const folder = typeof name === "string" ? (idx.folders.includes(name) ? name : idx.folders.find((f) => f.toLowerCase() === name.toLowerCase())) : undefined;+ if (folder && Array.isArray(dirs)) roots[folder] = 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) {diff --git a/tests/gpu-probe.test.ts b/tests/gpu-probe.test.tsindex 18efed3d..f77c0b56 100644--- a/tests/gpu-probe.test.ts+++ b/tests/gpu-probe.test.ts@@ -139,6 +139,18 @@ describe("the probe", () => {expect(inv.models.loras?.folderMissing).toBe(true);expect(inv.models.mmaudio?.folderMissing).toBe(true);});++ it("finds a folder a pack lists in another case from its directory (ComfyUI-RMBG's models/RMBG as \"rmbg\")", async () => {+ const f = idx.files["RMBG/VRMBG-3.0/model.safetensors"];+ expect(f.folder).toBe("RMBG");+ const s = zImageReady();+ s.folders = [...s.folders!.filter((x) => x !== "RMBG"), "rmbg"];+ s.files = { ...s.files, rmbg: [{ name: f.file, size: f.sizeBytes }] };+ fake = await startFakeComfy(s);+ const inv = await gatherInventory(transport(fake.url), idx);+ expect(inv.models.RMBG?.folderMissing).toBeUndefined();+ expect(filePresence(f, inv)).toBe("present");+ });});describe("reading a big /object_info a piece at a time", () => {