  
  
  class Mask(Adjustment):
      """ Return the requested mask """
      def __init__(self, mask_type, output_size, predicted_available):
          super().__init__(mask_type, output_size, predicted_available)
          self.do_erode = self.config.get("erosion", 0) != 0
          self.do_blend = self.config.get("type", None) is not None
  
      def process(self, detected_face, predicted_mask=None):
          """ Return mask and perform processing """
 
</s> remove                      "predicted_available: %s)",
                     self.__class__.__name__, mask_type, output_size, predicted_available)
        self.config = get_config(".".join(self.__module__.split(".")[-2:]))
 </s> add                      "predicted_available: %s, config: %s)",
                     self.__class__.__name__, mask_type, output_size, predicted_available, config)
        self.config = self.set_config(config) </s> remove     def __init__(self, mask_type, output_size, predicted_available=False):
        super().__init__(mask_type, output_size, predicted_available)
 </s> add     def __init__(self, mask_type, output_size, predicted_available=False, config=None):
        super().__init__(mask_type, output_size, predicted_available, config) </s> remove     def __init__(self, mask_type, output_size, predicted_available):
 </s> add     def __init__(self, mask_type, output_size, predicted_available, config=None): </s> remove         self.adjustments["mask"] = PluginLoader.get_converter("mask", "mask_blend")(
            self.args.mask_type,
            output_size,
            output_has_mask)
 </s> add     def load_plugins(self, config=None, disable_logging=False):
        """ Load the requested adjustment plugins """
        logger.debug("Loading plugins. config: %s", config)
        self.adjustments["box"] = PluginLoader.get_converter(
            "mask",
            "box_blend",
            disable_logging=disable_logging)("none",
                                             self.output_size,
                                             config=config)

        self.adjustments["mask"] = PluginLoader.get_converter(
            "mask",
            "mask_blend",
            disable_logging=disable_logging)(self.args.mask_type,
                                             self.output_size,
                                             self.output_has_mask,
                                             config=config)
    def __init__(self, mask_type, output_size, predicted_available, config=None):
        super().__init__(mask_type, output_size, predicted_available, config)
  
  
  class Mask(Adjustment):
      """ Return the requested mask """
    def __init__(self, mask_type, output_size, predicted_available, config=None):
        super().__init__(mask_type, output_size, predicted_available, config)
    def __init__(self, mask_type, output_size, predicted_available, config=None):
        super().__init__(mask_type, output_size, predicted_available, config)
          self.do_erode = self.config.get("erosion", 0) != 0
          self.do_blend = self.config.get("type", None) is not None
  
      def process(self, detected_face, predicted_mask=None):
          """ Return mask and perform processing """
keep keep keep keep replace replace keep keep keep keep keep
 Convert settings tool (#737)

* Initial prediction pipeline and display

* Patch faces from convert pipeline. Load configs

* Add tkinter canvas for image display

* Radio buttons to config gui. Standardise config gui. Remove dssim loss from realface

* Add action frame

* Live update cli options

* Live update config changes

* Quicker frame loading. Refresh faces button callback

* remove debug code

* Add saving and reloading config buttons

* Reduce lag with threading

* Busy indicator + geometry updates

* Fix options canvas resizing

* Add global config saving and resetting

* tools to own tab

* Rename tool to 'preview'

* geometry tweak

* pep8 fixes 
plugins/convert/mask/mask_blend.py