diff --git a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addLoRAsToGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addLoRAsToGraph.ts index 01158d1cf0..602af2242e 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addLoRAsToGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addLoRAsToGraph.ts @@ -6,6 +6,9 @@ import { MetadataAccumulatorInvocation, } from 'services/api/types'; import { + CANVAS_INPAINT_GRAPH, + CANVAS_OUTPAINT_GRAPH, + CANVAS_REFINE_DENOISE_LATENTS, CLIP_SKIP, LORA_LOADER, MAIN_MODEL_LOADER, @@ -136,6 +139,22 @@ export const addLoRAsToGraph = ( }, }); + if ( + graph.id && + [CANVAS_INPAINT_GRAPH, CANVAS_OUTPAINT_GRAPH].includes(graph.id) + ) { + graph.edges.push({ + source: { + node_id: currentLoraNodeId, + field: 'unet', + }, + destination: { + node_id: CANVAS_REFINE_DENOISE_LATENTS, + field: 'unet', + }, + }); + } + graph.edges.push({ source: { node_id: currentLoraNodeId, diff --git a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addSDXLLoRAstoGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addSDXLLoRAstoGraph.ts index 190816f21f..56423bd031 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addSDXLLoRAstoGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/addSDXLLoRAstoGraph.ts @@ -6,10 +6,13 @@ import { SDXLLoraLoaderInvocation, } from 'services/api/types'; import { + CANVAS_REFINE_DENOISE_LATENTS, LORA_LOADER, METADATA_ACCUMULATOR, NEGATIVE_CONDITIONING, POSITIVE_CONDITIONING, + SDXL_CANVAS_INPAINT_GRAPH, + SDXL_CANVAS_OUTPAINT_GRAPH, SDXL_MODEL_LOADER, } from './constants'; @@ -163,6 +166,24 @@ export const addSDXLLoRAsToGraph = ( }, }); + if ( + graph.id && + [SDXL_CANVAS_INPAINT_GRAPH, SDXL_CANVAS_OUTPAINT_GRAPH].includes( + graph.id + ) + ) { + graph.edges.push({ + source: { + node_id: currentLoraNodeId, + field: 'unet', + }, + destination: { + node_id: CANVAS_REFINE_DENOISE_LATENTS, + field: 'unet', + }, + }); + } + graph.edges.push({ source: { node_id: currentLoraNodeId,