Skip to content
Python

fixed infinitetalk bug

DeepBeepMeepe7433804d1e6
diff --git a/models/wan/any2video.py b/models/wan/any2video.py
index b0fc246..9f27fb3 100644
--- a/models/wan/any2video.py
+++ b/models/wan/any2video.py
@@ -447,7 +447,7 @@ class WanAny2V:
if model_type in ["i2v", "i2v_2_2", "fun_inp_1.3B", "fun_inp", "fantasy", "multitalk", "infinitetalk", "i2v_2_2_multitalk", "flf2v_720p"]:
any_end_frame = False
if infinitetalk:
- new_shot = "Q" in video_prompt_type
+ new_shot = "0" in video_prompt_type
if input_frames is not None:
image_ref = input_frames[:, 0]
else:
diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.py
index e1829f0..d3dc31e 100644
--- a/models/wan/wan_handler.py
+++ b/models/wan/wan_handler.py
@@ -147,15 +147,15 @@ class family_handler():
extra_model_def["all_image_refs_are_background_ref"] = True
extra_model_def["guide_custom_choices"] = {
"choices":[
- ("Images to Video, each Reference Image will start a new shot with a new Sliding Window - Sharp Transitions", "QKI"),
+ ("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", "QRUV"),
+ ("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", "GQUV"),
+ ("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"),
],
"default": "KI",
- "letters_filter": "RGUVQKI",
+ "letters_filter": "RGUV0KI",
"label": "Video to Video",
"show_label" : False,
}
@@ -190,6 +190,7 @@ class family_handler():
("Apply Relighting", "1"),
],
"label": "Custom Process",
+ "letters_filter": "1",
"show_label" : False,
"scale": 1,
}
@@ -427,7 +428,7 @@ class family_handler():
ui_defaults["audio_guidance_scale"]= 1
video_prompt_type = ui_defaults.get("video_prompt_type", "")
if "I" in video_prompt_type:
- video_prompt_type = video_prompt_type.replace("KI", "QKI")
+ video_prompt_type = video_prompt_type.replace("KI", "0KI")
ui_defaults["video_prompt_type"] = video_prompt_type
if settings_version < 2.28:
@@ -461,6 +462,13 @@ class family_handler():
video_prompt_type = video_prompt_type.replace("1", "#1")
ui_defaults["video_prompt_type"] = video_prompt_type
+ if settings_version < 2.38:
+ if base_model_type in ["infinitetalk"]:
+ video_prompt_type = ui_defaults.get("video_prompt_type", "")
+ if "Q" in video_prompt_type:
+ video_prompt_type = video_prompt_type.replace("Q", "0")
+ ui_defaults["video_prompt_type"] = video_prompt_type
+
@staticmethod
def update_default_settings(base_model_type, model_def, ui_defaults):
ui_defaults.update({
@@ -491,7 +499,7 @@ class family_handler():
"sliding_window_overlap" : 9,
"sliding_window_size": 81,
"sample_solver" : "euler",
- "video_prompt_type": "QKI",
+ "video_prompt_type": "0KI",
"remove_background_images_ref" : 0,
"adaptive_switch" : 1,
})
diff --git a/wgp.py b/wgp.py
index 9143689..d03807b 100644
--- a/wgp.py
+++ b/wgp.py
@@ -63,8 +63,8 @@ AUTOSAVE_FILENAME = "queue.zip"
PROMPT_VARS_MAX = 10
target_mmgp_version = "3.6.0"
-WanGP_version = "8.76"
-settings_version = 2.37
+WanGP_version = "8.761"
+settings_version = 2.38
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
@@ -7029,20 +7029,22 @@ def refresh_video_prompt_type_video_guide(state, filter_type, video_prompt_type,
def refresh_video_prompt_type_video_custom_dropbox(state, video_prompt_type, video_prompt_type_video_custom_dropbox):
model_type = state["model_type"]
model_def = get_model_def(model_type)
- custom_video_choices = model_def.get("custom_video_selection", None)
- if not "#" in video_prompt_type or custom_video_choices is None: return gr.update()
- video_prompt_type = del_in_sequence(video_prompt_type, "0123456789")
+ 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()
+ 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)
return video_prompt_type
def refresh_video_prompt_type_video_custom_checkbox(state, video_prompt_type, video_prompt_type_video_custom_checkbox):
model_type = state["model_type"]
model_def = get_model_def(model_type)
- custom_video_choices = model_def.get("custom_video_selection", None)
- if not "#" in video_prompt_type or custom_video_choices is None: return gr.update()
- video_prompt_type = del_in_sequence(video_prompt_type, "0123456789")
+ 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()
+ 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:
- video_prompt_type = add_to_sequence(video_prompt_type, custom_video_choices["choices"][1][1])
+ video_prompt_type = add_to_sequence(video_prompt_type, custom_video_selection["choices"][1][1])
return video_prompt_type
@@ -7613,10 +7615,9 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
custom_checkbox = len(custom_video_choices) <= 2
video_prompt_type_video_custom_label = custom_video_selection.get("label", "Custom Choices")
-
video_prompt_type_video_custom_dropbox = gr.Dropdown(
custom_video_choices,
- value=filter_letters(video_prompt_type_value, "0123456789", custom_video_selection.get("default", "")),
+ value=filter_letters(video_prompt_type_value, custom_video_selection.get("letters_filter", ""), custom_video_selection.get("default", "")),
scale = custom_video_selection.get("scale", 1),
label= video_prompt_type_video_custom_label , visible= not custom_checkbox and custom_choices,
show_label= custom_video_selection.get("show_label", True),