mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#2012 Replace all comfy seeds
This commit is contained in:
@ -2524,7 +2524,7 @@ async function generateComfyImage(prompt, negativePrompt) {
|
|||||||
}
|
}
|
||||||
let workflow = (await workflowResponse.json()).replace('"%prompt%"', JSON.stringify(prompt));
|
let workflow = (await workflowResponse.json()).replace('"%prompt%"', JSON.stringify(prompt));
|
||||||
workflow = workflow.replace('"%negative_prompt%"', JSON.stringify(negativePrompt));
|
workflow = workflow.replace('"%negative_prompt%"', JSON.stringify(negativePrompt));
|
||||||
workflow = workflow.replace('"%seed%"', JSON.stringify(Math.round(Math.random() * Number.MAX_SAFE_INTEGER)));
|
workflow = workflow.replaceAll('"%seed%"', JSON.stringify(Math.round(Math.random() * Number.MAX_SAFE_INTEGER)));
|
||||||
placeholders.forEach(ph => {
|
placeholders.forEach(ph => {
|
||||||
workflow = workflow.replace(`"%${ph}%"`, JSON.stringify(extension_settings.sd[ph]));
|
workflow = workflow.replace(`"%${ph}%"`, JSON.stringify(extension_settings.sd[ph]));
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user