The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(models): the Installed inventory names every ComfyUI folder, and only real files
purple65c36f64e371
diff --git a/src-tauri/src/commands/download.rs b/src-tauri/src/commands/download.rsindex 7524574f..d89992ef 100644--- a/src-tauri/src/commands/download.rs+++ b/src-tauri/src/commands/download.rs@@ -90,10 +90,13 @@ fn split_model_ref(name: &str) -> (String, String) {/// The model subdirs LU downloads into / ComfyUI enumerates from. Delete/// searches exactly these — never custom_nodes, never arbitrary paths.+/// embeddings and style_models joined on 2026-08-30, with the five folders the+/// R5 re-measure found missing from the inventory. A file the Installed list+/// names has to be deletable from that same list, or the list is a wall.const MODEL_SUBDIRS: &[&str] = &["checkpoints", "diffusion_models", "unet", "vae", "loras","text_encoders", "clip", "clip_vision", "audio_encoders",- "controlnet", "upscale_models",+ "controlnet", "upscale_models", "embeddings", "style_models",];/// Delete one installed model file from the ComfyUI models tree (the Modeldiff --git a/src/api/__tests__/installed-inventory-every-folder.test.ts b/src/api/__tests__/installed-inventory-every-folder.test.tsnew file mode 100644index 00000000..cfeb6331--- /dev/null+++ b/src/api/__tests__/installed-inventory-every-folder.test.ts@@ -0,0 +1,263 @@+/**+ * Meldung 1 of the R5 re-measure on the real 2.6.7 Windows build+ * (2026-08-30, ergebnis-r5-nachmessung.md).+ *+ * A 1 MB .safetensors dummy was dropped into ten ComfyUI model folders. The+ * running ComfyUI listed all ten at once. The app, after a reload, showed+ * five of them:+ *+ * checkpoints ok · diffusion_models ok · loras ok · vae ok · text_encoders ok+ * clip_vision NO · controlnet NO · upscale_models NO · embeddings NO · style_models NO+ *+ * Two real files were invisible with them:+ * clip_vision\sigclip_vision_patch14_384.safetensors 817 MB+ * text_encoders\llava_llama3_fp8_scaled.safetensors 2430 MB+ *+ * The second one is the harder half. Its folder was listed and its three+ * folder neighbours (clip_l, qwen_3_4b, umt5_xxl_fp8_e4m3fn_scaled) all+ * appeared, so this was not a folder gap at all: our own catalogue ships that+ * filename at 8.5 GB, the disk probe called the user's 2.4 GB copy too small,+ * and the partial filter swallowed it. A catalogue size is a claim about the+ * file WE ship. It says nothing about the file the user has, and this list+ * answers one question only: what is lying on the disk.+ *+ * And one invention in the other direction: the Installed list carried an+ * entry `pixel_space`, type safetensors, no size, for which no file exists+ * anywhere on the drive. It is ComfyUI's built-in pixel-space pseudo VAE,+ * offered by VAELoader in the same enum as the real files.+ *+ * Run: npx vitest run src/api/__tests__/installed-inventory-every-folder.test.ts+ */+import { describe, it, expect, vi, beforeEach } from 'vitest'++const localFetch = vi.fn()+const backendCall = vi.fn()+vi.mock('../backend', async (importOriginal) => ({+ ...(await importOriginal<typeof import('../backend')>()),+ localFetch: (...a: unknown[]) => localFetch(...a),+ backendCall: (...a: unknown[]) => backendCall(...a),+ isTauri: () => false,+ comfyuiUrl: (path: string) => `http://127.0.0.1:8188${path}`,+}))++import {+ getInstalledImageModels, getImageModels, isInstalledModelFile,+ INSTALLED_ADDON_SUBFOLDERS, subfolderForSource,+} from '../comfyui'++const okJson = (body: unknown) => ({ ok: true, status: 200, json: async () => body })+const notFound = { ok: false, status: 404, json: async () => ({}) }++/** The dummy the counter-check dropped into every folder, one per folder so+ * each lane can be told apart in the result. */+const dummy = (folder: string) => `r5n-${folder}.safetensors`++/** The two real files that were invisible on the box. */+const SIGCLIP = 'sigclip_vision_patch14_384.safetensors'+const LLAVA = 'llava_llama3_fp8_scaled.safetensors'++interface Board {+ checkpoints?: string[]+ unets?: string[]+ vaes?: string[]+ clips?: string[]+ loras?: string[]+ clipVision?: string[] | 'missing'+ controlnet?: string[] | 'missing'+ upscale?: string[] | 'missing'+ styleModels?: string[] | 'missing'+ embeddings?: string[] | 'missing'+}++function board(b: Board = {}) {+ const enumFor = (list: string[] | 'missing' | undefined, node: string, field: string) => {+ if (list === 'missing' || list === undefined) return notFound+ return okJson({ [node]: { input: { required: { [field]: [list] } } } })+ }+ localFetch.mockImplementation(async (url: string) => {+ if (url.includes('/embeddings')) {+ if (b.embeddings === 'missing' || b.embeddings === undefined) return notFound+ return okJson(b.embeddings)+ }+ if (url.includes('CheckpointLoaderSimple')) return enumFor(b.checkpoints ?? [], 'CheckpointLoaderSimple', 'ckpt_name')+ if (url.includes('UnetLoaderGGUF')) return notFound+ if (url.includes('UNETLoader')) return enumFor(b.unets ?? [], 'UNETLoader', 'unet_name')+ if (url.includes('LoraLoader')) return enumFor(b.loras ?? [], 'LoraLoader', 'lora_name')+ if (url.includes('VAELoader')) return enumFor(b.vaes ?? [], 'VAELoader', 'vae_name')+ if (url.includes('CLIPVisionLoader')) return enumFor(b.clipVision ?? [], 'CLIPVisionLoader', 'clip_name')+ if (url.includes('CLIPLoader')) return enumFor(b.clips ?? [], 'CLIPLoader', 'clip_name')+ if (url.includes('ControlNetLoader')) return enumFor(b.controlnet ?? [], 'ControlNetLoader', 'control_net_name')+ if (url.includes('UpscaleModelLoader')) return enumFor(b.upscale ?? [], 'UpscaleModelLoader', 'model_name')+ if (url.includes('StyleModelLoader')) return enumFor(b.styleModels ?? [], 'StyleModelLoader', 'style_model_name')+ return okJson({})+ })+}++beforeEach(() => {+ localFetch.mockReset()+ backendCall.mockReset()+ // The disk agrees with ComfyUI unless a test says otherwise, and every file+ // is measured, so nothing here depends on a size probe missing.+ backendCall.mockImplementation(async (_cmd: string, args: { files?: Array<{ filename: string }> }) =>+ (args?.files ?? []).map((f) => ({+ filename: f.filename, exists: true, actualBytes: 1_048_576, complete: true,+ })),+ )+})++describe('the Installed inventory covers every ComfyUI model folder', () => {+ it('THE FIX: all ten dummy folders of the R5 re-measure show up, not five', async () => {+ board({+ checkpoints: [dummy('checkpoints')],+ unets: [dummy('diffusion_models')],+ loras: [dummy('loras')],+ vaes: [dummy('vae')],+ clips: [dummy('text_encoders')],+ clipVision: [dummy('clip_vision')],+ controlnet: [dummy('controlnet')],+ upscale: [dummy('upscale_models')],+ styleModels: [dummy('style_models')],+ embeddings: [dummy('embeddings')],+ })++ const names = (await getInstalledImageModels()).map((m) => m.name)++ for (const folder of [+ 'checkpoints', 'diffusion_models', 'loras', 'vae', 'text_encoders',+ 'clip_vision', 'controlnet', 'upscale_models', 'style_models', 'embeddings',+ ]) {+ expect(names, `${folder} must be in the inventory`).toContain(dummy(folder))+ }+ })++ it('THE FIX: the 817 MB CLIP-Vision encoder is named at last', async () => {+ board({ clipVision: [SIGCLIP] })+ const names = (await getInstalledImageModels()).map((m) => m.name)+ expect(names).toContain(SIGCLIP)+ })++ it('THE FIX: llava_llama3 shows up beside its folder neighbours, at its real size', async () => {+ // The exact frame from the box: four files in text_encoders, three of them+ // visible, the 2.4 GB one gone. Our catalogue ships llava at 8.5 GB, so+ // the size probe reports it as not complete.+ backendCall.mockImplementation(async (_cmd: string, args: { files?: Array<{ filename: string }> }) =>+ (args?.files ?? []).map((f) => ({+ filename: f.filename,+ exists: true,+ actualBytes: f.filename === LLAVA ? 2_548_039_680 : 1_048_576,+ complete: f.filename !== LLAVA,+ })),+ )+ board({+ clips: [+ 'clip_l.safetensors', LLAVA, 'qwen_3_4b.safetensors',+ 'umt5_xxl_fp8_e4m3fn_scaled.safetensors',+ ],+ })++ const names = (await getInstalledImageModels()).map((m) => m.name)++ expect(names).toContain(LLAVA)+ expect(names).toContain('clip_l.safetensors')+ expect(names).toContain('qwen_3_4b.safetensors')+ expect(names).toContain('umt5_xxl_fp8_e4m3fn_scaled.safetensors')+ })++ it('THE FIX: pixel_space is not an installed model, because it is not a file', async () => {+ board({+ vaes: [+ 'ae.safetensors', 'hunyuan_video_vae_bf16.safetensors', 'sdxl_vae.safetensors',+ 'pixel_space',+ ],+ })++ const names = (await getInstalledImageModels()).map((m) => m.name)++ expect(names).not.toContain('pixel_space')+ expect(names).toContain('sdxl_vae.safetensors')+ })++ it('THE FIX: the built-in taesd family goes the same way pixel_space does', async () => {+ board({ vaes: ['taesd', 'taesdxl', 'taesd3', 'taef1', 'ae.safetensors'] })+ const names = (await getInstalledImageModels()).map((m) => m.name)+ expect(names).toEqual(['ae.safetensors'])+ })++ it('THE FIX: an embedding gets its extension back, so it can be measured and deleted', async () => {+ // ComfyUI serves /embeddings with the extension stripped. A name with no+ // extension is not a file: it cannot be sized and it cannot be deleted.+ backendCall.mockImplementation(async (_cmd: string, args: { files?: Array<{ filename: string }> }) =>+ (args?.files ?? []).map((f) => ({+ filename: f.filename,+ exists: f.filename === 'easynegative.pt',+ actualBytes: f.filename === 'easynegative.pt' ? 24_000 : 0,+ complete: true,+ })),+ )+ board({ embeddings: ['easynegative'] })++ const found = (await getInstalledImageModels()).find((m) => m.source === 'embedding')++ expect(found?.name).toBe('easynegative.pt')+ expect(subfolderForSource('embedding')).toBe('embeddings')+ })++ it('the folder list is one table, and it holds every addon folder', () => {+ expect(INSTALLED_ADDON_SUBFOLDERS.sort()).toEqual([+ 'clip_vision', 'controlnet', 'embeddings', 'loras', 'style_models',+ 'text_encoders', 'upscale_models', 'vae',+ ])+ })++ it('NEGATIVE CONTROL: a loader that is not installed costs its folder and nothing else', async () => {+ board({+ checkpoints: ['sd_turbo.safetensors'],+ clipVision: 'missing',+ controlnet: 'missing',+ upscale: 'missing',+ styleModels: 'missing',+ embeddings: 'missing',+ vaes: ['sdxl_vae.safetensors'],+ })++ const names = (await getInstalledImageModels()).map((m) => m.name)++ expect(names).toContain('sd_turbo.safetensors')+ expect(names).toContain('sdxl_vae.safetensors')+ })++ it('NEGATIVE CONTROL: the Create picker did not move, an upscale model is never a main model', async () => {+ board({+ checkpoints: ['sd_turbo.safetensors'],+ upscale: ['4x-UltraSharp.pth'],+ clipVision: [SIGCLIP],+ controlnet: ['control_v11p_sd15_canny.safetensors'],+ styleModels: ['flux1-redux-dev.safetensors'],+ })++ const picker = (await getImageModels()).map((m) => m.name)++ expect(picker).toEqual(['sd_turbo.safetensors'])+ })++ it('NEGATIVE CONTROL: one file listed by two loaders is counted once', async () => {+ board({+ vaes: ['shared.safetensors'],+ clipVision: ['shared.safetensors'],+ })+ const names = (await getInstalledImageModels()).map((m) => m.name)+ expect(names.filter((n) => n === 'shared.safetensors')).toHaveLength(1)+ })++ it('NEGATIVE CONTROL: the file rule takes every real extension, not just safetensors', () => {+ for (const name of [+ 'a.safetensors', 'b.sft', 'c.ckpt', 'd.pt', 'e.pth', 'f.bin', 'g.gguf', 'h.onnx', 'i.pkl',+ 'UPPER.SAFETENSORS',+ ]) {+ expect(isInstalledModelFile(name), name).toBe(true)+ }+ for (const name of ['pixel_space', 'taesd', 'taef1', '', 'folder/name']) {+ expect(isInstalledModelFile(name), name).toBe(false)+ }+ })+})diff --git a/src/api/comfyui.ts b/src/api/comfyui.tsindex 9b16432d..01b66f07 100644--- a/src/api/comfyui.ts+++ b/src/api/comfyui.ts@@ -147,12 +147,20 @@ export interface ClassifiedModel {type: ModelType/** Which ComfyUI enum listed this file. `motion_module` is the AnimateDiff* one, and it lives outside ComfyUI\models entirely (see getMotionModels).- * `lora`, `vae` and `text_encoder` are the addon folders: files that are- * not a model on their own, take up real disk, and used to appear in no- * list and no counter at all (counter-check 2026-08-29). */- source: 'checkpoint' | 'diffusion_model' | 'motion_module' | 'lora' | 'vae' | 'text_encoder'+ * The rest are the addon folders: files that are not a model on their own,+ * take up real disk, and used to appear in no list and no counter at all+ * (counter-check 2026-08-29, and five more folders in the R5 re-measure+ * the day after). */+ source: 'checkpoint' | 'diffusion_model' | 'motion_module' | AddonSource}+/** The ComfyUI\models folders that hold files a user installs, none of which+ * is a main model. One name per folder, and INSTALLED_ADDON_LANES below is+ * the single place that says which loader enumerates it. */+export type AddonSource =+ | 'lora' | 'vae' | 'text_encoder'+ | 'clip_vision' | 'controlnet' | 'upscale_model' | 'embedding' | 'style_model'+/** Where a listed file actually sits, by the enum that listed it. The disk* probe needs the folder, and the delete command resolves the same set.*@@ -168,6 +176,11 @@ export function subfolderForSource(source: ClassifiedModel['source']): string {case 'lora': return 'loras'case 'vae': return 'vae'case 'text_encoder': return 'text_encoders'+ case 'clip_vision': return 'clip_vision'+ case 'controlnet': return 'controlnet'+ case 'upscale_model': return 'upscale_models'+ case 'embedding': return 'embeddings'+ case 'style_model': return 'style_models'}}@@ -632,6 +645,69 @@ export async function getLoraModels(): Promise<string[]> {}}+/** The five folders the R5 re-measure (2026-08-30) found missing entirely.+ *+ * A dummy .safetensors was dropped into ten ComfyUI model folders. ComfyUI+ * listed all ten at once; the app showed five of them and never mentioned the+ * other five. Two real files were invisible with them, an 817 MB CLIP-Vision+ * encoder and, once the partial filter below was fixed, a 2.4 GB text+ * encoder. Each of these is a stock ComfyUI loader over a stock folder, and+ * each soft-fails to an empty list, so a distro that lacks one of the nodes+ * costs that folder and nothing around it. */+export async function getCLIPVisionModels(): Promise<string[]> {+ try {+ return await fetchNodeOptions('CLIPVisionLoader', 'clip_name')+ } catch (err) {+ log.warn('comfyui.fetch_clip_vision_failed', { err })+ return []+ }+}++export async function getControlNetModels(): Promise<string[]> {+ try {+ return await fetchNodeOptions('ControlNetLoader', 'control_net_name')+ } catch (err) {+ log.warn('comfyui.fetch_controlnet_failed', { err })+ return []+ }+}++export async function getUpscaleModels(): Promise<string[]> {+ try {+ return await fetchNodeOptions('UpscaleModelLoader', 'model_name')+ } catch (err) {+ log.warn('comfyui.fetch_upscale_failed', { err })+ return []+ }+}++export async function getStyleModels(): Promise<string[]> {+ try {+ return await fetchNodeOptions('StyleModelLoader', 'style_model_name')+ } catch (err) {+ log.warn('comfyui.fetch_style_models_failed', { err })+ return []+ }+}++/** Embeddings are the one folder no loader node enumerates: ComfyUI serves+ * them from its own /embeddings route instead, and that route hands back+ * BASE NAMES with the extension stripped. So this list alone cannot be shown+ * as installed files, and resolveEmbeddingFiles below puts the extension+ * back before anything reaches the inventory. */+export async function getEmbeddingNames(): Promise<string[]> {+ try {+ const res = await localFetch(comfyuiUrl('/embeddings'), { timeoutMs: COMFY_LIST_TIMEOUT_MS })+ if (!res.ok) return []+ const data = await res.json()+ if (!Array.isArray(data)) return []+ return data.filter((n): n is string => typeof n === 'string' && n.length > 0)+ } catch (err) {+ log.warn('comfyui.fetch_embeddings_failed', { err })+ return []+ }+}+export async function getSamplers(): Promise<string[]> {try {const list = await fetchNodeOptions('KSampler', 'sampler_name')@@ -882,21 +958,128 @@ export async function getInstalledVideoModels(): Promise<ClassifiedModel[]> {return out}+/** Extensions a model file on the disk actually carries. Everything ComfyUI+ * enumerates by filename ends in one of these. */+const MODEL_FILE_EXTENSIONS = [+ '.safetensors', '.sft', '.ckpt', '.pt', '.pth', '.bin', '.gguf', '.onnx', '.pkl',+]++/**+ * Is this enum entry a file on the disk at all.+ *+ * R5 re-measure, 2026-08-30: the Installed list under Image carried an entry+ * called `pixel_space`, type safetensors, no size. A search over the whole C:+ * drive found no such file, because there is none. `pixel_space` is ComfyUI's+ * built-in pixel-space pseudo VAE, and VAELoader offers it in the same enum as+ * the real files, exactly like the built-in taesd family beside it. The app+ * read that enum as a list of installed files and invented a model the user+ * neither downloaded nor can delete.+ *+ * The rule is the general one rather than a name list: an inventory entry+ * claims a file occupies the disk, and a name with no file extension is not a+ * file. That covers pixel_space, taesd, taesdxl, taesd3, taef1 and whatever+ * ComfyUI builds in next, without this having to be told about it.+ */+export function isInstalledModelFile(name: string): boolean {+ const lower = name.toLowerCase()+ return MODEL_FILE_EXTENSIONS.some((ext) => lower.endsWith(ext))+}+/** One addon folder, as classified models. These files are not a model on* their own, which is why no picker offers them and why every inventory* surface used to skip them. They still occupy the disk and the user still- * has to be able to see and remove them. */+ * has to be able to see and remove them.+ *+ * No partial filter here any more, and that is the second half of the R5+ * re-measure (2026-08-30). `text_encoders\llava_llama3_fp8_scaled.safetensors`+ * weighs 2.4 GB on the box and appeared nowhere, while its three folder+ * neighbours appeared. The catalogue ships that name at 8.5 GB, the disk+ * probe called 2.4 GB too small, and filterPartialFiles dropped it. But a+ * catalogue size is a claim about the file WE ship, never about the file the+ * user has, and this list answers one question only: what is lying on the+ * disk. ComfyUI enumerates the file, so ComfyUI can load it; hiding it left+ * 2.4 GB the user could not see and could not delete. The bundle cards and+ * the Create pickers keep their partial filter, because "is this usable" is+ * their question and it is a different one. */async function addonLane(read: () => Promise<string[]>,- source: 'lora' | 'vae' | 'text_encoder',+ source: AddonSource,): Promise<ClassifiedModel[]> {const names = await read()- const complete = await filterPartialFiles(names)return names- .filter((name) => complete.has(name))+ .filter(isInstalledModelFile).map((name) => ({ name, type: classifyModel(name), source }))}+/**+ * The embeddings folder, as real filenames.+ *+ * ComfyUI has no loader node over embeddings: they are served by the+ * /embeddings route, which strips the extension off every name. A stripped+ * name is not a file, so it fails isInstalledModelFile, cannot be measured and+ * cannot be deleted. So the extension is put back by asking the disk which of+ * the candidates exists, in ONE batched probe for the whole folder.+ *+ * Best effort: a probe that fails costs the embeddings lane and nothing else,+ * which is the same deal every other lane gets.+ */+async function embeddingLane(): Promise<ClassifiedModel[]> {+ const bases = await getEmbeddingNames()+ if (bases.length === 0) return []+ // A name that already carries an extension needs no guessing.+ const ready = bases.filter(isInstalledModelFile)+ const stripped = bases.filter((n) => !isInstalledModelFile(n))+ const found = new Set<string>(ready)+ if (stripped.length > 0) {+ try {+ const files = stripped.flatMap((base) =>+ MODEL_FILE_EXTENSIONS.map((ext) => ({+ subfolder: 'embeddings', filename: `${base}${ext}`, expectedBytes: 0,+ })),+ )+ const results: Array<{ filename: string; exists?: boolean }> =+ await backendCall('check_model_sizes', { files })+ const onDisk = new Set(results.filter((r) => r.exists).map((r) => r.filename))+ for (const base of stripped) {+ const hit = MODEL_FILE_EXTENSIONS.map((ext) => `${base}${ext}`).find((f) => onDisk.has(f))+ if (hit) found.add(hit)+ }+ } catch (err) {+ log.warn('comfyui.embedding_filename_probe_failed', { err })+ }+ }+ return [...found].map((name) => ({ name, type: classifyModel(name), source: 'embedding' as const }))+}++/**+ * Which loader answers for which ComfyUI model folder. ONE table, because the+ * folder list was spread over the readers that happened to need a folder, and+ * a folder nobody happened to need was simply invisible: five of them at the+ * R5 re-measure on 2026-08-30 (clip_vision, controlnet, upscale_models,+ * embeddings, style_models), holding among other things an 817 MB CLIP-Vision+ * encoder that no surface in the app had ever named.+ *+ * The main-model folders (checkpoints, diffusion_models, and the GGUF unets+ * beside them) are not here: those are read by getImageModels, which the+ * pickers share. Everything else a user drops into ComfyUI\models is.+ */+const INSTALLED_ADDON_LANES: Array<{ source: AddonSource; read: () => Promise<ClassifiedModel[]> }> = [+ { source: 'lora', read: () => addonLane(getLoraModels, 'lora') },+ { source: 'vae', read: () => addonLane(getVAEModels, 'vae') },+ { source: 'text_encoder', read: () => addonLane(getCLIPModels, 'text_encoder') },+ { source: 'clip_vision', read: () => addonLane(getCLIPVisionModels, 'clip_vision') },+ { source: 'controlnet', read: () => addonLane(getControlNetModels, 'controlnet') },+ { source: 'upscale_model', read: () => addonLane(getUpscaleModels, 'upscale_model') },+ { source: 'style_model', read: () => addonLane(getStyleModels, 'style_model') },+ { source: 'embedding', read: embeddingLane },+]++/** Every ComfyUI\models folder the inventory reads, by its subfolder name.+ * Exported so a test can hold it against ComfyUI's own folder truth instead+ * of against the list that happens to be here. */+export const INSTALLED_ADDON_SUBFOLDERS: string[] =+ INSTALLED_ADDON_LANES.map((lane) => subfolderForSource(lane.source))+/** Everything installed in the image lane, for the INVENTORY surfaces: the* Models rail counter and the Installed tab. The image twin of* getInstalledVideoModels, and the same bug shape one folder further out.@@ -913,18 +1096,16 @@ async function addonLane(* and getImageModels still answers exactly what it did. A VAE is never a* main model, and this function is the only place that says otherwise. */export async function getInstalledImageModels(): Promise<ClassifiedModel[]> {- const [imageModels, loras, vaes, textEncoders] = await Promise.all([+ const [imageModels, ...addons] = await Promise.all([inventoryLane('image', getImageModels),- inventoryLane('lora', () => addonLane(getLoraModels, 'lora')),- inventoryLane('vae', () => addonLane(getVAEModels, 'vae')),- inventoryLane('text_encoder', () => addonLane(getCLIPModels, 'text_encoder')),+ ...INSTALLED_ADDON_LANES.map((lane) => inventoryLane(lane.source, lane.read)),])const out: ClassifiedModel[] = []const seen = new Set<string>()// First lane wins. A name that two loaders both list (a checkpoint ComfyUI// also offers as a VAE) is one file on the disk and belongs in the list// once, or the Installed count starts inventing entries.- for (const m of [...imageModels, ...loras, ...vaes, ...textEncoders]) {+ for (const m of [imageModels, ...addons].flat()) {if (seen.has(m.name)) continueseen.add(m.name)out.push(m)diff --git a/src/hooks/useModels.ts b/src/hooks/useModels.tsindex 25136d57..bfe19d95 100644--- a/src/hooks/useModels.ts+++ b/src/hooks/useModels.ts@@ -5,7 +5,6 @@ import {getInstalledImageModels as getComfyImageModels,getInstalledVideoModels as getComfyVideoModels,checkComfyConnection,- filterPartialFiles,readModelDiskSizes,} from '../api/comfyui'import { parseNDJSONStream } from '../api/stream'@@ -222,11 +221,13 @@ export function useModels() {const imageModels = imageResult.status === 'fulfilled' ? imageResult.value : []const videoModels = videoResult.status === 'fulfilled' ? videoResult.value : []- // Still drop half-downloaded multipart files, as before.- const complete = await filterPartialFiles([- ...imageModels.map((m) => m.name),- ...videoModels.map((m) => m.name),- ])+ // No second partial filter here. The inventory readers above are the+ // one reader for this list and they already decided what is on the+ // disk; asking the catalogue a second time is what hid+ // llava_llama3_fp8_scaled.safetensors (2.4 GB on the box, 8.5 GB in+ // our catalogue) from every surface in the app while its three folder+ // neighbours showed up (R5 re-measure, 2026-08-30). A catalogue size+ // is a claim about the file we ship, not about the file the user has.const format = (name: string) =>name.toLowerCase().endsWith('.gguf') ? 'gguf' : 'safetensors'// What each file weighs, asked once for both lanes. Every ComfyUI@@ -238,8 +239,8 @@ export function useModels() {architecture: m.type, type, providerName: 'ComfyUI' as const,})comfyModels = [- ...imageModels.filter((m) => complete.has(m.name)).map((m) => toModel(m, 'image') as ImageModel),- ...videoModels.filter((m) => complete.has(m.name)).map((m) => toModel(m, 'video') as VideoModel),+ ...imageModels.map((m) => toModel(m, 'image') as ImageModel),+ ...videoModels.map((m) => toModel(m, 'video') as VideoModel),]}setModels([...allModels, ...comfyModels])