Python
fixed InfiniteTalk starting from last frame
deepbeepmeep1ae91d36f1d7
diff --git a/wgp.py b/wgp.pyindex a151252..0345e64 100644--- a/wgp.py+++ b/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_namewebbrowser.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}))\ No newline at end of file+ 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}))