Python
fixed abort button
DeepBeepMeepd82fa9a8d668
diff --git a/README.md b/README.mdindex 1a097a0..6207f6a 100644--- a/README.md+++ b/README.md@@ -10,6 +10,7 @@## π₯ Latest News!!+* April 18 2025: π Wan 2.1GP v4.2: FLF2V model support, official support from Wan for image2video start and end frames specialized for 720p.* April 17 2025: π Wan 2.1GP v4.1: Recam Master model support, view a video from a different angle. The video to process must be at least 81 frames long and you should set at least 15 steps denoising to get good results.* April 13 2025: π Wan 2.1GP v4.0: lots of goodies for you !- A new UI, tabs were replaced by a Dropdown box to easily switch modelsdiff --git a/wgp.py b/wgp.pyindex 707aff8..6aa9736 100644--- a/wgp.py+++ b/wgp.py@@ -2850,14 +2850,17 @@ def process_tasks(state, progress=gr.Progress()):gen["prompts_max"] = 0gen["prompt"] = ""yield status-+ abort = gen.get("abort", False)+ if abort:+ gen["abort"] = False+ yield "Video Generation Aborted"queue[:] = [item for item in queue if item['id'] != task['id']]update_global_queue_ref(queue)gen["prompts_max"] = 0gen["prompt"] = ""end_time = time.time()- if gen.get("abort"):+ if abort:yield f"Video generation was aborted. Total Generation Time: {end_time-start_time:.1f}s"else:yield f"Total Generation Time: {end_time-start_time:.1f}s"