update canvas graphs

This commit is contained in:
dunkeroni
2024-04-11 22:34:07 -04:00
committed by Kent Keirsey
parent 781de914f4
commit 38604aa408
6 changed files with 121 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import {
IMAGE_TO_IMAGE_GRAPH, IMAGE_TO_IMAGE_GRAPH,
IMAGE_TO_LATENTS, IMAGE_TO_LATENTS,
INPAINT_IMAGE, INPAINT_IMAGE,
INPAINT_CREATE_MASK,
LATENTS_TO_IMAGE, LATENTS_TO_IMAGE,
MAIN_MODEL_LOADER, MAIN_MODEL_LOADER,
SDXL_CANVAS_IMAGE_TO_IMAGE_GRAPH, SDXL_CANVAS_IMAGE_TO_IMAGE_GRAPH,
@ -145,6 +146,16 @@ export const addVAEToGraph = async (
field: 'vae', field: 'vae',
}, },
}, },
{
source: {
node_id: isSeamlessEnabled ? SEAMLESS : isAutoVae ? modelLoaderNodeId : VAE_LOADER,
field: 'vae',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'vae',
},
},
{ {
source: { source: {

View File

@ -133,6 +133,9 @@ export const buildCanvasInpaintGraph = async (
coherence_mode: canvasCoherenceMode, coherence_mode: canvasCoherenceMode,
minimum_denoise: canvasCoherenceMinDenoise, minimum_denoise: canvasCoherenceMinDenoise,
edge_radius: canvasCoherenceEdgeSize, edge_radius: canvasCoherenceEdgeSize,
image: canvasInitImage,
tiled: false,
fp32: fp32,
}, },
[DENOISE_LATENTS]: { [DENOISE_LATENTS]: {
type: 'denoise_latents', type: 'denoise_latents',
@ -172,6 +175,16 @@ export const buildCanvasInpaintGraph = async (
field: 'unet', field: 'unet',
}, },
}, },
{
source: {
node_id: modelLoaderNodeId,
field: 'unet',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'unet',
},
},
{ {
source: { source: {
node_id: modelLoaderNodeId, node_id: modelLoaderNodeId,
@ -331,6 +344,16 @@ export const buildCanvasInpaintGraph = async (
field: 'mask', field: 'mask',
}, },
}, },
{
source: {
node_id: INPAINT_IMAGE_RESIZE_UP,
field: 'image',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'image',
},
},
// Resize Down // Resize Down
{ {
source: { source: {

View File

@ -157,6 +157,9 @@ export const buildCanvasOutpaintGraph = async (
coherence_mode: canvasCoherenceMode, coherence_mode: canvasCoherenceMode,
edge_radius: canvasCoherenceEdgeSize, edge_radius: canvasCoherenceEdgeSize,
minimum_denoise: canvasCoherenceMinDenoise, minimum_denoise: canvasCoherenceMinDenoise,
image: canvasInitImage,
tiled: false,
fp32: fp32,
}, },
[DENOISE_LATENTS]: { [DENOISE_LATENTS]: {
type: 'denoise_latents', type: 'denoise_latents',
@ -197,6 +200,16 @@ export const buildCanvasOutpaintGraph = async (
field: 'unet', field: 'unet',
}, },
}, },
{
source: {
node_id: modelLoaderNodeId,
field: 'unet',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'unet',
},
},
{ {
source: { source: {
node_id: modelLoaderNodeId, node_id: modelLoaderNodeId,
@ -453,6 +466,16 @@ export const buildCanvasOutpaintGraph = async (
field: 'image', field: 'image',
}, },
}, },
{
source: {
node_id: INPAINT_IMAGE_RESIZE_UP,
field: 'image',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'image',
},
},
// Resize Results Down // Resize Results Down
{ {
source: { source: {

View File

@ -135,6 +135,9 @@ export const buildCanvasSDXLInpaintGraph = async (
coherence_mode: canvasCoherenceMode, coherence_mode: canvasCoherenceMode,
minimum_denoise: refinerModel ? Math.max(0.2, canvasCoherenceMinDenoise) : canvasCoherenceMinDenoise, minimum_denoise: refinerModel ? Math.max(0.2, canvasCoherenceMinDenoise) : canvasCoherenceMinDenoise,
edge_radius: canvasCoherenceEdgeSize, edge_radius: canvasCoherenceEdgeSize,
image: canvasInitImage,
tiled: false,
fp32: fp32,
}, },
[SDXL_DENOISE_LATENTS]: { [SDXL_DENOISE_LATENTS]: {
type: 'denoise_latents', type: 'denoise_latents',
@ -174,6 +177,16 @@ export const buildCanvasSDXLInpaintGraph = async (
field: 'unet', field: 'unet',
}, },
}, },
{
source: {
node_id: modelLoaderNodeId,
field: 'unet',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'unet',
},
},
{ {
source: { source: {
node_id: modelLoaderNodeId, node_id: modelLoaderNodeId,
@ -342,6 +355,16 @@ export const buildCanvasSDXLInpaintGraph = async (
field: 'mask', field: 'mask',
}, },
}, },
{
source: {
node_id: INPAINT_IMAGE_RESIZE_UP,
field: 'image',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'image',
},
},
// Resize Down // Resize Down
{ {
source: { source: {

View File

@ -157,6 +157,8 @@ export const buildCanvasSDXLOutpaintGraph = async (
coherence_mode: canvasCoherenceMode, coherence_mode: canvasCoherenceMode,
edge_radius: canvasCoherenceEdgeSize, edge_radius: canvasCoherenceEdgeSize,
minimum_denoise: refinerModel ? Math.max(0.2, canvasCoherenceMinDenoise) : canvasCoherenceMinDenoise, minimum_denoise: refinerModel ? Math.max(0.2, canvasCoherenceMinDenoise) : canvasCoherenceMinDenoise,
tiled: false,
fp32: fp32,
}, },
[SDXL_DENOISE_LATENTS]: { [SDXL_DENOISE_LATENTS]: {
type: 'denoise_latents', type: 'denoise_latents',
@ -197,6 +199,16 @@ export const buildCanvasSDXLOutpaintGraph = async (
field: 'unet', field: 'unet',
}, },
}, },
{
source: {
node_id: modelLoaderNodeId,
field: 'unet',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'unet',
},
},
{ {
source: { source: {
node_id: SDXL_MODEL_LOADER, node_id: SDXL_MODEL_LOADER,
@ -451,6 +463,16 @@ export const buildCanvasSDXLOutpaintGraph = async (
field: 'image', field: 'image',
}, },
}, },
{
source: {
node_id: INPAINT_IMAGE_RESIZE_UP,
field: 'image',
},
destination: {
node_id: INPAINT_CREATE_MASK,
field: 'image',
},
},
// Take combined mask and resize // Take combined mask and resize
{ {
source: { source: {

View File

@ -2878,6 +2878,25 @@ export type components = {
* @default 0 * @default 0
*/ */
minimum_denoise?: number; minimum_denoise?: number;
/**
* UNet
* @description The UNet input used to detect if it is an inpainting model
*/
unet?: components["schemas"]["UNetField"] | null;
/** Image */
image?: components["schemas"]["ImageField"] | null;
/** vae */
vae?: components["schemas"]["VAEField"] | null;
/**
* @description tiled is used by the VAE
* @default false
* */
tiled?: boolean;
/**
* @description fp32 is used by the VAE
* @default false
*/
fp32?: boolean;
/** /**
* type * type
* @default create_gradient_mask * @default create_gradient_mask