forked from extern/easydiffusion
Fix tags not being properly applied to prompt matrix (#610)
There is an issue on the beta where if you use pipe ( | ) in the prompt to make a prompt matrix, the optional prompts are only applied when the last prompt in the matrix is used.
This commit is contained in:
parent
854e3d3576
commit
28f822afe0
@ -899,14 +899,16 @@ function getPrompts(prompts) {
|
|||||||
prompts = prompts.map(prompt => prompt.trim())
|
prompts = prompts.map(prompt => prompt.trim())
|
||||||
prompts = prompts.filter(prompt => prompt !== '')
|
prompts = prompts.filter(prompt => prompt !== '')
|
||||||
|
|
||||||
|
let promptsToMake = applyPermuteOperator(prompts)
|
||||||
|
promptsToMake = applySetOperator(promptsToMake)
|
||||||
const newTags = activeTags.filter(tag => tag.inactive === undefined || tag.inactive === false)
|
const newTags = activeTags.filter(tag => tag.inactive === undefined || tag.inactive === false)
|
||||||
if (newTags.length > 0) {
|
if (newTags.length > 0) {
|
||||||
const promptTags = newTags.map(x => x.name).join(", ")
|
const promptTags = newTags.map(x => x.name).join(", ")
|
||||||
prompts = prompts.map((prompt) => `${prompt}, ${promptTags}`)
|
promptsToMake = promptsToMake.map((prompt) => `${prompt}, ${promptTags}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
let promptsToMake = applySetOperator(prompts)
|
|
||||||
promptsToMake = applyPermuteOperator(promptsToMake)
|
promptsToMake = applyPermuteOperator(promptsToMake)
|
||||||
|
promptsToMake = applySetOperator(promptsToMake)
|
||||||
|
|
||||||
return promptsToMake
|
return promptsToMake
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user