          self.queue_size = 1
          self._add_queues(kwargs["in_queue"], kwargs["out_queue"], ["predict", "post"])
          self._compile_threads()
          self.init_model()
          logger.info("Initialized %s %s with batchsize of %s", self.name, p_type, self.batchsize)
  
      def _add_queues(self, in_queue, out_queue, queues):
          """ Add the queues
              in_queue and out_queue should be pre-created queue manager queues
              queues should be a list of queue names """
 
</s> remove         p_type = "Detector" if self._plugin_type == "detect" else "Aligner"
        logger.info("Initializing %s %s...", self.name, p_type)
 </s> add         logger.info("Initializing %s in %s phase...", self.name, self._plugin_type) </s> remove         for task in ("extract_detect_in", "extract_align_in", "extract_align_out"):
 </s> add         tasks = ["extract_detect_in", "extract_align_in", "extract_mask_in", "extract_mask_out"]
        for task in tasks: </s> remove             logger.debug("Switching to align phase")
            self.phase = "align"
 </s> add             self.phase = "align" if self.phase == "detect" else "mask"
            logger.debug("Switching to %s phase", self.phase) </s> remove         """ Set whether to run detect and align together or separately """
        if self._detector.vram == 0 or self._aligner.vram == 0:
            logger.debug("At least one of aligner or detector have no VRAM requirement. "
                         "Enabling parallel processing.")
            return True
 </s> add         """ Set whether to run detect, align, and mask together or separately """
        logger.info("Initialized %s (%s) with batchsize of %s",
                    self.name, self._plugin_type, self.batchsize)
          self.queue_size = 1
          self._add_queues(kwargs["in_queue"], kwargs["out_queue"], ["predict", "post"])
          self._compile_threads()
          self.init_model()
        logger.info("Initialized %s (%s) with batchsize of %s",
                    self.name, self._plugin_type, self.batchsize)
  
      def _add_queues(self, in_queue, out_queue, queues):
          """ Add the queues
              in_queue and out_queue should be pre-created queue manager queues
              queues should be a list of queue names """
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
plugins/extract/_base.py