                       detected_face, sub_crop_offset, centering, predicted_mask is not None)
          mask = self._get_mask(detected_face, predicted_mask, centering, sub_crop_offset)
          raw_mask = mask.copy()
  
          if self._config.get("type") is not None and self._do_erode:
              mask = self._erode(mask)
          logger.trace(  # type: ignore
              "mask shape: %s, raw_mask shape: %s", mask.shape, raw_mask.shape)
  
          if self._mask_type != "none":
              mask *= self._box
  
          return mask, raw_mask
  
 
</s> remove             mask = predicted_mask
 </s> add             mask = self._process_predicted_mask(predicted_mask) </s> remove         box = BlurMask(self._config["type"],
                       box, self._config["kernel_size"],
                       self._config["passes"]).blurred
 </s> add         if self._config["type"] is not None:
            box = BlurMask("gaussian",
                           box,
                           6,
                           is_ratio=True).blurred </s> remove         self._thread = MultiThread(self._process,
                                   self._trigger,
                                   self._shutdown,
                                   self._queue_patch_in,
                                   self._samples,
                                   tk_vars,
                                   thread_count=1,
                                   name="patch_thread")
 </s> add         self._thread = Thread(target=self._process,
                              name="patch_thread",
                              args=(self._trigger,
                                    self._shutdown,
                                    self._queue_patch_in,
                                    self._samples,
                                    tk_vars),
                              daemon=True)
                       detected_face, sub_crop_offset, centering, predicted_mask is not None)
          mask = self._get_mask(detected_face, predicted_mask, centering, sub_crop_offset)
          raw_mask = mask.copy()
  





          if self._mask_type != "none":
              mask *= self._box
  
          return mask, raw_mask
  
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Preview Tool fixes
  - Prevent errors from getting swallowed
  - Correctly handle None mask type
  - Consistent box blending 
plugins/convert/mask/mask_blend.py