Spaces:
Build error
Build error
Update skyreelsinfer/pipelines/pipeline_skyreels_video.py
Browse files
skyreelsinfer/pipelines/pipeline_skyreels_video.py
CHANGED
@@ -14,7 +14,7 @@ from diffusers.pipelines.hunyuan_video.pipeline_hunyuan_video import MultiPipeli
|
|
14 |
from diffusers.pipelines.hunyuan_video.pipeline_hunyuan_video import PipelineCallback
|
15 |
from diffusers.pipelines.hunyuan_video.pipeline_hunyuan_video import retrieve_timesteps
|
16 |
from PIL import Image
|
17 |
-
|
18 |
|
19 |
def resizecrop(image, th, tw):
|
20 |
w, h = image.size
|
@@ -339,7 +339,9 @@ class SkyreelsVideoPipeline(HunyuanVideoPipeline):
|
|
339 |
|
340 |
if hasattr(self, "text_encoder_to_cpu"):
|
341 |
self.text_encoder_to_cpu()
|
342 |
-
self.text_encoder.to("cpu")
|
|
|
|
|
343 |
self.vae.to("cpu")
|
344 |
torch.cuda.empty_cache()
|
345 |
torch.cuda.reset_peak_memory_stats()
|
|
|
14 |
from diffusers.pipelines.hunyuan_video.pipeline_hunyuan_video import PipelineCallback
|
15 |
from diffusers.pipelines.hunyuan_video.pipeline_hunyuan_video import retrieve_timesteps
|
16 |
from PIL import Image
|
17 |
+
import gc
|
18 |
|
19 |
def resizecrop(image, th, tw):
|
20 |
w, h = image.size
|
|
|
339 |
|
340 |
if hasattr(self, "text_encoder_to_cpu"):
|
341 |
self.text_encoder_to_cpu()
|
342 |
+
#self.text_encoder.to("cpu")
|
343 |
+
del self.text_encoder
|
344 |
+
gc.collect()
|
345 |
self.vae.to("cpu")
|
346 |
torch.cuda.empty_cache()
|
347 |
torch.cuda.reset_peak_memory_stats()
|