From b775440bebf362eef1265e6dedaffcb8d50cc4da Mon Sep 17 00:00:00 2001 From: deepbeepmeep <84379123+deepbeepmeep@users.noreply.github.com> Date: Thu, 26 Jun 2025 17:39:09 +0200 Subject: [PATCH 1/4] Fixed identity crash --- wgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgp.py b/wgp.py index e9e4f31..0c7679a 100644 --- a/wgp.py +++ b/wgp.py @@ -3588,7 +3588,7 @@ def generate_video( preprocess_type = process_map.get(process_letter, "vace") else: preprocess_type2 = process_map.get(process_letter, None) - process_names = { "pose": "Open Pose", "depth": "Depth Mask", "scribble" : "Shapes", "flow" : "Flow Map", "gray" : "Gray Levels", "inpaint" : "Inpaint Mask", "U": "Identity Mask", "vace" : "Vace Data"} + process_names = { "pose": "Open Pose", "depth": "Depth Mask", "scribble" : "Shapes", "flow" : "Flow Map", "gray" : "Gray Levels", "inpaint" : "Inpaint Mask", "identity": "Identity Mask", "vace" : "Vace Data"} status_info = "Extracting " + process_names[preprocess_type] extra_process_list = ([] if preprocess_type2==None else [preprocess_type2]) + ([] if process_outside_mask==None or process_outside_mask == preprocess_type else [process_outside_mask]) if len(extra_process_list) == 1: From b14cdbdc0e3ba983f33275f84675c47f9dd44529 Mon Sep 17 00:00:00 2001 From: deepbeepmeep <84379123+deepbeepmeep@users.noreply.github.com> Date: Thu, 26 Jun 2025 18:05:09 +0200 Subject: [PATCH 2/4] Fixed 1024x1024 --- wgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgp.py b/wgp.py index 0c7679a..a1f8223 100644 --- a/wgp.py +++ b/wgp.py @@ -5491,7 +5491,7 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non # 720p ("1280x720 (16:9, 720p)", "1280x720"), ("720x1280 (9:16, 720p)", "720x1280"), - ("1024x1024 (1:1, 720p)", "1024x024"), + ("1024x1024 (1:1, 720p)", "1024x1024"), ("1280x544 (21:9, 720p)", "1280x544"), ("544x1280 (9:21, 720p)", "544x1280"), ("1104x832 (4:3, 720p)", "1104x832"), From 10db954aaa88204c42193cde7b46e706ba845d4b Mon Sep 17 00:00:00 2001 From: deepbeepmeep <84379123+deepbeepmeep@users.noreply.github.com> Date: Fri, 27 Jun 2025 00:46:34 +0200 Subject: [PATCH 3/4] Fixed injected frames / flow mixed up --- wgp.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wgp.py b/wgp.py index a1f8223..9f87dce 100644 --- a/wgp.py +++ b/wgp.py @@ -3582,7 +3582,7 @@ def generate_video( process_map = { "Y" : "depth", "W": "scribble", "X": "inpaint", "Z": "flow"} process_outside_mask = process_map.get(filter_letters(video_prompt_type, "YWX"), None) preprocess_type, preprocess_type2 = "vace", None - process_map = { "D" : "depth", "P": "pose", "S": "scribble", "F": "flow", "C": "gray", "M": "inpaint", "U": "identity"} + process_map = { "D" : "depth", "P": "pose", "S": "scribble", "L": "flow", "C": "gray", "M": "inpaint", "U": "identity"} for process_num, process_letter in enumerate( filter_letters(video_prompt_type, "PDSFCMU")): if process_num == 0: preprocess_type = process_map.get(process_letter, "vace") @@ -5037,7 +5037,7 @@ def refresh_video_prompt_type_video_mask(video_prompt_type, video_prompt_type_vi return video_prompt_type, gr.update(visible= visible), gr.update(visible= visible ) def refresh_video_prompt_type_video_guide(state, video_prompt_type, video_prompt_type_video_guide): - video_prompt_type = del_in_sequence(video_prompt_type, "PDSFCMUV") + video_prompt_type = del_in_sequence(video_prompt_type, "PDSLCMUV") video_prompt_type = add_to_sequence(video_prompt_type, video_prompt_type_video_guide) visible = "V" in video_prompt_type mask_visible = visible and "A" in video_prompt_type and not "U" in video_prompt_type @@ -5318,19 +5318,19 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non ("Transfer Human Motion", "PV"), ("Transfer Depth", "DV"), ("Transfer Shapes", "SV"), - ("Transfer Flow", "FV"), + ("Transfer Flow", "LV"), ("Recolorize", "CV"), ("Perform Inpainting", "MV"), ("Use Vace raw format", "V"), ("Keep Unchanged", "UV"), ("Transfer Human Motion & Depth", "PDV"), ("Transfer Human Motion & Shapes", "PSV"), - ("Transfer Human Motion & Flow", "PFV"), + ("Transfer Human Motion & Flow", "PLV"), ("Transfer Depth & Shapes", "DSV"), - ("Transfer Depth & Flow", "DFV"), - ("Transfer Shapes & Flow", "SFV"), + ("Transfer Depth & Flow", "DLV"), + ("Transfer Shapes & Flow", "SLV"), ], - value=filter_letters(video_prompt_type_value, "PDSFCMUV"), + value=filter_letters(video_prompt_type_value, "PDSLCMUV"), label="Control Video Process", scale = 2, visible= True ) elif hunyuan_video_custom_edit: @@ -5339,7 +5339,7 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non ("Inpaint Control Video", "MV"), ("Transfer Human Motion", "PMV"), ], - value=filter_letters(video_prompt_type_value, "PDSFCMUV"), + value=filter_letters(video_prompt_type_value, "PDSLCMUV"), label="Video to Video", scale = 3, visible= True ) else: From 81021e7a6fc7483ff832e95adf4bdd8ecc1a2c08 Mon Sep 17 00:00:00 2001 From: deepbeepmeep <84379123+deepbeepmeep@users.noreply.github.com> Date: Fri, 27 Jun 2025 08:28:28 +0200 Subject: [PATCH 4/4] Fixed injected frames with control video with mask --- wan/text2video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wan/text2video.py b/wan/text2video.py index dfa456b..ad008c2 100644 --- a/wan/text2video.py +++ b/wan/text2video.py @@ -253,7 +253,7 @@ class WanT2V: if src_video_shape[1] != total_frames: src_video[i] = torch.cat( [src_video[i], src_video[i].new_zeros(src_video_shape[0], total_frames -src_video_shape[1], *src_video_shape[-2:])], dim=1) src_mask[i] = torch.cat( [src_mask[i], src_mask[i].new_ones(src_video_shape[0], total_frames -src_video_shape[1], *src_video_shape[-2:])], dim=1) - src_mask[i] = torch.clamp((src_mask[i][:1, :, :, :] + 1) / 2, min=0, max=1) + src_mask[i] = torch.clamp((src_mask[i][:, :, :, :] + 1) / 2, min=0, max=1) image_sizes.append(src_video[i].shape[2:]) elif sub_src_video is None: if prepend_count > 0: @@ -654,4 +654,4 @@ class WanT2V: module = modules_dict[f"vace_blocks.{vace_layer}"] target = modules_dict[f"blocks.{model_layer}"] setattr(target, "vace", module ) - delattr(model, "vace_blocks") \ No newline at end of file + delattr(model, "vace_blocks")