          updated_headers = 0
          for file_info in tqdm(self._items.file_list_sorted, desc="Updating PNG Headers"):
              frame = file_info["source_filename"]
              face_index = file_info["face_index"]
              new_index = frame_face_indices[frame].index(face_index)
  
              if new_index == face_index:  # face index has not changed
                  continue
              fullpath = os.path.join(self._items.folder, file_info["current_filename"])
              logger.debug("Updating png header for '%s': face index from %s to %s",
 
</s> remove         frame_face_indices = self._items.items

        if not frame_face_indices:
 </s> add         if not self._items.items: </s> remove         model = load_model(self._filename, compile=False)
 </s> add         try:
            model = load_model(self._filename, compile=False)
        except RuntimeError as err:
            if "unable to get link info" in str(err).lower():
                msg = (f"Unable to load the model from '{self._filename}'. This may be a "
                       "temporary error but most likely means that your model has corrupted.\n"
                       "You can try to load the model again but if the problem persists you "
                       "should use the Restore Tool to restore your model from backup.")
                raise FaceswapError(msg)
            raise err </s> remove         self._alignments.filter_faces(frame_face_indices, filter_out=False)
 </s> add         self._alignments.filter_faces(self._items.items, filter_out=False)
            new_index = self._items.items[frame].index(face_index)
          updated_headers = 0
          for file_info in tqdm(self._items.file_list_sorted, desc="Updating PNG Headers"):
              frame = file_info["source_filename"]
              face_index = file_info["face_index"]
            new_index = self._items.items[frame].index(face_index)
  
              if new_index == face_index:  # face index has not changed
                  continue
              fullpath = os.path.join(self._items.folder, file_info["current_filename"])
              logger.debug("Updating png header for '%s': face index from %s to %s",
keep keep keep keep replace keep keep keep keep keep
 Code updates:
  - lib.image.update_existing_meta: optimize
  - plugins.tran.model._base - Capture corrupt model errors 
tools/alignments/jobs.py