                      arguments.output = self._get_output_location(location)
              else:
                  arguments = self._args
  
              if extractor is not None:
                  extractor.launch()
  
              mask = _Mask(arguments, extractor)
              mask.process()
  
              if extractor is not None:
                  extractor.reset_phase_index()
  
  
  class _Mask():  # pylint:disable=too-few-public-methods
      """ This tool is part of the Faceswap Tools suite and should be called from
      ``python tools.py mask`` command.
 
</s> remove         extractor = self._get_extractor()
 </s> add  </s> remove         if self._args.processing == "output":
            logger.debug("Update type `output` selected. Not launching extractor")
            return None
        logger.debug("masker: %s", self._args.masker)
        extractor = Extractor(None, None, self._args.masker, exclude_gpus=self._args.exclude_gpus)
        logger.debug(extractor)
        return extractor
 </s> add         logger.debug("Starting process: (arguments: %s)", arguments)
        mask = _Mask(arguments)
        mask.process()
        logger.debug("Finished process: (arguments: %s)", arguments) </s> remove     def __init__(self, arguments: Namespace, extractor: Optional[Extractor]) -> None:
        logger.debug("Initializing %s: (arguments: %s, extractor: %s)",
                     self.__class__.__name__, arguments, extractor)
 </s> add     def __init__(self, arguments: Namespace) -> None:
        logger.debug("Initializing %s: (arguments: %s)", self.__class__.__name__, arguments) </s> remove     extractor: :class:`plugins.extract.pipeline.Extractor`:
            The launched Extractor
 </s> add  </s> remove     def _get_extractor(self) -> Optional[Extractor]:
        """ Obtain a Mask extractor plugin and launch it
 </s> add     @staticmethod
    def _run_mask_process(arguments: Namespace) -> None:
        """ The mask process to be run in a spawned process.
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
                      arguments.output = self._get_output_location(location)
              else:
                  arguments = self._args
  
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
            if len(self._input_locations) > 1:
                proc = Process(target=self._run_mask_process, args=(arguments, ))
                proc.start()
                proc.join()
            else:
                self._run_mask_process(arguments)
  
  
  class _Mask():  # pylint:disable=too-few-public-methods
      """ This tool is part of the Faceswap Tools suite and should be called from
      ``python tools.py mask`` command.
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 bugfix: mask tool memory leak in batch-mode 
tools/mask/mask.py