tuan2308 commited on
Commit
cfc908e
1 Parent(s): 3aff737

Update roop/core.py

Browse files
Files changed (1) hide show
  1. roop/core.py +2 -1
roop/core.py CHANGED
@@ -18,6 +18,7 @@ import tensorflow
18
  import roop.globals
19
  import roop.metadata
20
  import roop.ui as ui
 
21
  from roop.predictor import predict_image, predict_video
22
  from roop.processors.frame.core import get_frame_processors_modules
23
  from roop.utilities import has_image_extension, is_image, is_video, detect_fps, create_video, extract_frames, get_temp_frame_paths, restore_audio, create_temp, move_temp, clean_temp, normalize_output_path
@@ -25,7 +26,7 @@ from roop.utilities import has_image_extension, is_image, is_video, detect_fps,
25
  warnings.filterwarnings('ignore', category=FutureWarning, module='insightface')
26
  warnings.filterwarnings('ignore', category=UserWarning, module='torchvision')
27
 
28
-
29
  def parse_args() -> None:
30
  signal.signal(signal.SIGINT, lambda signal_number, frame: destroy())
31
  program = argparse.ArgumentParser(formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=100))
 
18
  import roop.globals
19
  import roop.metadata
20
  import roop.ui as ui
21
+ import spaces
22
  from roop.predictor import predict_image, predict_video
23
  from roop.processors.frame.core import get_frame_processors_modules
24
  from roop.utilities import has_image_extension, is_image, is_video, detect_fps, create_video, extract_frames, get_temp_frame_paths, restore_audio, create_temp, move_temp, clean_temp, normalize_output_path
 
26
  warnings.filterwarnings('ignore', category=FutureWarning, module='insightface')
27
  warnings.filterwarnings('ignore', category=UserWarning, module='torchvision')
28
 
29
+ @spaces.GPU
30
  def parse_args() -> None:
31
  signal.signal(signal.SIGINT, lambda signal_number, frame: destroy())
32
  program = argparse.ArgumentParser(formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=100))