                  logger.debug("Plugin requirements within threshold: (plugin_required: %sMB, "
                               "vram_free: %sMB)", plugin_required, vram_free)
                  return
              # Hacky split across 3 plugins
              available_vram = (vram_free - vram_required) // 3
              for plugin in (self._detector, self._aligner, self._masker):
                  self._set_plugin_batchsize(plugin, available_vram)
          else:
              for plugin in (self._detector, self._aligner, self._masker):
                  vram_required = plugin.vram + self._vram_buffer
                  batch_required = plugin.vram_per_batch * plugin.batchsize
 
</s> remove             for plugin in (self._detector, self._aligner, self._masker):
 </s> add             for plugin in self._all_plugins: </s> remove             vram_required = (self._detector.vram + self._aligner.vram + self._masker.vram +
                             self._vram_buffer)
            batch_required = ((self._detector.vram_per_batch * self._detector.batchsize) +
                              (self._aligner.vram_per_batch * self._aligner.batchsize) +
                              (self._masker.vram_per_batch * self._masker.batchsize))
            plugin_required = vram_required + batch_required
 </s> add             batch_required = sum([plugin.vram_per_batch * plugin.batchsize
                                  for plugin in self._all_plugins])
            plugin_required = self._total_vram_required + batch_required </s> remove         """ Set the batchsize for the given plugin based on given available vram """
 </s> add         """ Set the batch size for the given plugin based on given available vram """ </s> remove             retval = [self._detector, self._aligner, self._masker]
        elif self.passes == 3 and self.phase == 'detect':
            retval = [self._detector]
        elif self.passes == 3 and self.phase == 'align':
            retval = [self._aligner]
        elif self.passes == 3 and self.phase == 'mask':
            retval = [self._masker]
 </s> add             retval = self._all_plugins </s> remove         if self._detector.vram == 0 and self._aligner.vram == 0 and self._masker.vram == 0:
            logger.debug("Either detector, aligner or masker have no VRAM requirements. Not "
                         "updating batchsize requirements.")
 </s> add         if sum([plugin.vram for plugin in self._all_plugins]) == 0:
            logger.debug("No plugins use VRAM. Not updating batchsize requirements.")
            available_vram = (vram_free - self._total_vram_required) // 3
            for plugin in self._all_plugins:
                  logger.debug("Plugin requirements within threshold: (plugin_required: %sMB, "
                               "vram_free: %sMB)", plugin_required, vram_free)
                  return
              # Hacky split across 3 plugins
            available_vram = (vram_free - self._total_vram_required) // 3
            for plugin in self._all_plugins:
            available_vram = (vram_free - self._total_vram_required) // 3
            for plugin in self._all_plugins:
                  self._set_plugin_batchsize(plugin, available_vram)
          else:
              for plugin in (self._detector, self._aligner, self._masker):
                  vram_required = plugin.vram + self._vram_buffer
                  batch_required = plugin.vram_per_batch * plugin.batchsize
keep keep keep keep replace replace keep keep keep keep keep
 Smart Mask - Extract code review

- Lint simple_tests.py
- Only reformat alignments file if it exists otherwise change filename
- Update legacy alignments to new format at all stages
- faces_detect.Mask.from_dict - logging format fix
- convert.py fix otf for new pipeline
- cli.py - Add note that masks not used. Revert convert masks
- faces_detect.py - Revert non-extract code
- Add .p and .pickle extensions for serializer
- plugins/extract revert some changes
- scripts/fsmedia - Revert code changes
- Pipeline - cleanup
- Consistant alpha channel stripping (fixes single-process)
- Store landmarks as numpy array
- Code attribution
- Normalize feed face and reference face to 0.0 - 1.0 in convert
- Lock in mask VRAM sized
- Add documentation to plugin_loader
- Update alignments tool to work with new format 
plugins/extract/pipeline.py