          self._scaling = scaling
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def toggle_mask_display(self):
          if not (self._model.config["learn_mask"] or self._model.config["penalized_mask_loss"]):
              return
          display_mask = not self._display_mask
          print("\n")  # Break to not garble loss output
          logger.info("Toggling mask display %s...", "on" if display_mask else "off")
 
</s> remove         self._display_mask = not self._display_mask
 </s> add         display_mask = not self._display_mask
        print("\n")  # Break to not garble loss output
        logger.info("Toggling mask display %s...", "on" if display_mask else "off")
        self._display_mask = display_mask </s> remove         preview_trigger().clear()
 </s> add         preview_trigger().clear(trigger_type=None) </s> remove                     logger.info("Toggle mask display requested")
 </s> add                     logger.verbose("Toggle mask display requested") </s> remove                     self._refresh_preview = True
 </s> add 
        """ Toggle the mask overlay on or off depending on user input. """
          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"]):
              return
          display_mask = not self._display_mask
          print("\n")  # Break to not garble loss output
          logger.info("Toggling mask display %s...", "on" if display_mask else "off")
keep keep keep add keep keep keep keep keep
 Updates
  - Change shortcut key to M
  - Slight optimizations
  - GUI support for mask toggling 
plugins/train/trainer/_base.py