From 727ff8f44a1fa8119a5e824c8fe250ef9f06ac2b Mon Sep 17 00:00:00 2001 From: potvik Date: Sat, 30 Sep 2023 02:47:23 +0300 Subject: [PATCH 1/2] SD Images: fix --- src/modules/sd-images/api/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/sd-images/api/index.ts b/src/modules/sd-images/api/index.ts index dc2bcbd2..36e4c917 100644 --- a/src/modules/sd-images/api/index.ts +++ b/src/modules/sd-images/api/index.ts @@ -64,6 +64,9 @@ export class SDNodeApi { } if (options.format === MEDIA_FORMAT.GIF) { + const modelFromParams = params.modelAlias ? getModelByParam(params.modelAlias): null; + const modelPath = (modelFromParams ?? options.model).path; + const { images } = await this.client.txt2img({ prompt: params.promptWithoutParams, negativePrompt: params.negativePrompt, @@ -75,7 +78,7 @@ export class SDNodeApi { loraName: params.loraName, loraStrength, seed: options.seed ?? params.seed, - model: (params.modelAlias && getModelByParam(params.modelAlias)?.path) ?? options.model.path, + model: modelPath, batchSize: 16, format: options.format }, server) From d6945465d4bdb28877b57d7a92fb010c521f5a48 Mon Sep 17 00:00:00 2001 From: Theo Fandrich Date: Fri, 29 Sep 2023 16:51:51 -0700 Subject: [PATCH 2/2] eslint changes --- src/modules/sd-images/api/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/sd-images/api/index.ts b/src/modules/sd-images/api/index.ts index 36e4c917..b7cb127d 100644 --- a/src/modules/sd-images/api/index.ts +++ b/src/modules/sd-images/api/index.ts @@ -64,8 +64,8 @@ export class SDNodeApi { } if (options.format === MEDIA_FORMAT.GIF) { - const modelFromParams = params.modelAlias ? getModelByParam(params.modelAlias): null; - const modelPath = (modelFromParams ?? options.model).path; + const modelFromParams = params.modelAlias ? getModelByParam(params.modelAlias) : null + const modelPath = (modelFromParams ?? options.model).path const { images } = await this.client.txt2img({ prompt: params.promptWithoutParams,