From 0ff153693ea16bf7927bbab59007f988f3b844d7 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 31 Jan 2026 22:21:40 -0800 Subject: [PATCH] fix: use getTitle() to find nodes by display name in getNodeRefsByTitle The getNodeRefsByTitle function was using n.title === title, which only works for nodes with an explicitly set title property. Nodes without a custom title (most nodes) fall back to constructor.title, which is set from the node's display_name during registration. Using getTitle() instead properly returns this.title || this.constructor.title, allowing selectNodes to work with display names like 'VAE Decode' and 'Load Checkpoint'. Amp-Thread-ID: https://ampcode.com/threads/T-019c17d8-6930-748a-bd55-2370f17af8ea --- browser_tests/fixtures/ComfyPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index befc3cc0a..e487e1942 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -1605,7 +1605,7 @@ export class ComfyPage { ( await this.page.evaluate((title) => { return window['app'].graph.nodes - .filter((n: LGraphNode) => n.title === title) + .filter((n: LGraphNode) => n.getTitle() === title) .map((n: LGraphNode) => n.id) }, title) ).map((id: NodeId) => this.getNodeRefById(id))