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(video): the I2V default grab reads both combo shapes through the shared reader
purple81463bcf63bd
diff --git a/src/api/__tests__/dynamic-workflow-i2v.test.ts b/src/api/__tests__/dynamic-workflow-i2v.test.tsindex 2cffc26b..4aec26e2 100644--- a/src/api/__tests__/dynamic-workflow-i2v.test.ts+++ b/src/api/__tests__/dynamic-workflow-i2v.test.ts@@ -105,6 +105,33 @@ describe('buildDynamicWorkflow — I2V override on the main path', () => {expect(nodeOf(wf, 'EmptyHunyuanLatentVideo')).toBeUndefined()})+ it('a required combo in the newer COMBO/options shape still fills its widget with the first option', async () => {+ // The box's custom_nodes answer in the newer schema: spec[0] is the string+ // "COMBO" and the choices sit under options. The old grab read spec[0][0]+ // and left the widget unset, ComfyUI then refused the graph.+ vi.mocked(getAllNodeInfo).mockResolvedValue({+ ...CORE,+ UNETLoader: { input: { required: { unet_name: [['wan2.1_i2v_14B_fp8.safetensors']] } } },+ CLIPLoader: { input: { required: { clip_name: [['umt5_xxl_fp8_e4m3fn_scaled.safetensors']] } } },+ VAELoader: { input: { required: { vae_name: [['wan_2.1_vae.safetensors']] } } },+ WanImageToVideo: {+ input: {+ required: {+ positive: ['CONDITIONING'], negative: ['CONDITIONING'], vae: ['VAE'],+ width: ['INT'], height: ['INT'], length: ['INT'], batch_size: ['INT'],+ sampling_mode: ['COMBO', { options: ['flow', 'legacy'] }],+ },+ optional: { start_image: ['IMAGE', {}] },+ },+ output: ['CONDITIONING', 'CONDITIONING', 'LATENT'],+ },+ } as never)++ const wf = await buildDynamicWorkflow(vidParams('wan2.1_i2v_14B_fp8.safetensors') as never, 'wan')+ const [, i2v] = nodeOf(wf, 'WanImageToVideo')!+ expect(i2v.inputs.sampling_mode).toBe('flow')+ })+it('Hunyuan i2v: single CONDITIONING output re-points positive only', async () => {vi.mocked(getAllNodeInfo).mockResolvedValue({...CORE,diff --git a/src/api/dynamic-workflow.ts b/src/api/dynamic-workflow.tsindex c41ff057..5642fc2b 100644--- a/src/api/dynamic-workflow.ts+++ b/src/api/dynamic-workflow.ts@@ -889,11 +889,14 @@ export async function buildDynamicWorkflow(if (decl.start_image) inputs.start_image = [loadId, 0]else if (decl.image) inputs.image = [loadId, 0]else if (decl.init_image) inputs.init_image = [loadId, 0]- // Remaining REQUIRED widgets we don't model: take the schema default- // (combo → first option) — same live-schema pattern as the RMBG builder.+ // Remaining REQUIRED widgets we don't model: take the schema default,+ // for a combo the first option. Same live-schema pattern as the RMBG+ // builder, and the combo read goes through the one shared reader so the+ // newer COMBO/options shape cannot leave a required widget unset.for (const [key, spec] of Object.entries(required)) {if (inputs[key] !== undefined) continue- if (Array.isArray(spec[0])) inputs[key] = spec[0][0]+ const combo = readComboOptions(spec)+ if (combo && combo.length) inputs[key] = combo[0]else if (spec[1] && typeof spec[1] === 'object' && 'default' in spec[1]) inputs[key] = spec[1].default}const i2vId = String(n++)