From ac6adb0b3f196ade0bcee512583b5945aba62e66 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Fri, 16 Jan 2026 14:43:48 +0900 Subject: [PATCH] [backport cloud/1.37] Fix copypasted primitives inside subgraphs (#8096) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8094 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8096-backport-cloud-1-37-Fix-copypasted-primitives-inside-subgraphs-2ea6d73d3650812e8692eb76149d8156) by [Unito](https://www.unito.io) Co-authored-by: AustinMroz --- src/lib/litegraph/src/LGraphCanvas.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts index 3e09ba5fd..800e924c6 100644 --- a/src/lib/litegraph/src/LGraphCanvas.ts +++ b/src/lib/litegraph/src/LGraphCanvas.ts @@ -8,6 +8,7 @@ import { useLayoutMutations } from '@/renderer/core/layout/operations/layoutMuta import { layoutStore } from '@/renderer/core/layout/store/layoutStore' import { LayoutSource } from '@/renderer/core/layout/types' import { removeNodeTitleHeight } from '@/renderer/core/layout/utils/nodeSizeUtil' +import { forEachNode } from '@/utils/graphTraversalUtil' import { CanvasPointer } from './CanvasPointer' import type { ContextMenu } from './ContextMenu' @@ -4041,6 +4042,8 @@ export class LGraphCanvas implements CustomEventDispatcher layoutStore.batchUpdateNodeBounds(newPositions) this.selectItems(created) + forEachNode(graph, (n) => n.onGraphConfigured?.()) + forEachNode(graph, (n) => n.onAfterGraphConfigured?.()) graph.afterChange() this.emitAfterChange()