fix: add error output for unsupported images (#2537)

* Raise Error on bad decode

* Move task arg pop to try block

* fix: prevent empty task from getting queued

---------

Co-authored-by: Manuel Schmid <dev@mash1t.de>
This commit is contained in:
Spencer Hayes-Laverdiere
2024-03-15 22:30:29 +01:00
committed by GitHub
co-authored by Manuel Schmid
parent 4a44be36fd
commit 55e23a9374
2 changed files with 10 additions and 3 deletions
+5 -1
View File
@@ -29,12 +29,16 @@ def get_task(*args):
return worker.AsyncTask(args=args)
def generate_clicked(task):
def generate_clicked(task: worker.AsyncTask):
import ldm_patched.modules.model_management as model_management
with model_management.interrupt_processing_mutex:
model_management.interrupt_processing = False
# outputs=[progress_html, progress_window, progress_gallery, gallery]
if len(task.args) == 0:
return
execution_start_time = time.perf_counter()
finished = False