mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: SDXL Refiner using the incorrect node during inpainting
This commit is contained in:
parent
98a076260b
commit
8b969053e7
@ -32,7 +32,8 @@ export const addSDXLRefinerToGraph = (
|
||||
graph: NonNullableGraph,
|
||||
baseNodeId: string,
|
||||
modelLoaderNodeId?: string,
|
||||
canvasInitImage?: ImageDTO
|
||||
canvasInitImage?: ImageDTO,
|
||||
canvasMaskImage?: ImageDTO
|
||||
): void => {
|
||||
const {
|
||||
refinerModel,
|
||||
@ -257,8 +258,30 @@ export const addSDXLRefinerToGraph = (
|
||||
};
|
||||
}
|
||||
|
||||
graph.edges.push(
|
||||
{
|
||||
if (graph.id === SDXL_CANVAS_INPAINT_GRAPH) {
|
||||
if (isUsingScaledDimensions) {
|
||||
graph.edges.push({
|
||||
source: {
|
||||
node_id: MASK_RESIZE_UP,
|
||||
field: 'image',
|
||||
},
|
||||
destination: {
|
||||
node_id: SDXL_REFINER_INPAINT_CREATE_MASK,
|
||||
field: 'mask',
|
||||
},
|
||||
});
|
||||
} else {
|
||||
graph.nodes[SDXL_REFINER_INPAINT_CREATE_MASK] = {
|
||||
...(graph.nodes[
|
||||
SDXL_REFINER_INPAINT_CREATE_MASK
|
||||
] as CreateDenoiseMaskInvocation),
|
||||
mask: canvasMaskImage,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (graph.id === SDXL_CANVAS_OUTPAINT_GRAPH) {
|
||||
graph.edges.push({
|
||||
source: {
|
||||
node_id: isUsingScaledDimensions ? MASK_RESIZE_UP : MASK_COMBINE,
|
||||
field: 'image',
|
||||
@ -267,18 +290,19 @@ export const addSDXLRefinerToGraph = (
|
||||
node_id: SDXL_REFINER_INPAINT_CREATE_MASK,
|
||||
field: 'mask',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
graph.edges.push({
|
||||
source: {
|
||||
node_id: SDXL_REFINER_INPAINT_CREATE_MASK,
|
||||
field: 'denoise_mask',
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: SDXL_REFINER_INPAINT_CREATE_MASK,
|
||||
field: 'denoise_mask',
|
||||
},
|
||||
destination: {
|
||||
node_id: SDXL_REFINER_DENOISE_LATENTS,
|
||||
field: 'denoise_mask',
|
||||
},
|
||||
}
|
||||
);
|
||||
destination: {
|
||||
node_id: SDXL_REFINER_DENOISE_LATENTS,
|
||||
field: 'denoise_mask',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
|
@ -663,7 +663,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
graph,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
modelLoaderNodeId,
|
||||
canvasInitImage
|
||||
canvasInitImage,
|
||||
canvasMaskImage
|
||||
);
|
||||
if (seamlessXAxis || seamlessYAxis) {
|
||||
modelLoaderNodeId = SDXL_REFINER_SEAMLESS;
|
||||
|
Loading…
Reference in New Issue
Block a user