mirror of
				https://github.com/Wan-Video/Wan2.1.git
				synced 2025-11-04 06:15:17 +00:00 
			
		
		
		
	fixed abort button
This commit is contained in:
		
							parent
							
								
									05e7eb4bef
								
							
						
					
					
						commit
						d82fa9a8d6
					
				@ -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 models
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								wgp.py
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								wgp.py
									
									
									
									
									
								
							@ -2850,14 +2850,17 @@ def process_tasks(state, progress=gr.Progress()):
 | 
			
		||||
                    gen["prompts_max"] = 0
 | 
			
		||||
                    gen["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"] = 0
 | 
			
		||||
    gen["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"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user