From d0ff85adc9be6cd1940be56e9a25576a7fd7fc25 Mon Sep 17 00:00:00 2001 From: pftq Date: Tue, 18 Mar 2025 22:17:31 -0700 Subject: [PATCH] VAE Tiling Support - credits to deepbeepmeep's WanGP --- wan/image2video.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wan/image2video.py b/wan/image2video.py index 822a233..df0eeed 100644 --- a/wan/image2video.py +++ b/wan/image2video.py @@ -137,7 +137,9 @@ class WanI2V: guide_scale=5.0, n_prompt="", seed=-1, - offload_model=True): + offload_model=True, + VAE_tile_size=0, # 20250316 pftq: vae tiling from deepbeepmeep/WanGP + ): r""" Generates video frames from input image and text prompt using diffusion process. @@ -249,7 +251,9 @@ class WanI2V: torch.zeros(3, F-1, h, w) # 20250226 pftq: fixed 80 being hardcoded frame-1 ], dim=1).to(self.device) - ])[0] + ] + , VAE_tile_size # 20250316 pftq: VAE tiling from deepbeepmeep/WanGP + )[0] y = torch.concat([msk, y]) @contextmanager