From a37b41e84cd2c0710cff3eb8e871cd88fe933941 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 22 Feb 2023 12:48:27 -0500 Subject: [PATCH] Don't send the "Random seed after every gen" field in the prompt. --- script_examples/basic_api_example.py | 1 - webshit/index.html | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/script_examples/basic_api_example.py b/script_examples/basic_api_example.py index 93185cc0..d2e315d4 100644 --- a/script_examples/basic_api_example.py +++ b/script_examples/basic_api_example.py @@ -30,7 +30,6 @@ prompt_text = """ "6", 0 ], - "Random seed after every gen": true, "sampler_name": "sample_euler", "scheduler": "normal", "seed": 8566257, diff --git a/webshit/index.html b/webshit/index.html index 4f26f557..ac14b583 100644 --- a/webshit/index.html +++ b/webshit/index.html @@ -350,10 +350,12 @@ function graphToPrompt() { } for (let y in n.widgets) { - 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; + if (!Object.hasOwn(n.widgets[y], 'to_randomize')) { //don't include "Random seed after every gen" in prompt. + 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) {