chaiNNer-org / spandrel

Spandrel gives your project support for various PyTorch architectures meant for AI Super-Resolution, restoration, and inpainting. Based on the model support implemented in chaiNNer.
MIT License
139 stars 12 forks source link

Fix Google Drive downloads #140

Closed RunDevelopment closed 8 months ago

RunDevelopment commented 8 months ago

The confirm=1 trick to get direct downloads even for large files recently (like a week ago) stopped working. So instead of downloading the file, Google Drive will give us a warning page "File too large to scan for viruses. Download Anyway?". So our automatic model downloading for tests will download those warning pages instead of models.

Luckily, this warning page is very simple. No JS. Just simple HTML forms. So I just parse the form and piece together the real download link. This seems to work without problems.

Why hasn't this been a problem in recent PRs? Since our CI uses a cache, we weren't affected by this problem right away. The next time the cache gets evicted, we would be in trouble though because most Google Drive downloads will fail.