              align_hashes = set(face.hash for face in self._detected_faces[side])
              if not align_hashes.issuperset(train_hashes["hashes"]):
                  missing_alignments[side] = [
                      os.path.basename(filename)
                      for hsh, filename in zip(train_hashes["hashes"], train_hashes["filenames"])
                      if hsh not in align_hashes]
          if missing_alignments:
              msg = ("There are faces in your training folder(s) which do not exist in your "
                     "alignments file. Training cannot continue. See above for a full list of "
                     "files missing alignments.")
 
</s> remove             align_hashes = set(face.hash for face in self._detected_faces[side])
            if not align_hashes.issuperset(train_hashes["hashes"]):
 </s> add             align_hashes = set(self._detected_faces[side])
            if not align_hashes.issuperset(set(train_hashes)): </s> remove                 detected_faces.append(detected_face)
        logger.debug("Detected Faces count: %s, Skipped faces count: %s",
                     len(detected_faces), skip_count)
 </s> add                 detected_faces[face["hash"]] = detected_face
        logger.debug("Detected Faces count: %s, Skipped faces count: %s, duplicate faces "
                     "count: %s", len(detected_faces), skip_count, dupe_count) </s> remove         hashes = {key: dict(hashes=[], filenames=[]) for key in image_list}
        pbar = tqdm(desc="Reading training images",
                    total=sum(len(val) for val in image_list.values()))
 </s> add         hashes = {key: dict() for key in image_list} </s> remove         side_hashes = set(self._hashes[side]["hashes"])
        detected_faces = []
 </s> add         dupe_count = 0
        side_hashes = set(self._hashes[side])
        detected_faces = dict()
                    for hsh, filenames in train_hashes.items()
                    for filename in filenames
              align_hashes = set(face.hash for face in self._detected_faces[side])
              if not align_hashes.issuperset(train_hashes["hashes"]):
                  missing_alignments[side] = [
                      os.path.basename(filename)
                    for hsh, filenames in train_hashes.items()
                    for filename in filenames
                      if hsh not in align_hashes]
          if missing_alignments:
              msg = ("There are faces in your training folder(s) which do not exist in your "
                     "alignments file. Training cannot continue. See above for a full list of "
                     "files missing alignments.")
keep keep keep keep replace keep keep keep keep keep
 plugins.train.trainer - Speed up mask caching 
plugins/train/trainer/_base.py