From f9c243d29f6268d97e5ad3eb37b172aa6e284f23 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 2 Apr 2023 18:41:54 +1000 Subject: [PATCH] feat(ui): handle random seeds --- invokeai/frontend/web/src/common/util/buildNodes.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/common/util/buildNodes.ts b/invokeai/frontend/web/src/common/util/buildNodes.ts index 6ddc6332d9..2899fba972 100644 --- a/invokeai/frontend/web/src/common/util/buildNodes.ts +++ b/invokeai/frontend/web/src/common/util/buildNodes.ts @@ -29,13 +29,14 @@ export function buildTxt2ImgNode( cfgScale: cfg_scale, sampler, seamless, + shouldRandomizeSeed, } = generation; // missing fields in TextToImageInvocation: strength, hires_fix return { type: 'txt2img', prompt, - seed, + seed: shouldRandomizeSeed ? -1 : seed, steps, width, height, @@ -66,12 +67,13 @@ export function buildImg2ImgNode( img2imgStrength: strength, shouldFitToWidthHeight: fit, initialImage, + shouldRandomizeSeed, } = generation; return { type: 'img2img', prompt, - seed, + seed: shouldRandomizeSeed ? -1 : seed, steps, width, height,