Skip to content

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.

fix(models): the installed list reads the file ending

purple0f1e4fb609e8
diff --git a/e2e/installed-models-show-their-file-format.spec.ts b/e2e/installed-models-show-their-file-format.spec.ts
new file mode 100644
index 00000000..63f7ac8d
--- /dev/null
+++ b/e2e/installed-models-show-their-file-format.spec.ts
@@ -0,0 +1,43 @@
+import { test, expect } from '@playwright/test'
+import { tauriMockInit, DEFAULT_ASSISTANT_REPLY, DEFAULT_MODEL_NAME } from './support/tauri-mock'
+import { seedOnboardingDone } from './support/cloud-mock'
+
+/**
+ * 3.0.4 Gegenprobe 8 (02.10.2026): Models, Installed called the AnimateDiff
+ * motion module v3_sd15_mm.ckpt "safetensors". Every ComfyUI file that was not
+ * .gguf got that word. Here a nachgebautes ComfyUI lists a .ckpt next to a
+ * .safetensors, and the cards must name each file's own format.
+ */
+test('an installed .ckpt is labelled ckpt, a .safetensors safetensors', async ({ page }) => {
+ await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME, platform: 'windows' })
+ await seedOnboardingDone(page)
+ await page.addInitScript(() => {
+ const bridge = (window as unknown as { __TAURI_INTERNALS__: { invoke: (c: string, a: { url?: string }) => Promise<unknown> } }).__TAURI_INTERNALS__
+ const invoke = bridge.invoke
+ const combo = (v: string[]) => [v]
+ const nodes = {
+ CheckpointLoaderSimple: { input: { required: { ckpt_name: combo(['dreamshaper_8.ckpt', 'juggernautXL.safetensors']) } } },
+ KSampler: { input: { required: { sampler_name: combo(['euler']), scheduler: combo(['simple']) } } },
+ } as Record<string, unknown>
+ bridge.invoke = (command, args) => {
+ if (command === 'sniff_model_files') return Promise.resolve([])
+ if (command !== 'proxy_localhost' || !args?.url?.includes(':8188')) return invoke(command, args)
+ const url = args.url
+ if (url.includes('/system_stats')) return Promise.resolve(JSON.stringify({ devices: [{ name: 'RTX 3060', type: 'cuda', vram_total: 12 * 1024 ** 3 }] }))
+ const one = /\/object_info\/([^/?]+)/.exec(url)
+ if (one) return Promise.resolve(JSON.stringify(one[1] in nodes ? { [one[1]]: nodes[one[1]] } : {}))
+ if (url.includes('/object_info')) return Promise.resolve(JSON.stringify(nodes))
+ return Promise.resolve('{}')
+ }
+ })
+ await page.goto('/')
+ await page.getByRole('button', { name: /^Models$/ }).first().click()
+ await page.getByRole('button', { name: /^Image \d+$/ }).click()
+ await page.getByRole('button', { name: /^Installed/ }).click()
+
+ const card = (name: string) => page.locator('div').filter({ hasText: name }).filter({ has: page.getByText(/^(ckpt|safetensors|gguf)$/) }).last()
+ await expect(card('dreamshaper_8')).toBeVisible({ timeout: 20_000 })
+ await expect(card('dreamshaper_8').getByText('ckpt', { exact: true })).toBeVisible()
+ await expect(card('dreamshaper_8').getByText('safetensors', { exact: true })).toHaveCount(0)
+ await expect(card('juggernautXL').getByText('safetensors', { exact: true })).toBeVisible()
+})
diff --git a/src/hooks/useModels.ts b/src/hooks/useModels.ts
index 695e4dec..4b69f1e6 100644
--- a/src/hooks/useModels.ts
+++ b/src/hooks/useModels.ts
@@ -38,6 +38,7 @@ import {
} from '../api/engine'
import type { BundledModel } from '../api/engine'
import type { PullProgress, AIModel, ModelCategory, ImageModel, VideoModel, CloudModel, ComfyModelSource } from '../types/models'
+import { fileFormat } from '../lib/model-file-format'
// Boot-resume for the managed built-in engine (2.5.7): the llama-server
@@ -484,8 +485,9 @@ export function useModels() {
// 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'
+ // The file's own ending. Everything that was not .gguf used to be
+ // called safetensors, a .ckpt motion module too (3.0.4 Gegenprobe 8).
+ const format = (name: string) => fileFormat({ name })
// What each file weighs, asked once for both lanes. Every ComfyUI
// entry used to carry size 0, and the card hides a zero size, so the
// Installed list answered "what is this costing me" with silence.
diff --git a/src/lib/__tests__/a-ckpt-file-is-not-called-safetensors.test.ts b/src/lib/__tests__/a-ckpt-file-is-not-called-safetensors.test.ts
index 28ea9490..fa736efd 100644
--- a/src/lib/__tests__/a-ckpt-file-is-not-called-safetensors.test.ts
+++ b/src/lib/__tests__/a-ckpt-file-is-not-called-safetensors.test.ts
@@ -16,6 +16,12 @@ describe('the model card names the real file format', () => {
expect(fileFormat({ name: 'some-model' })).toBe('')
})
+ it('the installed list reads the ending instead of calling every file safetensors', () => {
+ const hook = readFileSync('src/hooks/useModels.ts', 'utf8')
+ expect(hook).not.toMatch(/'gguf'\s*:\s*'safetensors'/)
+ expect(hook).toContain('fileFormat({ name })')
+ })
+
it('the card no longer falls back to the word safetensors', () => {
const card = readFileSync('src/components/models/ModelCard.tsx', 'utf8')
expect(card).not.toMatch(/\|\|\s*'safetensors'/)