      """ Predict faces from incoming queue """
      def __init__(self, in_queue, queue_size, arguments):
          logger.debug("Initializing %s: (args: %s, queue_size: %s, in_queue: %s)",
                       self.__class__.__name__, arguments, queue_size, in_queue)
          self.batchsize = self.get_batchsize(queue_size)
          self.args = arguments
          self.in_queue = in_queue
          self.out_queue = queue_manager.get_queue("patch")
          self.serializer = get_serializer("json")
          self.faces_count = 0
          self.verify_output = False
  
          if arguments.allow_growth:
              self.set_tf_allow_growth()
  
          self.model = self.load_model()
 
</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             self.set_tf_allow_growth()
 </s> add             self._set_tf_allow_growth()

        self._model = self._load_model()
        self._output_indices = {"face": self._model.largest_face_index,
                                "mask": self._model.largest_mask_index}
        self._predictor = self._model.converter(self._args.swap_model)
        self._thread = self._launch_predictor()
        logger.debug("Initialized %s: (out_queue: %s)", self.__class__.__name__, self._out_queue) </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         self.model = self.load_model()
        self.output_indices = {"face": self.model.largest_face_index,
                               "mask": self.model.largest_mask_index}
        self.predictor = self.model.converter(self.args.swap_model)
        self.queues = dict()
 </s> add     @property
    def thread(self):
        """ :class:`~lib.multithreading.MultiThread`: The thread that is running the prediction
        function from the Faceswap model. """
        return self._thread

    @property
    def in_queue(self):
        """ :class:`queue.Queue`: The input queue to the predictor. """
        return self._in_queue

    @property
    def out_queue(self):
        """ :class:`queue.Queue`: The output queue from the predictor. """
        return self._out_queue

    @property
    def faces_count(self):
        """ int: The total number of faces seen by the Predictor. """
        return self._faces_count </s> remove         self.args = arguments
        self.is_extract = is_extract
        folder, filename = self.set_folder_filename(input_is_video)
        super().__init__(folder,
                         filename=filename)
 </s> add         self._args = arguments
        self._is_extract = is_extract
        folder, filename = self._set_folder_filename(input_is_video)
        super().__init__(folder, filename=filename)
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
      """ Predict faces from incoming queue """
      def __init__(self, in_queue, queue_size, arguments):
          logger.debug("Initializing %s: (args: %s, queue_size: %s, in_queue: %s)",
                       self.__class__.__name__, arguments, queue_size, in_queue)
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
        self._batchsize = self._get_batchsize(queue_size)
        self._args = arguments
        self._in_queue = in_queue
        self._out_queue = queue_manager.get_queue("patch")
        self._serializer = get_serializer("json")
        self._faces_count = 0
        self._verify_output = False
  
          if arguments.allow_growth:
              self.set_tf_allow_growth()
  
          self.model = self.load_model()
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 
scripts/convert.py