mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-11-05 06:29:14 +00:00
disabled auto color correction for first window if no continue video
This commit is contained in:
parent
ede2245844
commit
1740b97058
@ -425,7 +425,7 @@ class WanAny2V:
|
|||||||
color_correction_strength = 1,
|
color_correction_strength = 1,
|
||||||
prefix_frames_count = 0,
|
prefix_frames_count = 0,
|
||||||
image_mode = 0,
|
image_mode = 0,
|
||||||
|
window_no = 0,
|
||||||
**bbargs
|
**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]
|
videos = torch.cat([video[:,:1] for video in videos], dim=1) if len(videos) > 1 else videos[0][:,:1]
|
||||||
else:
|
else:
|
||||||
videos = videos[0] # return only first video
|
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:
|
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= "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)
|
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
7
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.")
|
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))
|
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 = {}
|
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"]
|
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,
|
speakers_bboxes =speakers_bboxes,
|
||||||
image_mode = image_mode,
|
image_mode = image_mode,
|
||||||
video_prompt_type= video_prompt_type,
|
video_prompt_type= video_prompt_type,
|
||||||
|
window_no = window_no,
|
||||||
offloadobj = offloadobj,
|
offloadobj = offloadobj,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user