fix: Seamless not correctly plugged to SDXL Denoise Latents

This commit is contained in:
blessedcoolant 2023-08-29 04:18:45 +12:00
parent 6db19a8dee
commit 0ea67050f1

View File

@ -2,8 +2,13 @@ import { RootState } from 'app/store/store';
import { SeamlessModeInvocation } from 'services/api/types'; import { SeamlessModeInvocation } from 'services/api/types';
import { NonNullableGraph } from '../../types/types'; import { NonNullableGraph } from '../../types/types';
import { import {
CANVAS_IMAGE_TO_IMAGE_GRAPH,
CANVAS_TEXT_TO_IMAGE_GRAPH,
DENOISE_LATENTS, DENOISE_LATENTS,
IMAGE_TO_IMAGE_GRAPH, IMAGE_TO_IMAGE_GRAPH,
SDXL_CANVAS_IMAGE_TO_IMAGE_GRAPH,
SDXL_CANVAS_TEXT_TO_IMAGE_GRAPH,
SDXL_DENOISE_LATENTS,
SDXL_IMAGE_TO_IMAGE_GRAPH, SDXL_IMAGE_TO_IMAGE_GRAPH,
SDXL_TEXT_TO_IMAGE_GRAPH, SDXL_TEXT_TO_IMAGE_GRAPH,
SEAMLESS, SEAMLESS,
@ -25,6 +30,15 @@ export const addSeamlessToLinearGraph = (
seamless_y: seamlessYAxis, seamless_y: seamlessYAxis,
} as SeamlessModeInvocation; } as SeamlessModeInvocation;
let denoisingNodeId = DENOISE_LATENTS;
if (
graph.id === 'SDXL_TEXT_TO_IMAGE_GRAPH' ||
graph.id === 'SDXL_IMAGE_TO_IMAGE_GRAPH'
) {
denoisingNodeId = SDXL_DENOISE_LATENTS;
}
graph.edges = graph.edges.filter( graph.edges = graph.edges.filter(
(e) => (e) =>
!( !(
@ -41,7 +55,11 @@ export const addSeamlessToLinearGraph = (
graph.id === TEXT_TO_IMAGE_GRAPH || graph.id === TEXT_TO_IMAGE_GRAPH ||
graph.id === IMAGE_TO_IMAGE_GRAPH || graph.id === IMAGE_TO_IMAGE_GRAPH ||
graph.id === SDXL_TEXT_TO_IMAGE_GRAPH || graph.id === SDXL_TEXT_TO_IMAGE_GRAPH ||
graph.id === SDXL_IMAGE_TO_IMAGE_GRAPH graph.id === SDXL_IMAGE_TO_IMAGE_GRAPH ||
graph.id === CANVAS_TEXT_TO_IMAGE_GRAPH ||
graph.id === CANVAS_IMAGE_TO_IMAGE_GRAPH ||
graph.id === SDXL_CANVAS_TEXT_TO_IMAGE_GRAPH ||
graph.id == SDXL_CANVAS_IMAGE_TO_IMAGE_GRAPH
) { ) {
graph.edges.push( graph.edges.push(
{ {
@ -70,7 +88,7 @@ export const addSeamlessToLinearGraph = (
field: 'unet', field: 'unet',
}, },
destination: { destination: {
node_id: DENOISE_LATENTS, node_id: denoisingNodeId,
field: 'unet', field: 'unet',
}, },
} }