Skip to content

Commit

Permalink
Merge pull request #324 from harmony-one/sd_images_fix_003
Browse files Browse the repository at this point in the history
Sd images fix 003
  • Loading branch information
theofandrich authored Sep 30, 2023
2 parents ada04ab + 04ed1d8 commit f5bcc40
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/sd-images/api/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ export const getParamsFromPrompt = (originalPrompt: string, model?: IModel): IPa
prompt = prompt.replace(/--model (.*)/, '')
}

if (!modelAlias) {
const modelMatch = prompt.match(/--model (.*) /)

if (modelMatch) {
modelAlias = modelMatch[1]

prompt = prompt.replace(/--model (.*) /, '')
}
}

// Add 'leogirl' to trigger /leo model
if (model && model.name === 'leosams_helloworld' && !prompt.includes('leogirl')) {
prompt = 'leogirl ' + prompt
Expand Down

0 comments on commit f5bcc40

Please sign in to comment.