mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2024-03-22 13:10:55 +08:00
fix
This commit is contained in:
parent
5a40f537cc
commit
c963703395
|
@ -135,6 +135,7 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
|
|||
|
||||
wrk_face_mask_a = wrk_face_mask_a_0[...,None]
|
||||
|
||||
out_img = None
|
||||
out_merging_mask_a = None
|
||||
if cfg.mode == 'original':
|
||||
return img_bgr, img_face_mask_a
|
||||
|
@ -307,11 +308,11 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
|
|||
else:
|
||||
alpha = cfg.color_degrade_power / 100.0
|
||||
out_img = (out_img*(1.0-alpha) + out_img_reduced*alpha)
|
||||
else:
|
||||
out_img = img_bgr.copy()
|
||||
|
||||
out_merging_mask_a = img_face_mask_a
|
||||
|
||||
if out_img is None:
|
||||
out_img = img_bgr.copy()
|
||||
|
||||
return out_img, out_merging_mask_a
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user