From 957ee6d370e32715506fbd1aeefdea03f7e73b4f Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:13:29 +1200 Subject: [PATCH] fix: SDXL Canvas Inpaint & Outpaint not respecting SDXL Refiner start value --- .../nodes/util/graphBuilders/buildCanvasSDXLInpaintGraph.ts | 4 +++- .../nodes/util/graphBuilders/buildCanvasSDXLOutpaintGraph.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLInpaintGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLInpaintGraph.ts index 7d8586d09c..f38ed00bf4 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLInpaintGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLInpaintGraph.ts @@ -136,7 +136,9 @@ export const buildCanvasSDXLInpaintGraph = ( steps: steps, cfg_scale: cfg_scale, scheduler: scheduler, - denoising_start: 1 - strength, + denoising_start: shouldUseSDXLRefiner + ? Math.min(refinerStart, 1 - strength) + : 1 - strength, denoising_end: shouldUseSDXLRefiner ? refinerStart : 1, }, [LATENTS_TO_IMAGE]: { diff --git a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLOutpaintGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLOutpaintGraph.ts index b5260894c4..d7904de4f9 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLOutpaintGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graphBuilders/buildCanvasSDXLOutpaintGraph.ts @@ -162,7 +162,9 @@ export const buildCanvasSDXLOutpaintGraph = ( steps: steps, cfg_scale: cfg_scale, scheduler: scheduler, - denoising_start: 1 - strength, + denoising_start: shouldUseSDXLRefiner + ? Math.min(refinerStart, 1 - strength) + : 1 - strength, denoising_end: shouldUseSDXLRefiner ? refinerStart : 1, }, [LATENTS_TO_IMAGE]: {