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",
|
"maskAdjustmentsHeader": "Mask Adjustments",
|
||||||
"maskBlur": "Mask Blur",
|
"maskBlur": "Mask Blur",
|
||||||
"maskBlurMethod": "Mask Blur Method",
|
"maskBlurMethod": "Mask Blur Method",
|
||||||
"refinePassHeader": "Refine Pass",
|
"coherencePassHeader": "Coherence Pass",
|
||||||
"refineSteps": "Refine Steps",
|
"coherenceSteps": "Coherence Pass Steps",
|
||||||
"refineStrength": "Refine Strength",
|
"coherenceStrength": "Coherence Pass Strength",
|
||||||
"seamLowThreshold": "Low",
|
"seamLowThreshold": "Low",
|
||||||
"seamHighThreshold": "High",
|
"seamHighThreshold": "High",
|
||||||
"scaleBeforeProcessing": "Scale Before Processing",
|
"scaleBeforeProcessing": "Scale Before Processing",
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
CANVAS_INPAINT_GRAPH,
|
CANVAS_INPAINT_GRAPH,
|
||||||
CANVAS_OUTPAINT_GRAPH,
|
CANVAS_OUTPAINT_GRAPH,
|
||||||
CANVAS_REFINE_DENOISE_LATENTS,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
LORA_LOADER,
|
LORA_LOADER,
|
||||||
MAIN_MODEL_LOADER,
|
MAIN_MODEL_LOADER,
|
||||||
@ -149,7 +149,7 @@ export const addLoRAsToGraph = (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
SDXLLoraLoaderInvocation,
|
SDXLLoraLoaderInvocation,
|
||||||
} from 'services/api/types';
|
} from 'services/api/types';
|
||||||
import {
|
import {
|
||||||
CANVAS_REFINE_DENOISE_LATENTS,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
LORA_LOADER,
|
LORA_LOADER,
|
||||||
METADATA_ACCUMULATOR,
|
METADATA_ACCUMULATOR,
|
||||||
NEGATIVE_CONDITIONING,
|
NEGATIVE_CONDITIONING,
|
||||||
@ -178,7 +178,7 @@ export const addSDXLLoRAsToGraph = (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -17,9 +17,9 @@ import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
|||||||
import {
|
import {
|
||||||
CANVAS_INPAINT_GRAPH,
|
CANVAS_INPAINT_GRAPH,
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
CANVAS_REFINE_DENOISE_LATENTS,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
CANVAS_REFINE_NOISE,
|
CANVAS_COHERENCE_NOISE,
|
||||||
CANVAS_REFINE_NOISE_INCREMENT,
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
DENOISE_LATENTS,
|
DENOISE_LATENTS,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
@ -63,8 +63,8 @@ export const buildCanvasInpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
canvasRefineSteps,
|
canvasCoherenceSteps,
|
||||||
canvasRefineStrength,
|
canvasCoherenceStrength,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
@ -143,26 +143,26 @@ export const buildCanvasInpaintGraph = (
|
|||||||
denoising_start: 1 - strength,
|
denoising_start: 1 - strength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE]: {
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
type: 'noise',
|
type: 'noise',
|
||||||
id: NOISE,
|
id: NOISE,
|
||||||
use_cpu,
|
use_cpu,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
b: 1,
|
b: 1,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
type: 'denoise_latents',
|
type: 'denoise_latents',
|
||||||
id: DENOISE_LATENTS,
|
id: DENOISE_LATENTS,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
steps: canvasRefineSteps,
|
steps: canvasCoherenceSteps,
|
||||||
cfg_scale: cfg_scale,
|
cfg_scale: cfg_scale,
|
||||||
scheduler: scheduler,
|
scheduler: scheduler,
|
||||||
denoising_start: 1 - canvasRefineStrength,
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
@ -314,17 +314,17 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'item',
|
field: 'item',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'a',
|
field: 'a',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'value',
|
field: 'value',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -334,7 +334,7 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -344,7 +344,7 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'positive_conditioning',
|
field: 'positive_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -354,17 +354,17 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'negative_conditioning',
|
field: 'negative_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -374,14 +374,14 @@ export const buildCanvasInpaintGraph = (
|
|||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_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: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -431,8 +431,10 @@ export const buildCanvasInpaintGraph = (
|
|||||||
|
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
scaledWidth;
|
||||||
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -503,8 +505,8 @@ export const buildCanvasInpaintGraph = (
|
|||||||
// Add Images To Nodes
|
// Add Images To Nodes
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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),
|
||||||
|
@ -19,9 +19,9 @@ import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
|||||||
import {
|
import {
|
||||||
CANVAS_OUTPAINT_GRAPH,
|
CANVAS_OUTPAINT_GRAPH,
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
CANVAS_REFINE_DENOISE_LATENTS,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
CANVAS_REFINE_NOISE,
|
CANVAS_COHERENCE_NOISE,
|
||||||
CANVAS_REFINE_NOISE_INCREMENT,
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
CLIP_SKIP,
|
CLIP_SKIP,
|
||||||
DENOISE_LATENTS,
|
DENOISE_LATENTS,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
@ -69,8 +69,8 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
canvasRefineSteps,
|
canvasCoherenceSteps,
|
||||||
canvasRefineStrength,
|
canvasCoherenceStrength,
|
||||||
tileSize,
|
tileSize,
|
||||||
infillMethod,
|
infillMethod,
|
||||||
clipSkip,
|
clipSkip,
|
||||||
@ -163,26 +163,26 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
denoising_start: 1 - strength,
|
denoising_start: 1 - strength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE]: {
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
type: 'noise',
|
type: 'noise',
|
||||||
id: NOISE,
|
id: NOISE,
|
||||||
use_cpu,
|
use_cpu,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
b: 1,
|
b: 1,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
type: 'denoise_latents',
|
type: 'denoise_latents',
|
||||||
id: CANVAS_REFINE_DENOISE_LATENTS,
|
id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
steps: canvasRefineSteps,
|
steps: canvasCoherenceSteps,
|
||||||
cfg_scale: cfg_scale,
|
cfg_scale: cfg_scale,
|
||||||
scheduler: scheduler,
|
scheduler: scheduler,
|
||||||
denoising_start: 1 - canvasRefineStrength,
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
@ -355,17 +355,17 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'item',
|
field: 'item',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'a',
|
field: 'a',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'value',
|
field: 'value',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -375,7 +375,7 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_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: CANVAS_REFINE_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: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'negative_conditioning',
|
field: 'negative_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_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: CANVAS_REFINE_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: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -504,8 +504,10 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
|
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
scaledWidth;
|
||||||
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -615,8 +617,8 @@ export const buildCanvasOutpaintGraph = (
|
|||||||
|
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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),
|
||||||
|
@ -17,9 +17,9 @@ import { addVAEToGraph } from './addVAEToGraph';
|
|||||||
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||||
import {
|
import {
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
CANVAS_REFINE_DENOISE_LATENTS,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
CANVAS_REFINE_NOISE,
|
CANVAS_COHERENCE_NOISE,
|
||||||
CANVAS_REFINE_NOISE_INCREMENT,
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
INPAINT_IMAGE_RESIZE_DOWN,
|
INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
INPAINT_IMAGE_RESIZE_UP,
|
INPAINT_IMAGE_RESIZE_UP,
|
||||||
@ -63,8 +63,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
canvasRefineSteps,
|
canvasCoherenceSteps,
|
||||||
canvasRefineStrength,
|
canvasCoherenceStrength,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -148,26 +148,26 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
: 1 - strength,
|
: 1 - strength,
|
||||||
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE]: {
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
type: 'noise',
|
type: 'noise',
|
||||||
id: NOISE,
|
id: NOISE,
|
||||||
use_cpu,
|
use_cpu,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
b: 1,
|
b: 1,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
type: 'denoise_latents',
|
type: 'denoise_latents',
|
||||||
id: SDXL_DENOISE_LATENTS,
|
id: SDXL_DENOISE_LATENTS,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
steps: canvasRefineSteps,
|
steps: canvasCoherenceSteps,
|
||||||
cfg_scale: cfg_scale,
|
cfg_scale: cfg_scale,
|
||||||
scheduler: scheduler,
|
scheduler: scheduler,
|
||||||
denoising_start: 1 - canvasRefineStrength,
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
@ -328,17 +328,17 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'item',
|
field: 'item',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'a',
|
field: 'a',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'value',
|
field: 'value',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -348,7 +348,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -358,7 +358,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'positive_conditioning',
|
field: 'positive_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -368,17 +368,17 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'conditioning',
|
field: 'conditioning',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'negative_conditioning',
|
field: 'negative_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -388,14 +388,14 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_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: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -445,8 +445,10 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
|
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
scaledWidth;
|
||||||
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -517,8 +519,8 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
// Add Images To Nodes
|
// Add Images To Nodes
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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),
|
||||||
@ -576,7 +578,7 @@ export const buildCanvasSDXLInpaintGraph = (
|
|||||||
|
|
||||||
// Add Refiner if enabled
|
// Add Refiner if enabled
|
||||||
if (shouldUseSDXLRefiner) {
|
if (shouldUseSDXLRefiner) {
|
||||||
addSDXLRefinerToGraph(state, graph, CANVAS_REFINE_DENOISE_LATENTS);
|
addSDXLRefinerToGraph(state, graph, CANVAS_COHERENCE_DENOISE_LATENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// optionally add custom VAE
|
// optionally add custom VAE
|
||||||
|
@ -19,9 +19,9 @@ import { addVAEToGraph } from './addVAEToGraph';
|
|||||||
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
import { addWatermarkerToGraph } from './addWatermarkerToGraph';
|
||||||
import {
|
import {
|
||||||
CANVAS_OUTPUT,
|
CANVAS_OUTPUT,
|
||||||
CANVAS_REFINE_DENOISE_LATENTS,
|
CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
CANVAS_REFINE_NOISE,
|
CANVAS_COHERENCE_NOISE,
|
||||||
CANVAS_REFINE_NOISE_INCREMENT,
|
CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
INPAINT_IMAGE,
|
INPAINT_IMAGE,
|
||||||
INPAINT_IMAGE_RESIZE_DOWN,
|
INPAINT_IMAGE_RESIZE_DOWN,
|
||||||
INPAINT_IMAGE_RESIZE_UP,
|
INPAINT_IMAGE_RESIZE_UP,
|
||||||
@ -69,8 +69,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
shouldUseCpuNoise,
|
shouldUseCpuNoise,
|
||||||
maskBlur,
|
maskBlur,
|
||||||
maskBlurMethod,
|
maskBlurMethod,
|
||||||
canvasRefineSteps,
|
canvasCoherenceSteps,
|
||||||
canvasRefineStrength,
|
canvasCoherenceStrength,
|
||||||
tileSize,
|
tileSize,
|
||||||
infillMethod,
|
infillMethod,
|
||||||
} = state.generation;
|
} = state.generation;
|
||||||
@ -168,26 +168,26 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
: 1 - strength,
|
: 1 - strength,
|
||||||
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
denoising_end: shouldUseSDXLRefiner ? refinerStart : 1,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE]: {
|
[CANVAS_COHERENCE_NOISE]: {
|
||||||
type: 'noise',
|
type: 'noise',
|
||||||
id: NOISE,
|
id: NOISE,
|
||||||
use_cpu,
|
use_cpu,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_NOISE_INCREMENT]: {
|
[CANVAS_COHERENCE_NOISE_INCREMENT]: {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
id: CANVAS_REFINE_NOISE_INCREMENT,
|
id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
b: 1,
|
b: 1,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
},
|
},
|
||||||
[CANVAS_REFINE_DENOISE_LATENTS]: {
|
[CANVAS_COHERENCE_DENOISE_LATENTS]: {
|
||||||
type: 'denoise_latents',
|
type: 'denoise_latents',
|
||||||
id: CANVAS_REFINE_DENOISE_LATENTS,
|
id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
is_intermediate: true,
|
is_intermediate: true,
|
||||||
steps: canvasRefineSteps,
|
steps: canvasCoherenceSteps,
|
||||||
cfg_scale: cfg_scale,
|
cfg_scale: cfg_scale,
|
||||||
scheduler: scheduler,
|
scheduler: scheduler,
|
||||||
denoising_start: 1 - canvasRefineStrength,
|
denoising_start: 1 - canvasCoherenceStrength,
|
||||||
denoising_end: 1,
|
denoising_end: 1,
|
||||||
},
|
},
|
||||||
[LATENTS_TO_IMAGE]: {
|
[LATENTS_TO_IMAGE]: {
|
||||||
@ -369,17 +369,17 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'item',
|
field: 'item',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'a',
|
field: 'a',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE_INCREMENT,
|
node_id: CANVAS_COHERENCE_NOISE_INCREMENT,
|
||||||
field: 'value',
|
field: 'value',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'seed',
|
field: 'seed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -389,7 +389,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_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: CANVAS_REFINE_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: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'negative_conditioning',
|
field: 'negative_conditioning',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: CANVAS_REFINE_NOISE,
|
node_id: CANVAS_COHERENCE_NOISE,
|
||||||
field: 'noise',
|
field: 'noise',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
node_id: CANVAS_REFINE_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: CANVAS_REFINE_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: CANVAS_REFINE_DENOISE_LATENTS,
|
node_id: CANVAS_COHERENCE_DENOISE_LATENTS,
|
||||||
field: 'latents',
|
field: 'latents',
|
||||||
},
|
},
|
||||||
destination: {
|
destination: {
|
||||||
@ -519,8 +519,10 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
|
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[NOISE] as NoiseInvocation).width = scaledWidth;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
(graph.nodes[NOISE] as NoiseInvocation).height = scaledHeight;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = scaledWidth;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width =
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).height = scaledHeight;
|
scaledWidth;
|
||||||
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).height =
|
||||||
|
scaledHeight;
|
||||||
|
|
||||||
// Connect Nodes
|
// Connect Nodes
|
||||||
graph.edges.push(
|
graph.edges.push(
|
||||||
@ -630,8 +632,8 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
|
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
(graph.nodes[NOISE] as NoiseInvocation).height = height;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).width = width;
|
(graph.nodes[CANVAS_COHERENCE_NOISE] as NoiseInvocation).width = width;
|
||||||
(graph.nodes[CANVAS_REFINE_NOISE] as NoiseInvocation).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),
|
||||||
@ -709,7 +711,7 @@ export const buildCanvasSDXLOutpaintGraph = (
|
|||||||
|
|
||||||
// Add Refiner if enabled
|
// Add Refiner if enabled
|
||||||
if (shouldUseSDXLRefiner) {
|
if (shouldUseSDXLRefiner) {
|
||||||
addSDXLRefinerToGraph(state, graph, CANVAS_REFINE_DENOISE_LATENTS);
|
addSDXLRefinerToGraph(state, graph, CANVAS_COHERENCE_DENOISE_LATENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// optionally add custom VAE
|
// 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 = '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 CANVAS_REFINE_DENOISE_LATENTS = 'canvas_refine_denoise_latents';
|
export const CANVAS_COHERENCE_DENOISE_LATENTS =
|
||||||
export const CANVAS_REFINE_NOISE = 'canvas_refine_noise';
|
'canvas_coherence_denoise_latents';
|
||||||
export const CANVAS_REFINE_NOISE_INCREMENT = 'canvas_refine_noise_increment';
|
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';
|
||||||
|
@ -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 { setCanvasRefineSteps } 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 ParamCanvasRefineSteps = () => {
|
const ParamCanvasCoherenceSteps = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const canvasRefineSteps = useAppSelector(
|
const canvasCoherenceSteps = useAppSelector(
|
||||||
(state: RootState) => state.generation.canvasRefineSteps
|
(state: RootState) => state.generation.canvasCoherenceSteps
|
||||||
);
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
label={t('parameters.refineSteps')}
|
label={t('parameters.coherenceSteps')}
|
||||||
min={1}
|
min={1}
|
||||||
max={100}
|
max={100}
|
||||||
step={1}
|
step={1}
|
||||||
sliderNumberInputProps={{ max: 999 }}
|
sliderNumberInputProps={{ max: 999 }}
|
||||||
value={canvasRefineSteps}
|
value={canvasCoherenceSteps}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
dispatch(setCanvasRefineSteps(v));
|
dispatch(setCanvasCoherenceSteps(v));
|
||||||
}}
|
}}
|
||||||
withInput
|
withInput
|
||||||
withSliderMarks
|
withSliderMarks
|
||||||
withReset
|
withReset
|
||||||
handleReset={() => {
|
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 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 { setCanvasRefineStrength } 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 ParamCanvasRefineStrength = () => {
|
const ParamCanvasCoherenceStrength = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const canvasRefineStrength = useAppSelector(
|
const canvasCoherenceStrength = useAppSelector(
|
||||||
(state: RootState) => state.generation.canvasRefineStrength
|
(state: RootState) => state.generation.canvasCoherenceStrength
|
||||||
);
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
label={t('parameters.refineStrength')}
|
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={canvasRefineStrength}
|
value={canvasCoherenceStrength}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
dispatch(setCanvasRefineStrength(v));
|
dispatch(setCanvasCoherenceStrength(v));
|
||||||
}}
|
}}
|
||||||
withInput
|
withInput
|
||||||
withSliderMarks
|
withSliderMarks
|
||||||
withReset
|
withReset
|
||||||
handleReset={() => {
|
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;
|
scheduler: SchedulerParam;
|
||||||
maskBlur: number;
|
maskBlur: number;
|
||||||
maskBlurMethod: MaskBlurMethodParam;
|
maskBlurMethod: MaskBlurMethodParam;
|
||||||
canvasRefineSteps: number;
|
canvasCoherenceSteps: number;
|
||||||
canvasRefineStrength: StrengthParam;
|
canvasCoherenceStrength: StrengthParam;
|
||||||
seed: SeedParam;
|
seed: SeedParam;
|
||||||
seedWeights: string;
|
seedWeights: string;
|
||||||
shouldFitToWidthHeight: boolean;
|
shouldFitToWidthHeight: boolean;
|
||||||
@ -76,8 +76,8 @@ export const initialGenerationState: GenerationState = {
|
|||||||
scheduler: 'euler',
|
scheduler: 'euler',
|
||||||
maskBlur: 16,
|
maskBlur: 16,
|
||||||
maskBlurMethod: 'box',
|
maskBlurMethod: 'box',
|
||||||
canvasRefineSteps: 20,
|
canvasCoherenceSteps: 20,
|
||||||
canvasRefineStrength: 0.3,
|
canvasCoherenceStrength: 0.3,
|
||||||
seed: 0,
|
seed: 0,
|
||||||
seedWeights: '',
|
seedWeights: '',
|
||||||
shouldFitToWidthHeight: true,
|
shouldFitToWidthHeight: true,
|
||||||
@ -204,11 +204,11 @@ export const generationSlice = createSlice({
|
|||||||
setMaskBlurMethod: (state, action: PayloadAction<MaskBlurMethodParam>) => {
|
setMaskBlurMethod: (state, action: PayloadAction<MaskBlurMethodParam>) => {
|
||||||
state.maskBlurMethod = action.payload;
|
state.maskBlurMethod = action.payload;
|
||||||
},
|
},
|
||||||
setCanvasRefineSteps: (state, action: PayloadAction<number>) => {
|
setCanvasCoherenceSteps: (state, action: PayloadAction<number>) => {
|
||||||
state.canvasRefineSteps = action.payload;
|
state.canvasCoherenceSteps = action.payload;
|
||||||
},
|
},
|
||||||
setCanvasRefineStrength: (state, action: PayloadAction<number>) => {
|
setCanvasCoherenceStrength: (state, action: PayloadAction<number>) => {
|
||||||
state.canvasRefineStrength = action.payload;
|
state.canvasCoherenceStrength = action.payload;
|
||||||
},
|
},
|
||||||
setTileSize: (state, action: PayloadAction<number>) => {
|
setTileSize: (state, action: PayloadAction<number>) => {
|
||||||
state.tileSize = action.payload;
|
state.tileSize = action.payload;
|
||||||
@ -318,8 +318,8 @@ export const {
|
|||||||
setScheduler,
|
setScheduler,
|
||||||
setMaskBlur,
|
setMaskBlur,
|
||||||
setMaskBlurMethod,
|
setMaskBlurMethod,
|
||||||
setCanvasRefineSteps,
|
setCanvasCoherenceSteps,
|
||||||
setCanvasRefineStrength,
|
setCanvasCoherenceStrength,
|
||||||
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 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 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 />
|
||||||
<ParamCanvasRefinePassCollapse />
|
<ParamCanvasCoherencePassCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ 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 ParamMaskAdjustmentCollapse from 'features/parameters/components/Parameters/Canvas/MaskAdjustment/ParamMaskAdjustmentCollapse';
|
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 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 ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse';
|
||||||
@ -21,7 +21,7 @@ const UnifiedCanvasParameters = () => {
|
|||||||
<ParamSymmetryCollapse />
|
<ParamSymmetryCollapse />
|
||||||
<ParamMaskAdjustmentCollapse />
|
<ParamMaskAdjustmentCollapse />
|
||||||
<ParamInfillAndScalingCollapse />
|
<ParamInfillAndScalingCollapse />
|
||||||
<ParamCanvasRefinePassCollapse />
|
<ParamCanvasCoherencePassCollapse />
|
||||||
<ParamAdvancedCollapse />
|
<ParamAdvancedCollapse />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user