From 928087184ec573a76787288f0a4ae06137ab3cd0 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Tue, 21 Feb 2023 04:22:06 -0500 Subject: [PATCH] Fix escaped \{ appearing as { in workflows. --- webshit/index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webshit/index.html b/webshit/index.html index 490de6a..4f26f55 100644 --- a/webshit/index.html +++ b/webshit/index.html @@ -344,13 +344,17 @@ function graphToPrompt() { prompt = prompt.substring(0, startIndex) + randomOption + prompt.substring(endIndex + 1); } - widget.value = prompt.replace("\\{", "{").replace("\\}", "}"); + widget.value = prompt; } } } for (let y in n.widgets) { - input_[n.widgets[y].name] = n.widgets[y].value; + if (n.widgets[y].dynamic_prompt && n.widgets[y].dynamic_prompt === true) { + input_[n.widgets[y].name] = n.widgets[y].value.replace("\\{", "{").replace("\\}", "}"); + } else { + input_[n.widgets[y].name] = n.widgets[y].value; + } } for (let y in n.inputs) { let parent_node = n.getInputNode(y);