From b6570e775d1eba2c4f9a4cba23d296bd62a09481 Mon Sep 17 00:00:00 2001 From: RigbyB Date: Sun, 24 Dec 2023 21:02:04 +0000 Subject: [PATCH] ComfyUI request/prompt fix --- public/scripts/extensions/stable-diffusion/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index e8bc8f1e2..15e8736b0 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -2286,7 +2286,7 @@ async function generateComfyImage(prompt, negativePrompt) { toastr.error(`Failed to load workflow.\n\n${text}`); } 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))); placeholders.forEach(ph => { workflow = workflow.replace(`"%${ph}%"`, JSON.stringify(extension_settings.sd[ph]));