          -------
          list
              List of :class:`numpy.ndarray` faces with the opaque mask layer applied
          """
          orig_masks = np.tile(1 - np.rint(masks), 3)
          orig_masks[np.where((orig_masks == [1., 1., 1.]).all(axis=3))] = [0., 0., 1.]
          masks3: Union[List[np.ndarray], np.ndarray] = []
  
          if faces[-1].shape[-1] == 4:  # Mask contained in alpha channel of predictions
              pred_masks = [np.tile(1 - np.rint(face[..., -1])[..., None], 3) for face in faces[-2:]]
              for swap_masks in pred_masks:
 
</s> remove             pred_masks = [np.tile(1 - np.rint(face[..., -1])[..., None], 3) for face in faces[-2:]]
            for swap_masks in pred_masks:
                swap_masks[np.where((swap_masks == [1., 1., 1.]).all(axis=3))] = [0., 0., 1.]
 </s> add             pred_masks = [1 - np.rint(face[..., -1])[..., None] for face in faces[-2:]] </s> remove         retval = [np.array([cv2.addWeighted(img, 1.0, mask, 0.3, 0)
                            for img, mask in zip(previews, compiled_masks)])
                  for previews, compiled_masks in zip(faces, masks3)]
 </s> add         retval: List[np.ndarray] = []
        alpha = 1.0 - self._mask_opacity
        for previews, compiled_masks in zip(faces, masks3):
            overlays = previews.copy()
            overlays[np.where((compiled_masks == 1.).all(axis=3))] = self._mask_color
            retval.append(np.array([cv2.addWeighted(img, alpha, ovl, self._mask_opacity, 0)
                                    for img, ovl in zip(previews, overlays)]))
 </s> remove     @classmethod
    def _compile_masked(cls, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]:
 </s> add     def _compile_masked(self, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]: </s> remove         if not self._config["penalized_mask_loss"] or int(self._config[f"{area}_multiplier"]) <= 1:
 </s> add         multiplier = self._config[f"{area}_multiplier"]
        assert isinstance(multiplier, int)
        if not self._config["penalized_mask_loss"] or multiplier <= 1: </s> remove                     if params["type"] == list and isinstance(initial_value, list):
 </s> add                     if params.datatype == list and isinstance(initial_value, list):
        orig_masks = 1 - np.rint(masks)
          -------
          list
              List of :class:`numpy.ndarray` faces with the opaque mask layer applied
          """
        orig_masks = 1 - np.rint(masks)
        orig_masks = 1 - np.rint(masks)
          masks3: Union[List[np.ndarray], np.ndarray] = []
  
          if faces[-1].shape[-1] == 4:  # Mask contained in alpha channel of predictions
              pred_masks = [np.tile(1 - np.rint(face[..., -1])[..., None], 3) for face in faces[-2:]]
              for swap_masks in pred_masks:
keep keep keep keep replace replace keep keep keep keep keep
 Preview - Allow mask color/opacity configuration
  - typing: lib.config
  - docs: lib.config
  - bugfix: popup_configure - keep assets on top 
plugins/train/trainer/_base.py