
* Allow passing the onnxruntime to install.py * Fix CI * Disallow none execution providers in the UI * Use CV2 to detect fps * Respect trim on videos with audio * Respect trim on videos with audio (finally) * Implement caching to speed up preview and webcam * Define webcam UI and webcam performance * Remove layout from components * Add primary buttons * Extract benchmark and webcam settings * Introduce compact UI settings * Caching for IO and **** prediction * Caching for IO and **** prediction * Introduce face analyser caching * Fix some typing * Improve setup for benchmark * Clear image cache via post process * Fix settings in UI, Simplify restore_audio() using shortest * Select resolution and fps via webcam ui * Introduce read_static_image() to stop caching temp images * Use DirectShow under Windows * Multi-threading for webcam * Fix typing * Refactor frame processor * Refactor webcam processing * Avoid warnings due capture.isOpened() * Resume downloads (#110) * Introduce resumable downloads * Fix CURL commands * Break execution_settings into pieces * Cosmetic changes on cv2 webcam * Update Gradio * Move face cache to own file * Uniform namings for threading * Fix sorting of get_temp_frame_paths(), extend get_temp_frames_pattern() * Minor changes from the review * Looks stable to tme * Update the disclaimer * Update the disclaimer * Update the disclaimer
30 lines
839 B
Python
30 lines
839 B
Python
from typing import Optional
|
|
import gradio
|
|
|
|
import facefusion.globals
|
|
from facefusion import wording
|
|
from facefusion.uis.typing import Update
|
|
|
|
EXECUTION_QUEUE_COUNT_SLIDER : Optional[gradio.Slider] = None
|
|
|
|
|
|
def render() -> None:
|
|
global EXECUTION_QUEUE_COUNT_SLIDER
|
|
|
|
EXECUTION_QUEUE_COUNT_SLIDER = gradio.Slider(
|
|
label = wording.get('execution_queue_count_slider_label'),
|
|
value = facefusion.globals.execution_queue_count,
|
|
step = 1,
|
|
minimum = 1,
|
|
maximum = 16
|
|
)
|
|
|
|
|
|
def listen() -> None:
|
|
EXECUTION_QUEUE_COUNT_SLIDER.change(update_execution_queue_count, inputs = EXECUTION_QUEUE_COUNT_SLIDER, outputs = EXECUTION_QUEUE_COUNT_SLIDER)
|
|
|
|
|
|
def update_execution_queue_count(execution_queue_count : int = 1) -> Update:
|
|
facefusion.globals.execution_queue_count = execution_queue_count
|
|
return gradio.update(value = execution_queue_count)
|