Skip to content

Commit

Permalink
Merge pull request #322 from harmony-one/sd_images_fix_002
Browse files Browse the repository at this point in the history
SD Images: fix
  • Loading branch information
theofandrich authored Sep 30, 2023
2 parents 4a467f8 + d694546 commit ada04ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/sd-images/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit ada04ab

Please sign in to comment.