Merge pull request #1592 from rigbyb/comfyui_fix
ComfyUI request/prompt fix
This commit is contained in:
commit
3b2ea4b0e7
|
@ -2286,7 +2286,7 @@ async function generateComfyImage(prompt, negativePrompt) {
|
||||||
toastr.error(`Failed to load workflow.\n\n${text}`);
|
toastr.error(`Failed to load workflow.\n\n${text}`);
|
||||||
}
|
}
|
||||||
let workflow = (await workflowResponse.json()).replace('"%prompt%"', JSON.stringify(prompt));
|
let workflow = (await workflowResponse.json()).replace('"%prompt%"', JSON.stringify(prompt));
|
||||||
workflow = (await workflowResponse.json()).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.replace('"%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]));
|
||||||
|
|
Loading…
Reference in New Issue