UI Layout

1. Create

Create a new example file:
facefusion/uis/layouts/example.py

2. Implement

Implement the required hooks of the UI layout:
import gradio
from facefusion.uis.components import example
def pre_check() -> bool:
return True
def pre_render() -> bool:
return True
def render() -> gradio.Blocks:
with gradio.Blocks() as layout:
example.render()
return layout
def listen() -> None:
example.listen()
def run(ui : gradio.Blocks) -> None:
ui.launch()

3. Done

Finally, run the command:
python run.py --ui-layouts example
Last modified 1mo ago