              thread.check_and_raise_error()
  
  
  class DiskIO():
      """ Background threads to:
              Load images from disk and get the detected faces
              Save images back to disk """
      def __init__(self, alignments, images, arguments):
          logger.debug("Initializing %s: (alignments: %s, images: %s, arguments: %s)",
                       self.__class__.__name__, alignments, images, arguments)
          self.alignments = alignments
          self.images = images
 
</s> remove         self.alignments = alignments
        self.images = images
        self.args = arguments
        self.pre_process = PostProcess(arguments)
        self.completion_event = Event()
 </s> add         self._alignments = alignments
        self._images = images
        self._args = arguments
        self._pre_process = PostProcess(arguments)
        self._completion_event = Event() </s> remove     """ Predict faces from incoming queue """
 </s> add     """ Obtains the output from the Faceswap model.

    Parameters
    ----------
    in_queue: :class:`queue.Queue`
        The queue that contains images and detected faces for feeding the model
    queue_size: int
        The maximum size of the input queue
    arguments: :class:`argparse.Namespace`
        The arguments that were passed to the convert process as generated from Faceswap's command
        line arguments
    """ </s> remove     def check_thread_error(self):
        """ Check and raise thread errors """
        for thread in (self.predictor.thread,
                       self.disk_io.load_thread,
                       self.disk_io.save_thread,
                       self.patch_threads):
 </s> add     def _check_thread_error(self):
        """ Monitor all running threads for errors, and raise accordingly. """
        for thread in (self._predictor.thread,
                       self._disk_io.load_thread,
                       self._disk_io.save_thread,
                       self._patch_threads): </s> remove         self.size = size
        self.display_dims = (1, 1)
        self.tk_vars = tk_vars
        self.padding = padding
 </s> add         self._size = size
        self._display_dims = (1, 1)
        self._tk_vars = tk_vars
        self._padding = padding

        self._faces = dict()
        self._faces_source = None
        self._faces_dest = None
        self._tk_image = None </s> remove         self.faces = dict()
        self.faces_source = None
        self.faces_dest = None
        self.tk_image = None
 </s> add 
    """ Disk Input/Output for the converter process.

    Background threads to:
        * Load images from disk and get the detected faces
        * Save images back to disk

    Parameters
    ----------
    alignments: :class:`lib.alignmnents.Alignments`
        The alignments for the input video
    images: :class:`scripts.fsmedia.Images`
        The input images
    arguments: :class:`argparse.Namespace`
        The arguments that were passed to the convert process as generated from Faceswap's command
        line arguments
    """

              thread.check_and_raise_error()
  
  
  class DiskIO():
    """ Disk Input/Output for the converter process.

    Background threads to:
        * Load images from disk and get the detected faces
        * Save images back to disk

    Parameters
    ----------
    alignments: :class:`lib.alignmnents.Alignments`
        The alignments for the input video
    images: :class:`scripts.fsmedia.Images`
        The input images
    arguments: :class:`argparse.Namespace`
        The arguments that were passed to the convert process as generated from Faceswap's command
        line arguments
    """

    """ Disk Input/Output for the converter process.

    Background threads to:
        * Load images from disk and get the detected faces
        * Save images back to disk

    Parameters
    ----------
    alignments: :class:`lib.alignmnents.Alignments`
        The alignments for the input video
    images: :class:`scripts.fsmedia.Images`
        The input images
    arguments: :class:`argparse.Namespace`
        The arguments that were passed to the convert process as generated from Faceswap's command
        line arguments
    """

    """ Disk Input/Output for the converter process.

    Background threads to:
        * Load images from disk and get the detected faces
        * Save images back to disk

    Parameters
    ----------
    alignments: :class:`lib.alignmnents.Alignments`
        The alignments for the input video
    images: :class:`scripts.fsmedia.Images`
        The input images
    arguments: :class:`argparse.Namespace`
        The arguments that were passed to the convert process as generated from Faceswap's command
        line arguments
    """

      def __init__(self, alignments, images, arguments):
          logger.debug("Initializing %s: (alignments: %s, images: %s, arguments: %s)",
                       self.__class__.__name__, alignments, images, arguments)
          self.alignments = alignments
          self.images = images
keep keep keep keep 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 
scripts/convert.py