From c59400f6a6aa5a21836f8245b5e148cd9421da2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20Tu=E1=BA=A5n=20Anh?= Date: Mon, 5 Jun 2023 11:58:24 +0200 Subject: [PATCH] clear CUDA cache after swapping on low VRAM + ffmpeg cuda acceleration, clearing cache prevent cuda out-of-memory error --- roop/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/roop/core.py b/roop/core.py index c14bc48..b667a97 100755 --- a/roop/core.py +++ b/roop/core.py @@ -209,6 +209,7 @@ def start(preview_callback = None): process_video_multi_cores(args.source_img, args.frame_paths) else: process_video(args.source_img, args.frame_paths) + torch.cuda.empty_cache() status("creating video...") create_video(video_name, exact_fps, output_dir) status("adding audio...")