              # Clear trigger so calling process can set it during this run
              trigger_event.clear()
              tk_vars["busy"].set(True)
              queue_manager.flush_queue("preview_patch_in")
              self.feed_swapped_faces(patch_queue_in, samples)
              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)
  
      def update_converter_arguments(self):
          """ Update the converter arguments """
 
</s> remove     def update_converter_arguments(self):
        """ Update the converter arguments """
 </s> add     def _update_converter_arguments(self):
        """ Update the converter arguments to the currently selected values. """ </s> remove         self.tk_vars["busy"].set(True)
        self.config_tools.update_config()
        with self.lock:
            self.patch.converter_arguments = self.cli_frame.convert_args
            self.patch.current_config = self.config_tools.config
        self.patch.trigger.set()
 </s> add         self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set() </s> remove     def refresh(self, *args):
        """ Refresh the display """
 </s> add     def _refresh(self, *args):
        """ Load new faces to display in preview.

        Parameters
        ----------
        *args: tuple
            Unused, but required for tkinter callback.
        """ </s> remove     def feed_swapped_faces(patch_queue_in, samples):
        """ Feed swapped faces to the converter and trigger a run """
 </s> add     def _feed_swapped_faces(patch_queue_in, samples):
        """ Feed swapped faces to the converter's in-queue.

        Parameters
        ----------
        patch_queue_in: :class:`queue.Queue`
            The input queue for the patching process
        samples: :class:`Samples`
            The Samples for display.
        """ </s> remove             setattr(self.converter.args, key, val)
 </s> add             setattr(self._converter.cli_arguments, key, val)
            self._feed_swapped_faces(patch_queue_in, samples)
            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
              # Clear trigger so calling process can set it during this run
              trigger_event.clear()
              tk_vars["busy"].set(True)
              queue_manager.flush_queue("preview_patch_in")
            self._feed_swapped_faces(patch_queue_in, samples)
            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
            self._feed_swapped_faces(patch_queue_in, samples)
            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
            self._feed_swapped_faces(patch_queue_in, samples)
            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
            self._feed_swapped_faces(patch_queue_in, samples)
            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
            self._feed_swapped_faces(patch_queue_in, samples)
            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
            self._feed_swapped_faces(patch_queue_in, samples)
            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
            self._feed_swapped_faces(patch_queue_in, samples)
            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)
  
      def update_converter_arguments(self):
          """ Update the converter arguments """
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Smart Masks to Convert (#957)

- scripts.convert - Use Smart Masks for Convert
    * Make on-the-fly conversion an explicit option

- Move BlurMask to lib.faces_detect

- tools.preview - Fix for smart masks
    * Subclass from tk.Tk
    * Options to lib.gui.control_helper
    *variable cleanup

- lib.logger - Demote more tensorflow deprecation messages

- Documentation:
    * lib.faces_detect.BlurMask
    * plugins.convert.mask
    * lib.convert
    * scripts.convert
    * scripts.fsmedia
    * tools.preview 
tools/preview.py