Add minimal FlashVSR upscale support

https://zhuang2002.github.io/FlashVSR/

This only implements the projection model and the VAE, which seems to be enough for upscaling. This does NOT implement any of the streaming and sparse attention code.
This commit is contained in:
kijai
2025-10-15 18:24:28 +03:00
parent 3d42bf62ce
commit bb75cddd60
10 changed files with 1697 additions and 10 deletions
+6
View File
@@ -1424,6 +1424,12 @@ class WanVideoModelLoader:
sd.update(extra_sd)
del extra_sd
# FlashVSR
if "LQ_proj_in.norm1.gamma" in sd:
log.info("FlashVSR model detected, patching model...")
from .FlashVSR.LQ_proj_model import Buffer_LQ4x_Proj
transformer.LQ_proj_in = Buffer_LQ4x_Proj(in_dim=3, out_dim=1536, layer_num=1)
# Additional cond latents
if "add_conv_in.weight" in sd:
def zero_module(module):