  
      def prepare(self, category):
          """ Prepare the environment for execution """
          logger.debug("Preparing for execution")
          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)
          print("Loading...")
  
          self.statusbar.message.set(f"Executing - {self.command}.py")
          mode = "indeterminate" if self.command in ("effmpeg", "train") else "determinate"
          self.statusbar.start(mode)
 
</s> remove         self.statusbar.message.set(f"Executing - {self.command}.py")
        mode = "indeterminate" if self.command in ("effmpeg", "train") else "determinate"
        self.statusbar.start(mode)
 </s> add         self._statusbar.message.set(f"Executing - {self._command}.py")
        mode = "indeterminate" if self._command in ("effmpeg", "train") else "determinate"
        self._statusbar.start(mode) </s> remove         args = self.build_args(category)
        self.tk_vars.display.set(self.command)
 </s> add         args = self._build_args(category)
        self._tk_vars.display.set(self._command) </s> remove         category, command = self.tk_vars.generate_command.get().split(",")
        args = self.build_args(category, command=command, generate=True)
        self.tk_vars.console_clear.set(True)
        logger.debug(" ".join(args))
        print(" ".join(args))
        self.tk_vars.generate_command.set("")

    def prepare(self, category):
        """ Prepare the environment for execution """
 </s> add         category, command = self._tk_vars.generate_command.get().split(",")
        fs_args = self._build_args(category, command=command, generate=True)
        self._tk_vars.console_clear.set(True)
        logger.debug(" ".join(fs_args))
        print(" ".join(fs_args))
        self._tk_vars.generate_command.set("")

    def _prepare(self, category: T.Literal["faceswap", "tools"]) -> list[str]:
        """ Prepare the environment for execution, Sets the 'running task' and 'console clear'
        global tkinter variables. If training, sets the 'is training' variable

        Parameters
        ----------
        category: str, ["faceswap", "tools"]
            The script that is executing the command

        Returns
        -------
        list[str]
            The command line arguments to execute for the faceswap job
        """ </s> remove         command = self.command if not command else command
 </s> add         command = self._command if not command else command
        assert command is not None </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:
        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)
  
      def prepare(self, category):
          """ Prepare the environment for execution """
          logger.debug("Preparing for execution")
        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)
        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)
        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)
        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)
          print("Loading...")
  
          self.statusbar.message.set(f"Executing - {self.command}.py")
          mode = "indeterminate" if self.command in ("effmpeg", "train") else "determinate"
          self.statusbar.start(mode)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py