      return Config(plugin_name, configfile=configfile).config_dict
  
  
  class Adjustment():
      """ Parent class for adjustments """
      def __init__(self, mask_type, output_size, predicted_available, configfile=None, config=None):
          logger.debug("Initializing %s: (arguments: '%s', output_size: %s, "
                       "predicted_available: %s, configfile: %s, config: %s)",
                       self.__class__.__name__, mask_type, output_size, predicted_available,
                       configfile, config)
          self.config = self.set_config(configfile, config)
 
</s> remove                      "predicted_available: %s, configfile: %s, config: %s)",
                     self.__class__.__name__, mask_type, output_size, predicted_available,
                     configfile, config)
        self.config = self.set_config(configfile, config)
 </s> add                      "configfile: %s, config: %s)", self.__class__.__name__, mask_type,
                     output_size, configfile, config)
        self.config = self._set_config(configfile, config) </s> remove         self.mask_type = self.get_mask_type(mask_type, predicted_available)
        self.dummy = np.zeros((output_size, output_size, 3), dtype='float32')

        self.skip = self.config.get("type", None) is None
 </s> add         self.mask_type = mask_type
        self._dummy = np.zeros((output_size, output_size, 3), dtype='float32') </s> remove from lib.model import masks as model_masks
from ._base import Adjustment, BlurMask, logger
 </s> add from ._base import Adjustment, logger </s> remove     """ Swap a source face with a target """
    def __init__(self, output_dir, output_size, output_has_mask,
                 draw_transparent, pre_encode, arguments, configfile=None):
        logger.debug("Initializing %s: (output_dir: '%s', output_size: %s,  output_has_mask: %s, "
                     "draw_transparent: %s, pre_encode: %s, arguments: %s, configfile: %s)",
                     self.__class__.__name__, output_dir, output_size, output_has_mask,
                     draw_transparent, pre_encode, arguments, configfile)
        self.output_dir = output_dir
        self.draw_transparent = draw_transparent
        self.writer_pre_encode = pre_encode
        self.scale = arguments.output_scale / 100
        self.output_size = output_size
        self.output_has_mask = output_has_mask
        self.args = arguments
        self.configfile = configfile
        self.adjustments = dict(box=None, mask=None, color=None, seamless=None, scaling=None)
        self.load_plugins()
 </s> add     """ The converter is responsible for swapping the original face(s) in a frame with the output
    of a trained Faceswap model.

    Parameters
    ----------
    output_size: int
        The size of the face, in pixels, that is output from the Faceswap model
    coverage_ratio: float
        The ratio of the training image that was used for training the Faceswap model
    draw_transparent: bool
        Whether the final output should be drawn onto a transparent layer rather than the original
        frame. Only available with certain writer plugins.
    pre_encode: python function
        Some writer plugins support the pre-encoding of images prior to saving out. As patching is
        done in multiple threads, but writing is done in a single thread, it can speed up the
        process to do any pre-encoding as part of the converter process.
    arguments: :class:`argparse.Namespace`
        The arguments that were passed to the convert process as generated from Faceswap's command
        line arguments
    configfile: str, optional
        Optional location of custom configuration ``ini`` file. If ``None`` then use the default
        config location. Default: ``None``
    """
    def __init__(self, output_size, coverage_ratio, draw_transparent, pre_encode,
                 arguments, configfile=None):
        logger.debug("Initializing %s: (output_size: %s,  coverage_ratio: %s, draw_transparent: "
                     "%s, pre_encode: %s, arguments: %s, configfile: %s)", self.__class__.__name__,
                     output_size, coverage_ratio, draw_transparent, pre_encode, arguments,
                     configfile)
        self._output_size = output_size
        self._coverage_ratio = coverage_ratio
        self._draw_transparent = draw_transparent
        self._writer_pre_encode = pre_encode
        self._args = arguments
        self._configfile = configfile

        self._scale = arguments.output_scale / 100
        self._adjustments = dict(box=None, mask=None, color=None, seamless=None, scaling=None)

        self._load_plugins() </s> remove def get_config(plugin_name, configfile=None):
    """ Return the config for the requested model """
 </s> add def _get_config(plugin_name, configfile=None):
    """ Return the :attr:`lib.config.FaceswapConfig.config_dict` for the requested plugin.

    Parameters
    ----------
    plugin_name: str
        The name of the plugin to retrieve the config for
    configfile: str, optional
        Optional location of custom configuration ``ini`` file. If ``None`` then use the default
        config location. Default: ``None``

    Returns
    -------
    dict
        The configuration in dictionary form for the given plugin_name from
         :attr:`lib.config.FaceswapConfig.config_dict`
    """
    """ Parent class for Mask Adjustment Plugins.

    All mask plugins must inherit from this class.

    Parameters
    ----------
    mask_type: str
        The type of mask that this plugin is being used for
    output_size: int
        The size, in pixels, of the output from the Faceswap model.
    configfile: str, Optional
        Optional location of custom configuration ``ini`` file. If ``None`` then use the default
        config location. Default: ``None``
    config: :class:`lib.config.FaceswapConfig`, Optional
        Optional pre-loaded :class:`lib.config.FaceswapConfig`. If passed, then this will be used
        over any configuration on disk. If ``None`` then it is ignored. Default: ``None``


    Attributes
    ----------
    config: dict
        The configuration dictionary for this plugin.
    mask_type: str
        The type of mask that this plugin is being used for.
    """
    def __init__(self, mask_type, output_size, configfile=None, config=None):
      return Config(plugin_name, configfile=configfile).config_dict
  
  
  class Adjustment():
    """ Parent class for Mask Adjustment Plugins.

    All mask plugins must inherit from this class.

    Parameters
    ----------
    mask_type: str
        The type of mask that this plugin is being used for
    output_size: int
        The size, in pixels, of the output from the Faceswap model.
    configfile: str, Optional
        Optional location of custom configuration ``ini`` file. If ``None`` then use the default
        config location. Default: ``None``
    config: :class:`lib.config.FaceswapConfig`, Optional
        Optional pre-loaded :class:`lib.config.FaceswapConfig`. If passed, then this will be used
        over any configuration on disk. If ``None`` then it is ignored. Default: ``None``


    Attributes
    ----------
    config: dict
        The configuration dictionary for this plugin.
    mask_type: str
        The type of mask that this plugin is being used for.
    """
    def __init__(self, mask_type, output_size, configfile=None, config=None):
    """ Parent class for Mask Adjustment Plugins.

    All mask plugins must inherit from this class.

    Parameters
    ----------
    mask_type: str
        The type of mask that this plugin is being used for
    output_size: int
        The size, in pixels, of the output from the Faceswap model.
    configfile: str, Optional
        Optional location of custom configuration ``ini`` file. If ``None`` then use the default
        config location. Default: ``None``
    config: :class:`lib.config.FaceswapConfig`, Optional
        Optional pre-loaded :class:`lib.config.FaceswapConfig`. If passed, then this will be used
        over any configuration on disk. If ``None`` then it is ignored. Default: ``None``


    Attributes
    ----------
    config: dict
        The configuration dictionary for this plugin.
    mask_type: str
        The type of mask that this plugin is being used for.
    """
    def __init__(self, mask_type, output_size, configfile=None, config=None):
          logger.debug("Initializing %s: (arguments: '%s', output_size: %s, "
                       "predicted_available: %s, configfile: %s, config: %s)",
                       self.__class__.__name__, mask_type, output_size, predicted_available,
                       configfile, config)
          self.config = self.set_config(configfile, config)
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 
plugins/convert/mask/_base.py