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(comfyui): K2 - validate every loader value against ComfyUI's live list before submit

purpled507c626f352
diff --git a/src/api/__tests__/framepack-vae.test.ts b/src/api/__tests__/framepack-vae.test.ts
index c3d1fe78..d73c35d9 100644
--- a/src/api/__tests__/framepack-vae.test.ts
+++ b/src/api/__tests__/framepack-vae.test.ts
@@ -60,7 +60,14 @@ const params = {
function vaeEnum(list: string[]) {
vi.mocked(localFetch).mockResolvedValue({
ok: true,
- json: async () => ({ VAELoader: { input: { required: { vae_name: [list] } } } }),
+ // K2: findMatchingClipVision() now also probes /object_info/CLIPVisionLoader
+ // (same live-list-first fix as the VAE above, for FramePack's clip_vision
+ // encoder). The mock answers every /object_info/<node> call with the same
+ // body regardless of which node was asked for, so it needs both keys.
+ json: async () => ({
+ VAELoader: { input: { required: { vae_name: [list] } } },
+ CLIPVisionLoader: { input: { required: { clip_name: [['sigclip_vision_patch14_384.safetensors']] } } },
+ }),
} as never)
}
diff --git a/src/api/__tests__/local-op-workflows.test.ts b/src/api/__tests__/local-op-workflows.test.ts
index 1622f47c..7475557a 100644
--- a/src/api/__tests__/local-op-workflows.test.ts
+++ b/src/api/__tests__/local-op-workflows.test.ts
@@ -3,7 +3,7 @@
// they lean on. allNodes is mocked as a plain presence map — exactly what
// getAllNodeInfo() feeds the builders at runtime.
-import { describe, it, expect } from 'vitest'
+import { describe, it, expect, vi } from 'vitest'
import {
buildMusicWorkflow,
buildS2VWorkflow,
@@ -14,6 +14,22 @@ import {
import { classifyModel, galleryTypeForFile, resolveLocalOpPick, type ClassifiedModel } from '../comfyui'
import type { ComfyApiGraph, ComfyApiNode } from '../../types/comfy-graph'
+// K2: buildS2VWorkflow/buildMotionWorkflow now resolve CLIP/VAE/audio-encoder
+// against ComfyUI's live enum (findMatchingCLIP/findMatchingVAE/
+// findMatchingAudioEncoder) instead of writing hardcoded filenames straight
+// into the loader nodes — same fix Bug C already applied to the FLUX/video
+// lanes. Mock the live-fetch boundary only; classifyModel/galleryTypeForFile/
+// resolveLocalOpPick stay real.
+vi.mock('../comfyui', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('../comfyui')>()
+ return {
+ ...actual,
+ findMatchingCLIP: vi.fn(async () => 'umt5_xxl_fp8_e4m3fn_scaled.safetensors'),
+ findMatchingVAE: vi.fn(async () => 'wan_2.1_vae.safetensors'),
+ findMatchingAudioEncoder: vi.fn(async () => 'wav2vec2_large_english_fp16.safetensors'),
+ }
+})
+
/**
* The builders now declare their own graph shape (types/comfy-graph.ts), so
* the assertions below read THAT type instead of a local stand-in — a renamed
@@ -167,8 +183,8 @@ describe('buildS2VWorkflow', () => {
...over,
})
- it('wires audio embeddings into the S2V conditioner and muxes the voice into the mp4', () => {
- const wf: ComfyGraph = buildS2VWorkflow(s2v(), 7, FULL_NODES)
+ it('wires audio embeddings into the S2V conditioner and muxes the voice into the mp4', async () => {
+ const wf: ComfyGraph = await buildS2VWorkflow(s2v(), 7, FULL_NODES)
const types = classTypes(wf)
for (const t of ['LoadAudio', 'AudioEncoderLoader', 'AudioEncoderEncode', 'WanSoundImageToVideo', 'CreateVideo', 'SaveVideo']) {
expect(types).toContain(t)
@@ -177,13 +193,18 @@ describe('buildS2VWorkflow', () => {
const s2vNode = nodeOfType(wf, 'WanSoundImageToVideo')
// length stays on the 4k+1 grid
expect((numInput(s2vNode, 'length') - 1) % 4).toBe(0)
+ // K2: CLIP/VAE/audio encoder came from the (mocked) live resolvers, not a
+ // hardcoded literal.
+ expect(nodeOfType(wf, 'CLIPLoader').inputs?.clip_name).toBe('umt5_xxl_fp8_e4m3fn_scaled.safetensors')
+ expect(nodeOfType(wf, 'VAELoader').inputs?.vae_name).toBe('wan_2.1_vae.safetensors')
+ expect(nodeOfType(wf, 'AudioEncoderLoader').inputs?.audio_encoder_name).toBe('wav2vec2_large_english_fp16.safetensors')
})
- it('loads .gguf quants through the GGUF pack and hints its install when missing', () => {
- const wf: ComfyGraph = buildS2VWorkflow(s2v({ model: 'Wan2.2-S2V-14B-Q4_K_M.gguf' }), 7, FULL_NODES)
+ it('loads .gguf quants through the GGUF pack and hints its install when missing', async () => {
+ const wf: ComfyGraph = await buildS2VWorkflow(s2v({ model: 'Wan2.2-S2V-14B-Q4_K_M.gguf' }), 7, FULL_NODES)
expect(classTypes(wf)).toContain('UnetLoaderGGUF')
try {
- buildS2VWorkflow(s2v({ model: 'Wan2.2-S2V-14B-Q4_K_M.gguf' }), 7, nodesWithout('UnetLoaderGGUF'))
+ await buildS2VWorkflow(s2v({ model: 'Wan2.2-S2V-14B-Q4_K_M.gguf' }), 7, nodesWithout('UnetLoaderGGUF'))
expect.unreachable('should have thrown')
} catch (e) {
expect(e).toBeInstanceOf(WorkflowUnavailableError)
@@ -191,9 +212,9 @@ describe('buildS2VWorkflow', () => {
}
})
- it('rejects a missing voice or portrait before anything uploads', () => {
- expect(() => buildS2VWorkflow(s2v({ audioFile: undefined }), 7, FULL_NODES)).toThrow(/voice/i)
- expect(() => buildS2VWorkflow(s2v({ refImage: undefined }), 7, FULL_NODES)).toThrow(/portrait/i)
+ it('rejects a missing voice or portrait before anything uploads', async () => {
+ await expect(buildS2VWorkflow(s2v({ audioFile: undefined }), 7, FULL_NODES)).rejects.toThrow(/voice/i)
+ await expect(buildS2VWorkflow(s2v({ refImage: undefined }), 7, FULL_NODES)).rejects.toThrow(/portrait/i)
})
})
@@ -206,8 +227,8 @@ describe('buildMotionWorkflow', () => {
...over,
})
- it('builds the Animate graph: DWPose skeleton in, trimmed latent out, driving audio carried over', () => {
- const wf: ComfyGraph = buildMotionWorkflow(motion(), 7, FULL_NODES)
+ it('builds the Animate graph: DWPose skeleton in, trimmed latent out, driving audio carried over', async () => {
+ const wf: ComfyGraph = await buildMotionWorkflow(motion(), 7, FULL_NODES)
const types = classTypes(wf)
for (const t of ['LoadVideo', 'GetVideoComponents', 'DWPreprocessor', 'WanAnimateToVideo', 'TrimVideoLatent', 'CreateVideo']) {
expect(types).toContain(t)
@@ -217,18 +238,21 @@ describe('buildMotionWorkflow', () => {
expect(arrInput(trim, 'trim_amount')[1]).toBe(3)
const components = Object.entries(wf).find(([, n]) => n.class_type === 'GetVideoComponents')![0]
expect(nodeOfType(wf, 'CreateVideo').inputs?.audio).toEqual([components, 1])
+ // K2: CLIP/VAE came from the (mocked) live resolvers, not a hardcoded literal.
+ expect(nodeOfType(wf, 'CLIPLoader').inputs?.clip_name).toBe('umt5_xxl_fp8_e4m3fn_scaled.safetensors')
+ expect(nodeOfType(wf, 'VAELoader').inputs?.vae_name).toBe('wan_2.1_vae.safetensors')
})
- it('routes VACE models through WanVaceToVideo with the skeleton as control video', () => {
- const wf: ComfyGraph = buildMotionWorkflow(motion({ model: 'wan2.1_vace_1.3B_fp16.safetensors' }), 7, FULL_NODES)
+ it('routes VACE models through WanVaceToVideo with the skeleton as control video', async () => {
+ const wf: ComfyGraph = await buildMotionWorkflow(motion({ model: 'wan2.1_vace_1.3B_fp16.safetensors' }), 7, FULL_NODES)
const types = classTypes(wf)
expect(types).toContain('WanVaceToVideo')
expect(types).not.toContain('WanAnimateToVideo')
})
- it('hints the controlnet_aux install when DWPose is missing', () => {
+ it('hints the controlnet_aux install when DWPose is missing', async () => {
try {
- buildMotionWorkflow(motion(), 7, nodesWithout('DWPreprocessor'))
+ await buildMotionWorkflow(motion(), 7, nodesWithout('DWPreprocessor'))
expect.unreachable('should have thrown')
} catch (e) {
expect(e).toBeInstanceOf(WorkflowUnavailableError)
diff --git a/src/api/__tests__/vae-override-live-check-k2.test.ts b/src/api/__tests__/vae-override-live-check-k2.test.ts
new file mode 100644
index 00000000..539dbbb9
--- /dev/null
+++ b/src/api/__tests__/vae-override-live-check-k2.test.ts
@@ -0,0 +1,74 @@
+/**
+ * K2 (mrvideogame9829/sockenmonster, Discord "HELP WITH MODELS"/help-18,
+ * and GH #128-adjacent reports after the 3.0 update): "Prompt outputs failed
+ * validation | Node 3 (VAELoader): Value not in list" on Lipsync/Animate.
+ *
+ * A `params.vae` override (a stale remembered pick from an older LU/ComfyUI
+ * install, a wrong path separator, a subfolder-qualified name, ...) used to
+ * go straight into the VAELoader node unchecked. buildDynamicWorkflow now
+ * validates it against `models.vaes` — the live VAELoader enum already read
+ * off the same /object_info response this build used for strategy detection
+ * — BEFORE writing the node, and throws an actionable WorkflowUnavailableError
+ * instead of letting ComfyUI's opaque "Value not in list" reach the user.
+ *
+ * Run: npx vitest run src/api/__tests__/vae-override-live-check-k2.test.ts
+ */
+import { describe, it, expect, vi, beforeEach } from 'vitest'
+
+vi.mock('../comfyui-nodes', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('../comfyui-nodes')>()
+ return { ...actual, getAllNodeInfo: vi.fn() }
+})
+
+import { buildDynamicWorkflow, WorkflowUnavailableError } from '../dynamic-workflow'
+import { getAllNodeInfo } from '../comfyui-nodes'
+import { classTypes, nodeOf } from './graph-test-support'
+
+// Minimal live /object_info for an SDXL-checkpoint ComfyUI. The VAELoader
+// enum below is the "installed VAEs" live list K2's fix checks against.
+const CHECKPOINT_NODES: Record<string, unknown> = {
+ CheckpointLoaderSimple: { input: { required: { ckpt_name: [['sdxl.safetensors']] } } },
+ VAELoader: { input: { required: { vae_name: [['sdxl_vae.safetensors', 'ae.safetensors']] } } },
+ CLIPTextEncode: { input: { required: {} } },
+ KSampler: { input: { required: {} } },
+ EmptyLatentImage: { input: { required: {} } },
+ VAEDecode: { input: { required: {} } },
+ SaveImage: { input: { required: {} } },
+}
+
+const baseParams = {
+ model: 'sdxl.safetensors',
+ prompt: 'a red jacket', negativePrompt: '',
+ sampler: 'euler', scheduler: 'normal',
+ width: 1024, height: 1024, steps: 20, cfgScale: 7, seed: 1, batchSize: 1,
+} as never
+
+describe('buildDynamicWorkflow — K2: VAE override validated against the live list', () => {
+ beforeEach(() => {
+ vi.clearAllMocks()
+ vi.mocked(getAllNodeInfo).mockResolvedValue(CHECKPOINT_NODES as never)
+ })
+
+ it('a stale/unknown VAE override throws an actionable error naming what IS installed, instead of reaching /prompt', async () => {
+ await expect(
+ buildDynamicWorkflow({ ...(baseParams as object), vae: 'old-2.6.9-remembered-vae.safetensors' } as never),
+ ).rejects.toBeInstanceOf(WorkflowUnavailableError)
+ await expect(
+ buildDynamicWorkflow({ ...(baseParams as object), vae: 'old-2.6.9-remembered-vae.safetensors' } as never),
+ ).rejects.toThrow(/not installed in ComfyUI.*sdxl_vae\.safetensors/s)
+ })
+
+ it('a VAE override that really is in the live list builds a valid VAELoader node', async () => {
+ const wf = await buildDynamicWorkflow({ ...(baseParams as object), vae: 'ae.safetensors' } as never)
+ expect(classTypes(wf)).toContain('VAELoader')
+ const [, vaeNode] = nodeOf(wf, 'VAELoader') ?? []
+ expect((vaeNode?.inputs as { vae_name?: string } | undefined)?.vae_name).toBe('ae.safetensors')
+ })
+
+ it('"auto" and unset skip the check entirely (checkpoint keeps its bundled VAE)', async () => {
+ const wfAuto = await buildDynamicWorkflow({ ...(baseParams as object), vae: 'auto' } as never)
+ expect(classTypes(wfAuto)).not.toContain('VAELoader')
+ const wfUnset = await buildDynamicWorkflow({ ...(baseParams as object) } as never)
+ expect(classTypes(wfUnset)).not.toContain('VAELoader')
+ })
+})
diff --git a/src/api/comfyui.ts b/src/api/comfyui.ts
index 752fe7a1..db6e8476 100644
--- a/src/api/comfyui.ts
+++ b/src/api/comfyui.ts
@@ -1617,6 +1617,42 @@ export async function findMatchingCLIP(modelType: ModelType, activeModelName?: s
return clips[0]
}
+/**
+ * K2 (mrvideogame9829/sockenmonster, Discord "HELP WITH MODELS"/help-18,
+ * 2026-09-15/17): the Talking Character (lipsync) and Motion (animate)
+ * builders hardcoded `audio_encoder_name: 'wav2vec2_large_english_fp16.
+ * safetensors'` straight into AudioEncoderLoader, never checked against
+ * ComfyUI's live enum. A box that doesn't have that exact file (a different
+ * quant, a subfolder, or simply nothing installed) submitted it verbatim and
+ * ComfyUI's /prompt validator rejected the node with "Value not in list" —
+ * the same failure mode Bug C already fixed for CLIPLoader, just not carried
+ * over to the newer local lanes. Same no-silent-fallback rule as
+ * findMatchingVAE/findMatchingCLIP: resolve against the live list, throw an
+ * actionable "download <file>" message on a miss.
+ */
+export async function findMatchingAudioEncoder(): Promise<string> {
+ const encoders = await getAudioEncoderModels()
+ if (encoders.length === 0) {
+ throw new Error('No audio encoder models found. Download "wav2vec2_large_english_fp16.safetensors" from the Model Manager.')
+ }
+ const match = encoders.find((e) => e.toLowerCase().includes('wav2vec2'))
+ return match ?? encoders[0]
+}
+
+/**
+ * Same fix as findMatchingAudioEncoder, for CLIPVisionLoader. FramePack
+ * hardcoded `clip_name: 'sigclip_vision_patch14_384.safetensors'` unchecked;
+ * resolve against the live list instead.
+ */
+export async function findMatchingClipVision(): Promise<string> {
+ const models = await getCLIPVisionModels()
+ if (models.length === 0) {
+ throw new Error('No CLIP-Vision models found. Download "sigclip_vision_patch14_384.safetensors" from the Model Manager.')
+ }
+ const match = models.find((m) => m.toLowerCase().includes('sigclip'))
+ return match ?? models[0]
+}
+
async function findAnimateDiffModel(): Promise<string> {
const models = await getAnimateDiffModels()
if (models.length === 0) throw new Error('No AnimateDiff motion models found. Install them via ComfyUI Manager.')
diff --git a/src/api/dynamic-workflow.ts b/src/api/dynamic-workflow.ts
index 73fb6634..0a2785ab 100644
--- a/src/api/dynamic-workflow.ts
+++ b/src/api/dynamic-workflow.ts
@@ -1,4 +1,7 @@
-import { classifyModel, findMatchingVAE, findMatchingCLIP, findFluxCLIPPair } from './comfyui'
+import {
+ classifyModel, findMatchingVAE, findMatchingCLIP, findFluxCLIPPair,
+ findMatchingAudioEncoder, findMatchingClipVision,
+} from './comfyui'
import type { ModelType, GenerateParams, VideoParams } from './comfyui'
import { log } from '../lib/logger'
import { resolveRunSeed } from '../lib/run-seed'
@@ -679,6 +682,23 @@ export async function buildDynamicWorkflow(
}
if (params.vae && params.vae !== 'auto') {
+ // K2: this override used to go straight into VAELoader unchecked — a
+ // stale remembered pick (a name that existed in an older LU/ComfyUI
+ // install, a wrong path separator, a subfolder-qualified name ComfyUI's
+ // enum does not use) reached /prompt as-is and came back "Value not in
+ // list". `models.vaes` is the live VAELoader enum already read off this
+ // same /object_info response — validate against it before writing the
+ // node. Skip the check only when that enum came back empty (an older
+ // ComfyUI that answered a different schema): saying nothing is safer
+ // than a false rejection of a value we simply could not verify.
+ if (models.vaes.length > 0 && !models.vaes.includes(params.vae)) {
+ const list = models.vaes.slice(0, 12).join(', ')
+ throw new WorkflowUnavailableError(
+ `VAE "${params.vae}" is not installed in ComfyUI. Installed VAEs: ${list}. ` +
+ `Put the file into ComfyUI/models/vae and retry, or clear the VAE override.`,
+ strategy,
+ )
+ }
const vaeId = String(n++)
workflow[vaeId] = {
class_type: 'VAELoader',
@@ -1453,8 +1473,19 @@ export function buildMusicWorkflow(params: LocalOpParams, seed: number, allNodes
* the finished frames are muxed WITH the speech track (CreateVideo), because
* a silent talking-head clip is useless. Uses the Wan 2.1 VAE + UMT5 encoder
* (the S2V-14B pairing from the official release).
+ *
+ * K2 (mrvideogame9829/sockenmonster, Discord "HELP WITH MODELS"/help-18,
+ * 2026-09-15/17): the CLIP/VAE/audio-encoder filenames below used to be
+ * written straight into their loader nodes as literal strings, never checked
+ * against what ComfyUI actually has installed. Whichever one the box didn't
+ * have failed validation with "Value not in list" — Node 3 (VAELoader) in
+ * the reports, because that is the third node this builder creates. Resolve
+ * every one of them against the live enum first (same rule Bug C already
+ * applied to the FLUX/video lanes in buildDynamicWorkflow), so a mismatch is
+ * caught before /prompt submission with an actionable "download <file>"
+ * message instead of ComfyUI's opaque rejection.
*/
-export function buildS2VWorkflow(params: LocalOpParams, seed: number, allNodes: NodePresence): ComfyApiGraph {
+export async function buildS2VWorkflow(params: LocalOpParams, seed: number, allNodes: NodePresence): Promise<ComfyApiGraph> {
const workflow: ComfyApiGraph = {}
let n = 1
requireNodes(
@@ -1470,12 +1501,18 @@ export function buildS2VWorkflow(params: LocalOpParams, seed: number, allNodes:
const height = snap16(params.height, 480)
const length = snapWanLength(params.frames || 77)
+ const [wanClip, wanVae, audioEncoder] = await Promise.all([
+ findMatchingCLIP('wan', params.model),
+ findMatchingVAE('wan'),
+ findMatchingAudioEncoder(),
+ ])
+
const unetId = String(n++)
addUnetLoader(workflow, unetId, params.model, allNodes)
const clipId = String(n++)
- workflow[clipId] = { class_type: 'CLIPLoader', inputs: { clip_name: 'umt5_xxl_fp8_e4m3fn_scaled.safetensors', type: 'wan', device: 'default' } }
+ workflow[clipId] = { class_type: 'CLIPLoader', inputs: { clip_name: wanClip, type: 'wan', device: 'default' } }
const vaeId = String(n++)
- workflow[vaeId] = { class_type: 'VAELoader', inputs: { vae_name: 'wan_2.1_vae.safetensors' } }
+ workflow[vaeId] = { class_type: 'VAELoader', inputs: { vae_name: wanVae } }
const posId = String(n++)
workflow[posId] = { class_type: 'CLIPTextEncode', inputs: { text: params.prompt || 'a person talking naturally, natural expression', clip: [clipId, 0] } }
const negId = String(n++)
@@ -1484,7 +1521,7 @@ export function buildS2VWorkflow(params: LocalOpParams, seed: number, allNodes:
const audioLoadId = String(n++)
workflow[audioLoadId] = { class_type: 'LoadAudio', inputs: { audio: params.audioFile } }
const audioEncLoadId = String(n++)
- workflow[audioEncLoadId] = { class_type: 'AudioEncoderLoader', inputs: { audio_encoder_name: 'wav2vec2_large_english_fp16.safetensors' } }
+ workflow[audioEncLoadId] = { class_type: 'AudioEncoderLoader', inputs: { audio_encoder_name: audioEncoder } }
const audioEncId = String(n++)
workflow[audioEncId] = { class_type: 'AudioEncoderEncode', inputs: { audio_encoder: [audioEncLoadId, 0], audio: [audioLoadId, 0] } }
@@ -1527,8 +1564,11 @@ export function buildS2VWorkflow(params: LocalOpParams, seed: number, allNodes:
* DWPreprocessor from comfyui_controlnet_aux (one-click install; its CPU
* onnxruntime path works on every Windows box, no GPU wheel roulette).
* The driving clip's own audio is carried over into the result.
+ *
+ * K2: same live-list-first fix as buildS2VWorkflow above — CLIP/VAE were
+ * hardcoded literals here too.
*/
-export function buildMotionWorkflow(params: LocalOpParams, seed: number, allNodes: NodePresence): ComfyApiGraph {
+export async function buildMotionWorkflow(params: LocalOpParams, seed: number, allNodes: NodePresence): Promise<ComfyApiGraph> {
const workflow: ComfyApiGraph = {}
let n = 1
requireNodes(allNodes, ['LoadVideo', 'GetVideoComponents'], 'Motion control')
@@ -1550,12 +1590,17 @@ export function buildMotionWorkflow(params: LocalOpParams, seed: number, allNode
const height = snap16(params.height, 480)
const length = snapWanLength(params.frames || 77)
+ const [wanClip, wanVae] = await Promise.all([
+ findMatchingCLIP('wan', params.model),
+ findMatchingVAE('wan'),
+ ])
+
const unetId = String(n++)
addUnetLoader(workflow, unetId, params.model, allNodes)
const clipId = String(n++)
- workflow[clipId] = { class_type: 'CLIPLoader', inputs: { clip_name: 'umt5_xxl_fp8_e4m3fn_scaled.safetensors', type: 'wan', device: 'default' } }
+ workflow[clipId] = { class_type: 'CLIPLoader', inputs: { clip_name: wanClip, type: 'wan', device: 'default' } }
const vaeId = String(n++)
- workflow[vaeId] = { class_type: 'VAELoader', inputs: { vae_name: 'wan_2.1_vae.safetensors' } }
+ workflow[vaeId] = { class_type: 'VAELoader', inputs: { vae_name: wanVae } }
const posId = String(n++)
workflow[posId] = { class_type: 'CLIPTextEncode', inputs: { text: params.prompt || 'a person moving naturally, high quality', clip: [clipId, 0] } }
const negId = String(n++)
@@ -1630,8 +1675,8 @@ export async function buildLocalOpWorkflow(params: LocalOpParams): Promise<Comfy
const seed = resolveRunSeed(params.seed)
switch (params.op) {
case 'music': return buildMusicWorkflow(params, seed, allNodes)
- case 'lipsync': return buildS2VWorkflow(params, seed, allNodes)
- case 'motion': return buildMotionWorkflow(params, seed, allNodes)
+ case 'lipsync': return await buildS2VWorkflow(params, seed, allNodes)
+ case 'motion': return await buildMotionWorkflow(params, seed, allNodes)
}
}
@@ -1661,7 +1706,10 @@ async function buildFramePackWorkflow(params: VideoParams, seed: number, nodes:
// DualCLIPLoader with type "hunyuan_video" — CLIPLoader type "wan" creates Llama2 with 128256 vocab
// but llava_llama3 has 128320 tokens, causing state_dict size mismatch. DualCLIPLoader handles both correctly.
workflow[clipId] = { class_type: 'DualCLIPLoader', inputs: { clip_name1: 'clip_l.safetensors', clip_name2: 'llava_llama3_fp8_scaled.safetensors', type: 'hunyuan_video' } }
- workflow[clipVisionId] = { class_type: 'CLIPVisionLoader', inputs: { clip_name: 'sigclip_vision_patch14_384.safetensors' } }
+ // K2: was a hardcoded literal never checked against the live CLIPVisionLoader
+ // enum — same "Value not in list" failure mode as the VAE below, just for a
+ // different node. Resolved against the live list like the VAE already is.
+ workflow[clipVisionId] = { class_type: 'CLIPVisionLoader', inputs: { clip_name: await findMatchingClipVision() } }
// FramePack is a HunyuanVideo 1.0 model. Its sampler allocates the history
// buffer with 16 latent channels, and the HunyuanVideo 1.5 VAE encodes 32, so
// pairing the two dies at the first section with "Expected size 32 but got