From 1740b97058bb47f298deb0754d75e7a9ba64841c Mon Sep 17 00:00:00 2001 From: deepbeepmeep Date: Thu, 7 Aug 2025 00:33:17 +0200 Subject: [PATCH] disabled auto color correction for first window if no continue video --- models/wan/any2video.py | 4 ++-- wgp.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/models/wan/any2video.py b/models/wan/any2video.py index 4a20255..fd643ce 100644 --- a/models/wan/any2video.py +++ b/models/wan/any2video.py @@ -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) diff --git a/wgp.py b/wgp.py index f5f8b43..614819e 100644 --- a/wgp.py +++ b/wgp.py @@ -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: