disabled auto color correction for first window if no continue video

This commit is contained in:
deepbeepmeep 2025-08-07 00:33:17 +02:00
parent ede2245844
commit 1740b97058
2 changed files with 9 additions and 2 deletions

View File

@ -425,7 +425,7 @@ class WanAny2V:
color_correction_strength = 1,
prefix_frames_count = 0,
image_mode = 0,
window_no = 0,
**bbargs
):
@ -939,7 +939,7 @@ class WanAny2V:
videos = torch.cat([video[:,:1] for video in videos], dim=1) if len(videos) > 1 else videos[0][:,:1]
else:
videos = videos[0] # return only first video
if color_correction_strength > 0 and prefix_frames_count > 0:
if color_correction_strength > 0 and (prefix_frames_count > 0 and window_no > 1 or prefix_frames_count > 1 and window_no == 1):
if vace and False:
# videos = match_and_blend_colors_with_mask(videos.unsqueeze(0), input_frames[0].unsqueeze(0), input_masks[0][:1].unsqueeze(0), color_correction_strength,copy_mode= "progressive_blend").squeeze(0)
videos = match_and_blend_colors_with_mask(videos.unsqueeze(0), input_frames[0].unsqueeze(0), input_masks[0][:1].unsqueeze(0), color_correction_strength,copy_mode= "reference").squeeze(0)

7
wgp.py
View File

@ -1744,6 +1744,12 @@ for path in ["wan2.1_Vace_1.3B_preview_bf16.safetensors", "sky_reels2_diffusion
print(f"Removing old version of model '{path}'. A new version of this model will be downloaded next time you use it.")
os.remove( os.path.join("ckpts" , path))
for f, s in [("ckpts/Florence2/modeling_florence2.py", 127287)]:
try:
if os.path.isfile(f) and os.path.getsize(f) == s:
print(f"Removing old version of model '{f}'. A new version of this model will be downloaded next time you use it.")
os.remove(f)
except: pass
models_def = {}
family_handlers = ["models.wan.wan_handler", "models.wan.df_handler", "models.hyvideo.hunyuan_handler", "models.ltx_video.ltxv_handler", "models.flux.flux_handler", "models.qwen.qwen_handler"]
@ -4550,6 +4556,7 @@ def generate_video(
speakers_bboxes =speakers_bboxes,
image_mode = image_mode,
video_prompt_type= video_prompt_type,
window_no = window_no,
offloadobj = offloadobj,
)
except Exception as e: