Created
March 26, 2022 20:08
-
-
Save RichardSlater/b1783707d23e6f422f98f645cdcda059 to your computer and use it in GitHub Desktop.
Medium.com: Creating AI Art? Has your Super-SloMo model stopped working?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.colab import drive | |
drive.mount('/content/drive') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os.path import exists | |
def download_from_google_drive(file_id, file_name): | |
# download a file from the Google Drive link | |
!rm -f ./cookie | |
!curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id={file_id}" > /dev/null | |
confirm_text = !awk '/download/ {print $NF}' ./cookie | |
confirm_text = confirm_text[0] | |
!curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm={confirm_text}&id={file_id}" -o {file_name} | |
pretrained_model = 'SuperSloMo.ckpt' | |
if not exists(pretrained_model): | |
download_from_google_drive('1uok9sHVx8FwttH5N3m-CmcauIfR1XBvd', pretrained_model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pretrained_model = '/content/drive/MyDrive/Super-SloMo/shared-checkpoints/SuperSloMo-Python36+0.4.1+cu92-epoch200.ckpt' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment