Spaces:
ALSv
/
Runtime error

ALSv commited on
Commit
566044b
·
verified ·
1 Parent(s): 9ce1b3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  # -*- coding: UTF-8 -*-
2
  #!/usr/bin/env python
3
- import numpy as np
4
  import gradio as gr
 
5
  import roop.globals
6
  from roop.core import (
7
  start,
@@ -11,7 +11,6 @@ from roop.core import (
11
  )
12
  from roop.processors.frame.core import get_frame_processors_modules
13
  from roop.utilities import normalize_output_path
14
- from PIL import Image
15
 
16
 
17
  def swap_face(source_file, target_file, doFaceEnhancer):
@@ -49,6 +48,7 @@ def swap_face(source_file, target_file, doFaceEnhancer):
49
  roop.globals.video_encoder = "libx264"
50
  roop.globals.video_quality = 18
51
  roop.globals.max_memory = suggest_max_memory()
 
52
  # FORZA CPU
53
  roop.globals.execution_providers = decode_execution_providers(["cpu"])
54
  roop.globals.execution_threads = suggest_execution_threads()
@@ -65,7 +65,7 @@ def swap_face(source_file, target_file, doFaceEnhancer):
65
  if not frame_processor.pre_check():
66
  return
67
 
68
- # Avvio roop
69
  start()
70
  return output_path
71
 
 
1
  # -*- coding: UTF-8 -*-
2
  #!/usr/bin/env python
 
3
  import gradio as gr
4
+ from PIL import Image
5
  import roop.globals
6
  from roop.core import (
7
  start,
 
11
  )
12
  from roop.processors.frame.core import get_frame_processors_modules
13
  from roop.utilities import normalize_output_path
 
14
 
15
 
16
  def swap_face(source_file, target_file, doFaceEnhancer):
 
48
  roop.globals.video_encoder = "libx264"
49
  roop.globals.video_quality = 18
50
  roop.globals.max_memory = suggest_max_memory()
51
+
52
  # FORZA CPU
53
  roop.globals.execution_providers = decode_execution_providers(["cpu"])
54
  roop.globals.execution_threads = suggest_execution_threads()
 
65
  if not frame_processor.pre_check():
66
  return
67
 
68
+ # Avvio Roop
69
  start()
70
  return output_path
71