          with self._lock:
              self._refresh = True
  
      def request_mask_toggle(self) -> None:
          """ Handle a GUI trigger request to set the Set the :attr:`_toggle_mask` to ``True`` to
          request a mask toggle on next pass of the training loop. """
          logger.verbose("Toggle mask display requested...")  # type:ignore
          with self._lock:
              self._toggle_mask = True
  
 
</s> remove             self._refresh = True
 </s> add             self._triggers["refresh"] = True </s> remove             self._toggle_mask = True
 </s> add             self._triggers["toggle_mask"] = True </s> remove         the :attr:`_refresh` to ``True`` to request a refresh on the next pass of the
 </s> add         the refresh trigger to ``True`` to request a refresh on the next pass of the </s> remove             setattr(self, self._callbacks[key], True)
 </s> add             if key == "f":
                self._toggle_size()
            else:
                self._triggers[self._callbacks[key]] = True </s> remove                 self._refresh = False
 </s> add                 self._triggers["refresh"] = False
        """ Handle a GUI trigger request to set the mask toggle to ``True`` to
          with self._lock:
              self._refresh = True
  
      def request_mask_toggle(self) -> None:
        """ Handle a GUI trigger request to set the mask toggle to ``True`` to
          request a mask toggle on next pass of the training loop. """
          logger.verbose("Toggle mask display requested...")  # type:ignore
          with self._lock:
              self._toggle_mask = True
  
keep keep keep keep replace keep keep keep keep keep
 bugfix: Update preview screen in GUI 
scripts/train.py