Fixed Bug with converting PositivePrompt Into an input and Enhanced API Key System

This commit is contained in:
Jack
2024-12-15 04:50:38 +02:00
parent bbf4401550
commit 6d9fc4bbfd
8 changed files with 124 additions and 15 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ class txt2img:
@classmethod
def VALIDATE_INPUTS(cls, positivePrompt, negativePrompt):
if (positivePrompt is None or len(positivePrompt) < 3 or len(positivePrompt) > 2000):
if (positivePrompt is not None and (positivePrompt == "" or len(positivePrompt) < 3 or len(positivePrompt) > 2000)):
raise Exception("Positive Prompt Must Be Between 3 And 2000 characters!")
if (negativePrompt is not None and negativePrompt != "" and (len(negativePrompt) < 3 or len(negativePrompt) > 2000)):
raise Exception("Negative Prompt Must Be Between 3 And 2000 characters!")