  
      def toggle_mask_display(self):
          if not (self._model.config["learn_mask"] or self._model.config["penalized_mask_loss"]):
              return
          self._display_mask = not self._display_mask
  
      def show_sample(self):
          """ Compile a preview image.
  
          Returns
 
</s> remove         logger.info("Flipping mask display")
 </s> add         """ Toggle the mask overlay on or off based on user input. """ </s> remove     """ Set the global preview trigger if it has not always been set and return.
 </s> add     """ Set the global preview trigger if it has not already been set and return. </s> remove     """ Trigger to indicate to underlying Faceswap process that the preview image should
 </s> add     """ Triggers to indicate to underlying Faceswap process that the preview image should
        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
  
      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")
        self._display_mask = display_mask
  
      def show_sample(self):
          """ Compile a preview image.
  
          Returns
keep keep keep keep replace keep keep keep keep keep
 Updates
  - Change shortcut key to M
  - Slight optimizations
  - GUI support for mask toggling 
plugins/train/trainer/_base.py