  
          self.skip = self.config.get("type", None) is None
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def set_config(self, configfile, config):
          """ Set the config to either global config or passed in config """
          section = ".".join(self.__module__.split(".")[-2:])
          if config is None:
              retval = get_config(section, configfile=configfile)
          else:
              config.section = section
 
</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         for section in self.config.config.sections():
            if section == "writer":
 </s> add         for section in self._config.config.sections():
            if section.startswith("writer."): </s> remove         self.config = Config(None)
        self.config_dicts = self.get_config_dicts()  # Holds currently saved config
 </s> add         self._config = Config(None) </s> remove                     self.config.config[section][item] = new_value

    def get_config_dicts(self):
        """ Hold a custom config dict for the config """
 </s> add                     self._config.config[section][item] = new_value

    def _get_config_dicts(self):
        """ Obtain a custom configuration dictionary for convert configuration items in use
        by the preview tool formatted for control helper.

        Returns
        -------
        dict
            Each configuration section as keys, with the values as a dict of option:
            :class:`lib.gui.control_helper.ControlOption` pairs. """
        logger.debug("Formatting Config for GUI") </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)
    @property
    def dummy(self):
        """:class:`numpy.ndarray`: A dummy mask of all zeros of the shape:
        (:attr:`output_size`, :attr:`output_size`, `3`)
        """
        return self._dummy

    @property
    def skip(self):
        """bool: ``True`` if the blur type config attribute is ``None`` otherwise ``False`` """
        return self.config.get("type", None) is None

    def _set_config(self, configfile, config):
        """ Set the correct configuration for the plugin based on whether a config file
        or pre-loaded config has been passed in.

        Parameters
        ----------
        configfile: str
            Location of custom configuration ``ini`` file. If ``None`` then use the
            default config location
        config: :class:`lib.config.FaceswapConfig`
            Pre-loaded :class:`lib.config.FaceswapConfig`. If passed, then this will be
            used over any configuration on disk. If ``None`` then it is ignored.

        Returns
        -------
        dict
            The configuration in dictionary form for the given from
            :attr:`lib.config.FaceswapConfig.config_dict`
        """
  
          self.skip = self.config.get("type", None) is None
          logger.debug("Initialized %s", self.__class__.__name__)
  
    @property
    def dummy(self):
        """:class:`numpy.ndarray`: A dummy mask of all zeros of the shape:
        (:attr:`output_size`, :attr:`output_size`, `3`)
        """
        return self._dummy

    @property
    def skip(self):
        """bool: ``True`` if the blur type config attribute is ``None`` otherwise ``False`` """
        return self.config.get("type", None) is None

    def _set_config(self, configfile, config):
        """ Set the correct configuration for the plugin based on whether a config file
        or pre-loaded config has been passed in.

        Parameters
        ----------
        configfile: str
            Location of custom configuration ``ini`` file. If ``None`` then use the
            default config location
        config: :class:`lib.config.FaceswapConfig`
            Pre-loaded :class:`lib.config.FaceswapConfig`. If passed, then this will be
            used over any configuration on disk. If ``None`` then it is ignored.

        Returns
        -------
        dict
            The configuration in dictionary form for the given from
            :attr:`lib.config.FaceswapConfig.config_dict`
        """
    @property
    def dummy(self):
        """:class:`numpy.ndarray`: A dummy mask of all zeros of the shape:
        (:attr:`output_size`, :attr:`output_size`, `3`)
        """
        return self._dummy

    @property
    def skip(self):
        """bool: ``True`` if the blur type config attribute is ``None`` otherwise ``False`` """
        return self.config.get("type", None) is None

    def _set_config(self, configfile, config):
        """ Set the correct configuration for the plugin based on whether a config file
        or pre-loaded config has been passed in.

        Parameters
        ----------
        configfile: str
            Location of custom configuration ``ini`` file. If ``None`` then use the
            default config location
        config: :class:`lib.config.FaceswapConfig`
            Pre-loaded :class:`lib.config.FaceswapConfig`. If passed, then this will be
            used over any configuration on disk. If ``None`` then it is ignored.

        Returns
        -------
        dict
            The configuration in dictionary form for the given from
            :attr:`lib.config.FaceswapConfig.config_dict`
        """
          section = ".".join(self.__module__.split(".")[-2:])
          if config is None:
              retval = get_config(section, configfile=configfile)
          else:
              config.section = section
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