From 3a0d51d1004f051842a03bc000bc9be505b12dfb Mon Sep 17 00:00:00 2001 From: Tianlin Pan Date: Sun, 14 Sep 2025 16:21:46 +0800 Subject: [PATCH] Fix gradient checkpointing in WAN VACE blocks --- diffsynth/pipelines/wan_video_new.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diffsynth/pipelines/wan_video_new.py b/diffsynth/pipelines/wan_video_new.py index 660a38e..a8efc23 100644 --- a/diffsynth/pipelines/wan_video_new.py +++ b/diffsynth/pipelines/wan_video_new.py @@ -1243,7 +1243,11 @@ def model_fn_wan_video( tea_cache_update = False if vace_context is not None: - vace_hints = vace(x, vace_context, context, t_mod, freqs) + vace_hints = vace( + x, vace_context, context, t_mod, freqs, + use_gradient_checkpointing=use_gradient_checkpointing, + use_gradient_checkpointing_offload=use_gradient_checkpointing_offload + ) # blocks if use_unified_sequence_parallel: