          if cli_option[0] == "-m":
              self._training_session_location["model_folder"] = cli_option[1]
              logger.debug("model_folder: '%s'", self._training_session_location["model_folder"])
  
      def terminate(self, message):
          """ Finalize wrapper when process has exited """
          logger.debug("Terminating Faceswap processes")
          self.tk_vars.running_task.set(False)
          if self.task.command == "train":
              self.tk_vars.is_training.set(False)
              Session.stop_training()
 
</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         self.statusbar.stop()
        self.statusbar.message.set(message)
        self.tk_vars.display.set("")
 </s> add         self._statusbar.stop()
        self._statusbar.message.set(message)
        self._tk_vars.display.set("") </s> remove     def terminate(self):
        """ Terminate the running process in a LongRunningTask so we can still
            output to console """
        if self.thread is None:
 </s> add     def terminate(self) -> None:
        """ Terminate the running process in a LongRunningTask so console can still be updated
        console """
        if self._thread is None: </s> remove             self.thread = LongRunningTask(target=self.terminate_in_thread,
                                          args=(self.command, self.process))
            if self.command == "train":
                self.wrapper.tk_vars.is_training.set(False)
            self.thread.start()
            self.config.root.after(1000, self.terminate)
        elif not self.thread.complete.is_set():
 </s> add             self._thread = LongRunningTask(target=self._terminate_in_thread,
                                           args=(self._command, self._process))
            if self._command == "train":
                get_config().tk_vars.is_training.set(False)
            self._thread.start()
            self._config.root.after(1000, self.terminate)
        elif not self._thread.complete.is_set(): </s> remove     def terminate_in_thread(self, command, process):
        """ Terminate the subprocess """
 </s> add         Parameters
        ----------
        command: str
            The command that is running

        process: :class:`subprocess.Popen`
            The running process

        Returns
        -------
        bool
            ``True`` when this function exits
        """
    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
        """
          if cli_option[0] == "-m":
              self._training_session_location["model_folder"] = cli_option[1]
              logger.debug("model_folder: '%s'", self._training_session_location["model_folder"])
  
    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
        """
    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
        """
          logger.debug("Terminating Faceswap processes")
          self.tk_vars.running_task.set(False)
          if self.task.command == "train":
              self.tk_vars.is_training.set(False)
              Session.stop_training()
keep keep keep keep replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py