Skip to content

Commit

Permalink
Upgraded to Gradio 4.24.0, hoping gradio fixed their browser problems
Browse files Browse the repository at this point in the history
  • Loading branch information
C0untFloyd committed Mar 30, 2024
1 parent 9907f1f commit c2931cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--extra-index-url https://download.pytorch.org/whl/cu118

numpy==1.24.3
gradio==4.21.0
gradio==4.24.0
opencv-python==4.8.1.78
onnx==1.15.0
insightface==0.7.3
Expand Down
8 changes: 4 additions & 4 deletions ui/tabs/faceswap_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def faceswap_tab():
start_event = bt_start.click(fn=start_swap,
inputs=[ui.globals.ui_selected_enhancer, selected_face_detection, roop.globals.keep_frames, roop.globals.wait_after_extraction,
roop.globals.skip_audio, max_face_distance, ui.globals.ui_blend_ratio, chk_useclip, clip_text,video_swapping_method, no_face_action, vr_mode, autorotate, maskimage],
outputs=[bt_start, bt_stop, resultfiles])
outputs=[bt_start, bt_stop, resultfiles], show_progress='full')
after_swap_event = start_event.then(fn=on_resultfiles_finished, inputs=[resultfiles], outputs=[resultimage, resultvideo])

bt_stop.click(fn=stop_swap, cancels=[start_event, after_swap_event], outputs=[bt_start, bt_stop], queue=False)
Expand Down Expand Up @@ -231,7 +231,7 @@ def on_srcfile_changed(srcfiles, progress=gr.Progress()):
for f in srcfiles:
source_path = f.name
if source_path.lower().endswith('fsz'):
progress(0, desc="Retrieving faces from Faceset File", )
progress(0, desc="Retrieving faces from Faceset File")
unzipfolder = os.path.join(os.environ["TEMP"], 'faceset')
if os.path.isdir(unzipfolder):
files = os.listdir(unzipfolder)
Expand Down Expand Up @@ -263,7 +263,7 @@ def on_srcfile_changed(srcfiles, progress=gr.Progress()):
roop.globals.INPUT_FACESETS.append(face_set)

elif util.has_image_extension(source_path):
progress(0, desc="Retrieving faces from image", )
progress(0, desc="Retrieving faces from image")
roop.globals.source_path = source_path
SELECTION_FACES_DATA = extract_face_images(roop.globals.source_path, (False, 0))
progress(0.5, desc="Retrieving faces from image")
Expand Down Expand Up @@ -529,7 +529,7 @@ def translate_swap_mode(dropdown_text):


def start_swap( enhancer, detection, keep_frames, wait_after_extraction, skip_audio, face_distance, blend_ratio,
use_clip, clip_text, processing_method, no_face_action, vr_mode, autorotate, imagemask, progress=gr.Progress(track_tqdm=False)):
use_clip, clip_text, processing_method, no_face_action, vr_mode, autorotate, imagemask, progress=gr.Progress()):
from ui.main import prepare_environment
from roop.core import batch_process
global is_processing, list_files_process
Expand Down

0 comments on commit c2931cf

Please sign in to comment.