From 836777eb55ca7c9a752b9a2703b0a55b75366de9 Mon Sep 17 00:00:00 2001 From: DeepBeepMeep Date: Fri, 5 Sep 2025 20:57:09 +0200 Subject: [PATCH 1/5] fixed End Frames checkbox not always visible --- models/wan/wan_handler.py | 2 +- wgp.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.py index bc2eb39..8316d6d 100644 --- a/models/wan/wan_handler.py +++ b/models/wan/wan_handler.py @@ -144,7 +144,7 @@ class family_handler(): if vace_class or base_model_type in ["infinitetalk"]: image_prompt_types_allowed = "TVL" elif base_model_type in ["ti2v_2_2"]: - image_prompt_types_allowed = "TSEVL" + image_prompt_types_allowed = "TSEV" elif i2v: image_prompt_types_allowed = "SEVL" else: diff --git a/wgp.py b/wgp.py index 396e273..1eb3fca 100644 --- a/wgp.py +++ b/wgp.py @@ -7105,12 +7105,13 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non with gr.Group(visible= len(image_prompt_types_allowed)>1) as image_prompt_type_group: with gr.Row(): image_prompt_type_radio_allowed_values= filter_letters(image_prompt_types_allowed, "SVL") + image_prompt_type_radio_value = filter_letters(image_prompt_type_value, image_prompt_type_radio_allowed_values, image_prompt_type_choices[0][1]) if len(image_prompt_type_choices) > 0: - image_prompt_type_radio = gr.Radio( image_prompt_type_choices, value =filter_letters(image_prompt_type_value, image_prompt_type_radio_allowed_values, image_prompt_type_choices[0][1]), label="Location", show_label= False, visible= len(image_prompt_types_allowed)>1, scale= 3) + image_prompt_type_radio = gr.Radio( image_prompt_type_choices, value = image_prompt_type_radio_value, label="Location", show_label= False, visible= len(image_prompt_types_allowed)>1, scale= 3) else: image_prompt_type_radio = gr.Radio(choices=[("", "")], value="", visible= False) if "E" in image_prompt_types_allowed: - image_prompt_type_endcheckbox = gr.Checkbox( value ="E" in image_prompt_type_value, label="End Image(s)", show_label= False, visible= any_letters(image_prompt_type_value, "SVL") and not image_outputs , scale= 1) + image_prompt_type_endcheckbox = gr.Checkbox( value ="E" in image_prompt_type_value, label="End Image(s)", show_label= False, visible= any_letters(image_prompt_type_radio_value, "SVL") and not image_outputs , scale= 1) any_end_image = True else: image_prompt_type_endcheckbox = gr.Checkbox( value =False, show_label= False, visible= False , scale= 1) From cf65889e2e1094902e08434e87b18049b9fe76b7 Mon Sep 17 00:00:00 2001 From: DeepBeepMeep Date: Fri, 5 Sep 2025 21:59:26 +0200 Subject: [PATCH 2/5] fixed End Frames checkbox not always visible --- models/wan/wan_handler.py | 8 ++++++++ wgp.py | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.py index 8316d6d..20c3594 100644 --- a/models/wan/wan_handler.py +++ b/models/wan/wan_handler.py @@ -296,11 +296,19 @@ class family_handler(): if text_oneframe_overlap(base_model_type): ui_defaults["sliding_window_overlap"] = 1 + if settings_version < 2.32: + image_prompt_type = ui_defaults.get("image_prompt_type", "") + if test_class_i2v(base_model_type) and len(image_prompt_type) == 0: + ui_defaults["image_prompt_type"] = "S" + @staticmethod def update_default_settings(base_model_type, model_def, ui_defaults): ui_defaults.update({ "sample_solver": "unipc", }) + if test_class_i2v(base_model_type): + ui_defaults["image_prompt_type"] = "S" + if base_model_type in ["fantasy"]: ui_defaults.update({ "audio_guidance_scale": 5.0, diff --git a/wgp.py b/wgp.py index 1eb3fca..124ae5e 100644 --- a/wgp.py +++ b/wgp.py @@ -61,7 +61,7 @@ PROMPT_VARS_MAX = 10 target_mmgp_version = "3.6.0" WanGP_version = "8.4" -settings_version = 2.31 +settings_version = 2.32 max_source_video_frames = 3000 prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None @@ -6142,11 +6142,11 @@ def eject_video_from_gallery(state, input_file_list, choice): return gr.Gallery(value = file_list, selected_index= choice), gr.update() if len(file_list) >0 else get_default_video_info(), gr.Row(visible= len(file_list) > 0) def has_video_file_extension(filename): - extension = os.path.splitext(filename)[-1] + extension = os.path.splitext(filename)[-1].lower() return extension in [".mp4"] def has_image_file_extension(filename): - extension = os.path.splitext(filename)[-1] + extension = os.path.splitext(filename)[-1].lower() return extension in [".png", ".jpg", ".jpeg", ".bmp", ".gif", ".webp", ".tif", ".tiff", ".jfif", ".pjpeg"] def add_videos_to_gallery(state, input_file_list, choice, files_to_load): gen = get_gen_info(state) From 242ae50d8368ac2da00adefa3365f69ca01ee03a Mon Sep 17 00:00:00 2001 From: DeepBeepMeep Date: Fri, 5 Sep 2025 22:05:00 +0200 Subject: [PATCH 3/5] fixed End Frames checkbox not always visible --- wgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgp.py b/wgp.py index 124ae5e..7db0236 100644 --- a/wgp.py +++ b/wgp.py @@ -7105,8 +7105,8 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non with gr.Group(visible= len(image_prompt_types_allowed)>1) as image_prompt_type_group: with gr.Row(): image_prompt_type_radio_allowed_values= filter_letters(image_prompt_types_allowed, "SVL") - image_prompt_type_radio_value = filter_letters(image_prompt_type_value, image_prompt_type_radio_allowed_values, image_prompt_type_choices[0][1]) if len(image_prompt_type_choices) > 0: + image_prompt_type_radio_value = filter_letters(image_prompt_type_value, image_prompt_type_radio_allowed_values, image_prompt_type_choices[0][1]) image_prompt_type_radio = gr.Radio( image_prompt_type_choices, value = image_prompt_type_radio_value, label="Location", show_label= False, visible= len(image_prompt_types_allowed)>1, scale= 3) else: image_prompt_type_radio = gr.Radio(choices=[("", "")], value="", visible= False) From 0649686e9d785b734f209967128f0849e160f5f6 Mon Sep 17 00:00:00 2001 From: DeepBeepMeep Date: Fri, 5 Sep 2025 22:14:12 +0200 Subject: [PATCH 4/5] fixed End Frames checkbox not always visible --- wgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgp.py b/wgp.py index 7db0236..4f1a10d 100644 --- a/wgp.py +++ b/wgp.py @@ -7105,8 +7105,8 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non with gr.Group(visible= len(image_prompt_types_allowed)>1) as image_prompt_type_group: with gr.Row(): image_prompt_type_radio_allowed_values= filter_letters(image_prompt_types_allowed, "SVL") + image_prompt_type_radio_value = filter_letters(image_prompt_type_value, image_prompt_type_radio_allowed_values, image_prompt_type_choices[0][1] if len(image_prompt_type_choices) > 0 else "") if len(image_prompt_type_choices) > 0: - image_prompt_type_radio_value = filter_letters(image_prompt_type_value, image_prompt_type_radio_allowed_values, image_prompt_type_choices[0][1]) image_prompt_type_radio = gr.Radio( image_prompt_type_choices, value = image_prompt_type_radio_value, label="Location", show_label= False, visible= len(image_prompt_types_allowed)>1, scale= 3) else: image_prompt_type_radio = gr.Radio(choices=[("", "")], value="", visible= False) From 66a07db16b841a908008f953849758cf3de6cf37 Mon Sep 17 00:00:00 2001 From: DeepBeepMeep Date: Sat, 6 Sep 2025 00:08:45 +0200 Subject: [PATCH 5/5] fixed End Frames checkbox not always visible --- models/wan/wan_handler.py | 4 +++- wgp.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.py index 20c3594..5d5c27c 100644 --- a/models/wan/wan_handler.py +++ b/models/wan/wan_handler.py @@ -144,7 +144,9 @@ class family_handler(): if vace_class or base_model_type in ["infinitetalk"]: image_prompt_types_allowed = "TVL" elif base_model_type in ["ti2v_2_2"]: - image_prompt_types_allowed = "TSEV" + image_prompt_types_allowed = "TSVL" + elif test_multitalk(base_model_type) or base_model_type in ["fantasy"]: + image_prompt_types_allowed = "SVL" elif i2v: image_prompt_types_allowed = "SEVL" else: diff --git a/wgp.py b/wgp.py index 4f1a10d..9bbf1ff 100644 --- a/wgp.py +++ b/wgp.py @@ -6623,7 +6623,8 @@ def refresh_image_prompt_type_radio(state, image_prompt_type, image_prompt_type_ image_prompt_type = del_in_sequence(image_prompt_type, "VLTS") image_prompt_type = add_to_sequence(image_prompt_type, image_prompt_type_radio) any_video_source = len(filter_letters(image_prompt_type, "VL"))>0 - end_visible = any_letters(image_prompt_type, "SVL") + model_def = get_model_def(state["model_type"]) + end_visible = any_letters(image_prompt_type, "SVL") and "E" in model_def.get("image_prompt_types_allowed","") return image_prompt_type, gr.update(visible = "S" in image_prompt_type ), gr.update(visible = end_visible and ("E" in image_prompt_type) ), gr.update(visible = "V" in image_prompt_type) , gr.update(visible = any_video_source), gr.update(visible = end_visible) def refresh_image_prompt_type_endcheckbox(state, image_prompt_type, image_prompt_type_radio, end_checkbox):