fix json complete. do not accept headers

pull/75/head
GeorgLegato 2023-05-01 01:07:57 +02:00
parent d8703520ec
commit 430b2d2310
1 changed files with 4 additions and 4 deletions

View File

@ -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)