              with self._lock:
                  self._update_converter_arguments()
                  self._converter.reinitialize(config=self.current_config)
              swapped = self._patch_faces(patch_queue_in, patch_queue_out, samples.sample_size)
              with self._lock:
                  self._display.destination = swapped
              tk_vars["refresh"].set(True)
              tk_vars["busy"].set(False)
  
          logger.debug("Closed patch process thread")
  
      def _update_converter_arguments(self) -> None:
          """ Update the converter arguments to the currently selected values. """
 
</s> remove                 self._converter.reinitialize(config=self.current_config)
 </s> add                 self._converter.reinitialize(config=self._app.config_tools.config) </s> remove             with self._lock:
 </s> add             with self._app.lock: </s> remove             self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        logger.trace("Refreshed swapped faces")  # type: ignore
 </s> add         self._dispatcher.set_needs_patch()
        logger.debug("Patched swapped faces") </s> remove             # Clear trigger so calling process can set it during this run
            trigger_event.clear()
 </s> add             logger.debug("Patch Triggered") </s> remove     current_config::class:`lib.config.FaceswapConfig`
        The currently set configuration for the patch queue
 </s> add 
            with self._app.lock:
                self._app.display.destination = swapped

            logger.debug("Patch complete")
            trigger_event.clear()
              with self._lock:
                  self._update_converter_arguments()
                  self._converter.reinitialize(config=self.current_config)
              swapped = self._patch_faces(patch_queue_in, patch_queue_out, samples.sample_size)
            with self._app.lock:
                self._app.display.destination = swapped

            logger.debug("Patch complete")
            trigger_event.clear()
            with self._app.lock:
                self._app.display.destination = swapped

            logger.debug("Patch complete")
            trigger_event.clear()
            with self._app.lock:
                self._app.display.destination = swapped

            logger.debug("Patch complete")
            trigger_event.clear()
            with self._app.lock:
                self._app.display.destination = swapped

            logger.debug("Patch complete")
            trigger_event.clear()
  
          logger.debug("Closed patch process thread")
  
      def _update_converter_arguments(self) -> None:
          """ Update the converter arguments to the currently selected values. """
keep keep keep keep replace replace replace replace keep keep keep keep keep
 bugfix:
    - preview tool - Prevent tkinter variables from exiting main thread
refactor:
    - preview tool - Split module to smaller sub-modules + docs, locales
Typing:
    - tools.preview.cli
Unit test:
    - tools.preview.viewer 
tools/preview/preview.py