diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabControlLayers.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabControlLayers.ts index 1afa21ba9f..88a9c0859b 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabControlLayers.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabControlLayers.ts @@ -118,13 +118,11 @@ export const addGenerationTabControlLayers = async ( // Connect the conditioning to the collector g.addEdge(regionalPosCond, 'conditioning', posCondCollect, 'item'); // Copy the connections to the "global" positive conditioning node to the regional cond - for (const edge of g.getEdgesTo(posCond)) { - if (edge.destination.field !== 'prompt') { - // Clone the edge, but change the destination node to the regional conditioning node - const clone = deepClone(edge); - clone.destination.node_id = regionalPosCond.id; - g.addEdgeFromObj(clone); - } + for (const edge of g.getEdgesTo(posCond, ['clip', 'mask'])) { + // Clone the edge, but change the destination node to the regional conditioning node + const clone = deepClone(edge); + clone.destination.node_id = regionalPosCond.id; + g.addEdgeFromObj(clone); } } @@ -149,13 +147,11 @@ export const addGenerationTabControlLayers = async ( // Connect the conditioning to the collector g.addEdge(regionalNegCond, 'conditioning', negCondCollect, 'item'); // Copy the connections to the "global" negative conditioning node to the regional cond - for (const edge of g.getEdgesTo(negCond)) { - if (edge.destination.field !== 'prompt') { - // Clone the edge, but change the destination node to the regional conditioning node - const clone = deepClone(edge); - clone.destination.node_id = regionalNegCond.id; - g.addEdgeFromObj(clone); - } + for (const edge of g.getEdgesTo(negCond, ['clip', 'mask'])) { + // Clone the edge, but change the destination node to the regional conditioning node + const clone = deepClone(edge); + clone.destination.node_id = regionalNegCond.id; + g.addEdgeFromObj(clone); } } @@ -188,13 +184,11 @@ export const addGenerationTabControlLayers = async ( // Connect the conditioning to the negative collector g.addEdge(regionalPosCondInverted, 'conditioning', negCondCollect, 'item'); // Copy the connections to the "global" positive conditioning node to our regional node - for (const edge of g.getEdgesTo(posCond)) { - if (edge.destination.field !== 'prompt') { - // Clone the edge, but change the destination node to the regional conditioning node - const clone = deepClone(edge); - clone.destination.node_id = regionalPosCondInverted.id; - g.addEdgeFromObj(clone); - } + for (const edge of g.getEdgesTo(posCond, ['clip', 'mask'])) { + // Clone the edge, but change the destination node to the regional conditioning node + const clone = deepClone(edge); + clone.destination.node_id = regionalPosCondInverted.id; + g.addEdgeFromObj(clone); } } diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabLoRAs.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabLoRAs.ts index 5a7173f2d5..6374c72a93 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabLoRAs.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabLoRAs.ts @@ -42,9 +42,9 @@ export const addGenerationTabLoRAs = ( g.addEdge(seamless ?? modelLoader, 'unet', loraCollectionLoader, 'unet'); g.addEdge(clipSkip, 'clip', loraCollectionLoader, 'clip'); // Reroute UNet & CLIP connections through the LoRA collection loader - g.deleteEdgesTo(denoise, 'unet'); - g.deleteEdgesTo(posCond, 'clip'); - g.deleteEdgesTo(negCond, 'clip'); + g.deleteEdgesTo(denoise, ['unet']); + g.deleteEdgesTo(posCond, ['clip']); + g.deleteEdgesTo(negCond, ['clip']); g.addEdge(loraCollectionLoader, 'unet', denoise, 'unet'); g.addEdge(loraCollectionLoader, 'clip', posCond, 'clip'); g.addEdge(loraCollectionLoader, 'clip', negCond, 'clip'); diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabSeamless.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabSeamless.ts index ef0b38291f..d0ecc96482 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabSeamless.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addGenerationTabSeamless.ts @@ -41,8 +41,8 @@ export const addGenerationTabSeamless = ( }); // Seamless slots into the graph between the model loader and the denoise node - g.deleteEdgesFrom(modelLoader, 'unet'); - g.deleteEdgesFrom(modelLoader, 'vae'); + g.deleteEdgesFrom(modelLoader, ['unet']); + g.deleteEdgesFrom(modelLoader, ['vae']); g.addEdge(modelLoader, 'unet', seamless, 'unet'); g.addEdge(vaeLoader ?? modelLoader, 'vae', seamless, 'vae');