          if not self.models_exist and self.predict:
              logger.error("Model could not be found in folder '%s'. Exiting", self.model_dir)
              exit(0)
  
          K.clear_session()
          model_mapping = self.map_models(swapped)
          for network in self.networks.values():
              if not network.side:
                  is_loaded = network.load()
              else:
 
</s>
        if not self.is_legacy:
            K.clear_session()
          if not self.models_exist and self.predict:
              logger.error("Model could not be found in folder '%s'. Exiting", self.model_dir)
              exit(0)
  
        if not self.is_legacy:
            K.clear_session()
          model_mapping = self.map_models(swapped)
          for network in self.networks.values():
              if not network.side:
                  is_loaded = network.load()
              else:
keep keep keep keep replace keep keep keep keep keep
 bugfix: Don't clear session when loading legacy weights
plugins/train/model/_base.py