                       self.__class__.__name__, detector, aligner, masker, configfile, multiprocess,
                       exclude_gpus, rotate_images, min_size, normalize_method, re_feed,
                       image_is_aligned)
          self._instance = _get_instance()
          masker = [masker] if not isinstance(masker, list) else masker
          self._flow = self._set_flow(detector, aligner, masker)
          self._exclude_gpus = exclude_gpus
          # 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
          # TODO Calculate scaling for more plugins than currently exist in _parallel_scaling
 
</s> remove         self._mask = [self._load_mask(mask, image_is_aligned, configfile) for mask in masker]
 </s> add         self._mask = [self._load_mask(mask, image_is_aligned, configfile) for mask in maskers] </s> remove             frame_name = metadata["source"]["source_filename"]
            face_index = metadata["source"]["face_index"]
            alignment = self._alignments.get_faces_in_frame(frame_name)
            if not alignment or face_index > len(alignment) - 1:
                self._counts["skip"] += 1
                logger.warning("Skipping Face not found in alignments file: '%s'", filename)
                continue
            alignment = alignment[face_index]
            self._counts["face"] += 1

            if self._check_for_missing(frame_name, face_index, alignment):
                continue

            detected_face = self._get_detected_face(alignment)
            if self._update_type == "output":
                detected_face.image = image
                self._save(frame_name, face_index, detected_face)
            else:
                media = ExtractMedia(filename, image, detected_faces=[detected_face])
                # Hacky overload of ExtractMedia's shape parameter to apply the actual original
                # frame dimension
                media._image_shape = (*metadata["source"]["source_frame_dims"], 3)
                setattr(media, "mask_tool_face_info", metadata["source"])  # TODO formalize
 </s> add             media = self._process_face(filename, image, metadata)
            if media is not None: </s> remove     def _set_flow(detector: str, aligner: str, masker: List[str]) -> List[str]:
 </s> add     def _set_flow(detector: Optional[str],
                  aligner: Optional[str],
                  masker: List[Optional[str]]) -> List[str]: </s> remove                 self._counts["update"] += 1
 </s> add  </s> remove             queue = args[0]
 </s> add             queue = cast("EventQueue", args[0])
        maskers = [cast(Optional[str],
                   masker)] if not isinstance(masker, list) else cast(List[Optional[str]], masker)
        self._flow = self._set_flow(detector, aligner, maskers)
                       self.__class__.__name__, detector, aligner, masker, configfile, multiprocess,
                       exclude_gpus, rotate_images, min_size, normalize_method, re_feed,
                       image_is_aligned)
          self._instance = _get_instance()
        maskers = [cast(Optional[str],
                   masker)] if not isinstance(masker, list) else cast(List[Optional[str]], masker)
        self._flow = self._set_flow(detector, aligner, maskers)
        maskers = [cast(Optional[str],
                   masker)] if not isinstance(masker, list) else cast(List[Optional[str]], masker)
        self._flow = self._set_flow(detector, aligner, maskers)
          self._exclude_gpus = exclude_gpus
          # 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
          # TODO Calculate scaling for more plugins than currently exist in _parallel_scaling
keep keep keep keep replace replace keep keep keep keep keep
 Minor updates and fixups
  - Mask Tool - Typing + BiSeNet mask update fix
  - Alignments Tool - Auto search for alignments file 
plugins/extract/pipeline.py