From e4a914c6998c8375ec50771dfa9e94de49dd82a7 Mon Sep 17 00:00:00 2001 From: smthemex <138738845+smthemex@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:49:27 +0800 Subject: [PATCH] Update pipeline.py --- src/pipelines/pipeline.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pipelines/pipeline.py b/src/pipelines/pipeline.py index fe87b14..daefb4d 100644 --- a/src/pipelines/pipeline.py +++ b/src/pipelines/pipeline.py @@ -478,8 +478,8 @@ class LQ2VideoLongSVDPipeline(DiffusionPipeline): # 4. Encode input image using VAE needs_upcasting = (self.vae.dtype == torch.float16 or self.vae.dtype == torch.bfloat16) and self.vae.config.force_upcast vae_dtype = self.vae.dtype - if needs_upcasting: - self.vae.to(dtype=torch.float32) + # if needs_upcasting: + # self.vae.to(dtype=torch.float32) # Prepare ref image latents ref_image_tensor = ref_image.to( @@ -690,6 +690,8 @@ class LQ2VideoLongSVDPipeline(DiffusionPipeline): # cast back to fp16 if needed if needs_upcasting: self.vae.to(dtype=vae_dtype) + + #print(latents.shape,latents.dtype) #torch.Size([1, 16, 4, 32, 32]) torch.float16 frames = self.decode_latents(latents, num_frames, decode_chunk_size) else: frames = latents @@ -807,4 +809,4 @@ def _gaussian_blur2d(input, kernel_size, sigma): out_x = _filter2d(input, kernel_x[..., None, :]) out = _filter2d(out_x, kernel_y[..., None]) - return out \ No newline at end of file + return out