openai / glide-text2im

GLIDE: a diffusion-based text-conditional image synthesis model
MIT License
3.54k stars 500 forks source link

Check if file exists before sending the GET request #14

Closed kcosta42 closed 2 years ago

kcosta42 commented 2 years ago

The function fetch_file_cached call requests.get before checking if the file was already present, which caused it to raise an exception for offline use.

This PR simply moves the check before the call to requests.