From 45bcf4096ca459c7cd033ec19e7bb6846abac4b9 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Thu, 4 Dec 2025 13:39:35 -0800 Subject: [PATCH] On adding output matchType, initialize type (#7161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The output type of a matchType output is initialized to COMFY_MATCHTYPE_V3, but is updated soon after to the value calculated from input types. Under some difficult to reproduce circumstances, this output type may be incorrectly evaluated in connections to other switch nodes. Since the initial type is never a valid connection, this can produce errors. Instead, the output type of a matchtype node is initialized to allow connections to anything to ensure that the subsequent restriction of output types is guaranteed to be directional ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7161-On-adding-output-matchType-initialize-type-2bf6d73d3650819ab169ffe9a4ecfeb4) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown --- src/services/litegraphService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/litegraphService.ts b/src/services/litegraphService.ts index 9f324e864..71750ccfe 100644 --- a/src/services/litegraphService.ts +++ b/src/services/litegraphService.ts @@ -219,7 +219,9 @@ export const useLitegraphService = () => { */ function addOutputs(node: LGraphNode, outputs: OutputSpec[]) { for (const output of outputs) { - const { name, type, is_list } = output + const { name, is_list } = output + // TODO: Fix the typing at the node spec level + const type = output.type === 'COMFY_MATCHTYPE_V3' ? '*' : output.type const shapeOptions = is_list ? { shape: LiteGraph.GRID_SHAPE } : {} const nameKey = `${nodeKey(node)}.outputs.${output.index}.name` const typeKey = `dataTypes.${normalizeI18nKey(type)}`