      new_face = autoencoder.predict(face / 255.0)[0]
      new_face = numpy.clip(new_face * 255, 0, 255).astype(image.dtype)
      new_face = cv2.resize(new_face, (160, 160))
      # Aligner is not ready to use yet
      if use_aligner:
          return aligner.align(image.copy(), new_face)
      else:
          return superpose(image, new_face, crop)
 
</s> remove def convert_one_image(image, model_dir="models", swap_model=False, use_aligner=False):
 </s> add def smooth_mask(img_old,img_new):
    w,h,c = img_new.shape
    crop = slice(0,w)
    mask = numpy.zeros_like(img_new)
    mask[h//15:-h//15,w//15:-w//15,:] = 255
    mask = cv2.GaussianBlur(mask,(15,15),10)
    img_new[crop,crop] = mask/255*img_new + (1-mask/255)*img_old
    if use_avg_color_adjust:
        adjust_avg_color(old_face,new_face)
    if use_smooth_mask:
        smooth_mask(old_face,new_face)

      new_face = autoencoder.predict(face / 255.0)[0]
      new_face = numpy.clip(new_face * 255, 0, 255).astype(image.dtype)
      new_face = cv2.resize(new_face, (160, 160))
    if use_avg_color_adjust:
        adjust_avg_color(old_face,new_face)
    if use_smooth_mask:
        smooth_mask(old_face,new_face)

      # Aligner is not ready to use yet
      if use_aligner:
          return aligner.align(image.copy(), new_face)
      else:
          return superpose(image, new_face, crop)
keep keep add keep keep keep keep keep
 Adjust color average and smooth mask (#31) 
lib/faces_process.py