mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): use seed + 1 for second inpaint/outpaint pass
This commit is contained in:
parent
79df46bad2
commit
40e6dd8464
@ -509,9 +509,9 @@
|
||||
"maskAdjustmentsHeader": "Mask Adjustments",
|
||||
"maskBlur": "Mask Blur",
|
||||
"maskBlurMethod": "Mask Blur Method",
|
||||
"refinePassHeader": "Refine Pass",
|
||||
"refineSteps": "Refine Steps",
|
||||
"refineStrength": "Refine Strength",
|
||||
"coherencePassHeader": "Coherence Pass",
|
||||
"coherenceSteps": "Coherence Pass Steps",
|
||||
"coherenceStrength": "Coherence Pass Strength",
|
||||
"seamLowThreshold": "Low",
|
||||
"seamHighThreshold": "High",
|
||||
"scaleBeforeProcessing": "Scale Before Processing",
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
import {
|
||||
CANVAS_INPAINT_GRAPH,
|
||||
CANVAS_OUTPAINT_GRAPH,
|
||||
CANVAS_REFINE_DENOISE_LATENTS,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
CLIP_SKIP,
|
||||
LORA_LOADER,
|
||||
MAIN_MODEL_LOADER,
|
||||
@ -149,7 +149,7 @@ export const addLoRAsToGraph = (
|
||||
field: 'unet',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'unet',
|
||||
},
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
SDXLLoraLoaderInvocation,
|
||||
} from 'services/api/types';
|
||||
import {
|
||||
CANVAS_REFINE_DENOISE_LATENTS,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
LORA_LOADER,
|
||||
METADATA_ACCUMULATOR,
|
||||
NEGATIVE_CONDITIONING,
|
||||
@ -178,7 +178,7 @@ export const addSDXLLoRAsToGraph = (
|
||||
field: 'unet',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'unet',
|
||||
},
|
||||
});
|
||||
|
@ -17,9 +17,9 @@ import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||
import {
|
||||
CANVAS_INPAINT_GRAPH,
|
||||
CANVAS_OUTPUT,
|
||||
CANVAS_REFINE_DENOISE_LATENTS,
|
||||
CANVAS_REFINE_NOISE,
|
||||
CANVAS_REFINE_NOISE_INCREMENT,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
CANVAS_COHERENCE_NOISE,
|
||||
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
CLIP_SKIP,
|
||||
DENOISE_LATENTS,
|
||||
INPAINT_IMAGE,
|
||||
@ -63,8 +63,8 @@ export const buildCanvasInpaintGraph = (
|
||||
shouldUseCpuNoise,
|
||||
maskBlur,
|
||||
maskBlurMethod,
|
||||
canvasRefineSteps,
|
||||
canvasRefineStrength,
|
||||
canvasCoherenceSteps,
|
||||
canvasCoherenceStrength,
|
||||
clipSkip,
|
||||
} = state.generation;
|
||||
|
||||
@ -143,26 +143,26 @@ export const buildCanvasInpaintGraph = (
|
||||
denoising_start: 1 - strength,
|
||||
denoising_end: 1,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE]: {
|
||||
[CANVAS_COHERENCE_NOISE]: {
|
||||
type: 'noise',
|
||||
id: NOISE,
|
||||
use_cpu,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
||||
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||
type: 'add',
|
||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
b: 1,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
||||
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||
type: 'denoise_latents',
|
||||
id: DENOISE_LATENTS,
|
||||
is_intermediate: true,
|
||||
steps: canvasRefineSteps,
|
||||
steps: canvasCoherenceSteps,
|
||||
cfg_scale: cfg_scale,
|
||||
scheduler: scheduler,
|
||||
denoising_start: 1 - canvasRefineStrength,
|
||||
denoising_start: 1 - canvasCoherenceStrength,
|
||||
denoising_end: 1,
|
||||
},
|
||||
[LATENTS_TO_IMAGE]: {
|
||||
@ -314,17 +314,17 @@ export const buildCanvasInpaintGraph = (
|
||||
field: 'item',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'a',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'value',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'seed',
|
||||
},
|
||||
},
|
||||
@ -334,7 +334,7 @@ export const buildCanvasInpaintGraph = (
|
||||
field: 'unet',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'unet',
|
||||
},
|
||||
},
|
||||
@ -344,7 +344,7 @@ export const buildCanvasInpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'positive_conditioning',
|
||||
},
|
||||
},
|
||||
@ -354,17 +354,17 @@ export const buildCanvasInpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'negative_conditioning',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'noise',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'noise',
|
||||
},
|
||||
},
|
||||
@ -374,14 +374,14 @@ export const buildCanvasInpaintGraph = (
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
},
|
||||
// Decode Inpainted Latents To Image
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
@ -431,8 +431,10 @@ export const buildCanvasInpaintGraph = (
|
||||
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||
scaledWidth;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||
scaledHeight;
|
||||
|
||||
// Connect Nodes
|
||||
graph.edges.push(
|
||||
@ -503,8 +505,8 @@ export const buildCanvasInpaintGraph = (
|
||||
// Add Images To Nodes
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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] as ImageToLatentsInvocation),
|
||||
|
@ -19,9 +19,9 @@ import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||
import {
|
||||
CANVAS_OUTPAINT_GRAPH,
|
||||
CANVAS_OUTPUT,
|
||||
CANVAS_REFINE_DENOISE_LATENTS,
|
||||
CANVAS_REFINE_NOISE,
|
||||
CANVAS_REFINE_NOISE_INCREMENT,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
CANVAS_COHERENCE_NOISE,
|
||||
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
CLIP_SKIP,
|
||||
DENOISE_LATENTS,
|
||||
INPAINT_IMAGE,
|
||||
@ -69,8 +69,8 @@ export const buildCanvasOutpaintGraph = (
|
||||
shouldUseCpuNoise,
|
||||
maskBlur,
|
||||
maskBlurMethod,
|
||||
canvasRefineSteps,
|
||||
canvasRefineStrength,
|
||||
canvasCoherenceSteps,
|
||||
canvasCoherenceStrength,
|
||||
tileSize,
|
||||
infillMethod,
|
||||
clipSkip,
|
||||
@ -163,26 +163,26 @@ export const buildCanvasOutpaintGraph = (
|
||||
denoising_start: 1 - strength,
|
||||
denoising_end: 1,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE]: {
|
||||
[CANVAS_COHERENCE_NOISE]: {
|
||||
type: 'noise',
|
||||
id: NOISE,
|
||||
use_cpu,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
||||
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||
type: 'add',
|
||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
b: 1,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
||||
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||
type: 'denoise_latents',
|
||||
id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
is_intermediate: true,
|
||||
steps: canvasRefineSteps,
|
||||
steps: canvasCoherenceSteps,
|
||||
cfg_scale: cfg_scale,
|
||||
scheduler: scheduler,
|
||||
denoising_start: 1 - canvasRefineStrength,
|
||||
denoising_start: 1 - canvasCoherenceStrength,
|
||||
denoising_end: 1,
|
||||
},
|
||||
[LATENTS_TO_IMAGE]: {
|
||||
@ -355,17 +355,17 @@ export const buildCanvasOutpaintGraph = (
|
||||
field: 'item',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'a',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'value',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'seed',
|
||||
},
|
||||
},
|
||||
@ -375,7 +375,7 @@ export const buildCanvasOutpaintGraph = (
|
||||
field: 'unet',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'unet',
|
||||
},
|
||||
},
|
||||
@ -385,7 +385,7 @@ export const buildCanvasOutpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'positive_conditioning',
|
||||
},
|
||||
},
|
||||
@ -395,17 +395,17 @@ export const buildCanvasOutpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'negative_conditioning',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'noise',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'noise',
|
||||
},
|
||||
},
|
||||
@ -415,14 +415,14 @@ export const buildCanvasOutpaintGraph = (
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
},
|
||||
// Decode the result from Inpaint
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
@ -504,8 +504,10 @@ export const buildCanvasOutpaintGraph = (
|
||||
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||
scaledWidth;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||
scaledHeight;
|
||||
|
||||
// Connect Nodes
|
||||
graph.edges.push(
|
||||
@ -615,8 +617,8 @@ export const buildCanvasOutpaintGraph = (
|
||||
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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] as ImageToLatentsInvocation),
|
||||
|
@ -17,9 +17,9 @@ import { addVAEToGraph } from './addVAEToGraph';
|
||||
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||
import {
|
||||
CANVAS_OUTPUT,
|
||||
CANVAS_REFINE_DENOISE_LATENTS,
|
||||
CANVAS_REFINE_NOISE,
|
||||
CANVAS_REFINE_NOISE_INCREMENT,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
CANVAS_COHERENCE_NOISE,
|
||||
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
INPAINT_IMAGE,
|
||||
INPAINT_IMAGE_RESIZE_DOWN,
|
||||
INPAINT_IMAGE_RESIZE_UP,
|
||||
@ -63,8 +63,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
shouldUseCpuNoise,
|
||||
maskBlur,
|
||||
maskBlurMethod,
|
||||
canvasRefineSteps,
|
||||
canvasRefineStrength,
|
||||
canvasCoherenceSteps,
|
||||
canvasCoherenceStrength,
|
||||
} = state.generation;
|
||||
|
||||
const {
|
||||
@ -148,26 +148,26 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
: 1 - strength,
|
||||
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE]: {
|
||||
[CANVAS_COHERENCE_NOISE]: {
|
||||
type: 'noise',
|
||||
id: NOISE,
|
||||
use_cpu,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
||||
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||
type: 'add',
|
||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
b: 1,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
||||
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||
type: 'denoise_latents',
|
||||
id: SDXL_DENOISE_LATENTS,
|
||||
is_intermediate: true,
|
||||
steps: canvasRefineSteps,
|
||||
steps: canvasCoherenceSteps,
|
||||
cfg_scale: cfg_scale,
|
||||
scheduler: scheduler,
|
||||
denoising_start: 1 - canvasRefineStrength,
|
||||
denoising_start: 1 - canvasCoherenceStrength,
|
||||
denoising_end: 1,
|
||||
},
|
||||
[LATENTS_TO_IMAGE]: {
|
||||
@ -328,17 +328,17 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
field: 'item',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'a',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'value',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'seed',
|
||||
},
|
||||
},
|
||||
@ -348,7 +348,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
field: 'unet',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'unet',
|
||||
},
|
||||
},
|
||||
@ -358,7 +358,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'positive_conditioning',
|
||||
},
|
||||
},
|
||||
@ -368,17 +368,17 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'negative_conditioning',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'noise',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'noise',
|
||||
},
|
||||
},
|
||||
@ -388,14 +388,14 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
},
|
||||
// Decode Inpainted Latents To Image
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
@ -445,8 +445,10 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||
scaledWidth;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||
scaledHeight;
|
||||
|
||||
// Connect Nodes
|
||||
graph.edges.push(
|
||||
@ -517,8 +519,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
// Add Images To Nodes
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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] as ImageToLatentsInvocation),
|
||||
@ -576,7 +578,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
||||
|
||||
// Add Refiner if enabled
|
||||
if (shouldUseSDXLRefiner) {
|
||||
addSDXLRefinerToGraph(state, graph, CANVAS_REFINE_DENOISE_LATENTS);
|
||||
addSDXLRefinerToGraph(state, graph, CANVAS_COHERENCE_DENOISE_LATENTS);
|
||||
}
|
||||
|
||||
// optionally add custom VAE
|
||||
|
@ -19,9 +19,9 @@ import { addVAEToGraph } from './addVAEToGraph';
|
||||
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||
import {
|
||||
CANVAS_OUTPUT,
|
||||
CANVAS_REFINE_DENOISE_LATENTS,
|
||||
CANVAS_REFINE_NOISE,
|
||||
CANVAS_REFINE_NOISE_INCREMENT,
|
||||
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
CANVAS_COHERENCE_NOISE,
|
||||
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
INPAINT_IMAGE,
|
||||
INPAINT_IMAGE_RESIZE_DOWN,
|
||||
INPAINT_IMAGE_RESIZE_UP,
|
||||
@ -69,8 +69,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
shouldUseCpuNoise,
|
||||
maskBlur,
|
||||
maskBlurMethod,
|
||||
canvasRefineSteps,
|
||||
canvasRefineStrength,
|
||||
canvasCoherenceSteps,
|
||||
canvasCoherenceStrength,
|
||||
tileSize,
|
||||
infillMethod,
|
||||
} = state.generation;
|
||||
@ -168,26 +168,26 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
: 1 - strength,
|
||||
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE]: {
|
||||
[CANVAS_COHERENCE_NOISE]: {
|
||||
type: 'noise',
|
||||
id: NOISE,
|
||||
use_cpu,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
||||
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||
type: 'add',
|
||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
b: 1,
|
||||
is_intermediate: true,
|
||||
},
|
||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
||||
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||
type: 'denoise_latents',
|
||||
id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
is_intermediate: true,
|
||||
steps: canvasRefineSteps,
|
||||
steps: canvasCoherenceSteps,
|
||||
cfg_scale: cfg_scale,
|
||||
scheduler: scheduler,
|
||||
denoising_start: 1 - canvasRefineStrength,
|
||||
denoising_start: 1 - canvasCoherenceStrength,
|
||||
denoising_end: 1,
|
||||
},
|
||||
[LATENTS_TO_IMAGE]: {
|
||||
@ -369,17 +369,17 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
field: 'item',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'a',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
||||
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||
field: 'value',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'seed',
|
||||
},
|
||||
},
|
||||
@ -389,7 +389,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
field: 'unet',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'unet',
|
||||
},
|
||||
},
|
||||
@ -399,7 +399,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'positive_conditioning',
|
||||
},
|
||||
},
|
||||
@ -409,17 +409,17 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
field: 'conditioning',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'negative_conditioning',
|
||||
},
|
||||
},
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_NOISE,
|
||||
node_id: CANVAS_COHERENCE_NOISE,
|
||||
field: 'noise',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'noise',
|
||||
},
|
||||
},
|
||||
@ -429,14 +429,14 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
},
|
||||
// Decode inpainted latents to image
|
||||
{
|
||||
source: {
|
||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
||||
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||
field: 'latents',
|
||||
},
|
||||
destination: {
|
||||
@ -519,8 +519,10 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||
scaledWidth;
|
||||
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||
scaledHeight;
|
||||
|
||||
// Connect Nodes
|
||||
graph.edges.push(
|
||||
@ -630,8 +632,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
|
||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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] as ImageToLatentsInvocation),
|
||||
@ -709,7 +711,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
||||
|
||||
// Add Refiner if enabled
|
||||
if (shouldUseSDXLRefiner) {
|
||||
addSDXLRefinerToGraph(state, graph, CANVAS_REFINE_DENOISE_LATENTS);
|
||||
addSDXLRefinerToGraph(state, graph, CANVAS_COHERENCE_DENOISE_LATENTS);
|
||||
}
|
||||
|
||||
// optionally add custom VAE
|
||||
|
@ -25,9 +25,11 @@ export const INPAINT_IMAGE_RESIZE_DOWN = 'inpaint_image_resize_down';
|
||||
export const INPAINT_INFILL = 'inpaint_infill';
|
||||
export const INPAINT_INFILL_RESIZE_DOWN = 'inpaint_infill_resize_down';
|
||||
export const INPAINT_FINAL_IMAGE = 'inpaint_final_image';
|
||||
export const CANVAS_REFINE_DENOISE_LATENTS = 'canvas_refine_denoise_latents';
|
||||
export const CANVAS_REFINE_NOISE = 'canvas_refine_noise';
|
||||
export const CANVAS_REFINE_NOISE_INCREMENT = 'canvas_refine_noise_increment';
|
||||
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_EDGE = 'mask_edge';
|
||||
export const MASK_BLUR = 'mask_blur';
|
||||
|
@ -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 { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import IAISlider from 'common/components/IAISlider';
|
||||
import { setCanvasRefineSteps } from 'features/parameters/store/generationSlice';
|
||||
import { setCanvasCoherenceSteps } from 'features/parameters/store/generationSlice';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const ParamCanvasRefineSteps = () => {
|
||||
const ParamCanvasCoherenceSteps = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const canvasRefineSteps = useAppSelector(
|
||||
(state: RootState) => state.generation.canvasRefineSteps
|
||||
const canvasCoherenceSteps = useAppSelector(
|
||||
(state: RootState) => state.generation.canvasCoherenceSteps
|
||||
);
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<IAISlider
|
||||
label={t('parameters.refineSteps')}
|
||||
label={t('parameters.coherenceSteps')}
|
||||
min={1}
|
||||
max={100}
|
||||
step={1}
|
||||
sliderNumberInputProps={{ max: 999 }}
|
||||
value={canvasRefineSteps}
|
||||
value={canvasCoherenceSteps}
|
||||
onChange={(v) => {
|
||||
dispatch(setCanvasRefineSteps(v));
|
||||
dispatch(setCanvasCoherenceSteps(v));
|
||||
}}
|
||||
withInput
|
||||
withSliderMarks
|
||||
withReset
|
||||
handleReset={() => {
|
||||
dispatch(setCanvasRefineSteps(20));
|
||||
dispatch(setCanvasCoherenceSteps(20));
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(ParamCanvasRefineSteps);
|
||||
export default memo(ParamCanvasCoherenceSteps);
|
@ -1,36 +1,36 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import IAISlider from 'common/components/IAISlider';
|
||||
import { setCanvasRefineStrength } from 'features/parameters/store/generationSlice';
|
||||
import { setCanvasCoherenceStrength } from 'features/parameters/store/generationSlice';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const ParamCanvasRefineStrength = () => {
|
||||
const ParamCanvasCoherenceStrength = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const canvasRefineStrength = useAppSelector(
|
||||
(state: RootState) => state.generation.canvasRefineStrength
|
||||
const canvasCoherenceStrength = useAppSelector(
|
||||
(state: RootState) => state.generation.canvasCoherenceStrength
|
||||
);
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<IAISlider
|
||||
label={t('parameters.refineStrength')}
|
||||
label={t('parameters.coherenceStrength')}
|
||||
min={0}
|
||||
max={1}
|
||||
step={0.01}
|
||||
sliderNumberInputProps={{ max: 999 }}
|
||||
value={canvasRefineStrength}
|
||||
value={canvasCoherenceStrength}
|
||||
onChange={(v) => {
|
||||
dispatch(setCanvasRefineStrength(v));
|
||||
dispatch(setCanvasCoherenceStrength(v));
|
||||
}}
|
||||
withInput
|
||||
withSliderMarks
|
||||
withReset
|
||||
handleReset={() => {
|
||||
dispatch(setCanvasRefineStrength(0.3));
|
||||
dispatch(setCanvasCoherenceStrength(0.3));
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(ParamCanvasRefineStrength);
|
||||
export default memo(ParamCanvasCoherenceStrength);
|
@ -1,21 +0,0 @@
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import IAICollapse from 'common/components/IAICollapse';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ParamCanvasRefineSteps from './ParamCanvasRefineSteps';
|
||||
import ParamCanvasRefineStrength from './ParamCanvasRefineStrength';
|
||||
|
||||
const ParamCanvasRefinePassCollapse = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<IAICollapse label={t('parameters.refinePassHeader')}>
|
||||
<Flex sx={{ flexDirection: 'column', gap: 2, paddingBottom: 2 }}>
|
||||
<ParamCanvasRefineSteps />
|
||||
<ParamCanvasRefineStrength />
|
||||
</Flex>
|
||||
</IAICollapse>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(ParamCanvasRefinePassCollapse);
|
@ -37,8 +37,8 @@ export interface GenerationState {
|
||||
scheduler: SchedulerParam;
|
||||
maskBlur: number;
|
||||
maskBlurMethod: MaskBlurMethodParam;
|
||||
canvasRefineSteps: number;
|
||||
canvasRefineStrength: StrengthParam;
|
||||
canvasCoherenceSteps: number;
|
||||
canvasCoherenceStrength: StrengthParam;
|
||||
seed: SeedParam;
|
||||
seedWeights: string;
|
||||
shouldFitToWidthHeight: boolean;
|
||||
@ -76,8 +76,8 @@ export const initialGenerationState: GenerationState = {
|
||||
scheduler: 'euler',
|
||||
maskBlur: 16,
|
||||
maskBlurMethod: 'box',
|
||||
canvasRefineSteps: 20,
|
||||
canvasRefineStrength: 0.3,
|
||||
canvasCoherenceSteps: 20,
|
||||
canvasCoherenceStrength: 0.3,
|
||||
seed: 0,
|
||||
seedWeights: '',
|
||||
shouldFitToWidthHeight: true,
|
||||
@ -204,11 +204,11 @@ export const generationSlice = createSlice({
|
||||
setMaskBlurMethod: (state, action: PayloadAction<MaskBlurMethodParam>) => {
|
||||
state.maskBlurMethod = action.payload;
|
||||
},
|
||||
setCanvasRefineSteps: (state, action: PayloadAction<number>) => {
|
||||
state.canvasRefineSteps = action.payload;
|
||||
setCanvasCoherenceSteps: (state, action: PayloadAction<number>) => {
|
||||
state.canvasCoherenceSteps = action.payload;
|
||||
},
|
||||
setCanvasRefineStrength: (state, action: PayloadAction<number>) => {
|
||||
state.canvasRefineStrength = action.payload;
|
||||
setCanvasCoherenceStrength: (state, action: PayloadAction<number>) => {
|
||||
state.canvasCoherenceStrength = action.payload;
|
||||
},
|
||||
setTileSize: (state, action: PayloadAction<number>) => {
|
||||
state.tileSize = action.payload;
|
||||
@ -318,8 +318,8 @@ export const {
|
||||
setScheduler,
|
||||
setMaskBlur,
|
||||
setMaskBlurMethod,
|
||||
setCanvasRefineSteps,
|
||||
setCanvasRefineStrength,
|
||||
setCanvasCoherenceSteps,
|
||||
setCanvasCoherenceStrength,
|
||||
setSeed,
|
||||
setSeedWeights,
|
||||
setShouldFitToWidthHeight,
|
||||
|
@ -2,7 +2,7 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para
|
||||
import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
||||
import ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
||||
import ParamCanvasRefinePassCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamCanvasRefinePassCollapse';
|
||||
import ParamCanvasCoherencePassCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamCanvasCoherencePassCollapse';
|
||||
import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse';
|
||||
import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse';
|
||||
import ParamSDXLPromptArea from './ParamSDXLPromptArea';
|
||||
@ -21,7 +21,7 @@ export default function SDXLUnifiedCanvasTabParameters() {
|
||||
<ParamNoiseCollapse />
|
||||
<ParamMaskAdjustmentCollapse />
|
||||
<ParamInfillAndScalingCollapse />
|
||||
<ParamCanvasRefinePassCollapse />
|
||||
<ParamCanvasCoherencePassCollapse />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse';
|
||||
import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse';
|
||||
import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse';
|
||||
import ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
||||
import ParamCanvasRefinePassCollapse from 'features/parameters/components/Parameters/Canvas/SeamPainting/ParamCanvasRefinePassCollapse';
|
||||
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 ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
||||
@ -21,7 +21,7 @@ const UnifiedCanvasParameters = () => {
|
||||
<ParamSymmetryCollapse />
|
||||
<ParamMaskAdjustmentCollapse />
|
||||
<ParamInfillAndScalingCollapse />
|
||||
<ParamCanvasRefinePassCollapse />
|
||||
<ParamCanvasCoherencePassCollapse />
|
||||
<ParamAdvancedCollapse />
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user