fix: LoRA's not working with new canvas refine

This commit is contained in:
blessedcoolant 2023-08-24 07:51:32 +12:00 committed by Kent Keirsey
parent 5eb6148336
commit f45ea1145d
2 changed files with 40 additions and 0 deletions

View File

@ -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,

View File

@ -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,