few comments for the future

pull/212/head
Alexey Borsky 2023-05-27 07:20:40 +03:00
parent ba3c17ef7e
commit 89ba89d949
2 changed files with 3 additions and 0 deletions

View File

@ -200,4 +200,6 @@ def start_process(*args):
warped_styled_frame_ = gr.Image.update() warped_styled_frame_ = gr.Image.update()
processed_frame = gr.Image.update() processed_frame = gr.Image.update()
# print('TOTAL TIME:', int(time.time() - processing_start_time))
yield 'done', curr_frame, occlusion_mask, warped_styled_frame_, processed_frame, output_video_name, gr.Button.update(interactive=True), gr.Button.update(interactive=False) yield 'done', curr_frame, occlusion_mask, warped_styled_frame_, processed_frame, output_video_name, gr.Button.update(interactive=True), gr.Button.update(interactive=False)

View File

@ -189,6 +189,7 @@ def start_process(*args):
alpha_mask = alpha_mask + sdcn_anim_tmp.prev_frame_alpha_mask * 0.5 alpha_mask = alpha_mask + sdcn_anim_tmp.prev_frame_alpha_mask * 0.5
sdcn_anim_tmp.prev_frame_alpha_mask = alpha_mask sdcn_anim_tmp.prev_frame_alpha_mask = alpha_mask
# alpha_mask = np.round(alpha_mask * 8) / 8 #> 0.3
alpha_mask = np.clip(alpha_mask, 0, 1) alpha_mask = np.clip(alpha_mask, 0, 1)
occlusion_mask = np.clip(alpha_mask * 255, 0, 255).astype(np.uint8) occlusion_mask = np.clip(alpha_mask * 255, 0, 255).astype(np.uint8)