From 9d9e563bf133790fec83232f297712009ebdcd9a Mon Sep 17 00:00:00 2001 From: Maiko Tan Date: Thu, 15 Aug 2024 14:56:19 +0800 Subject: [PATCH 1/2] feat(sd): add steps for hires fix --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 101f0ac..0bb80a9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,6 +110,7 @@ export function apply(ctx: Context, config: Config) { .option('noise', '-n ', { hidden: some(restricted, thirdParty) }) .option('strength', '-N ', { hidden: restricted }) .option('hiresFix', '-H', { hidden: () => config.type !== 'sd-webui' }) + .option('hiresFixSteps', { hidden: () => config.type !== 'sd-webui' }) .option('smea', '-S', { hidden: () => config.model !== 'nai-v3' }) .option('smeaDyn', '-d', { hidden: () => config.model !== 'nai-v3' }) .option('scheduler', '-C ', { @@ -365,6 +366,7 @@ export function apply(ctx: Context, config: Config) { init_images: image && [image.dataUrl], // sd-webui accepts data URLs with base64 encoded image restore_faces: config.restoreFaces ?? false, enable_hr: options.hiresFix ?? config.hiresFix ?? false, + hr_second_pass_steps: options.hiresFixSteps ?? 0, ...project(parameters, { prompt: 'prompt', batch_size: 'n_samples', From fa73c3fd07ae3f75b14c565ea21e5c6c609b76ed Mon Sep 17 00:00:00 2001 From: Maiko Tan Date: Thu, 15 Aug 2024 14:59:44 +0800 Subject: [PATCH 2/2] fix: desc --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 0bb80a9..aa67079 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,7 +110,7 @@ export function apply(ctx: Context, config: Config) { .option('noise', '-n ', { hidden: some(restricted, thirdParty) }) .option('strength', '-N ', { hidden: restricted }) .option('hiresFix', '-H', { hidden: () => config.type !== 'sd-webui' }) - .option('hiresFixSteps', { hidden: () => config.type !== 'sd-webui' }) + .option('hiresFixSteps', '', { type: step, hidden: () => config.type !== 'sd-webui' }) .option('smea', '-S', { hidden: () => config.model !== 'nai-v3' }) .option('smeaDyn', '-d', { hidden: () => config.model !== 'nai-v3' }) .option('scheduler', '-C ', {