mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Add Seam Painting with Scale Before
This commit is contained in:
parent
f2ee8a3da8
commit
cc7c6e5d41
@ -43,6 +43,8 @@ import {
|
|||||||
RANGE_OF_SIZE,
|
RANGE_OF_SIZE,
|
||||||
SEAM_FIX_DENOISE_LATENTS,
|
SEAM_FIX_DENOISE_LATENTS,
|
||||||
SEAM_MASK_COMBINE,
|
SEAM_MASK_COMBINE,
|
||||||
|
SEAM_MASK_RESIZE_DOWN,
|
||||||
|
SEAM_MASK_RESIZE_UP,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -461,6 +463,13 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
width: scaledWidth,
|
width: scaledWidth,
|
||||||
height: scaledHeight,
|
height: scaledHeight,
|
||||||
};
|
};
|
||||||
|
graph.nodes[SEAM_MASK_RESIZE_UP] = {
|
||||||
|
type: 'img_resize',
|
||||||
|
id: SEAM_MASK_RESIZE_UP,
|
||||||
|
is_intermediate: true,
|
||||||
|
width: scaledWidth,
|
||||||
|
height: scaledHeight,
|
||||||
|
};
|
||||||
graph.nodes[INPAINT_IMAGE_RESIZE_DOWN] = {
|
graph.nodes[INPAINT_IMAGE_RESIZE_DOWN] = {
|
||||||
type: 'img_resize',
|
type: 'img_resize',
|
||||||
id: INPAINT_IMAGE_RESIZE_DOWN,
|
id: INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
@ -482,6 +491,13 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
};
|
};
|
||||||
|
graph.nodes[SEAM_MASK_RESIZE_DOWN] = {
|
||||||
|
type: 'img_resize',
|
||||||
|
id: SEAM_MASK_RESIZE_DOWN,
|
||||||
|
is_intermediate: true,
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
};
|
||||||
|
|
||||||
graph.nodes[NOISE] = {
|
graph.nodes[NOISE] = {
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
...(graph.nodes[NOISE] as NoiseInvocation),
|
||||||
@ -523,6 +539,57 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// Seam Paint Mask
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: MASK_FROM_ALPHA,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: MASK_EDGE,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: MASK_EDGE,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: SEAM_MASK_RESIZE_UP,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: SEAM_MASK_RESIZE_UP,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: SEAM_FIX_DENOISE_LATENTS,
|
||||||
|
field: 'mask',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: MASK_BLUR,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: SEAM_MASK_COMBINE,
|
||||||
|
field: 'mask1',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: SEAM_MASK_RESIZE_UP,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: SEAM_MASK_COMBINE,
|
||||||
|
field: 'mask2',
|
||||||
|
},
|
||||||
|
},
|
||||||
// Resize Results Down
|
// Resize Results Down
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@ -536,7 +603,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: MASK_BLUR,
|
node_id: MASK_RESIZE_UP,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -544,6 +611,16 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: SEAM_MASK_COMBINE,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: SEAM_MASK_RESIZE_DOWN,
|
||||||
|
field: 'image',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: INPAINT_INFILL,
|
node_id: INPAINT_INFILL,
|
||||||
@ -577,7 +654,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: MASK_RESIZE_DOWN,
|
node_id: SEAM_MASK_RESIZE_DOWN,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -608,7 +685,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: MASK_RESIZE_DOWN,
|
node_id: SEAM_MASK_RESIZE_DOWN,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
|
@ -31,6 +31,8 @@ export const MASK_EDGE = 'mask_edge';
|
|||||||
export const MASK_BLUR = 'mask_blur';
|
export const MASK_BLUR = 'mask_blur';
|
||||||
export const MASK_COMBINE = 'mask_combine';
|
export const MASK_COMBINE = 'mask_combine';
|
||||||
export const SEAM_MASK_COMBINE = 'seam_mask_combine';
|
export const SEAM_MASK_COMBINE = 'seam_mask_combine';
|
||||||
|
export const SEAM_MASK_RESIZE_UP = 'seam_mask_resize_up';
|
||||||
|
export const SEAM_MASK_RESIZE_DOWN = 'seam_mask_resize_down';
|
||||||
export const MASK_RESIZE_UP = 'mask_resize_up';
|
export const MASK_RESIZE_UP = 'mask_resize_up';
|
||||||
export const MASK_RESIZE_DOWN = 'mask_resize_down';
|
export const MASK_RESIZE_DOWN = 'mask_resize_down';
|
||||||
export const COLOR_CORRECT = 'color_correct';
|
export const COLOR_CORRECT = 'color_correct';
|
||||||
|
Loading…
Reference in New Issue
Block a user