hlky HF Staff commited on
Commit
3d28980
·
verified ·
1 Parent(s): d07745d

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -0
handler.py CHANGED
@@ -11,6 +11,7 @@ class EndpointHandler:
11
  self.device = "cuda"
12
  self.dtype = torch.float16
13
  self.vae = cast(AutoencoderKLHunyuanVideo, AutoencoderKLHunyuanVideo.from_pretrained(path, torch_dtype=self.dtype).to(self.device, self.dtype).eval())
 
14
 
15
  self.vae_scale_factor = self.vae_scale_factor_spatial = self.vae.spatial_compression_ratio
16
  self.video_processor = VideoProcessor(
 
11
  self.device = "cuda"
12
  self.dtype = torch.float16
13
  self.vae = cast(AutoencoderKLHunyuanVideo, AutoencoderKLHunyuanVideo.from_pretrained(path, torch_dtype=self.dtype).to(self.device, self.dtype).eval())
14
+ self.vae.enable_tiling()
15
 
16
  self.vae_scale_factor = self.vae_scale_factor_spatial = self.vae.spatial_compression_ratio
17
  self.video_processor = VideoProcessor(