          self._training_session_location = {}
          self.task = FaceswapControl(self)
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def set_callbacks(self):
          """ Set the tkinter variable callbacks """
          logger.debug("Setting tk variable traces")
          self.tk_vars.action_command.trace("w", self.action_command)
          self.tk_vars.generate_command.trace("w", self.generate_command)
  
      def action_command(self, *args):
 
</s> remove         self.tk_vars = get_config().tk_vars
        self.set_callbacks()
        self.pathscript = os.path.realpath(os.path.dirname(sys.argv[0]))
        self.command = None
        self.statusbar = get_config().statusbar
        self._training_session_location = {}
        self.task = FaceswapControl(self)
 </s> add         self._tk_vars = get_config().tk_vars
        self._set_callbacks()
        self._command: str | None = None
        """ str | None: The currently executing command, when process running or ``None`` """

        self._statusbar = get_config().statusbar
        self._training_session_location: dict[T.Literal["model_name", "model_folder"], str] = {}
        self._task = FaceswapControl(self) </s> remove         self.tk_vars.action_command.trace("w", self.action_command)
        self.tk_vars.generate_command.trace("w", self.generate_command)
 </s> add         self._tk_vars.action_command.trace("w", self._action_command)
        self._tk_vars.generate_command.trace("w", self._generate_command)

    def _action_command(self, *args: tuple[str, str, str]):  # pylint:disable=unused-argument
        """ Callback for when the Action button is pressed. Process command line options and
        launches the action </s> remove     def action_command(self, *args):
        """ The action to perform when the action button is pressed """
        if not self.tk_vars.action_command.get():
 </s> add         Parameters
        ----------
        args:
            tuple[str, str, str]
                Tkinter variable callback args. Required but unused
        """
        if not self._tk_vars.action_command.get(): </s> remove         category, command = self.tk_vars.action_command.get().split(",")
 </s> add         category, command = self._tk_vars.action_command.get().split(",") </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
        """
    @property
    def task(self) -> FaceswapControl:
        """ :class:`FaceswapControl`: The object that controls the underlying faceswap process """
        return self._task

    def _set_callbacks(self) -> None:
        """ Set the tkinter variable callbacks for performing an action or generating a command """
          self._training_session_location = {}
          self.task = FaceswapControl(self)
          logger.debug("Initialized %s", self.__class__.__name__)
  
    @property
    def task(self) -> FaceswapControl:
        """ :class:`FaceswapControl`: The object that controls the underlying faceswap process """
        return self._task

    def _set_callbacks(self) -> None:
        """ Set the tkinter variable callbacks for performing an action or generating a command """
    @property
    def task(self) -> FaceswapControl:
        """ :class:`FaceswapControl`: The object that controls the underlying faceswap process """
        return self._task

    def _set_callbacks(self) -> None:
        """ Set the tkinter variable callbacks for performing an action or generating a command """
          logger.debug("Setting tk variable traces")
          self.tk_vars.action_command.trace("w", self.action_command)
          self.tk_vars.generate_command.trace("w", self.generate_command)
  
      def action_command(self, *args):
keep keep keep keep replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py