          self.phase = self._flow[0]
          # We only ever need 1 item in each queue. This is 2 items cached (1 in queue 1 waiting
          # for queue) at each point. Adding more just stacks RAM with no speed benefit.
          self._queue_size = 1
          self._vram_buffer = 256  # Leave a buffer for VRAM allocation
          self._detect = self._load_detect(detector, rotate_images, min_size, configfile)
          self._align = self._load_align(aligner, configfile, normalize_method)
          self._mask = [self._load_mask(mask, image_is_aligned, configfile) for mask in masker]
          self._is_parallel = self._set_parallel_processing(multiprocess)
          self._set_extractor_batchsize()
 
</s> remove         self.phase = self._flow[0]
 </s> add  </s> remove         logger.debug("Running Detection. Phase: '%s'", self.phase)
 </s> add         logger.debug("Running Detection. Phase: '%s'", self._current_phase) </s> remove             self.phase = self._next_phase
            logger.debug("Switching to %s phase", self.phase)
 </s> add             self._phase_index += 1
            logger.debug("Switching to phase: %s", self._current_phase) </s> remove     def _total_vram_required(self):
        """ Return vram required for all phases plus the buffer """
        vrams = dict()
 </s> add     def _vram_per_phase(self):
        """ dict: The amount of vram required for each phase in :attr:`_flow`. """
        retval = dict()
        self._vram_stats = self._get_vram_stats()
          self.phase = self._flow[0]
          # We only ever need 1 item in each queue. This is 2 items cached (1 in queue 1 waiting
          # for queue) at each point. Adding more just stacks RAM with no speed benefit.
          self._queue_size = 1
        self._vram_stats = self._get_vram_stats()
          self._detect = self._load_detect(detector, rotate_images, min_size, configfile)
          self._align = self._load_align(aligner, configfile, normalize_method)
          self._mask = [self._load_mask(mask, image_is_aligned, configfile) for mask in masker]
          self._is_parallel = self._set_parallel_processing(multiprocess)
          self._set_extractor_batchsize()
keep keep keep keep replace keep keep keep keep keep
 Extract - Better VRAM Allocation in Extraction Pipeline 
plugins/extract/pipeline.py