              new_face[:, :, -1] = np.minimum(new_face[:, :, -1], mask.squeeze())
          else:
              logger.trace("Adding mask to alpha channel")
              new_face = np.concatenate((new_face, mask), -1)
          new_face = np.clip(new_face, 0.0, 1.0)
          logger.trace("Got mask. Image shape: %s", new_face.shape)
          return new_face, raw_mask
  
      def post_warp_adjustments(self, predicted, new_image):
          """ Apply fixes to the image after warping """
 
</s> remove     def post_warp_adjustments(self, predicted, new_image):
 </s> add     def post_warp_adjustments(self, background, new_image): </s> remove         placeholder = predicted["image"] / 255.0
        placeholder = np.concatenate((placeholder,
                                      np.zeros((frame_size[1], frame_size[0], 1))),
                                     axis=-1).astype("float32")
 </s> add         placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background
 </s> remove             mask = np.repeat(new_image[:, :, -1][:, :, np.newaxis], 3, axis=-1)
            foreground = new_image[:, :, :3]
            background = (predicted["image"][:, :, :3] / 255.0) * (1.0 - mask)

 </s> add             foreground, mask = np.split(new_image, (3, ), axis=-1) </s> remove         return placeholder
 </s> add         return placeholder, background </s> remove             frame = foreground + background

 </s> add             background *= (1.0 - mask)
            background += foreground
            frame = background
        np.clip(new_face, 0.0, 1.0, out=new_face)
              new_face[:, :, -1] = np.minimum(new_face[:, :, -1], mask.squeeze())
          else:
              logger.trace("Adding mask to alpha channel")
              new_face = np.concatenate((new_face, mask), -1)
        np.clip(new_face, 0.0, 1.0, out=new_face)
          logger.trace("Got mask. Image shape: %s", new_face.shape)
          return new_face, raw_mask
  
      def post_warp_adjustments(self, predicted, new_image):
          """ Apply fixes to the image after warping """
keep keep keep keep replace keep keep keep keep keep
 Optimized numpy functions in Converter (#838) 
lib/convert.py