          """ Return whether this model has a predicted mask """
          return bool(self.model.state.config.get("learn_mask", False))
  
      @staticmethod
      def get_batchsize(queue_size):
          """ Get the batchsize """
          logger.debug("Getting batchsize")
          is_cpu = GPUStats().device_count == 0
          batchsize = 1 if is_cpu else 16
          batchsize = min(queue_size, batchsize)
          logger.debug("Batchsize: %s", batchsize)
 
</s> remove     def has_predicted_mask(self):
        """ Return whether this model has a predicted mask """
        return bool(self.model.state.config.get("learn_mask", False))
 </s> add     def _input_mask(self):
        """ :class:`numpy.ndarray`: A dummy mask for inputting to the model. """
        mask = np.zeros((1, ) + self._model.state.mask_shapes[0], dtype="float32")
        return mask </s> remove     def input_mask(self):
        """ Return the input mask """
        mask = np.zeros((1, ) + self.model.state.mask_shapes[0], dtype="float32")
        return mask
 </s> add     def _input_size(self):
        """ int: The size in pixels of the Faceswap model input. """
        return self._model.input_shape[0] </s> remove     def set_tf_allow_growth():
        """ Allow TensorFlow to manage VRAM growth """
 </s> add     def _set_tf_allow_growth():
        """ Enables the TensorFlow configuration option "allow_growth".

        TODO Move this temporary fix somewhere more appropriate
        """ </s> remove     def get_mask(self, detected_face, predicted_mask):
        """ Return the mask from lib/model/masks and intersect with box """
 </s> add         Parameters
        ----------
        detected_face: :class:`lib.faces_detect.DetectedFace`
            The DetectedFace object as returned from :class:`scripts.convert.Predictor`.
        predicted_mask: :class:`numpy.ndarray`
            The predicted mask as output from the Faceswap Model if the model was trained
            with a mask, otherwise ``None``

        Returns
        -------
        :class:`numpy.ndarray`
            The mask sized to Faceswap model output with any requested blurring applied.
        """ </s> remove         if blur_kernel == 0 or blur_kernel % 2 == 1:
            self._blur_kernel = blur_kernel
        else:
            self._blur_kernel = blur_kernel + 1
 </s> add         if blur_type is not None:
            blur_kernel += 0 if blur_kernel == 0 or blur_kernel % 2 == 1 else 1
            self._blur["kernel"] = blur_kernel
            self._blur["type"] = blur_type
            self._blur["passes"] = blur_passes
    def _get_batchsize(queue_size):
        """ Get the batch size for feeding the model.

        Sets the batch size to 1 if inference is being run on CPU, otherwise the minimum of the
        :attr:`self._queue_size` and 16.

        Returns
        -------
        int
            The batch size that the model is to be fed at.
        """
          """ Return whether this model has a predicted mask """
          return bool(self.model.state.config.get("learn_mask", False))
  
      @staticmethod
    def _get_batchsize(queue_size):
        """ Get the batch size for feeding the model.

        Sets the batch size to 1 if inference is being run on CPU, otherwise the minimum of the
        :attr:`self._queue_size` and 16.

        Returns
        -------
        int
            The batch size that the model is to be fed at.
        """
    def _get_batchsize(queue_size):
        """ Get the batch size for feeding the model.

        Sets the batch size to 1 if inference is being run on CPU, otherwise the minimum of the
        :attr:`self._queue_size` and 16.

        Returns
        -------
        int
            The batch size that the model is to be fed at.
        """
          logger.debug("Getting batchsize")
          is_cpu = GPUStats().device_count == 0
          batchsize = 1 if is_cpu else 16
          batchsize = min(queue_size, batchsize)
          logger.debug("Batchsize: %s", batchsize)
keep keep keep keep 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