mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into feat/dev_reload
This commit is contained in:
commit
368ff17ed4
@ -55,7 +55,7 @@ async def get_version() -> AppVersion:
|
|||||||
|
|
||||||
@app_router.get("/config", operation_id="get_config", status_code=200, response_model=AppConfig)
|
@app_router.get("/config", operation_id="get_config", status_code=200, response_model=AppConfig)
|
||||||
async def get_config() -> AppConfig:
|
async def get_config() -> AppConfig:
|
||||||
infill_methods = ["tile"]
|
infill_methods = ["tile", "lama"]
|
||||||
if PatchMatch.patchmatch_available():
|
if PatchMatch.patchmatch_available():
|
||||||
infill_methods.append("patchmatch")
|
infill_methods.append("patchmatch")
|
||||||
|
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
# Copyright (c) 2022 Kyle Schouviller (https://github.com/kyle0654) and the InvokeAI Team
|
# Copyright (c) 2022 Kyle Schouviller (https://github.com/kyle0654) and the InvokeAI Team
|
||||||
|
|
||||||
|
import math
|
||||||
from typing import Literal, Optional, get_args
|
from typing import Literal, Optional, get_args
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import math
|
|
||||||
from PIL import Image, ImageOps
|
from PIL import Image, ImageOps
|
||||||
from invokeai.app.invocations.primitives import ImageField, ImageOutput, ColorField
|
|
||||||
|
|
||||||
|
from invokeai.app.invocations.primitives import ColorField, ImageField, ImageOutput
|
||||||
from invokeai.app.util.misc import SEED_MAX, get_random_seed
|
from invokeai.app.util.misc import SEED_MAX, get_random_seed
|
||||||
|
from invokeai.backend.image_util.lama import LaMA
|
||||||
from invokeai.backend.image_util.patchmatch import PatchMatch
|
from invokeai.backend.image_util.patchmatch import PatchMatch
|
||||||
|
|
||||||
from ..models.image import ImageCategory, ResourceOrigin
|
from ..models.image import ImageCategory, ResourceOrigin
|
||||||
from .baseinvocation import BaseInvocation, InputField, InvocationContext, title, tags
|
from .baseinvocation import BaseInvocation, InputField, InvocationContext, tags, title
|
||||||
|
|
||||||
|
|
||||||
def infill_methods() -> list[str]:
|
def infill_methods() -> list[str]:
|
||||||
methods = [
|
methods = [
|
||||||
"tile",
|
"tile",
|
||||||
"solid",
|
"solid",
|
||||||
|
"lama",
|
||||||
]
|
]
|
||||||
if PatchMatch.patchmatch_available():
|
if PatchMatch.patchmatch_available():
|
||||||
methods.insert(0, "patchmatch")
|
methods.insert(0, "patchmatch")
|
||||||
@ -28,6 +30,11 @@ INFILL_METHODS = Literal[tuple(infill_methods())]
|
|||||||
DEFAULT_INFILL_METHOD = "patchmatch" if "patchmatch" in get_args(INFILL_METHODS) else "tile"
|
DEFAULT_INFILL_METHOD = "patchmatch" if "patchmatch" in get_args(INFILL_METHODS) else "tile"
|
||||||
|
|
||||||
|
|
||||||
|
def infill_lama(im: Image.Image) -> Image.Image:
|
||||||
|
lama = LaMA()
|
||||||
|
return lama(im)
|
||||||
|
|
||||||
|
|
||||||
def infill_patchmatch(im: Image.Image) -> Image.Image:
|
def infill_patchmatch(im: Image.Image) -> Image.Image:
|
||||||
if im.mode != "RGBA":
|
if im.mode != "RGBA":
|
||||||
return im
|
return im
|
||||||
@ -90,7 +97,7 @@ def tile_fill_missing(im: Image.Image, tile_size: int = 16, seed: Optional[int]
|
|||||||
return im
|
return im
|
||||||
|
|
||||||
# Find all invalid tiles and replace with a random valid tile
|
# Find all invalid tiles and replace with a random valid tile
|
||||||
replace_count = (tiles_mask is False).sum()
|
replace_count = (tiles_mask == False).sum() # noqa: E712
|
||||||
rng = np.random.default_rng(seed=seed)
|
rng = np.random.default_rng(seed=seed)
|
||||||
tiles_all[np.logical_not(tiles_mask)] = filtered_tiles[rng.choice(filtered_tiles.shape[0], replace_count), :, :, :]
|
tiles_all[np.logical_not(tiles_mask)] = filtered_tiles[rng.choice(filtered_tiles.shape[0], replace_count), :, :, :]
|
||||||
|
|
||||||
@ -218,3 +225,34 @@ class InfillPatchMatchInvocation(BaseInvocation):
|
|||||||
width=image_dto.width,
|
width=image_dto.width,
|
||||||
height=image_dto.height,
|
height=image_dto.height,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@title("LaMa Infill")
|
||||||
|
@tags("image", "inpaint")
|
||||||
|
class LaMaInfillInvocation(BaseInvocation):
|
||||||
|
"""Infills transparent areas of an image using the LaMa model"""
|
||||||
|
|
||||||
|
type: Literal["infill_lama"] = "infill_lama"
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
image: ImageField = InputField(description="The image to infill")
|
||||||
|
|
||||||
|
def invoke(self, context: InvocationContext) -> ImageOutput:
|
||||||
|
image = context.services.images.get_pil_image(self.image.image_name)
|
||||||
|
|
||||||
|
infilled = infill_lama(image.copy())
|
||||||
|
|
||||||
|
image_dto = context.services.images.create(
|
||||||
|
image=infilled,
|
||||||
|
image_origin=ResourceOrigin.INTERNAL,
|
||||||
|
image_category=ImageCategory.GENERAL,
|
||||||
|
node_id=self.id,
|
||||||
|
session_id=context.graph_execution_state_id,
|
||||||
|
is_intermediate=self.is_intermediate,
|
||||||
|
)
|
||||||
|
|
||||||
|
return ImageOutput(
|
||||||
|
image=ImageField(image_name=image_dto.image_name),
|
||||||
|
width=image_dto.width,
|
||||||
|
height=image_dto.height,
|
||||||
|
)
|
||||||
|
@ -32,6 +32,7 @@ class CoreMetadata(BaseModelExcludeNull):
|
|||||||
generation_mode: str = Field(
|
generation_mode: str = Field(
|
||||||
description="The generation mode that output this image",
|
description="The generation mode that output this image",
|
||||||
)
|
)
|
||||||
|
created_by: Optional[str] = Field(description="The name of the creator of the image")
|
||||||
positive_prompt: str = Field(description="The positive prompt parameter")
|
positive_prompt: str = Field(description="The positive prompt parameter")
|
||||||
negative_prompt: str = Field(description="The negative prompt parameter")
|
negative_prompt: str = Field(description="The negative prompt parameter")
|
||||||
width: int = Field(description="The width parameter")
|
width: int = Field(description="The width parameter")
|
||||||
|
56
invokeai/backend/image_util/lama.py
Normal file
56
invokeai/backend/image_util/lama.py
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import gc
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import torch
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
from invokeai.app.services.config import get_invokeai_config
|
||||||
|
from invokeai.backend.util.devices import choose_torch_device
|
||||||
|
|
||||||
|
|
||||||
|
def norm_img(np_img):
|
||||||
|
if len(np_img.shape) == 2:
|
||||||
|
np_img = np_img[:, :, np.newaxis]
|
||||||
|
np_img = np.transpose(np_img, (2, 0, 1))
|
||||||
|
np_img = np_img.astype("float32") / 255
|
||||||
|
return np_img
|
||||||
|
|
||||||
|
|
||||||
|
def load_jit_model(url_or_path, device):
|
||||||
|
model_path = url_or_path
|
||||||
|
print(f"Loading model from: {model_path}")
|
||||||
|
model = torch.jit.load(model_path, map_location="cpu").to(device)
|
||||||
|
model.eval()
|
||||||
|
return model
|
||||||
|
|
||||||
|
|
||||||
|
class LaMA:
|
||||||
|
def __call__(self, input_image: Image.Image, *args: Any, **kwds: Any) -> Any:
|
||||||
|
device = choose_torch_device()
|
||||||
|
model_location = get_invokeai_config().models_path / "core/misc/lama/lama.pt"
|
||||||
|
model = load_jit_model(model_location, device)
|
||||||
|
|
||||||
|
image = np.asarray(input_image.convert("RGB"))
|
||||||
|
image = norm_img(image)
|
||||||
|
|
||||||
|
mask = input_image.split()[-1]
|
||||||
|
mask = np.asarray(mask)
|
||||||
|
mask = np.invert(mask)
|
||||||
|
mask = norm_img(mask)
|
||||||
|
|
||||||
|
mask = (mask > 0) * 1
|
||||||
|
image = torch.from_numpy(image).unsqueeze(0).to(device)
|
||||||
|
mask = torch.from_numpy(mask).unsqueeze(0).to(device)
|
||||||
|
|
||||||
|
with torch.inference_mode():
|
||||||
|
infilled_image = model(image, mask)
|
||||||
|
|
||||||
|
infilled_image = infilled_image[0].permute(1, 2, 0).detach().cpu().numpy()
|
||||||
|
infilled_image = np.clip(infilled_image * 255, 0, 255).astype("uint8")
|
||||||
|
infilled_image = Image.fromarray(infilled_image)
|
||||||
|
|
||||||
|
del model
|
||||||
|
gc.collect()
|
||||||
|
|
||||||
|
return infilled_image
|
@ -509,12 +509,9 @@
|
|||||||
"maskAdjustmentsHeader": "Mask Adjustments",
|
"maskAdjustmentsHeader": "Mask Adjustments",
|
||||||
"maskBlur": "Mask Blur",
|
"maskBlur": "Mask Blur",
|
||||||
"maskBlurMethod": "Mask Blur Method",
|
"maskBlurMethod": "Mask Blur Method",
|
||||||
"seamPaintingHeader": "Seam Painting",
|
"coherencePassHeader": "Coherence Pass",
|
||||||
"seamSize": "Seam Size",
|
"coherenceSteps": "Coherence Pass Steps",
|
||||||
"seamBlur": "Seam Blur",
|
"coherenceStrength": "Coherence Pass Strength",
|
||||||
"seamSteps": "Seam Steps",
|
|
||||||
"seamStrength": "Seam Strength",
|
|
||||||
"seamThreshold": "Seam Threshold",
|
|
||||||
"seamLowThreshold": "Low",
|
"seamLowThreshold": "Low",
|
||||||
"seamHighThreshold": "High",
|
"seamHighThreshold": "High",
|
||||||
"scaleBeforeProcessing": "Scale Before Processing",
|
"scaleBeforeProcessing": "Scale Before Processing",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { MenuItem } from '@chakra-ui/react';
|
import { Flex, MenuItem, Text } from '@chakra-ui/react';
|
||||||
import { skipToken } from '@reduxjs/toolkit/dist/query';
|
import { skipToken } from '@reduxjs/toolkit/dist/query';
|
||||||
import { useAppToaster } from 'app/components/Toaster';
|
import { useAppToaster } from 'app/components/Toaster';
|
||||||
import { useAppDispatch } from 'app/store/storeHooks';
|
import { useAppDispatch } from 'app/store/storeHooks';
|
||||||
@ -228,6 +228,18 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
|
|||||||
>
|
>
|
||||||
{t('gallery.deleteImage')}
|
{t('gallery.deleteImage')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
{metadata?.created_by && (
|
||||||
|
<Flex
|
||||||
|
sx={{
|
||||||
|
padding: '5px 10px',
|
||||||
|
marginTop: '5px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text fontSize="xs" fontWeight="bold">
|
||||||
|
Created by {metadata?.created_by}
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -69,6 +69,9 @@ const ImageMetadataActions = (props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{metadata.created_by && (
|
||||||
|
<ImageMetadataItem label="Created By" value={metadata.created_by} />
|
||||||
|
)}
|
||||||
{metadata.generation_mode && (
|
{metadata.generation_mode && (
|
||||||
<ImageMetadataItem
|
<ImageMetadataItem
|
||||||
label="Generation Mode"
|
label="Generation Mode"
|
||||||
|
@ -6,6 +6,9 @@ import {
|
|||||||
MetadataAccumulatorInvocation,
|
MetadataAccumulatorInvocation,
|
||||||
} from 'services/api/types';
|
} from 'services/api/types';
|
||||||
import {
|
import {
|
||||||
|
CANVAS_INPAINT_GRAPH,
|
||||||
|
CANVAS_OUTPAINT_GRAPH,
|
||||||
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
LORA_LOADER,
|
LORA_LOADER,
|
||||||
MAIN_MODEL_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_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'unet',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
graph.edges.push({
|
graph.edges.push({
|
||||||
source: {
|
source: {
|
||||||
node_id: currentLoraNodeId,
|
node_id: currentLoraNodeId,
|
||||||
|
@ -6,10 +6,13 @@ import {
|
|||||||
SDXLLoraLoaderInvocation,
|
SDXLLoraLoaderInvocation,
|
||||||
} from 'services/api/types';
|
} from 'services/api/types';
|
||||||
import {
|
import {
|
||||||
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
LORA_LOADER,
|
LORA_LOADER,
|
||||||
METADATA_ACCUMULATOR,
|
METADATA_ACCUMULATOR,
|
||||||
NEGATIVE_CONDITIONING,
|
NEGATIVE_CONDITIONING,
|
||||||
POSITIVE_CONDITIONING,
|
POSITIVE_CONDITIONING,
|
||||||
|
SDXL_CANVAS_INPAINT_GRAPH,
|
||||||
|
SDXL_CANVAS_OUTPAINT_GRAPH,
|
||||||
SDXL_MODEL_LOADER,
|
SDXL_MODEL_LOADER,
|
||||||
} from './constants';
|
} 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_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'unet',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
graph.edges.push({
|
graph.edges.push({
|
||||||
source: {
|
source: {
|
||||||
node_id: currentLoraNodeId,
|
node_id: currentLoraNodeId,
|
||||||
|
@ -17,8 +17,10 @@ import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
|||||||
import {
|
import {
|
||||||
CANVAS_INPAINT_GRAPH,
|
CANVAS_INPAINT_GRAPH,
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
CANVAS_COHERENCE_NOISE,
|
||||||
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
COLOR_CORRECT,
|
|
||||||
DENOISE_LATENTS,
|
DENOISE_LATENTS,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
INPAINT_IMAGE_RESIZE_DOWN,
|
INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
@ -61,6 +63,8 @@ export const buildCanvasInpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
|
canvasCoherenceSteps,
|
||||||
|
canvasCoherenceStrength,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
@ -139,23 +143,39 @@ export const buildCanvasInpaintGraph = (
|
|||||||
denoising_start: 1 - strength,
|
denoising_start: 1 - strength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
|
type: 'noise',
|
||||||
|
id: NOISE,
|
||||||
|
use_cpu,
|
||||||
|
is_intermediate: true,
|
||||||
|
},
|
||||||
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
|
type: 'add',
|
||||||
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
b: 1,
|
||||||
|
is_intermediate: true,
|
||||||
|
},
|
||||||
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
|
type: 'denoise_latents',
|
||||||
|
id: DENOISE_LATENTS,
|
||||||
|
is_intermediate: true,
|
||||||
|
steps: canvasCoherenceSteps,
|
||||||
|
cfg_scale: cfg_scale,
|
||||||
|
scheduler: scheduler,
|
||||||
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
|
denoising_end: 1,
|
||||||
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
type: 'l2i',
|
type: 'l2i',
|
||||||
id: LATENTS_TO_IMAGE,
|
id: LATENTS_TO_IMAGE,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
fp32: vaePrecision === 'fp32' ? true : false,
|
fp32: vaePrecision === 'fp32' ? true : false,
|
||||||
},
|
},
|
||||||
[COLOR_CORRECT]: {
|
|
||||||
type: 'color_correct',
|
|
||||||
id: COLOR_CORRECT,
|
|
||||||
is_intermediate: true,
|
|
||||||
reference: canvasInitImage,
|
|
||||||
},
|
|
||||||
[CANVAS_OUTPUT]: {
|
[CANVAS_OUTPUT]: {
|
||||||
type: 'img_paste',
|
type: 'color_correct',
|
||||||
id: CANVAS_OUTPUT,
|
id: CANVAS_OUTPUT,
|
||||||
is_intermediate: !shouldAutoSave,
|
is_intermediate: !shouldAutoSave,
|
||||||
base_image: canvasInitImage,
|
reference: canvasInitImage,
|
||||||
},
|
},
|
||||||
[RANGE_OF_SIZE]: {
|
[RANGE_OF_SIZE]: {
|
||||||
type: 'range_of_size',
|
type: 'range_of_size',
|
||||||
@ -287,12 +307,83 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Decode Inpainted Latents To Image
|
// Canvas Refine
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: ITERATE,
|
||||||
|
field: 'item',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'a',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'value',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
|
field: 'seed',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: MAIN_MODEL_LOADER,
|
||||||
|
field: 'unet',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'unet',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: POSITIVE_CONDITIONING,
|
||||||
|
field: 'conditioning',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'positive_conditioning',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: NEGATIVE_CONDITIONING,
|
||||||
|
field: 'conditioning',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'negative_conditioning',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
|
field: 'noise',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'noise',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: DENOISE_LATENTS,
|
node_id: DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'latents',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Decode Inpainted Latents To Image
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'latents',
|
||||||
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: LATENTS_TO_IMAGE,
|
node_id: LATENTS_TO_IMAGE,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
@ -338,11 +429,12 @@ export const buildCanvasInpaintGraph = (
|
|||||||
height: height,
|
height: height,
|
||||||
};
|
};
|
||||||
|
|
||||||
graph.nodes[NOISE] = {
|
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
width: scaledWidth,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
height: scaledHeight,
|
scaledWidth;
|
||||||
};
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -384,7 +476,7 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: COLOR_CORRECT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -398,27 +490,6 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_RESIZE_DOWN,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Back Onto Original Image
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: CANVAS_OUTPUT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: MASK_RESIZE_DOWN,
|
node_id: MASK_RESIZE_DOWN,
|
||||||
@ -432,11 +503,11 @@ export const buildCanvasInpaintGraph = (
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Add Images To Nodes
|
// Add Images To Nodes
|
||||||
graph.nodes[NOISE] = {
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
width: width,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
height: height,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height = height;
|
||||||
};
|
|
||||||
graph.nodes[INPAINT_IMAGE] = {
|
graph.nodes[INPAINT_IMAGE] = {
|
||||||
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
||||||
image: canvasInitImage,
|
image: canvasInitImage,
|
||||||
@ -453,27 +524,6 @@ export const buildCanvasInpaintGraph = (
|
|||||||
node_id: LATENTS_TO_IMAGE,
|
node_id: LATENTS_TO_IMAGE,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_BLUR,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Back Onto Original Image
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_OUTPUT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
|
@ -19,8 +19,10 @@ import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
|||||||
import {
|
import {
|
||||||
CANVAS_OUTPAINT_GRAPH,
|
CANVAS_OUTPAINT_GRAPH,
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
CANVAS_COHERENCE_NOISE,
|
||||||
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
COLOR_CORRECT,
|
|
||||||
DENOISE_LATENTS,
|
DENOISE_LATENTS,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
INPAINT_IMAGE_RESIZE_DOWN,
|
INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
@ -32,7 +34,6 @@ import {
|
|||||||
MAIN_MODEL_LOADER,
|
MAIN_MODEL_LOADER,
|
||||||
MASK_BLUR,
|
MASK_BLUR,
|
||||||
MASK_COMBINE,
|
MASK_COMBINE,
|
||||||
MASK_EDGE,
|
|
||||||
MASK_FROM_ALPHA,
|
MASK_FROM_ALPHA,
|
||||||
MASK_RESIZE_DOWN,
|
MASK_RESIZE_DOWN,
|
||||||
MASK_RESIZE_UP,
|
MASK_RESIZE_UP,
|
||||||
@ -41,10 +42,6 @@ import {
|
|||||||
POSITIVE_CONDITIONING,
|
POSITIVE_CONDITIONING,
|
||||||
RANDOM_INT,
|
RANDOM_INT,
|
||||||
RANGE_OF_SIZE,
|
RANGE_OF_SIZE,
|
||||||
SEAM_FIX_DENOISE_LATENTS,
|
|
||||||
SEAM_MASK_COMBINE,
|
|
||||||
SEAM_MASK_RESIZE_DOWN,
|
|
||||||
SEAM_MASK_RESIZE_UP,
|
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,12 +69,8 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
seamSize,
|
canvasCoherenceSteps,
|
||||||
seamBlur,
|
canvasCoherenceStrength,
|
||||||
seamSteps,
|
|
||||||
seamStrength,
|
|
||||||
seamLowThreshold,
|
|
||||||
seamHighThreshold,
|
|
||||||
tileSize,
|
tileSize,
|
||||||
infillMethod,
|
infillMethod,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
@ -141,11 +134,6 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
mask2: canvasMaskImage,
|
mask2: canvasMaskImage,
|
||||||
},
|
},
|
||||||
[SEAM_MASK_COMBINE]: {
|
|
||||||
type: 'mask_combine',
|
|
||||||
id: MASK_COMBINE,
|
|
||||||
is_intermediate: true,
|
|
||||||
},
|
|
||||||
[MASK_BLUR]: {
|
[MASK_BLUR]: {
|
||||||
type: 'img_blur',
|
type: 'img_blur',
|
||||||
id: MASK_BLUR,
|
id: MASK_BLUR,
|
||||||
@ -153,12 +141,6 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
radius: maskBlur,
|
radius: maskBlur,
|
||||||
blur_type: maskBlurMethod,
|
blur_type: maskBlurMethod,
|
||||||
},
|
},
|
||||||
[INPAINT_INFILL]: {
|
|
||||||
type: 'infill_tile',
|
|
||||||
id: INPAINT_INFILL,
|
|
||||||
is_intermediate: true,
|
|
||||||
tile_size: tileSize,
|
|
||||||
},
|
|
||||||
[INPAINT_IMAGE]: {
|
[INPAINT_IMAGE]: {
|
||||||
type: 'i2l',
|
type: 'i2l',
|
||||||
id: INPAINT_IMAGE,
|
id: INPAINT_IMAGE,
|
||||||
@ -181,23 +163,26 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
denoising_start: 1 - strength,
|
denoising_start: 1 - strength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[MASK_EDGE]: {
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
type: 'mask_edge',
|
type: 'noise',
|
||||||
id: MASK_EDGE,
|
id: NOISE,
|
||||||
|
use_cpu,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
edge_size: seamSize,
|
|
||||||
edge_blur: seamBlur,
|
|
||||||
low_threshold: seamLowThreshold,
|
|
||||||
high_threshold: seamHighThreshold,
|
|
||||||
},
|
},
|
||||||
[SEAM_FIX_DENOISE_LATENTS]: {
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
type: 'denoise_latents',
|
type: 'add',
|
||||||
id: SEAM_FIX_DENOISE_LATENTS,
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
b: 1,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
steps: seamSteps,
|
},
|
||||||
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
|
type: 'denoise_latents',
|
||||||
|
id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
is_intermediate: true,
|
||||||
|
steps: canvasCoherenceSteps,
|
||||||
cfg_scale: cfg_scale,
|
cfg_scale: cfg_scale,
|
||||||
scheduler: scheduler,
|
scheduler: scheduler,
|
||||||
denoising_start: 1 - seamStrength,
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
@ -206,13 +191,8 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
fp32: vaePrecision === 'fp32' ? true : false,
|
fp32: vaePrecision === 'fp32' ? true : false,
|
||||||
},
|
},
|
||||||
[COLOR_CORRECT]: {
|
|
||||||
type: 'color_correct',
|
|
||||||
id: COLOR_CORRECT,
|
|
||||||
is_intermediate: true,
|
|
||||||
},
|
|
||||||
[CANVAS_OUTPUT]: {
|
[CANVAS_OUTPUT]: {
|
||||||
type: 'img_paste',
|
type: 'color_correct',
|
||||||
id: CANVAS_OUTPUT,
|
id: CANVAS_OUTPUT,
|
||||||
is_intermediate: !shouldAutoSave,
|
is_intermediate: !shouldAutoSave,
|
||||||
},
|
},
|
||||||
@ -368,14 +348,34 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Seam Paint
|
// Canvas Refine
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: ITERATE,
|
||||||
|
field: 'item',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'a',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'value',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
|
field: 'seed',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: MAIN_MODEL_LOADER,
|
node_id: MAIN_MODEL_LOADER,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -385,7 +385,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'positive_conditioning',
|
field: 'positive_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -395,17 +395,17 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'negative_conditioning',
|
field: 'negative_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -415,14 +415,14 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Decode the result from Inpaint
|
// Decode the result from Inpaint
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -442,6 +442,23 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (infillMethod === 'lama') {
|
||||||
|
graph.nodes[INPAINT_INFILL] = {
|
||||||
|
type: 'infill_lama',
|
||||||
|
id: INPAINT_INFILL,
|
||||||
|
is_intermediate: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (infillMethod === 'tile') {
|
||||||
|
graph.nodes[INPAINT_INFILL] = {
|
||||||
|
type: 'infill_tile',
|
||||||
|
id: INPAINT_INFILL,
|
||||||
|
is_intermediate: true,
|
||||||
|
tile_size: tileSize,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Handle Scale Before Processing
|
// Handle Scale Before Processing
|
||||||
if (['auto', 'manual'].includes(boundingBoxScaleMethod)) {
|
if (['auto', 'manual'].includes(boundingBoxScaleMethod)) {
|
||||||
const scaledWidth: number = scaledBoundingBoxDimensions.width;
|
const scaledWidth: number = scaledBoundingBoxDimensions.width;
|
||||||
@ -463,13 +480,6 @@ 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,
|
||||||
@ -491,19 +501,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] as NoiseInvocation).width = scaledWidth;
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
width: scaledWidth,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
height: scaledHeight,
|
scaledWidth;
|
||||||
};
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -539,57 +543,6 @@ 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: {
|
||||||
@ -611,16 +564,6 @@ 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,
|
||||||
@ -638,7 +581,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: COLOR_CORRECT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'reference',
|
field: 'reference',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -647,37 +590,6 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
node_id: INPAINT_IMAGE_RESIZE_DOWN,
|
node_id: INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: SEAM_MASK_RESIZE_DOWN,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Everything Back
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: INPAINT_INFILL_RESIZE_DOWN,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: CANVAS_OUTPUT,
|
|
||||||
field: 'base_image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_OUTPUT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
@ -685,7 +597,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SEAM_MASK_RESIZE_DOWN,
|
node_id: MASK_RESIZE_DOWN,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -702,11 +614,12 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
| InfillPatchMatchInvocation),
|
| InfillPatchMatchInvocation),
|
||||||
image: canvasInitImage,
|
image: canvasInitImage,
|
||||||
};
|
};
|
||||||
graph.nodes[NOISE] = {
|
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
width: width,
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
height: height,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
};
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height = height;
|
||||||
|
|
||||||
graph.nodes[INPAINT_IMAGE] = {
|
graph.nodes[INPAINT_IMAGE] = {
|
||||||
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
||||||
image: canvasInitImage,
|
image: canvasInitImage,
|
||||||
@ -727,47 +640,6 @@ 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_FIX_DENOISE_LATENTS,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_FROM_ALPHA,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: SEAM_MASK_COMBINE,
|
|
||||||
field: 'mask1',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_EDGE,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: SEAM_MASK_COMBINE,
|
|
||||||
field: 'mask2',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Color Correct The Inpainted Result
|
// Color Correct The Inpainted Result
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@ -775,7 +647,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: COLOR_CORRECT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'reference',
|
field: 'reference',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -784,37 +656,6 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
node_id: LATENTS_TO_IMAGE,
|
node_id: LATENTS_TO_IMAGE,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: SEAM_MASK_COMBINE,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Everything Back
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: INPAINT_INFILL,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: CANVAS_OUTPUT,
|
|
||||||
field: 'base_image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_OUTPUT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
@ -822,7 +663,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SEAM_MASK_COMBINE,
|
node_id: MASK_BLUR,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
|
@ -17,7 +17,9 @@ import { addVAEToGraph } from './addVAEToGraph';
|
|||||||
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||||
import {
|
import {
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
COLOR_CORRECT,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
CANVAS_COHERENCE_NOISE,
|
||||||
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
INPAINT_IMAGE_RESIZE_DOWN,
|
INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
INPAINT_IMAGE_RESIZE_UP,
|
INPAINT_IMAGE_RESIZE_UP,
|
||||||
@ -61,6 +63,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
|
canvasCoherenceSteps,
|
||||||
|
canvasCoherenceStrength,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -144,23 +148,39 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
: 1 - strength,
|
: 1 - strength,
|
||||||
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
||||||
},
|
},
|
||||||
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
|
type: 'noise',
|
||||||
|
id: NOISE,
|
||||||
|
use_cpu,
|
||||||
|
is_intermediate: true,
|
||||||
|
},
|
||||||
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
|
type: 'add',
|
||||||
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
b: 1,
|
||||||
|
is_intermediate: true,
|
||||||
|
},
|
||||||
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
|
type: 'denoise_latents',
|
||||||
|
id: SDXL_DENOISE_LATENTS,
|
||||||
|
is_intermediate: true,
|
||||||
|
steps: canvasCoherenceSteps,
|
||||||
|
cfg_scale: cfg_scale,
|
||||||
|
scheduler: scheduler,
|
||||||
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
|
denoising_end: 1,
|
||||||
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
type: 'l2i',
|
type: 'l2i',
|
||||||
id: LATENTS_TO_IMAGE,
|
id: LATENTS_TO_IMAGE,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
fp32: vaePrecision === 'fp32' ? true : false,
|
fp32: vaePrecision === 'fp32' ? true : false,
|
||||||
},
|
},
|
||||||
[COLOR_CORRECT]: {
|
|
||||||
type: 'color_correct',
|
|
||||||
id: COLOR_CORRECT,
|
|
||||||
is_intermediate: true,
|
|
||||||
reference: canvasInitImage,
|
|
||||||
},
|
|
||||||
[CANVAS_OUTPUT]: {
|
[CANVAS_OUTPUT]: {
|
||||||
type: 'img_paste',
|
type: 'color_correct',
|
||||||
id: CANVAS_OUTPUT,
|
id: CANVAS_OUTPUT,
|
||||||
is_intermediate: !shouldAutoSave,
|
is_intermediate: !shouldAutoSave,
|
||||||
base_image: canvasInitImage,
|
reference: canvasInitImage,
|
||||||
},
|
},
|
||||||
[RANGE_OF_SIZE]: {
|
[RANGE_OF_SIZE]: {
|
||||||
type: 'range_of_size',
|
type: 'range_of_size',
|
||||||
@ -301,12 +321,83 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Decode inpainted latents to image
|
// Canvas Refine
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: ITERATE,
|
||||||
|
field: 'item',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'a',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'value',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
|
field: 'seed',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: SDXL_MODEL_LOADER,
|
||||||
|
field: 'unet',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'unet',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: POSITIVE_CONDITIONING,
|
||||||
|
field: 'conditioning',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'positive_conditioning',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: NEGATIVE_CONDITIONING,
|
||||||
|
field: 'conditioning',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'negative_conditioning',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
|
field: 'noise',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'noise',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SDXL_DENOISE_LATENTS,
|
node_id: SDXL_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'latents',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Decode Inpainted Latents To Image
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
field: 'latents',
|
||||||
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: LATENTS_TO_IMAGE,
|
node_id: LATENTS_TO_IMAGE,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
@ -352,11 +443,12 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
height: height,
|
height: height,
|
||||||
};
|
};
|
||||||
|
|
||||||
graph.nodes[NOISE] = {
|
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
width: scaledWidth,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
height: scaledHeight,
|
scaledWidth;
|
||||||
};
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -398,7 +490,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: COLOR_CORRECT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -412,27 +504,6 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_RESIZE_DOWN,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Back Onto Original Image
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: CANVAS_OUTPUT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: MASK_RESIZE_DOWN,
|
node_id: MASK_RESIZE_DOWN,
|
||||||
@ -446,11 +517,11 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Add Images To Nodes
|
// Add Images To Nodes
|
||||||
graph.nodes[NOISE] = {
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
width: width,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
height: height,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height = height;
|
||||||
};
|
|
||||||
graph.nodes[INPAINT_IMAGE] = {
|
graph.nodes[INPAINT_IMAGE] = {
|
||||||
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
||||||
image: canvasInitImage,
|
image: canvasInitImage,
|
||||||
@ -467,27 +538,6 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
node_id: LATENTS_TO_IMAGE,
|
node_id: LATENTS_TO_IMAGE,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_BLUR,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Back Onto Original Image
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_OUTPUT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
@ -528,7 +578,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
|
|
||||||
// Add Refiner if enabled
|
// Add Refiner if enabled
|
||||||
if (shouldUseSDXLRefiner) {
|
if (shouldUseSDXLRefiner) {
|
||||||
addSDXLRefinerToGraph(state, graph, SDXL_DENOISE_LATENTS);
|
addSDXLRefinerToGraph(state, graph, CANVAS_COHERENCE_DENOISE_LATENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// optionally add custom VAE
|
// optionally add custom VAE
|
||||||
|
@ -19,7 +19,9 @@ import { addVAEToGraph } from './addVAEToGraph';
|
|||||||
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||||
import {
|
import {
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
COLOR_CORRECT,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
CANVAS_COHERENCE_NOISE,
|
||||||
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
INPAINT_IMAGE_RESIZE_DOWN,
|
INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
INPAINT_IMAGE_RESIZE_UP,
|
INPAINT_IMAGE_RESIZE_UP,
|
||||||
@ -29,7 +31,6 @@ import {
|
|||||||
LATENTS_TO_IMAGE,
|
LATENTS_TO_IMAGE,
|
||||||
MASK_BLUR,
|
MASK_BLUR,
|
||||||
MASK_COMBINE,
|
MASK_COMBINE,
|
||||||
MASK_EDGE,
|
|
||||||
MASK_FROM_ALPHA,
|
MASK_FROM_ALPHA,
|
||||||
MASK_RESIZE_DOWN,
|
MASK_RESIZE_DOWN,
|
||||||
MASK_RESIZE_UP,
|
MASK_RESIZE_UP,
|
||||||
@ -41,10 +42,6 @@ import {
|
|||||||
SDXL_CANVAS_OUTPAINT_GRAPH,
|
SDXL_CANVAS_OUTPAINT_GRAPH,
|
||||||
SDXL_DENOISE_LATENTS,
|
SDXL_DENOISE_LATENTS,
|
||||||
SDXL_MODEL_LOADER,
|
SDXL_MODEL_LOADER,
|
||||||
SEAM_FIX_DENOISE_LATENTS,
|
|
||||||
SEAM_MASK_COMBINE,
|
|
||||||
SEAM_MASK_RESIZE_DOWN,
|
|
||||||
SEAM_MASK_RESIZE_UP,
|
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
|
||||||
|
|
||||||
@ -72,12 +69,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
seamSize,
|
canvasCoherenceSteps,
|
||||||
seamBlur,
|
canvasCoherenceStrength,
|
||||||
seamSteps,
|
|
||||||
seamStrength,
|
|
||||||
seamLowThreshold,
|
|
||||||
seamHighThreshold,
|
|
||||||
tileSize,
|
tileSize,
|
||||||
infillMethod,
|
infillMethod,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
@ -144,11 +137,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
mask2: canvasMaskImage,
|
mask2: canvasMaskImage,
|
||||||
},
|
},
|
||||||
[SEAM_MASK_COMBINE]: {
|
|
||||||
type: 'mask_combine',
|
|
||||||
id: MASK_COMBINE,
|
|
||||||
is_intermediate: true,
|
|
||||||
},
|
|
||||||
[MASK_BLUR]: {
|
[MASK_BLUR]: {
|
||||||
type: 'img_blur',
|
type: 'img_blur',
|
||||||
id: MASK_BLUR,
|
id: MASK_BLUR,
|
||||||
@ -156,12 +144,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
radius: maskBlur,
|
radius: maskBlur,
|
||||||
blur_type: maskBlurMethod,
|
blur_type: maskBlurMethod,
|
||||||
},
|
},
|
||||||
[INPAINT_INFILL]: {
|
|
||||||
type: 'infill_tile',
|
|
||||||
id: INPAINT_INFILL,
|
|
||||||
is_intermediate: true,
|
|
||||||
tile_size: tileSize,
|
|
||||||
},
|
|
||||||
[INPAINT_IMAGE]: {
|
[INPAINT_IMAGE]: {
|
||||||
type: 'i2l',
|
type: 'i2l',
|
||||||
id: INPAINT_IMAGE,
|
id: INPAINT_IMAGE,
|
||||||
@ -186,23 +168,26 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
: 1 - strength,
|
: 1 - strength,
|
||||||
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
||||||
},
|
},
|
||||||
[MASK_EDGE]: {
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
type: 'mask_edge',
|
type: 'noise',
|
||||||
id: MASK_EDGE,
|
id: NOISE,
|
||||||
|
use_cpu,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
edge_size: seamSize,
|
|
||||||
edge_blur: seamBlur,
|
|
||||||
low_threshold: seamLowThreshold,
|
|
||||||
high_threshold: seamHighThreshold,
|
|
||||||
},
|
},
|
||||||
[SEAM_FIX_DENOISE_LATENTS]: {
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
type: 'denoise_latents',
|
type: 'add',
|
||||||
id: SEAM_FIX_DENOISE_LATENTS,
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
b: 1,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
steps: seamSteps,
|
},
|
||||||
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
|
type: 'denoise_latents',
|
||||||
|
id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
|
is_intermediate: true,
|
||||||
|
steps: canvasCoherenceSteps,
|
||||||
cfg_scale: cfg_scale,
|
cfg_scale: cfg_scale,
|
||||||
scheduler: scheduler,
|
scheduler: scheduler,
|
||||||
denoising_start: 1 - seamStrength,
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
@ -211,13 +196,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
fp32: vaePrecision === 'fp32' ? true : false,
|
fp32: vaePrecision === 'fp32' ? true : false,
|
||||||
},
|
},
|
||||||
[COLOR_CORRECT]: {
|
|
||||||
type: 'color_correct',
|
|
||||||
id: COLOR_CORRECT,
|
|
||||||
is_intermediate: true,
|
|
||||||
},
|
|
||||||
[CANVAS_OUTPUT]: {
|
[CANVAS_OUTPUT]: {
|
||||||
type: 'img_paste',
|
type: 'color_correct',
|
||||||
id: CANVAS_OUTPUT,
|
id: CANVAS_OUTPUT,
|
||||||
is_intermediate: !shouldAutoSave,
|
is_intermediate: !shouldAutoSave,
|
||||||
},
|
},
|
||||||
@ -382,14 +362,34 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Seam Paint
|
// Canvas Refine
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: ITERATE,
|
||||||
|
field: 'item',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'a',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
|
field: 'value',
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
|
field: 'seed',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SDXL_MODEL_LOADER,
|
node_id: SDXL_MODEL_LOADER,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -399,7 +399,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'positive_conditioning',
|
field: 'positive_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -409,17 +409,17 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'negative_conditioning',
|
field: 'negative_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -429,14 +429,14 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Decode inpainted latents to image
|
// Decode inpainted latents to image
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SEAM_FIX_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -457,6 +457,23 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (infillMethod === 'lama') {
|
||||||
|
graph.nodes[INPAINT_INFILL] = {
|
||||||
|
type: 'infill_lama',
|
||||||
|
id: INPAINT_INFILL,
|
||||||
|
is_intermediate: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (infillMethod === 'tile') {
|
||||||
|
graph.nodes[INPAINT_INFILL] = {
|
||||||
|
type: 'infill_tile',
|
||||||
|
id: INPAINT_INFILL,
|
||||||
|
is_intermediate: true,
|
||||||
|
tile_size: tileSize,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Handle Scale Before Processing
|
// Handle Scale Before Processing
|
||||||
if (['auto', 'manual'].includes(boundingBoxScaleMethod)) {
|
if (['auto', 'manual'].includes(boundingBoxScaleMethod)) {
|
||||||
const scaledWidth: number = scaledBoundingBoxDimensions.width;
|
const scaledWidth: number = scaledBoundingBoxDimensions.width;
|
||||||
@ -478,13 +495,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
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,
|
||||||
@ -506,19 +516,13 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
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] as NoiseInvocation).width = scaledWidth;
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
width: scaledWidth,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
height: scaledHeight,
|
scaledWidth;
|
||||||
};
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -554,57 +558,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
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: {
|
||||||
@ -626,16 +579,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
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,
|
||||||
@ -653,7 +596,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: COLOR_CORRECT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'reference',
|
field: 'reference',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -662,37 +605,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
node_id: INPAINT_IMAGE_RESIZE_DOWN,
|
node_id: INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: SEAM_MASK_RESIZE_DOWN,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Everything Back
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: INPAINT_INFILL_RESIZE_DOWN,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: CANVAS_OUTPUT,
|
|
||||||
field: 'base_image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_OUTPUT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
@ -700,7 +612,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SEAM_MASK_RESIZE_DOWN,
|
node_id: MASK_RESIZE_DOWN,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -717,11 +629,12 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
| InfillPatchMatchInvocation),
|
| InfillPatchMatchInvocation),
|
||||||
image: canvasInitImage,
|
image: canvasInitImage,
|
||||||
};
|
};
|
||||||
graph.nodes[NOISE] = {
|
|
||||||
...(graph.nodes[NOISE] as NoiseInvocation),
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
width: width,
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
height: height,
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
};
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height = height;
|
||||||
|
|
||||||
graph.nodes[INPAINT_IMAGE] = {
|
graph.nodes[INPAINT_IMAGE] = {
|
||||||
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
...(graph.nodes[INPAINT_IMAGE] as ImageToLatentsInvocation),
|
||||||
image: canvasInitImage,
|
image: canvasInitImage,
|
||||||
@ -742,47 +655,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
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_FIX_DENOISE_LATENTS,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_FROM_ALPHA,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: SEAM_MASK_COMBINE,
|
|
||||||
field: 'mask1',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: MASK_EDGE,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: SEAM_MASK_COMBINE,
|
|
||||||
field: 'mask2',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Color Correct The Inpainted Result
|
// Color Correct The Inpainted Result
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
@ -790,7 +662,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: COLOR_CORRECT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'reference',
|
field: 'reference',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -799,37 +671,6 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
node_id: LATENTS_TO_IMAGE,
|
node_id: LATENTS_TO_IMAGE,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: SEAM_MASK_COMBINE,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'mask',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// Paste Everything Back
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: INPAINT_INFILL,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: CANVAS_OUTPUT,
|
|
||||||
field: 'base_image',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: COLOR_CORRECT,
|
|
||||||
field: 'image',
|
|
||||||
},
|
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_OUTPUT,
|
node_id: CANVAS_OUTPUT,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
@ -837,7 +678,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SEAM_MASK_COMBINE,
|
node_id: MASK_BLUR,
|
||||||
field: 'image',
|
field: 'image',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -870,7 +711,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
|
|
||||||
// Add Refiner if enabled
|
// Add Refiner if enabled
|
||||||
if (shouldUseSDXLRefiner) {
|
if (shouldUseSDXLRefiner) {
|
||||||
addSDXLRefinerToGraph(state, graph, SEAM_FIX_DENOISE_LATENTS);
|
addSDXLRefinerToGraph(state, graph, CANVAS_COHERENCE_DENOISE_LATENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// optionally add custom VAE
|
// optionally add custom VAE
|
||||||
|
@ -25,14 +25,15 @@ export const INPAINT_IMAGE_RESIZE_DOWN = 'inpaint_image_resize_down';
|
|||||||
export const INPAINT_INFILL = 'inpaint_infill';
|
export const INPAINT_INFILL = 'inpaint_infill';
|
||||||
export const INPAINT_INFILL_RESIZE_DOWN = 'inpaint_infill_resize_down';
|
export const INPAINT_INFILL_RESIZE_DOWN = 'inpaint_infill_resize_down';
|
||||||
export const INPAINT_FINAL_IMAGE = 'inpaint_final_image';
|
export const INPAINT_FINAL_IMAGE = 'inpaint_final_image';
|
||||||
export const SEAM_FIX_DENOISE_LATENTS = 'seam_fix_denoise_latents';
|
export const CANVAS_COHERENCE_DENOISE_LATENTS =
|
||||||
|
'canvas_coherence_denoise_latents';
|
||||||
|
export const CANVAS_COHERENCE_NOISE = 'canvas_coherence_noise';
|
||||||
|
export const CANVAS_COHERENCE_NOISE_INCREMENT =
|
||||||
|
'canvas_coherence_noise_increment';
|
||||||
export const MASK_FROM_ALPHA = 'tomask';
|
export const MASK_FROM_ALPHA = 'tomask';
|
||||||
export const MASK_EDGE = 'mask_edge';
|
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_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';
|
||||||
|
@ -27,7 +27,9 @@ const ParamInfillMethod = () => {
|
|||||||
|
|
||||||
const { data: appConfigData, isLoading } = useGetAppConfigQuery();
|
const { data: appConfigData, isLoading } = useGetAppConfigQuery();
|
||||||
|
|
||||||
const infill_methods = appConfigData?.infill_methods;
|
const infill_methods = appConfigData?.infill_methods.filter(
|
||||||
|
(method) => method !== 'lama'
|
||||||
|
);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
import { Flex } from '@chakra-ui/react';
|
||||||
|
import IAICollapse from 'common/components/IAICollapse';
|
||||||
|
import { memo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import ParamCanvasCoherenceSteps from './ParamCanvasCoherenceSteps';
|
||||||
|
import ParamCanvasCoherenceStrength from './ParamCanvasCoherenceStrength';
|
||||||
|
|
||||||
|
const ParamCanvasCoherencePassCollapse = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<IAICollapse label={t('parameters.coherencePassHeader')}>
|
||||||
|
<Flex sx={{ flexDirection: 'column', gap: 2, paddingBottom: 2 }}>
|
||||||
|
<ParamCanvasCoherenceSteps />
|
||||||
|
<ParamCanvasCoherenceStrength />
|
||||||
|
</Flex>
|
||||||
|
</IAICollapse>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memo(ParamCanvasCoherencePassCollapse);
|
@ -1,36 +1,36 @@
|
|||||||
import type { RootState } from 'app/store/store';
|
import type { RootState } from 'app/store/store';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import IAISlider from 'common/components/IAISlider';
|
import IAISlider from 'common/components/IAISlider';
|
||||||
import { setSeamSteps } from 'features/parameters/store/generationSlice';
|
import { setCanvasCoherenceSteps } from 'features/parameters/store/generationSlice';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const ParamSeamSteps = () => {
|
const ParamCanvasCoherenceSteps = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const seamSteps = useAppSelector(
|
const canvasCoherenceSteps = useAppSelector(
|
||||||
(state: RootState) => state.generation.seamSteps
|
(state: RootState) => state.generation.canvasCoherenceSteps
|
||||||
);
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
label={t('parameters.seamSteps')}
|
label={t('parameters.coherenceSteps')}
|
||||||
min={0}
|
min={1}
|
||||||
max={100}
|
max={100}
|
||||||
step={1}
|
step={1}
|
||||||
sliderNumberInputProps={{ max: 999 }}
|
sliderNumberInputProps={{ max: 999 }}
|
||||||
value={seamSteps}
|
value={canvasCoherenceSteps}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
dispatch(setSeamSteps(v));
|
dispatch(setCanvasCoherenceSteps(v));
|
||||||
}}
|
}}
|
||||||
withInput
|
withInput
|
||||||
withSliderMarks
|
withSliderMarks
|
||||||
withReset
|
withReset
|
||||||
handleReset={() => {
|
handleReset={() => {
|
||||||
dispatch(setSeamSteps(20));
|
dispatch(setCanvasCoherenceSteps(20));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ParamSeamSteps);
|
export default memo(ParamCanvasCoherenceSteps);
|
@ -1,36 +1,36 @@
|
|||||||
import type { RootState } from 'app/store/store';
|
import type { RootState } from 'app/store/store';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import IAISlider from 'common/components/IAISlider';
|
import IAISlider from 'common/components/IAISlider';
|
||||||
import { setSeamStrength } from 'features/parameters/store/generationSlice';
|
import { setCanvasCoherenceStrength } from 'features/parameters/store/generationSlice';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const ParamSeamStrength = () => {
|
const ParamCanvasCoherenceStrength = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const seamStrength = useAppSelector(
|
const canvasCoherenceStrength = useAppSelector(
|
||||||
(state: RootState) => state.generation.seamStrength
|
(state: RootState) => state.generation.canvasCoherenceStrength
|
||||||
);
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
label={t('parameters.seamStrength')}
|
label={t('parameters.coherenceStrength')}
|
||||||
min={0}
|
min={0}
|
||||||
max={1}
|
max={1}
|
||||||
step={0.01}
|
step={0.01}
|
||||||
sliderNumberInputProps={{ max: 999 }}
|
sliderNumberInputProps={{ max: 999 }}
|
||||||
value={seamStrength}
|
value={canvasCoherenceStrength}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
dispatch(setSeamStrength(v));
|
dispatch(setCanvasCoherenceStrength(v));
|
||||||
}}
|
}}
|
||||||
withInput
|
withInput
|
||||||
withSliderMarks
|
withSliderMarks
|
||||||
withReset
|
withReset
|
||||||
handleReset={() => {
|
handleReset={() => {
|
||||||
dispatch(setSeamStrength(0.7));
|
dispatch(setCanvasCoherenceStrength(0.3));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ParamSeamStrength);
|
export default memo(ParamCanvasCoherenceStrength);
|
@ -1,36 +0,0 @@
|
|||||||
import type { RootState } from 'app/store/store';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import IAISlider from 'common/components/IAISlider';
|
|
||||||
import { setSeamBlur } from 'features/parameters/store/generationSlice';
|
|
||||||
import { memo } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
const ParamSeamBlur = () => {
|
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const seamBlur = useAppSelector(
|
|
||||||
(state: RootState) => state.generation.seamBlur
|
|
||||||
);
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<IAISlider
|
|
||||||
label={t('parameters.seamBlur')}
|
|
||||||
min={0}
|
|
||||||
max={64}
|
|
||||||
step={8}
|
|
||||||
sliderNumberInputProps={{ max: 512 }}
|
|
||||||
value={seamBlur}
|
|
||||||
onChange={(v) => {
|
|
||||||
dispatch(setSeamBlur(v));
|
|
||||||
}}
|
|
||||||
withInput
|
|
||||||
withSliderMarks
|
|
||||||
withReset
|
|
||||||
handleReset={() => {
|
|
||||||
dispatch(setSeamBlur(8));
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default memo(ParamSeamBlur);
|
|
@ -1,27 +0,0 @@
|
|||||||
import { Flex } from '@chakra-ui/react';
|
|
||||||
import IAICollapse from 'common/components/IAICollapse';
|
|
||||||
import { memo } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import ParamSeamBlur from './ParamSeamBlur';
|
|
||||||
import ParamSeamSize from './ParamSeamSize';
|
|
||||||
import ParamSeamSteps from './ParamSeamSteps';
|
|
||||||
import ParamSeamStrength from './ParamSeamStrength';
|
|
||||||
import ParamSeamThreshold from './ParamSeamThreshold';
|
|
||||||
|
|
||||||
const ParamSeamPaintingCollapse = () => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<IAICollapse label={t('parameters.seamPaintingHeader')}>
|
|
||||||
<Flex sx={{ flexDirection: 'column', gap: 2, paddingBottom: 2 }}>
|
|
||||||
<ParamSeamSize />
|
|
||||||
<ParamSeamBlur />
|
|
||||||
<ParamSeamSteps />
|
|
||||||
<ParamSeamStrength />
|
|
||||||
<ParamSeamThreshold />
|
|
||||||
</Flex>
|
|
||||||
</IAICollapse>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default memo(ParamSeamPaintingCollapse);
|
|
@ -1,36 +0,0 @@
|
|||||||
import type { RootState } from 'app/store/store';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import IAISlider from 'common/components/IAISlider';
|
|
||||||
import { setSeamSize } from 'features/parameters/store/generationSlice';
|
|
||||||
import { memo } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
const ParamSeamSize = () => {
|
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const seamSize = useAppSelector(
|
|
||||||
(state: RootState) => state.generation.seamSize
|
|
||||||
);
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<IAISlider
|
|
||||||
label={t('parameters.seamSize')}
|
|
||||||
min={0}
|
|
||||||
max={128}
|
|
||||||
step={8}
|
|
||||||
sliderNumberInputProps={{ max: 512 }}
|
|
||||||
value={seamSize}
|
|
||||||
onChange={(v) => {
|
|
||||||
dispatch(setSeamSize(v));
|
|
||||||
}}
|
|
||||||
withInput
|
|
||||||
withSliderMarks
|
|
||||||
withReset
|
|
||||||
handleReset={() => {
|
|
||||||
dispatch(setSeamSize(16));
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default memo(ParamSeamSize);
|
|
@ -1,121 +0,0 @@
|
|||||||
import {
|
|
||||||
FormControl,
|
|
||||||
FormLabel,
|
|
||||||
HStack,
|
|
||||||
RangeSlider,
|
|
||||||
RangeSliderFilledTrack,
|
|
||||||
RangeSliderMark,
|
|
||||||
RangeSliderThumb,
|
|
||||||
RangeSliderTrack,
|
|
||||||
Tooltip,
|
|
||||||
} from '@chakra-ui/react';
|
|
||||||
import type { RootState } from 'app/store/store';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
|
||||||
import {
|
|
||||||
setSeamHighThreshold,
|
|
||||||
setSeamLowThreshold,
|
|
||||||
} from 'features/parameters/store/generationSlice';
|
|
||||||
import { memo, useCallback } from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { BiReset } from 'react-icons/bi';
|
|
||||||
|
|
||||||
const ParamSeamThreshold = () => {
|
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const seamLowThreshold = useAppSelector(
|
|
||||||
(state: RootState) => state.generation.seamLowThreshold
|
|
||||||
);
|
|
||||||
|
|
||||||
const seamHighThreshold = useAppSelector(
|
|
||||||
(state: RootState) => state.generation.seamHighThreshold
|
|
||||||
);
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const handleSeamThresholdChange = useCallback(
|
|
||||||
(v: number[]) => {
|
|
||||||
dispatch(setSeamLowThreshold(v[0] as number));
|
|
||||||
dispatch(setSeamHighThreshold(v[1] as number));
|
|
||||||
},
|
|
||||||
[dispatch]
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleSeamThresholdReset = () => {
|
|
||||||
dispatch(setSeamLowThreshold(100));
|
|
||||||
dispatch(setSeamHighThreshold(200));
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<FormControl>
|
|
||||||
<FormLabel>{t('parameters.seamThreshold')}</FormLabel>
|
|
||||||
<HStack w="100%" gap={4} mt={-2}>
|
|
||||||
<RangeSlider
|
|
||||||
aria-label={[
|
|
||||||
t('parameters.seamLowThreshold'),
|
|
||||||
t('parameters.seamHighThreshold'),
|
|
||||||
]}
|
|
||||||
value={[seamLowThreshold, seamHighThreshold]}
|
|
||||||
min={0}
|
|
||||||
max={255}
|
|
||||||
step={1}
|
|
||||||
minStepsBetweenThumbs={1}
|
|
||||||
onChange={handleSeamThresholdChange}
|
|
||||||
>
|
|
||||||
<RangeSliderTrack>
|
|
||||||
<RangeSliderFilledTrack />
|
|
||||||
</RangeSliderTrack>
|
|
||||||
<Tooltip label={seamLowThreshold} placement="top" hasArrow>
|
|
||||||
<RangeSliderThumb index={0} />
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip label={seamHighThreshold} placement="top" hasArrow>
|
|
||||||
<RangeSliderThumb index={1} />
|
|
||||||
</Tooltip>
|
|
||||||
<RangeSliderMark
|
|
||||||
value={0}
|
|
||||||
sx={{
|
|
||||||
insetInlineStart: '0 !important',
|
|
||||||
insetInlineEnd: 'unset !important',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
0
|
|
||||||
</RangeSliderMark>
|
|
||||||
<RangeSliderMark
|
|
||||||
value={0.392}
|
|
||||||
sx={{
|
|
||||||
insetInlineStart: '38.4% !important',
|
|
||||||
transform: 'translateX(-38.4%)',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
100
|
|
||||||
</RangeSliderMark>
|
|
||||||
<RangeSliderMark
|
|
||||||
value={0.784}
|
|
||||||
sx={{
|
|
||||||
insetInlineStart: '79.8% !important',
|
|
||||||
transform: 'translateX(-79.8%)',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
200
|
|
||||||
</RangeSliderMark>
|
|
||||||
<RangeSliderMark
|
|
||||||
value={1}
|
|
||||||
sx={{
|
|
||||||
insetInlineStart: 'unset !important',
|
|
||||||
insetInlineEnd: '0 !important',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
255
|
|
||||||
</RangeSliderMark>
|
|
||||||
</RangeSlider>
|
|
||||||
<IAIIconButton
|
|
||||||
size="sm"
|
|
||||||
aria-label={t('accessibility.reset')}
|
|
||||||
tooltip={t('accessibility.reset')}
|
|
||||||
icon={<BiReset />}
|
|
||||||
onClick={handleSeamThresholdReset}
|
|
||||||
/>
|
|
||||||
</HStack>
|
|
||||||
</FormControl>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default memo(ParamSeamThreshold);
|
|
@ -37,12 +37,8 @@ export interface GenerationState {
|
|||||||
scheduler: SchedulerParam;
|
scheduler: SchedulerParam;
|
||||||
maskBlur: number;
|
maskBlur: number;
|
||||||
maskBlurMethod: MaskBlurMethodParam;
|
maskBlurMethod: MaskBlurMethodParam;
|
||||||
seamSize: number;
|
canvasCoherenceSteps: number;
|
||||||
seamBlur: number;
|
canvasCoherenceStrength: StrengthParam;
|
||||||
seamSteps: number;
|
|
||||||
seamStrength: StrengthParam;
|
|
||||||
seamLowThreshold: number;
|
|
||||||
seamHighThreshold: number;
|
|
||||||
seed: SeedParam;
|
seed: SeedParam;
|
||||||
seedWeights: string;
|
seedWeights: string;
|
||||||
shouldFitToWidthHeight: boolean;
|
shouldFitToWidthHeight: boolean;
|
||||||
@ -80,12 +76,8 @@ export const initialGenerationState: GenerationState = {
|
|||||||
scheduler: 'euler',
|
scheduler: 'euler',
|
||||||
maskBlur: 16,
|
maskBlur: 16,
|
||||||
maskBlurMethod: 'box',
|
maskBlurMethod: 'box',
|
||||||
seamSize: 16,
|
canvasCoherenceSteps: 20,
|
||||||
seamBlur: 8,
|
canvasCoherenceStrength: 0.3,
|
||||||
seamSteps: 20,
|
|
||||||
seamStrength: 0.7,
|
|
||||||
seamLowThreshold: 100,
|
|
||||||
seamHighThreshold: 200,
|
|
||||||
seed: 0,
|
seed: 0,
|
||||||
seedWeights: '',
|
seedWeights: '',
|
||||||
shouldFitToWidthHeight: true,
|
shouldFitToWidthHeight: true,
|
||||||
@ -212,23 +204,11 @@ export const generationSlice = createSlice({
|
|||||||
setMaskBlurMethod: (state, action: PayloadAction<MaskBlurMethodParam>) => {
|
setMaskBlurMethod: (state, action: PayloadAction<MaskBlurMethodParam>) => {
|
||||||
state.maskBlurMethod = action.payload;
|
state.maskBlurMethod = action.payload;
|
||||||
},
|
},
|
||||||
setSeamSize: (state, action: PayloadAction<number>) => {
|
setCanvasCoherenceSteps: (state, action: PayloadAction<number>) => {
|
||||||
state.seamSize = action.payload;
|
state.canvasCoherenceSteps = action.payload;
|
||||||
},
|
},
|
||||||
setSeamBlur: (state, action: PayloadAction<number>) => {
|
setCanvasCoherenceStrength: (state, action: PayloadAction<number>) => {
|
||||||
state.seamBlur = action.payload;
|
state.canvasCoherenceStrength = action.payload;
|
||||||
},
|
|
||||||
setSeamSteps: (state, action: PayloadAction<number>) => {
|
|
||||||
state.seamSteps = action.payload;
|
|
||||||
},
|
|
||||||
setSeamStrength: (state, action: PayloadAction<number>) => {
|
|
||||||
state.seamStrength = action.payload;
|
|
||||||
},
|
|
||||||
setSeamLowThreshold: (state, action: PayloadAction<number>) => {
|
|
||||||
state.seamLowThreshold = action.payload;
|
|
||||||
},
|
|
||||||
setSeamHighThreshold: (state, action: PayloadAction<number>) => {
|
|
||||||
state.seamHighThreshold = action.payload;
|
|
||||||
},
|
},
|
||||||
setTileSize: (state, action: PayloadAction<number>) => {
|
setTileSize: (state, action: PayloadAction<number>) => {
|
||||||
state.tileSize = action.payload;
|
state.tileSize = action.payload;
|
||||||
@ -338,12 +318,8 @@ export const {
|
|||||||
setScheduler,
|
setScheduler,
|
||||||
setMaskBlur,
|
setMaskBlur,
|
||||||
setMaskBlurMethod,
|
setMaskBlurMethod,
|
||||||
setSeamSize,
|
setCanvasCoherenceSteps,
|
||||||
setSeamBlur,
|
setCanvasCoherenceStrength,
|
||||||
setSeamSteps,
|
|
||||||
setSeamStrength,
|
|
||||||
setSeamLowThreshold,
|
|
||||||
setSeamHighThreshold,
|
|
||||||
setSeed,
|
setSeed,
|
||||||
setSeedWeights,
|
setSeedWeights,
|
||||||
setShouldFitToWidthHeight,
|
setShouldFitToWidthHeight,
|
||||||
|
@ -2,7 +2,7 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para
|
|||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
||||||
import ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
import ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
||||||
import ParamSeamPaintingCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamSeamPaintingCollapse';
|
import ParamCanvasCoherencePassCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamCanvasCoherencePassCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
||||||
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
||||||
@ -21,7 +21,7 @@ export default function SDXLUnifiedCanvasTabParameters() {
|
|||||||
<ParamNoiseCollapse />
|
<ParamNoiseCollapse />
|
||||||
<ParamMaskAdjustmentCollapse />
|
<ParamMaskAdjustmentCollapse />
|
||||||
<ParamInfillAndScalingCollapse />
|
<ParamInfillAndScalingCollapse />
|
||||||
<ParamSeamPaintingCollapse />
|
<ParamCanvasCoherencePassCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para
|
|||||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||||
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||||
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
||||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
|
||||||
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
|
||||||
import ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
import ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
||||||
import ParamSeamPaintingCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamSeamPaintingCollapse';
|
import ParamCanvasCoherencePassCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamCanvasCoherencePassCollapse';
|
||||||
|
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||||
import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea';
|
import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea';
|
||||||
|
import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import UnifiedCanvasCoreParameters from './UnifiedCanvasCoreParameters';
|
import UnifiedCanvasCoreParameters from './UnifiedCanvasCoreParameters';
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ const UnifiedCanvasParameters = () => {
|
|||||||
<ParamSymmetryCollapse />
|
<ParamSymmetryCollapse />
|
||||||
<ParamMaskAdjustmentCollapse />
|
<ParamMaskAdjustmentCollapse />
|
||||||
<ParamInfillAndScalingCollapse />
|
<ParamInfillAndScalingCollapse />
|
||||||
<ParamSeamPaintingCollapse />
|
<ParamCanvasCoherencePassCollapse />
|
||||||
<ParamAdvancedCollapse />
|
<ParamAdvancedCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
118
invokeai/frontend/web/src/services/api/schema.d.ts
vendored
118
invokeai/frontend/web/src/services/api/schema.d.ts
vendored
@ -397,6 +397,59 @@ export type components = {
|
|||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
BaseModelType: "sd-1" | "sd-2" | "sdxl" | "sdxl-refiner";
|
BaseModelType: "sd-1" | "sd-2" | "sdxl" | "sdxl-refiner";
|
||||||
|
/**
|
||||||
|
* Blank Image
|
||||||
|
* @description Creates a blank image and forwards it to the pipeline
|
||||||
|
*/
|
||||||
|
BlankImageInvocation: {
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
* @description The id of this node. Must be unique among all nodes.
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* Is Intermediate
|
||||||
|
* @description Whether or not this node is an intermediate node.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
is_intermediate?: boolean;
|
||||||
|
/**
|
||||||
|
* Type
|
||||||
|
* @default blank_image
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
type: "blank_image";
|
||||||
|
/**
|
||||||
|
* Width
|
||||||
|
* @description The width of the image
|
||||||
|
* @default 512
|
||||||
|
*/
|
||||||
|
width?: number;
|
||||||
|
/**
|
||||||
|
* Height
|
||||||
|
* @description The height of the image
|
||||||
|
* @default 512
|
||||||
|
*/
|
||||||
|
height?: number;
|
||||||
|
/**
|
||||||
|
* Mode
|
||||||
|
* @description The mode of the image
|
||||||
|
* @default RGB
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
mode?: "RGB" | "RGBA";
|
||||||
|
/**
|
||||||
|
* Color
|
||||||
|
* @description The color of the image
|
||||||
|
* @default {
|
||||||
|
* "r": 0,
|
||||||
|
* "g": 0,
|
||||||
|
* "b": 0,
|
||||||
|
* "a": 255
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
color?: components["schemas"]["ColorField"];
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Blend Latents
|
* Blend Latents
|
||||||
* @description Blend two latents using a given alpha. Latents must have same size.
|
* @description Blend two latents using a given alpha. Latents must have same size.
|
||||||
@ -1400,6 +1453,11 @@ export type components = {
|
|||||||
* @description The generation mode that output this image
|
* @description The generation mode that output this image
|
||||||
*/
|
*/
|
||||||
generation_mode: string;
|
generation_mode: string;
|
||||||
|
/**
|
||||||
|
* Created By
|
||||||
|
* @description The name of the creator of the image
|
||||||
|
*/
|
||||||
|
created_by?: string;
|
||||||
/**
|
/**
|
||||||
* Positive Prompt
|
* Positive Prompt
|
||||||
* @description The positive prompt parameter
|
* @description The positive prompt parameter
|
||||||
@ -1951,7 +2009,7 @@ export type components = {
|
|||||||
* @description The nodes in this graph
|
* @description The nodes in this graph
|
||||||
*/
|
*/
|
||||||
nodes?: {
|
nodes?: {
|
||||||
[key: string]: components["schemas"]["BooleanInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MetadataAccumulatorInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageLuminosityAdjustmentInvocation"] | components["schemas"]["ImageSaturationAdjustmentInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"];
|
[key: string]: components["schemas"]["BooleanInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MetadataAccumulatorInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageLuminosityAdjustmentInvocation"] | components["schemas"]["ImageSaturationAdjustmentInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"];
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Edges
|
* Edges
|
||||||
@ -1994,7 +2052,7 @@ export type components = {
|
|||||||
* @description The results of node executions
|
* @description The results of node executions
|
||||||
*/
|
*/
|
||||||
results: {
|
results: {
|
||||||
[key: string]: components["schemas"]["BooleanOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["SDXLLoraLoaderOutput"] | components["schemas"]["VaeLoaderOutput"] | components["schemas"]["MetadataAccumulatorOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["ClipSkipInvocationOutput"] | components["schemas"]["ONNXModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["GraphInvocationOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["CollectInvocationOutput"];
|
[key: string]: components["schemas"]["BooleanOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["SDXLLoraLoaderOutput"] | components["schemas"]["VaeLoaderOutput"] | components["schemas"]["MetadataAccumulatorOutput"] | components["schemas"]["ClipSkipInvocationOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["ONNXModelLoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["GraphInvocationOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["CollectInvocationOutput"];
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Errors
|
* Errors
|
||||||
@ -3292,6 +3350,34 @@ export type components = {
|
|||||||
*/
|
*/
|
||||||
item?: unknown;
|
item?: unknown;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* LaMa Infill
|
||||||
|
* @description Infills transparent areas of an image using the LaMa model
|
||||||
|
*/
|
||||||
|
LaMaInfillInvocation: {
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
* @description The id of this node. Must be unique among all nodes.
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* Is Intermediate
|
||||||
|
* @description Whether or not this node is an intermediate node.
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
is_intermediate?: boolean;
|
||||||
|
/**
|
||||||
|
* Type
|
||||||
|
* @default infill_lama
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
type: "infill_lama";
|
||||||
|
/**
|
||||||
|
* Image
|
||||||
|
* @description The image to infill
|
||||||
|
*/
|
||||||
|
image?: components["schemas"]["ImageField"];
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Latents Primitive Collection
|
* Latents Primitive Collection
|
||||||
* @description A collection of latents tensor primitive values
|
* @description A collection of latents tensor primitive values
|
||||||
@ -6232,12 +6318,24 @@ export type components = {
|
|||||||
/** Ui Order */
|
/** Ui Order */
|
||||||
ui_order?: number;
|
ui_order?: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* ControlNetModelFormat
|
||||||
|
* @description An enumeration.
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
ControlNetModelFormat: "checkpoint" | "diffusers";
|
||||||
/**
|
/**
|
||||||
* StableDiffusion1ModelFormat
|
* StableDiffusion1ModelFormat
|
||||||
* @description An enumeration.
|
* @description An enumeration.
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
StableDiffusion1ModelFormat: "checkpoint" | "diffusers";
|
StableDiffusion1ModelFormat: "checkpoint" | "diffusers";
|
||||||
|
/**
|
||||||
|
* StableDiffusionOnnxModelFormat
|
||||||
|
* @description An enumeration.
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
StableDiffusionOnnxModelFormat: "olive" | "onnx";
|
||||||
/**
|
/**
|
||||||
* StableDiffusionXLModelFormat
|
* StableDiffusionXLModelFormat
|
||||||
* @description An enumeration.
|
* @description An enumeration.
|
||||||
@ -6250,18 +6348,6 @@ export type components = {
|
|||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
StableDiffusion2ModelFormat: "checkpoint" | "diffusers";
|
StableDiffusion2ModelFormat: "checkpoint" | "diffusers";
|
||||||
/**
|
|
||||||
* ControlNetModelFormat
|
|
||||||
* @description An enumeration.
|
|
||||||
* @enum {string}
|
|
||||||
*/
|
|
||||||
ControlNetModelFormat: "checkpoint" | "diffusers";
|
|
||||||
/**
|
|
||||||
* StableDiffusionOnnxModelFormat
|
|
||||||
* @description An enumeration.
|
|
||||||
* @enum {string}
|
|
||||||
*/
|
|
||||||
StableDiffusionOnnxModelFormat: "olive" | "onnx";
|
|
||||||
};
|
};
|
||||||
responses: never;
|
responses: never;
|
||||||
parameters: never;
|
parameters: never;
|
||||||
@ -6378,7 +6464,7 @@ export type operations = {
|
|||||||
};
|
};
|
||||||
requestBody: {
|
requestBody: {
|
||||||
content: {
|
content: {
|
||||||
"application/json": components["schemas"]["BooleanInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MetadataAccumulatorInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageLuminosityAdjustmentInvocation"] | components["schemas"]["ImageSaturationAdjustmentInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"];
|
"application/json": components["schemas"]["BooleanInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MetadataAccumulatorInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageLuminosityAdjustmentInvocation"] | components["schemas"]["ImageSaturationAdjustmentInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
responses: {
|
responses: {
|
||||||
@ -6419,7 +6505,7 @@ export type operations = {
|
|||||||
};
|
};
|
||||||
requestBody: {
|
requestBody: {
|
||||||
content: {
|
content: {
|
||||||
"application/json": components["schemas"]["BooleanInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MetadataAccumulatorInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageLuminosityAdjustmentInvocation"] | components["schemas"]["ImageSaturationAdjustmentInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"];
|
"application/json": components["schemas"]["BooleanInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["SDXLLoraLoaderInvocation"] | components["schemas"]["VaeLoaderInvocation"] | components["schemas"]["MetadataAccumulatorInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ClipSkipInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageLuminosityAdjustmentInvocation"] | components["schemas"]["ImageSaturationAdjustmentInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["ONNXPromptInvocation"] | components["schemas"]["ONNXTextToLatentsInvocation"] | components["schemas"]["ONNXLatentsToImageInvocation"] | components["schemas"]["OnnxModelLoaderInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
responses: {
|
responses: {
|
||||||
|
Loading…
Reference in New Issue
Block a user