Upload face_fix_next.py
Browse files- face_fix_next.py +47 -11
face_fix_next.py
CHANGED
|
@@ -1,8 +1,7 @@
|
|
| 1 |
-
import multiprocessing
|
| 2 |
import gradio
|
| 3 |
|
| 4 |
-
import
|
| 5 |
-
from facefusion.uis.components import about,
|
| 6 |
|
| 7 |
|
| 8 |
def pre_check() -> bool:
|
|
@@ -20,9 +19,25 @@ def render() -> gradio.Blocks:
|
|
| 20 |
with gradio.Blocks():
|
| 21 |
about.render()
|
| 22 |
with gradio.Blocks():
|
| 23 |
-
|
| 24 |
with gradio.Blocks():
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
with gradio.Blocks():
|
| 27 |
execution.render()
|
| 28 |
execution_thread_count.render()
|
|
@@ -40,6 +55,13 @@ def render() -> gradio.Blocks:
|
|
| 40 |
target.render()
|
| 41 |
with gradio.Blocks():
|
| 42 |
output.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
with gradio.Column(scale = 3):
|
| 44 |
with gradio.Blocks():
|
| 45 |
preview.render()
|
|
@@ -50,15 +72,25 @@ def render() -> gradio.Blocks:
|
|
| 50 |
with gradio.Blocks():
|
| 51 |
face_masker.render()
|
| 52 |
with gradio.Blocks():
|
| 53 |
-
|
|
|
|
|
|
|
| 54 |
with gradio.Blocks():
|
| 55 |
common_options.render()
|
| 56 |
return layout
|
| 57 |
|
| 58 |
|
| 59 |
def listen() -> None:
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
execution.listen()
|
| 63 |
execution_thread_count.listen()
|
| 64 |
execution_queue_count.listen()
|
|
@@ -68,14 +100,18 @@ def listen() -> None:
|
|
| 68 |
source.listen()
|
| 69 |
target.listen()
|
| 70 |
output.listen()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
preview.listen()
|
| 72 |
trim_frame.listen()
|
| 73 |
face_selector.listen()
|
| 74 |
face_masker.listen()
|
| 75 |
-
|
|
|
|
| 76 |
common_options.listen()
|
| 77 |
|
| 78 |
|
| 79 |
def run(ui : gradio.Blocks) -> None:
|
| 80 |
-
|
| 81 |
-
ui.queue(concurrency_count = concurrency_count).launch(show_api = False, quiet = True, inbrowser = facefusion.globals.open_browser, share=True)
|
|
|
|
|
|
|
| 1 |
import gradio
|
| 2 |
|
| 3 |
+
from facefusion import state_manager
|
| 4 |
+
from facefusion.uis.components import about, age_modifier_options, common_options, execution, execution_queue_count, execution_thread_count, expression_restorer_options, face_debugger_options, face_detector, face_editor_options, face_enhancer_options, face_landmarker, face_masker, face_selector, face_swapper_options, frame_colorizer_options, frame_enhancer_options, instant_runner, job_manager, job_runner, lip_syncer_options, memory, output, output_options, preview, processors, source, target, temp_frame, terminal, trim_frame, ui_workflow
|
| 5 |
|
| 6 |
|
| 7 |
def pre_check() -> bool:
|
|
|
|
| 19 |
with gradio.Blocks():
|
| 20 |
about.render()
|
| 21 |
with gradio.Blocks():
|
| 22 |
+
processors.render()
|
| 23 |
with gradio.Blocks():
|
| 24 |
+
age_modifier_options.render()
|
| 25 |
+
with gradio.Blocks():
|
| 26 |
+
expression_restorer_options.render()
|
| 27 |
+
with gradio.Blocks():
|
| 28 |
+
face_debugger_options.render()
|
| 29 |
+
with gradio.Blocks():
|
| 30 |
+
face_editor_options.render()
|
| 31 |
+
with gradio.Blocks():
|
| 32 |
+
face_enhancer_options.render()
|
| 33 |
+
with gradio.Blocks():
|
| 34 |
+
face_swapper_options.render()
|
| 35 |
+
with gradio.Blocks():
|
| 36 |
+
frame_colorizer_options.render()
|
| 37 |
+
with gradio.Blocks():
|
| 38 |
+
frame_enhancer_options.render()
|
| 39 |
+
with gradio.Blocks():
|
| 40 |
+
lip_syncer_options.render()
|
| 41 |
with gradio.Blocks():
|
| 42 |
execution.render()
|
| 43 |
execution_thread_count.render()
|
|
|
|
| 55 |
target.render()
|
| 56 |
with gradio.Blocks():
|
| 57 |
output.render()
|
| 58 |
+
with gradio.Blocks():
|
| 59 |
+
ui_workflow.render()
|
| 60 |
+
instant_runner.render()
|
| 61 |
+
job_runner.render()
|
| 62 |
+
job_manager.render()
|
| 63 |
+
with gradio.Blocks():
|
| 64 |
+
terminal.render()
|
| 65 |
with gradio.Column(scale = 3):
|
| 66 |
with gradio.Blocks():
|
| 67 |
preview.render()
|
|
|
|
| 72 |
with gradio.Blocks():
|
| 73 |
face_masker.render()
|
| 74 |
with gradio.Blocks():
|
| 75 |
+
face_detector.render()
|
| 76 |
+
with gradio.Blocks():
|
| 77 |
+
face_landmarker.render()
|
| 78 |
with gradio.Blocks():
|
| 79 |
common_options.render()
|
| 80 |
return layout
|
| 81 |
|
| 82 |
|
| 83 |
def listen() -> None:
|
| 84 |
+
processors.listen()
|
| 85 |
+
age_modifier_options.listen()
|
| 86 |
+
expression_restorer_options.listen()
|
| 87 |
+
face_debugger_options.listen()
|
| 88 |
+
face_editor_options.listen()
|
| 89 |
+
face_enhancer_options.listen()
|
| 90 |
+
face_swapper_options.listen()
|
| 91 |
+
frame_colorizer_options.listen()
|
| 92 |
+
frame_enhancer_options.listen()
|
| 93 |
+
lip_syncer_options.listen()
|
| 94 |
execution.listen()
|
| 95 |
execution_thread_count.listen()
|
| 96 |
execution_queue_count.listen()
|
|
|
|
| 100 |
source.listen()
|
| 101 |
target.listen()
|
| 102 |
output.listen()
|
| 103 |
+
instant_runner.listen()
|
| 104 |
+
job_runner.listen()
|
| 105 |
+
job_manager.listen()
|
| 106 |
+
terminal.listen()
|
| 107 |
preview.listen()
|
| 108 |
trim_frame.listen()
|
| 109 |
face_selector.listen()
|
| 110 |
face_masker.listen()
|
| 111 |
+
face_detector.listen()
|
| 112 |
+
face_landmarker.listen()
|
| 113 |
common_options.listen()
|
| 114 |
|
| 115 |
|
| 116 |
def run(ui : gradio.Blocks) -> None:
|
| 117 |
+
ui.launch(show_api = False, inbrowser = state_manager.get_item('open_browser'), share=True)
|
|
|