          if gpu_stats.device_count == 0:
              logger.debug("No GPU detected. Enabling parallel processing.")
              return True
  
          required_vram = detector_vram + aligner_vram + 320  # 320MB buffer
          stats = gpu_stats.get_card_most_free()
          free_vram = int(stats["free"])
          logger.verbose("%s - %sMB free of %sMB",
                         stats["device"],
                         free_vram,
 
</s> remove         free_vram = int(stats["free"])
 </s> add         vram_free = int(stats["free"]) </s> remove         if gpu_stats.is_plaidml and (not self.detector.supports_plaidml or
                                     not self.aligner.supports_plaidml):
            logger.debug("At least one of aligner or detector does not support plaidML. "
                         "Enabling parallel processing.")
            return True

        if not gpu_stats.is_plaidml and (
                (self.detector.supports_plaidml and aligner_vram != 0) or
                (self.aligner.supports_plaidml and detector_vram != 0)):
            logger.warning("Keras + non-Keras aligner/detector combination does not support "
                           "parallel processing. Switching to serial.")
            return False

        if self.detector.supports_plaidml and self.aligner.supports_plaidml:
            logger.debug("Both aligner and detector support plaidML. Disabling parallel "
                         "processing.")
            return False

 </s> add  </s> remove                        free_vram,
 </s> add                        vram_free, </s> remove         if free_vram <= required_vram:
 </s> add         if vram_free <= vram_required: </s> remove         if detector_vram == 0 or aligner_vram == 0:
 </s> add     def _set_parallel_processing(self, multiprocess):
        """ Set whether to run detect and align together or separately """
        if self._detector.vram == 0 or self._aligner.vram == 0:
        if get_backend() == "amd":
            logger.debug("Parallel processing discabled by amd")
            return False

        vram_required = self._detector.vram + self._aligner.vram + self._vram_buffer
          if gpu_stats.device_count == 0:
              logger.debug("No GPU detected. Enabling parallel processing.")
              return True
  
        if get_backend() == "amd":
            logger.debug("Parallel processing discabled by amd")
            return False

        vram_required = self._detector.vram + self._aligner.vram + self._vram_buffer
          stats = gpu_stats.get_card_most_free()
          free_vram = int(stats["free"])
          logger.verbose("%s - %sMB free of %sMB",
                         stats["device"],
                         free_vram,
keep keep keep keep replace keep keep keep keep keep
 De-Multiprocess Extract (#871)

* requirements.txt: - Pin opencv to 4.1.1 (fixes cv2-dnn error)

* lib.face_detect.DetectedFace: change LandmarksXY to landmarks_xy. Add left, right, top, bottom attributes

* lib.model.session: Session manager for loading models into different graphs (for Nvidia + CPU)

* plugins.extract._base: New parent class for all extract plugins

* plugins.extract.pipeline. Remove MultiProcessing. Dynamically limit batchsize for Nvidia cards. Remove loglevel input

* S3FD + FAN plugins. Standardise to Keras version for all backends

* Standardize all extract plugins to new threaded codebase

* Documentation. Start implementing Numpy style docstrings for Sphinx Documentation

* Remove s3fd_amd. Change convert OTF to expect DetectedFace object

* faces_detect - clean up and documentation

* Remove PoolProcess

* Migrate manual tool to new extract workflow

* Remove AMD specific extractor code from cli and plugins

* Sort tool to new extract workflow

* Remove multiprocessing from project

* Remove multiprocessing queues from QueueManager

* Remove multiprocessing support from logger

* Move face_filter to new extraction pipeline

* Alignments landmarksXY > landmarks_xy and legacy handling

* Intercept get_backend for sphinx doc build

# Add Sphinx documentation 
plugins/extract/pipeline.py