Updated _load_pretrained_model_low_mem to check if keys are in the state_dict
# What does this PR do?

This PR checks if any key is in the `state_dict` before attempting to load it. If we have multiple checkpoints, not all keys are in every checkpoint.

TODO
- [ ] tests

I am wondering what is the correct place to add a test for this function<|||||>_The documentation is not available anymore as the PR was closed or merged._<|||||>Your plan works for me, Sylvain. I will work on the low mem test then today.