Skip to content
Python

initial i2v black frame support

DeepBeepMeepcd6bc85456fa
diff --git a/models/wan/any2video.py b/models/wan/any2video.py
index 8a3ff7f..c7d9a42 100644
--- a/models/wan/any2video.py
+++ b/models/wan/any2video.py
@@ -554,6 +554,10 @@ class WanAny2V:
input_video = image_ref.unsqueeze(1)
else:
color_correction_strength = 0 #disable color correction as transition frames between shots may have a complete different color level than the colors of the new shot
+ if input_video is None:
+ input_video = torch.full((3, 1, height, width), -1)
+ color_correction_strength = 0
+
_ , preframes_count, height, width = input_video.shape
input_video = input_video.to(device=self.device).to(dtype= self.VAE_dtype)
if infinitetalk:
diff --git a/shared/attention.py b/shared/attention.py
index da860a9..16cb412 100644
--- a/shared/attention.py
+++ b/shared/attention.py
@@ -68,11 +68,16 @@ def sageattn2_wrapper(
return o
try:
- # from sageattn3 import sageattn3_blackwell as sageattn3 #word0 windows version
from sageattn import sageattn_blackwell as sageattn3
except ImportError:
sageattn3 = None
+if sageattn3 is None:
+ try:
+ from sageattn3 import sageattn3_blackwell as sageattn3 #word0 windows version
+ except ImportError:
+ sageattn3 = None
+
@torch.compiler.disable()
def sageattn3_wrapper(
qkv_list,