mirror of
				https://github.com/Wan-Video/Wan2.1.git
				synced 2025-11-03 22:04:21 +00:00 
			
		
		
		
	fixed InfiniteTalk starting from last frame
This commit is contained in:
		
							parent
							
								
									6490af145a
								
							
						
					
					
						commit
						1ae91d36f1
					
				
							
								
								
									
										4
									
								
								wgp.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								wgp.py
									
									
									
									
									
								
							@ -4739,7 +4739,7 @@ def generate_video(
 | 
			
		||||
                    raise gr.Error(f"invalid keep frames {keep_frames_video_guide}")
 | 
			
		||||
                keep_frames_parsed = keep_frames_parsed[aligned_guide_start_frame: aligned_guide_end_frame ]
 | 
			
		||||
            if infinitetalk and video_guide is not None:
 | 
			
		||||
                src_image = get_video_frame(video_guide, aligned_guide_start_frame-1, return_last_if_missing = True, return_PIL = True)
 | 
			
		||||
                src_image = get_video_frame(video_guide, aligned_guide_start_frame, return_last_if_missing = True, return_PIL = True)
 | 
			
		||||
                new_height, new_width = calculate_new_dimensions(image_size[0], image_size[1], src_image.height, src_image.width, sample_fit_canvas, block_size = block_size)
 | 
			
		||||
                src_image = src_image.resize((new_width, new_height), resample=Image.Resampling.LANCZOS)
 | 
			
		||||
                refresh_preview["video_guide"] = src_image  
 | 
			
		||||
@ -9290,4 +9290,4 @@ if __name__ == "__main__":
 | 
			
		||||
        else:
 | 
			
		||||
            url = "http://" + server_name 
 | 
			
		||||
        webbrowser.open(url + ":" + str(server_port), new = 0, autoraise = True)
 | 
			
		||||
    demo.launch(favicon_path="favicon.png", server_name=server_name, server_port=server_port, share=args.share, allowed_paths=list({save_path, image_save_path}))
 | 
			
		||||
    demo.launch(favicon_path="favicon.png", server_name=server_name, server_port=server_port, share=args.share, allowed_paths=list({save_path, image_save_path}))
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user