          self._model = model
          self._display_mask = model.config["learn_mask"] or model.config["penalized_mask_loss"]
          self.images = {}
          self._coverage_ratio = coverage_ratio
          self._scaling = scaling
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def toggle_mask_display(self):
          """ Toggle the mask overlay on or off depending on user input. """
          if not (self._model.config["learn_mask"] or self._model.config["penalized_mask_loss"]):
 
</s> remove     def __init__(self, model, coverage_ratio, scaling=1.0):
 </s> add     def __init__(self, model, coverage_ratio): </s> remove             if save_iteration or self._save_now or self._refresh_preview:
 </s> add             if self._preview.should_refresh(): </s> remove         self._toggle_preview_mask: bool = False
        self._refresh_preview: bool = False
        self._preview_buffer: Dict[str, np.ndarray] = {}
        self._lock = Lock()
 </s> add         self._preview = Preview() </s> remove             if self._toggle_preview_mask:
 </s> add             if self._preview.should_toggle_mask(): </s> remove                 self._toggle_preview_mask = False
                self._refresh_preview = True
 </s> add                 self._preview.request_refresh()
          self._model = model
          self._display_mask = model.config["learn_mask"] or model.config["penalized_mask_loss"]
          self.images = {}
          self._coverage_ratio = coverage_ratio

          logger.debug("Initialized %s", self.__class__.__name__)
  
      def toggle_mask_display(self):
          """ Toggle the mask overlay on or off depending on user input. """
          if not (self._model.config["learn_mask"] or self._model.config["penalized_mask_loss"]):
keep keep keep keep replace keep keep keep keep keep
 Live Preview - Replace cv2 with matplotlib viewer 
plugins/train/trainer/_base.py