mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-23 07:50:45 +02:00
Accurate event handling
This commit is contained in:
@@ -57,23 +57,23 @@ def render() -> None:
|
|||||||
|
|
||||||
def listen() -> None:
|
def listen() -> None:
|
||||||
PREVIEW_FRAME_SLIDER.change(update_preview_image, inputs = PREVIEW_FRAME_SLIDER, outputs = PREVIEW_IMAGE)
|
PREVIEW_FRAME_SLIDER.change(update_preview_image, inputs = PREVIEW_FRAME_SLIDER, outputs = PREVIEW_IMAGE)
|
||||||
multi_component_names : List[ComponentName] =\
|
multi_one_component_names : List[ComponentName] =\
|
||||||
[
|
[
|
||||||
'source_image',
|
'source_image',
|
||||||
'target_image',
|
'target_image',
|
||||||
'target_video'
|
'target_video'
|
||||||
]
|
]
|
||||||
for component_name in multi_component_names:
|
for component_name in multi_one_component_names:
|
||||||
component = get_ui_component(component_name)
|
component = get_ui_component(component_name)
|
||||||
if component:
|
if component:
|
||||||
for method in [ 'upload', 'change', 'clear' ]:
|
for method in [ 'upload', 'change', 'clear' ]:
|
||||||
getattr(component, method)(update_preview_image, inputs = PREVIEW_FRAME_SLIDER, outputs = PREVIEW_IMAGE)
|
getattr(component, method)(update_preview_image, inputs = PREVIEW_FRAME_SLIDER, outputs = PREVIEW_IMAGE)
|
||||||
multi_component_names : List[ComponentName] =\
|
multi_two_component_names : List[ComponentName] =\
|
||||||
[
|
[
|
||||||
'target_image',
|
'target_image',
|
||||||
'target_video'
|
'target_video'
|
||||||
]
|
]
|
||||||
for component_name in multi_component_names:
|
for component_name in multi_two_component_names:
|
||||||
component = get_ui_component(component_name)
|
component = get_ui_component(component_name)
|
||||||
if component:
|
if component:
|
||||||
for method in [ 'upload', 'change', 'clear' ]:
|
for method in [ 'upload', 'change', 'clear' ]:
|
||||||
|
|||||||
Reference in New Issue
Block a user