Python
UI improvements
DeepBeepMeepf77ba0317f01
diff --git a/README.md b/README.mdindex 72a7b0d..ee432d7 100644--- a/README.md+++ b/README.md@@ -20,7 +20,7 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models**Follow DeepBeepMeep on Twitter/X to get the Latest News**: https://x.com/deepbeepmeep## 🔥 Latest Updates :-### September 25 2025: WanGP v8.76 - ~~Here Are Two Three New Contenders in the Vace Arena !~~ The Never Ending Release+### September 28 2025: WanGP v8.76 - ~~Here Are Two Three New Contenders in the Vace Arena !~~ The Never Ending ReleaseSo in ~~today's~~ this release you will find two Wannabe Vace that covers each only a subset of Vace features but offers some interesting advantages:- **Wan 2.2 Animate**: this model is specialized in *Body Motion* and *Facial Motion transfers*. It does that very well. You can use this model to either *Replace* a person in an in Video or *Animate* the person of your choice using an existing *Pose Video* (remember *Animate Anyone* ?). By default it will keep the original soundtrack. *Wan 2.2 Animate* seems to be under the hood a derived i2v model and should support the corresponding Loras Accelerators (for instance *FusioniX t2v*). Also as a WanGP exclusivity, you will find support for *Outpainting*.diff --git a/models/wan/any2video.py b/models/wan/any2video.pyindex 9f27fb3..c9b1a29 100644--- a/models/wan/any2video.py+++ b/models/wan/any2video.py@@ -1058,7 +1058,7 @@ class WanAny2V:def get_loras_transformer(self, get_model_recursive_prop, base_model_type, model_type, video_prompt_type, model_mode, **kwargs):if base_model_type == "animate":- if "1" in video_prompt_type:+ if "#" in video_prompt_type and "1" in video_prompt_type:preloadURLs = get_model_recursive_prop(model_type, "preload_URLs")if len(preloadURLs) > 0:return [os.path.join("ckpts", os.path.basename(preloadURLs[0]))] , [1]diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.pyindex d3dc31e..b1f5942 100644--- a/models/wan/wan_handler.py+++ b/models/wan/wan_handler.py@@ -147,19 +147,30 @@ class family_handler():extra_model_def["all_image_refs_are_background_ref"] = Trueextra_model_def["guide_custom_choices"] = {"choices":[- ("Images to Video, each Reference Image will start a new shot with a new Sliding Window - Sharp Transitions", "0KI"),- ("Images to Video, each Reference Image will start a new shot with a new Sliding Window - Smooth Transitions", "KI"),- ("Sparse Video to Video, one Image will by extracted from Video for each new Sliding Window - Sharp Transitions", "0RUV"),- ("Sparse Video to Video, one Image will by extracted from Video for each new Sliding Window - Smooth Transitions", "RUV"),- ("Video to Video, amount of motion transferred depends on Denoising Strength - Sharp Transitions", "G0UV"),- ("Video to Video, amount of motion transferred depends on Denoising Strength - Smooth Transitions", "GUV"),+ ("Images to Video, each Reference Image will start a new shot with a new Sliding Window", "KI"),+ ("Sparse Video to Video, one Image will by extracted from Video for each new Sliding Window", "RUV"),+ ("Video to Video, amount of motion transferred depends on Denoising Strength", "GUV"),],"default": "KI",- "letters_filter": "RGUV0KI",+ "letters_filter": "RGUVKI","label": "Video to Video",+ "scale": 3,+ "show_label" : False,+ }++ extra_model_def["custom_video_selection"] = {+ "choices":[+ ("Smooth Transitions", ""),+ ("Sharp Transitions", "0"),+ ],+ "trigger": "",+ "label": "Custom Process",+ "letters_filter": "0","show_label" : False,+ "scale": 1,}+# extra_model_def["at_least_one_image_ref_needed"] = Trueif base_model_type in ["lucy_edit"]:extra_model_def["keep_frames_video_guide_not_supported"] = True@@ -189,7 +200,9 @@ class family_handler():("None", ""),("Apply Relighting", "1"),],+ "trigger": "#","label": "Custom Process",+ "type": "checkbox","letters_filter": "1","show_label" : False,"scale": 1,diff --git a/wgp.py b/wgp.pyindex d03807b..e48070c 100644--- a/wgp.py+++ b/wgp.py@@ -7017,12 +7017,13 @@ def refresh_video_prompt_type_video_guide(state, filter_type, video_prompt_type,else:mask_selector_visible = Trueref_images_visible = "I" in video_prompt_type- custom_options = custom_checkbox= False- if "#" in video_prompt_type:- custom_options = True- custom_video_choices = model_def.get("custom_video_selection", None)- if custom_video_choices is not None:- custom_checkbox = len(custom_video_choices.get("choices", [])) <= 2+ custom_options = custom_checkbox = False+ custom_video_selection = model_def.get("custom_video_selection", None)+ if custom_video_selection is not None:+ custom_trigger = custom_video_selection.get("trigger","")+ if len(custom_trigger) == 0 or custom_trigger in video_prompt_type:+ custom_options = True+ custom_checkbox = custom_video_selection.get("type","") == "checkbox"return video_prompt_type, gr.update(visible = visible and not image_outputs), image_guide, gr.update(visible = keep_frames_video_guide_visible), gr.update(visible = visible and "G" in video_prompt_type), gr.update(visible= (visible or "F" in video_prompt_type or "K" in video_prompt_type) and any_outpainting), gr.update(visible= visible and mask_selector_visible and not "U" in video_prompt_type ) , gr.update(visible= mask_visible and not image_outputs), image_mask, image_mask_guide, gr.update(visible= mask_visible), gr.update(visible = ref_images_visible ), gr.update(visible= custom_options and not custom_checkbox ), gr.update(visible= custom_options and custom_checkbox )@@ -7030,7 +7031,7 @@ def refresh_video_prompt_type_video_custom_dropbox(state, video_prompt_type, vidmodel_type = state["model_type"]model_def = get_model_def(model_type)custom_video_selection = model_def.get("custom_video_selection", None)- if not "#" in video_prompt_type or custom_video_selection is None: return gr.update()+ if custom_video_selection is None: return gr.update()letters_filter = custom_video_selection.get("letters_filter", "")video_prompt_type = del_in_sequence(video_prompt_type, letters_filter)video_prompt_type = add_to_sequence(video_prompt_type, video_prompt_type_video_custom_dropbox)@@ -7040,7 +7041,7 @@ def refresh_video_prompt_type_video_custom_checkbox(state, video_prompt_type, vimodel_type = state["model_type"]model_def = get_model_def(model_type)custom_video_selection = model_def.get("custom_video_selection", None)- if not "#" in video_prompt_type or custom_video_selection is None: return gr.update()+ if custom_video_selection is None: return gr.update()letters_filter = custom_video_selection.get("letters_filter", "")video_prompt_type = del_in_sequence(video_prompt_type, letters_filter)if video_prompt_type_video_custom_checkbox:@@ -7610,9 +7611,10 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Nonvideo_prompt_type_video_custom_checkbox = gr.Checkbox(value=False, label="Custom Checkbbox", scale = 1, visible= False, show_label= True, )else:- custom_choices = "#" in video_prompt_type_valuecustom_video_choices = custom_video_selection["choices"]- custom_checkbox = len(custom_video_choices) <= 2+ custom_video_trigger = custom_video_selection.get("trigger", "")+ custom_choices = len(custom_video_trigger) == 0 or custom_video_trigger in video_prompt_type_value+ custom_checkbox = custom_video_selection.get("type","") == "checkbox"video_prompt_type_video_custom_label = custom_video_selection.get("label", "Custom Choices")video_prompt_type_video_custom_dropbox = gr.Dropdown(