          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:
                  swap_masks[np.where((swap_masks == [1., 1., 1.]).all(axis=3))] = [0., 0., 1.]
              faces[-2:] = [face[..., :-1] for face in faces[-2:]]
              masks3 = [orig_masks, *pred_masks]
          else:
              masks3 = np.repeat(np.expand_dims(orig_masks, axis=0), 3, axis=0)
  
 
</s> remove         orig_masks = np.tile(1 - np.rint(masks), 3)
        orig_masks[np.where((orig_masks == [1., 1., 1.]).all(axis=3))] = [0., 0., 1.]
 </s> add         orig_masks = 1 - np.rint(masks) </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             func = self.config.getint
 </s> add             retval = self.config.getint(section, option) </s> remove             func = self._parse_list
 </s> add             retval = self._parse_list(section, option) </s> remove                 for option, params in conf.defaults[section].items():
                    if option == "helptext":
                        retval[key]["helptext"] = params
                        continue
 </s> add                 retval[key]["helptext"] = conf.defaults[section].helptext
                for option, params in conf.defaults[section].items.items():
            pred_masks = [1 - np.rint(face[..., -1])[..., None] for face in faces[-2:]]
          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 = [1 - np.rint(face[..., -1])[..., None] for face in faces[-2:]]
            pred_masks = [1 - np.rint(face[..., -1])[..., None] for face in faces[-2:]]
            pred_masks = [1 - np.rint(face[..., -1])[..., None] for face in faces[-2:]]
              faces[-2:] = [face[..., :-1] for face in faces[-2:]]
              masks3 = [orig_masks, *pred_masks]
          else:
              masks3 = np.repeat(np.expand_dims(orig_masks, axis=0), 3, axis=0)
  
keep keep keep keep replace 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