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): card, counter and Installed list read the same shelf

purple02629277b940
diff --git a/src/api/__tests__/bundle-install-visible-wait.test.ts b/src/api/__tests__/bundle-install-visible-wait.test.ts
index 06f71818..a9aacf3e 100644
--- a/src/api/__tests__/bundle-install-visible-wait.test.ts
+++ b/src/api/__tests__/bundle-install-visible-wait.test.ts
@@ -44,6 +44,9 @@ vi.mock('../comfyui', () => ({
getVAEModels: async () => [],
getCLIPModels: async () => [],
getGgufUnetModels: () => getGgufUnetModels(),
+ // Sixth loader (2026-08-29): the AnimateDiff pack lists its motion modules
+ // itself. No motion module in these fixtures, so it answers empty.
+ getAnimateDiffModels: async () => [],
filterPartialFiles: async (names: string[]) => new Set(names),
refreshComfyModels: (...a: unknown[]) => refreshComfyModels(...(a as [number])),
}))
diff --git a/src/api/__tests__/bundles-installed-every-file.test.ts b/src/api/__tests__/bundles-installed-every-file.test.ts
index 867d07d1..27c3b18e 100644
--- a/src/api/__tests__/bundles-installed-every-file.test.ts
+++ b/src/api/__tests__/bundles-installed-every-file.test.ts
@@ -43,6 +43,9 @@ vi.mock('../comfyui', () => ({
getCheckpoints: async () => [],
getDiffusionModels: () => diffusionModels(),
getGgufUnetModels: () => ggufUnets(),
+ // Sixth loader (2026-08-29): the AnimateDiff pack lists its motion modules
+ // itself. No motion module in these fixtures, so it answers empty.
+ getAnimateDiffModels: async () => [],
getVAEModels: () => vaes(),
getCLIPModels: () => clips(),
filterPartialFiles: async (names: string[]) => new Set(names),
diff --git a/src/api/__tests__/bundles-installed-gguf.test.ts b/src/api/__tests__/bundles-installed-gguf.test.ts
index a246103c..99007269 100644
--- a/src/api/__tests__/bundles-installed-gguf.test.ts
+++ b/src/api/__tests__/bundles-installed-gguf.test.ts
@@ -30,6 +30,9 @@ vi.mock('../comfyui', () => ({
getVAEModels: async () => [],
getCLIPModels: async () => [],
getGgufUnetModels: () => ggufUnets(),
+ // Sixth loader (2026-08-29): the AnimateDiff pack lists its motion modules
+ // itself. No motion module in these fixtures, so it answers empty.
+ getAnimateDiffModels: async () => [],
filterPartialFiles: async (names: string[]) => new Set(names),
}))
diff --git a/src/api/__tests__/installed-video-inventory.test.ts b/src/api/__tests__/installed-video-inventory.test.ts
new file mode 100644
index 00000000..7e8c51da
--- /dev/null
+++ b/src/api/__tests__/installed-video-inventory.test.ts
@@ -0,0 +1,177 @@
+/**
+ * Round 2 of B1 / GH #113, from the counter-check on the real 2.6.7 Windows
+ * build (2026-08-29).
+ *
+ * Endstate there: two video bundles installed cleanly, both cards reading
+ * Installed, the rail counter on Video reading 3, and the Installed list
+ * holding three Wan files and neither AnimateDiff bundle. Same bug shape as
+ * the round 1 finding, one layer further out: the card checks its own files,
+ * the counter and the list read the four ComfyUI\models loaders, and
+ * AnimateDiff-Evolved keeps its motion modules in
+ * custom_nodes/ComfyUI-AnimateDiff-Evolved/models. Nothing that reads only
+ * ComfyUI\models can ever see them.
+ *
+ * Second finding in the same frame: the other file of those bundles, the
+ * Realistic Vision SD1.5 checkpoint, was counted under Image only, so one
+ * video bundle showed up half in the wrong lane and half nowhere.
+ *
+ * These tests pin the inventory reader the counter and the Installed list use
+ * now, and they pin that the Create picker reader did NOT change with it: a
+ * motion module is half of a pair, never a main model.
+ *
+ * Run: npx vitest run src/api/__tests__/installed-video-inventory.test.ts
+ */
+import { describe, it, expect, vi, beforeEach } from 'vitest'
+
+const localFetch = vi.fn()
+vi.mock('../backend', async (importOriginal) => ({
+ ...(await importOriginal<typeof import('../backend')>()),
+ localFetch: (...a: unknown[]) => localFetch(...a),
+ isTauri: () => false,
+ comfyuiUrl: (path: string) => `http://127.0.0.1:8188${path}`,
+}))
+
+import {
+ getVideoModels, getImageModels, getInstalledVideoModels, getAnimateDiffMotionModels,
+ classifyModel, isImageModelType,
+} from '../comfyui'
+import { ENUM_SUBFOLDERS, ANIMATEDIFF_SUBFOLDER, readComfyModelNames, modelsNotVisibleInComfy } from '../discover'
+import { getVideoBundles } from '../discover'
+
+const okJson = (body: unknown) => ({ ok: true, status: 200, json: async () => body })
+
+/** The two files of the AnimateDiff bundles, exactly as the catalogue and the
+ * box name them. */
+const MOTION_LIGHTNING = 'animatediff_lightning_4step_comfyui.safetensors'
+const MOTION_V3 = 'v3_sd15_mm.ckpt'
+const SD15 = 'Realistic_Vision_V6.0_NV_B1_fp16.safetensors'
+const WAN = 'wan2.2_ti2v_5B_fp16.safetensors'
+
+function routeObjectInfo(opts: {
+ checkpoints?: string[]
+ unets?: string[]
+ gguf?: string[]
+ motion?: string[]
+ adeInstalled?: boolean
+}) {
+ const { checkpoints = [], unets = [], gguf = [], motion = [], adeInstalled = true } = opts
+ localFetch.mockImplementation(async (url: string) => {
+ if (url.includes('CheckpointLoaderSimple')) {
+ return okJson({ CheckpointLoaderSimple: { input: { required: { ckpt_name: [checkpoints] } } } })
+ }
+ if (url.includes('UnetLoaderGGUF')) {
+ return okJson({ UnetLoaderGGUF: { input: { required: { unet_name: [gguf] } } } })
+ }
+ if (url.includes('UNETLoader')) {
+ return okJson({ UNETLoader: { input: { required: { unet_name: [unets] } } } })
+ }
+ if (url.includes('ADE_LoadAnimateDiffModel')) {
+ if (!adeInstalled) return { ok: false, status: 404, json: async () => ({}) }
+ return okJson({ ADE_LoadAnimateDiffModel: { input: { required: { model_name: [motion] } } } })
+ }
+ return okJson({})
+ })
+}
+
+beforeEach(() => {
+ localFetch.mockReset()
+})
+
+describe('the Installed counter sees what the cards see', () => {
+ it('THE FIX: a motion module under custom_nodes is in the video inventory', async () => {
+ routeObjectInfo({ motion: [MOTION_LIGHTNING, MOTION_V3] })
+ const names = (await getInstalledVideoModels()).map(m => m.name)
+ expect(names).toContain(MOTION_LIGHTNING)
+ expect(names).toContain(MOTION_V3)
+ })
+
+ it('the exact counter-check endstate: three Wan files plus two AnimateDiff bundles', async () => {
+ // What the box actually had: the counter said 3 and both AnimateDiff cards
+ // said Installed. The inventory now holds all of it.
+ routeObjectInfo({
+ checkpoints: [SD15],
+ unets: ['wan2.1_t2v_1.3B_bf16.safetensors', WAN],
+ gguf: ['wan2.2-i2v-rapid-aio-v10-nsfw-Q4_K_M.gguf'],
+ motion: [MOTION_LIGHTNING, MOTION_V3],
+ })
+ const names = (await getInstalledVideoModels()).map(m => m.name)
+ expect(names).toContain(MOTION_LIGHTNING)
+ expect(names).toContain(MOTION_V3)
+ // and the three Wan files that were already counted
+ expect(names).toContain('wan2.1_t2v_1.3B_bf16.safetensors')
+ expect(names).toContain(WAN)
+ expect(names).toContain('wan2.2-i2v-rapid-aio-v10-nsfw-Q4_K_M.gguf')
+ expect(new Set(names).size).toBe(names.length) // no double counting
+ })
+
+ it('SECOND FINDING: the SD1.5 half of a video bundle counts in the video lane too', async () => {
+ routeObjectInfo({ checkpoints: [SD15], motion: [MOTION_LIGHTNING] })
+ const video = (await getInstalledVideoModels()).map(m => m.name)
+ expect(video).toContain(SD15)
+ // and it stays an image checkpoint, because that is what it also is
+ const image = (await getImageModels()).map(m => m.name)
+ expect(image).toContain(SD15)
+ })
+
+ it('without a motion module an SD1.5 checkpoint does NOT inflate the video count', async () => {
+ // No AnimateDiff pack, no AnimateDiff lane. selectStrategy uses the same
+ // condition before it routes video onto the animatediff pipeline.
+ routeObjectInfo({ checkpoints: [SD15], adeInstalled: false })
+ const names = (await getInstalledVideoModels()).map(m => m.name)
+ expect(names).toEqual([])
+ })
+
+ it('the Create picker reader is unchanged: no motion module as a main model', async () => {
+ routeObjectInfo({ checkpoints: [SD15], motion: [MOTION_LIGHTNING, MOTION_V3] })
+ const picker = (await getVideoModels()).map(m => m.name)
+ expect(picker).not.toContain(MOTION_LIGHTNING)
+ expect(picker).not.toContain(MOTION_V3)
+ expect(picker).not.toContain(SD15)
+ })
+
+ it('a motion module is never offered in the image picker either', async () => {
+ routeObjectInfo({ checkpoints: [MOTION_LIGHTNING], motion: [MOTION_LIGHTNING] })
+ const image = (await getImageModels()).map(m => m.name)
+ expect(image).not.toContain(MOTION_LIGHTNING)
+ expect(classifyModel(MOTION_LIGHTNING)).toBe('animatediff')
+ expect(isImageModelType('animatediff')).toBe(false)
+ })
+
+ it('degrades quietly when the AnimateDiff pack is not installed', async () => {
+ routeObjectInfo({ unets: [WAN], adeInstalled: false })
+ expect(await getAnimateDiffMotionModels()).toEqual([])
+ const names = (await getInstalledVideoModels()).map(m => m.name)
+ expect(names).toEqual([WAN])
+ })
+})
+
+describe('the shared visibility reader covers the custom_nodes path', () => {
+ it('readComfyModelNames lists a motion module', async () => {
+ routeObjectInfo({ motion: [MOTION_V3] })
+ expect(await readComfyModelNames()).toContain(MOTION_V3)
+ })
+
+ it('a finished AnimateDiff download is confirmed instead of accused', async () => {
+ // Before the sixth loader, this file could never be confirmed: the install
+ // click and the download poller spent their whole budget and then told the
+ // user LU and ComfyUI use different model folders.
+ routeObjectInfo({ motion: [MOTION_V3] })
+ expect(await modelsNotVisibleInComfy([MOTION_V3])).toEqual([])
+ })
+
+ it('a motion module the engine does not list is still reported missing', async () => {
+ routeObjectInfo({ motion: [] })
+ expect(await modelsNotVisibleInComfy([MOTION_V3])).toEqual([MOTION_V3])
+ })
+
+ it('the AnimateDiff subfolder is judged, and both catalogue bundles use it', () => {
+ expect(ENUM_SUBFOLDERS.has(ANIMATEDIFF_SUBFOLDER)).toBe(true)
+ const animate = getVideoBundles().filter(b => b.workflow === 'animatediff')
+ expect(animate.length).toBeGreaterThan(0)
+ for (const b of animate) {
+ const motionFile = b.files.find(f => f.filename === MOTION_LIGHTNING || f.filename === MOTION_V3)
+ expect(motionFile, b.name).toBeTruthy()
+ expect(motionFile!.subfolder, b.name).toBe(ANIMATEDIFF_SUBFOLDER)
+ }
+ })
+})
diff --git a/src/api/comfyui.ts b/src/api/comfyui.ts
index d14b56ea..3683fbad 100644
--- a/src/api/comfyui.ts
+++ b/src/api/comfyui.ts
@@ -138,13 +138,15 @@ export function galleryTypeForFile(
// 2.5.8: ace / wans2v / wananimate / wanvace are the specialized local-lane
// architectures (music, talking character, motion control). They are neither
// image nor video picker material — each lane has its own model list.
-export type ModelType = 'flux' | 'flux2' | 'zimage' | 'ernie_image' | 'sdxl' | 'sd15' | 'wan' | 'wan22' | 'hunyuan' | 'ltx' | 'mochi' | 'cosmos' | 'cogvideo' | 'svd' | 'framepack' | 'pyramidflow' | 'allegro' | 'ace' | 'wans2v' | 'wananimate' | 'wanvace' | 'unknown'
+export type ModelType = 'flux' | 'flux2' | 'zimage' | 'ernie_image' | 'sdxl' | 'sd15' | 'wan' | 'wan22' | 'hunyuan' | 'ltx' | 'mochi' | 'cosmos' | 'cogvideo' | 'svd' | 'framepack' | 'pyramidflow' | 'allegro' | 'ace' | 'wans2v' | 'wananimate' | 'wanvace' | 'animatediff' | 'unknown'
export type VideoBackend = 'wan' | 'animatediff' | 'none'
export interface ClassifiedModel {
name: string
type: ModelType
- source: 'checkpoint' | 'diffusion_model'
+ /** Which ComfyUI enum listed this file. `motion_module` is the AnimateDiff
+ * one, and it lives outside ComfyUI\models entirely (see getMotionModels). */
+ source: 'checkpoint' | 'diffusion_model' | 'motion_module'
}
// ─── Model Classification ───
@@ -180,6 +182,11 @@ export function classifyModel(name: string | null | undefined): ModelType {
if (lower.includes('vace')) return 'wanvace'
if (lower.includes('s2v')) return 'wans2v'
if (lower.includes('animate') && lower.includes('wan') && !lower.includes('animatediff')) return 'wananimate'
+ // A motion module is neither an image nor a standalone video model: it is the
+ // second half of the AnimateDiff lane, which also needs an SD checkpoint. Its
+ // own type keeps it out of isImageModelType (which lets 'unknown' through and
+ // would otherwise offer a motion module in the image picker).
+ if (lower.includes('animatediff')) return 'animatediff'
if (lower.includes('ace_step') || lower.includes('ace-step') || lower.includes('acestep')) return 'ace'
// Merged 14B "rapid AIO" builds (e.g. wan2.2-i2v-rapid-aio) are Wan 14B
// architecture: classic WanImageToVideo graph + wan_2.1_vae — NOT the
@@ -615,9 +622,14 @@ export async function getSchedulers(): Promise<string[]> {
}
}
+/** Motion modules the AnimateDiff-Evolved pack enumerates. These files do NOT
+ * live under ComfyUI\models: the pack keeps them in
+ * custom_nodes/ComfyUI-AnimateDiff-Evolved/models, which is why the four
+ * ComfyUI\models loaders cannot see them and why every surface that only read
+ * those four reported an installed AnimateDiff bundle as nothing at all. */
export async function getAnimateDiffModels(): Promise<string[]> {
try {
- const res = await localFetch(comfyuiUrl('/object_info/ADE_LoadAnimateDiffModel'))
+ const res = await localFetch(comfyuiUrl('/object_info/ADE_LoadAnimateDiffModel'), { timeoutMs: COMFY_LIST_TIMEOUT_MS })
if (!res.ok) return []
const data = await res.json()
return data?.ADE_LoadAnimateDiffModel?.input?.required?.model_name?.[0] ?? []
@@ -765,6 +777,55 @@ export async function getVideoModels(): Promise<ClassifiedModel[]> {
return result
}
+/** The AnimateDiff motion modules, as classified models. (getMotionModels,
+ * without the prefix, is the Wan Animate/VACE lane and a different thing.)
+ *
+ * Kept separate from getVideoModels on purpose: the Create video picker asks
+ * that one for a MAIN model, and a motion module is never that. It is half of
+ * a pair (SD checkpoint + motion module) that the animatediff strategy puts
+ * together itself via findAnimateDiffModel. */
+export async function getAnimateDiffMotionModels(): Promise<ClassifiedModel[]> {
+ const names = await getAnimateDiffModels()
+ return names.map((name) => ({ name, type: 'animatediff' as ModelType, source: 'motion_module' as const }))
+}
+
+/** Everything installed in the video lane, for the INVENTORY surfaces: the
+ * Models rail counter and the Installed tab.
+ *
+ * Counter-check on the Windows box, 2026-08-29: two AnimateDiff bundles
+ * installed cleanly, both cards read Installed, and the rail counter and the
+ * Installed list knew neither of them. The cards check their own files, the
+ * counter read the four ComfyUI\models loaders, and AnimateDiff keeps its
+ * motion modules under custom_nodes. Same bug shape as GH #113: card, counter
+ * and list answering from different readers.
+ *
+ * Two additions over getVideoModels, both of them things ComfyUI really can
+ * serve as video right now:
+ * - the motion modules themselves, wherever the pack keeps them
+ * - the SD checkpoints the AnimateDiff lane drives, but ONLY while motion
+ * modules exist, which is the same condition selectStrategy uses before it
+ * routes a video request onto the animatediff pipeline. That is the second
+ * file of both AnimateDiff bundles (Realistic Vision), which used to be
+ * counted under Image alone, so a video bundle showed up half in the wrong
+ * lane and half nowhere. It stays in the Image count too, because it is
+ * genuinely an image checkpoint as well.
+ *
+ * Not used by detectVideoBackend, the Create picker or model-pick: those ask
+ * for a main model and getVideoModels still answers exactly what it did. */
+export async function getInstalledVideoModels(): Promise<ClassifiedModel[]> {
+ const [videoModels, motionModels] = await Promise.all([getVideoModels(), getAnimateDiffMotionModels()])
+ const out: ClassifiedModel[] = [...videoModels, ...motionModels]
+ if (motionModels.length > 0) {
+ const imageModels = await getImageModels()
+ for (const m of imageModels) {
+ if (m.source !== 'checkpoint') continue
+ if (out.some((x) => x.name === m.name)) continue
+ out.push(m)
+ }
+ }
+ return out
+}
+
// ── 2.5.8 specialized local-lane model lists ─────────────────────────────────
// Each lane owns its picker: an ACE checkpoint in the Image list (or a 14B S2V
// in the Video list) would build a graph that ComfyUI rejects, so these
diff --git a/src/api/discover.ts b/src/api/discover.ts
index 898bf6da..9b1d9714 100644
--- a/src/api/discover.ts
+++ b/src/api/discover.ts
@@ -1,5 +1,5 @@
import { backendCall, fetchExternal } from "./backend"
-import { getCheckpoints, getDiffusionModels, getVAEModels, getCLIPModels, getGgufUnetModels, filterPartialFiles, refreshComfyModels } from "./comfyui"
+import { getCheckpoints, getDiffusionModels, getVAEModels, getCLIPModels, getGgufUnetModels, getAnimateDiffModels, filterPartialFiles, refreshComfyModels } from "./comfyui"
import type { ProviderId } from "./providers/types"
import { log } from "../lib/logger"
@@ -150,21 +150,30 @@ export async function checkBundlesInstalled(bundles: ModelBundle[]): Promise<Rec
// quants are listed by ComfyUI-GGUF's own loader. Both Unfiltered video
// bundles are GGUF, so without it this cannot see the one file that makes
// them what they are, and the fuzzy fallback below can never confirm them.
- const [rawCheckpoints, rawDiffModels, rawGgufUnets, rawVaes, rawClips] = await Promise.all([
+ // getAnimateDiffModels for the same reason getGgufUnetModels is here: the
+ // motion modules of both AnimateDiff bundles live under custom_nodes and
+ // none of the four ComfyUI\models loaders can see them. Without it the
+ // gate below skipped those files and the card trusted the disk alone,
+ // which is how two cards read Installed over a rail counter that knew
+ // neither of them.
+ const [rawCheckpoints, rawDiffModels, rawGgufUnets, rawVaes, rawClips, rawMotion] = await Promise.all([
getCheckpoints(), getDiffusionModels(), getGgufUnetModels(), getVAEModels(), getCLIPModels(),
+ getAnimateDiffModels(),
])
- const [checkpoints, diffModels, ggufUnets, vaes, clips] = await Promise.all([
+ const [checkpoints, diffModels, ggufUnets, vaes, clips, motion] = await Promise.all([
filterPartialFiles(rawCheckpoints).then(s => Array.from(s)),
filterPartialFiles(rawDiffModels).then(s => Array.from(s)),
filterPartialFiles(rawGgufUnets).then(s => Array.from(s)),
filterPartialFiles(rawVaes).then(s => Array.from(s)),
filterPartialFiles(rawClips).then(s => Array.from(s)),
+ filterPartialFiles(rawMotion).then(s => Array.from(s)),
])
comfyLists = {
checkpoints,
diffusion_models: [...diffModels, ...ggufUnets],
vae: vaes,
text_encoders: clips,
+ [ANIMATEDIFF_SUBFOLDER]: motion,
}
} catch {
comfyLists = null // ComfyUI not reachable · size-check verdicts stand
@@ -226,10 +235,19 @@ export async function checkBundlesInstalled(bundles: ModelBundle[]): Promise<Rec
return result
}
+/** Where the AnimateDiff-Evolved pack keeps its motion modules. Not under
+ * ComfyUI\models at all, which is exactly why the counter and the Installed
+ * list used to miss a fully installed AnimateDiff bundle while its card said
+ * Installed (counter-check on the Windows box, 2026-08-29). */
+export const ANIMATEDIFF_SUBFOLDER = 'custom_nodes/ComfyUI-AnimateDiff-Evolved/models'
+
/** Subfolders whose contents ComfyUI enumerates via object_info — the only
* ones the visibility check can reason about (loras/upscale etc. stay on the
- * pure size check). */
-export const ENUM_SUBFOLDERS = new Set(['checkpoints', 'diffusion_models', 'vae', 'text_encoders'])
+ * pure size check). The AnimateDiff one is enumerated by the pack's own
+ * ADE_LoadAnimateDiffModel node, so it belongs here even though it sits under
+ * custom_nodes: a motion module the running ComfyUI cannot list is exactly as
+ * useless as an invisible checkpoint. */
+export const ENUM_SUBFOLDERS = new Set(['checkpoints', 'diffusion_models', 'vae', 'text_encoders', ANIMATEDIFF_SUBFOLDER])
/** Base identity of a model file: basename only (ComfyUI enums can carry
* nested-subdir prefixes), lowercase, extension and common quant suffixes
@@ -255,6 +273,12 @@ export function normalizeModelBase(name: string): string {
export async function readComfyModelNames(): Promise<string[]> {
const lists = await Promise.all([
getCheckpoints(), getDiffusionModels(), getVAEModels(), getCLIPModels(), getGgufUnetModels(),
+ // Sixth loader, added 2026-08-29 after the counter-check: the AnimateDiff
+ // pack enumerates its motion modules itself, from a folder under
+ // custom_nodes. Without it a finished AnimateDiff download could never be
+ // confirmed, so the download store spent its full budget and then told the
+ // user LU and ComfyUI use different model folders, which was not true.
+ getAnimateDiffModels(),
])
return lists.flat()
}
diff --git a/src/components/create/experimental/badges.ts b/src/components/create/experimental/badges.ts
index 1de68cb0..78dd8233 100644
--- a/src/components/create/experimental/badges.ts
+++ b/src/components/create/experimental/badges.ts
@@ -25,6 +25,9 @@ export const TYPE_BADGE: Record<ModelType, { label: string; color: string }> = {
wans2v: { label: 'Wan S2V', color: 'bg-orange-500/15 text-orange-300' },
wananimate: { label: 'Wan Animate', color: 'bg-orange-500/15 text-orange-300' },
wanvace: { label: 'VACE', color: 'bg-lime-500/15 text-lime-300' },
+ // A motion module, not a main model. It shows up in the Models inventory,
+ // never in a Create picker, so this label is only ever read there.
+ animatediff: { label: 'AnimateDiff', color: 'bg-sky-500/15 text-sky-300' },
unknown: { label: 'Model', color: 'bg-white/10 text-gray-400' },
}
diff --git a/src/hooks/useModels.ts b/src/hooks/useModels.ts
index 0dbc1c53..700dea58 100644
--- a/src/hooks/useModels.ts
+++ b/src/hooks/useModels.ts
@@ -3,7 +3,7 @@ import { listModels, pullModel as pullModelApi, pullModelTauri, deleteModel as d
import { isTauri, isMacOS } from '../api/backend'
import {
getImageModels as getComfyImageModels,
- getVideoModels as getComfyVideoModels,
+ getInstalledVideoModels as getComfyVideoModels,
checkComfyConnection,
filterPartialFiles,
} from '../api/comfyui'
@@ -191,6 +191,13 @@ export function useModels() {
if (comfyOk) {
// Settled, not all: a folder ComfyUI cannot read costs that one lane,
// never the whole list. The old code lost both to a single throw.
+ // The VIDEO side asks getInstalledVideoModels, not getVideoModels. This
+ // is the inventory, and the inventory has to agree with the bundle
+ // cards: a bundle whose card says Installed must be in this count and
+ // in the Installed list. The four ComfyUI\models loaders alone cannot
+ // do that, because the AnimateDiff pack keeps its motion modules under
+ // custom_nodes (counter-check on the Windows box, 2026-08-29: two
+ // cards Installed, rail counter 3, neither bundle in the list).
const [imageResult, videoResult] = await Promise.allSettled([
getComfyImageModels(),
getComfyVideoModels(),
diff --git a/src/stores/createStore.ts b/src/stores/createStore.ts
index 59b20e36..5a85b2fc 100644
--- a/src/stores/createStore.ts
+++ b/src/stores/createStore.ts
@@ -121,6 +121,10 @@ export const MODEL_TYPE_DEFAULTS: Record<ModelType, {
wans2v: { steps: 20, cfgScale: 6.0, sampler: 'euler', scheduler: 'simple', width: 832, height: 480, frames: 77, fps: 16 },
wananimate: { steps: 20, cfgScale: 5.0, sampler: 'euler', scheduler: 'simple', width: 832, height: 480, frames: 77, fps: 16 },
wanvace: { steps: 25, cfgScale: 5.0, sampler: 'euler', scheduler: 'simple', width: 832, height: 480, frames: 81, fps: 16 },
+ // The AnimateDiff lane runs on an SD1.5 checkpoint plus a motion module, so
+ // these are the SD1.5 numbers with a frame count (see comfyui.ts
+ // MODEL_TYPE_DEFAULTS.animatediff, which the workflow builder reads).
+ animatediff: { steps: 20, cfgScale: 7.5, sampler: 'euler_ancestral', scheduler: 'normal', width: 512, height: 512, frames: 16, fps: 8 },
unknown: { steps: 20, cfgScale: 7.0, sampler: 'euler', scheduler: 'normal', width: 1024, height: 1024 },
}