fix no inputs warning

This commit is contained in:
Chris Malone 2025-04-08 21:51:36 +10:00
parent a15751892e
commit 1cad8d429e

3
wgp.py
View File

@ -30,7 +30,6 @@ import io
from PIL import Image from PIL import Image
import zipfile import zipfile
import tempfile import tempfile
import shutil
import atexit import atexit
global_queue_ref = [] global_queue_ref = []
AUTOSAVE_FILENAME = "queue.zip" AUTOSAVE_FILENAME = "queue.zip"
@ -105,7 +104,7 @@ def process_prompt_and_add_tasks(state, model_choice):
inputs.pop("lset_name") inputs.pop("lset_name")
if inputs == None: if inputs == None:
gr.Warning("Internal state error: Could not retrieve inputs for the model.") gr.Warning("Internal state error: Could not retrieve inputs for the model.")
return update_queue_data(queue) return get_queue_table(queue)
prompt = inputs["prompt"] prompt = inputs["prompt"]
if len(prompt) ==0: if len(prompt) ==0:
gr.Info("Prompt cannot be empty.") gr.Info("Prompt cannot be empty.")