          if self._is_predict and not self.model_exists:
              logger.error("Model could not be found in folder '%s'. Exiting", self._model_dir)
              sys.exit(1)
  
          model = load_model(self._filename, compile=False)
          logger.info("Loaded model from disk: '%s'", self._filename)
          return model
  
      def _save(self):
          """ Backup and save the model and state file.
 
</s> remove         frame_face_indices = self._items.items

        if not frame_face_indices:
 </s> add         if not self._items.items: </s> remove             new_index = frame_face_indices[frame].index(face_index)
 </s> add             new_index = self._items.items[frame].index(face_index) </s> remove         self._alignments.filter_faces(frame_face_indices, filter_out=False)
 </s> add         self._alignments.filter_faces(self._items.items, filter_out=False)
        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
          if self._is_predict and not self.model_exists:
              logger.error("Model could not be found in folder '%s'. Exiting", self._model_dir)
              sys.exit(1)
  
        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
          logger.info("Loaded model from disk: '%s'", self._filename)
          return model
  
      def _save(self):
          """ Backup and save the model and state file.
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 
plugins/train/model/_base.py