          self.tk_vars.running_task.set(False)
          if self.task.command == "train":
              self.tk_vars.is_training.set(False)
              Session.stop_training()
          self.statusbar.stop()
          self.statusbar.message.set(message)
          self.tk_vars.display.set("")
          get_images().delete_preview()
          preview_trigger().clear(trigger_type=None)
          self.command = None
          logger.debug("Terminated Faceswap processes")
          print("Process exited.")
 
</s> remove         self.command = None
 </s> add         self._command = None </s> remove         self.tk_vars.running_task.set(False)
        if self.task.command == "train":
            self.tk_vars.is_training.set(False)
 </s> add         self._tk_vars.running_task.set(False)
        if self._task.command == "train":
            self._tk_vars.is_training.set(False) </s> remove     def terminate(self, message):
        """ Finalize wrapper when process has exited """
 </s> add     def terminate(self, message: str) -> None:
        """ Finalize wrapper when process has exited. Stops the progress bar, sets the status
        message. If the terminating task is 'train', then triggers the training close down actions

        Parameters
        ----------
        message: str
            The message to display in the status bar
        """ </s> remove     """ Control the underlying Faceswap tasks """
    def __init__(self, wrapper):
        logger.debug("Initializing %s", self.__class__.__name__)
        self.wrapper = wrapper
 </s> add     """ Control the underlying Faceswap tasks.

    wrapper: :class:`ProcessWrapper`
        The object responsible for managing this faceswap task
    """
    def __init__(self, wrapper: ProcessWrapper) -> None:
        logger.debug("Initializing %s (wrapper: %s)", self.__class__.__name__, wrapper)
        self._wrapper = wrapper </s> remove         self.tk_vars.running_task.set(True)
        self.tk_vars.console_clear.set(True)
        if self.command == "train":
            self.tk_vars.is_training.set(True)
 </s> add         assert self._command is not None
        self._tk_vars.running_task.set(True)
        self._tk_vars.console_clear.set(True)
        if self._command == "train":
            self._tk_vars.is_training.set(True)
        self._statusbar.stop()
        self._statusbar.message.set(message)
        self._tk_vars.display.set("")
          self.tk_vars.running_task.set(False)
          if self.task.command == "train":
              self.tk_vars.is_training.set(False)
              Session.stop_training()
        self._statusbar.stop()
        self._statusbar.message.set(message)
        self._tk_vars.display.set("")
        self._statusbar.stop()
        self._statusbar.message.set(message)
        self._tk_vars.display.set("")
        self._statusbar.stop()
        self._statusbar.message.set(message)
        self._tk_vars.display.set("")
          get_images().delete_preview()
          preview_trigger().clear(trigger_type=None)
          self.command = None
          logger.debug("Terminated Faceswap processes")
          print("Process exited.")
keep keep keep keep replace replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py