From 430b2d2310e9b8867d1c1fdf4a4f7e93bbe10cee Mon Sep 17 00:00:00 2001 From: GeorgLegato Date: Mon, 1 May 2023 01:07:57 +0200 Subject: [PATCH] fix json complete. do not accept headers --- iz_helpers/prompt_util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iz_helpers/prompt_util.py b/iz_helpers/prompt_util.py index ab978ee..415a629 100644 --- a/iz_helpers/prompt_util.py +++ b/iz_helpers/prompt_util.py @@ -9,9 +9,10 @@ from .static_variables import ( def completeOptionals(j): if isinstance(j, dict): + # Remove header information, user dont pimp our ui if "prompts" in j: - if "headers" not in j["prompts"]: - j["prompts"]["headers"] = ["outpaint steps","prompt"] + if "headers" in j["prompts"]: + del j["prompts"]["headers"] if "negPrompt" not in j: j["negPrompt"]="" @@ -32,8 +33,7 @@ def validatePromptJson_throws(data): validate(instance=data, schema=schema) except Exception: - raise "Your prompts are not schema valid." - #fixJson(data) + raise Exception("Your prompts are not schema valid.") return completeOptionals(data)