Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the download_models() function in notebook_helpers.py #322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions notebook_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def download_models(mode):
url_conf = 'https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1'
url_ckpt = 'https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1'

path_conf = 'logs/diffusion/superresolution_bsr/configs/project.yaml'
path_ckpt = 'logs/diffusion/superresolution_bsr/checkpoints/last.ckpt'
path_conf, name_conf = os.path.split('logs/diffusion/superresolution_bsr/configs/project.yaml')
path_ckpt, name_ckpt = os.path.split('logs/diffusion/superresolution_bsr/checkpoints/last.ckpt')

download_url(url_conf, path_conf)
download_url(url_ckpt, path_ckpt)
download_url(url_conf, path_conf, filename=name_conf)
download_url(url_ckpt, path_ckpt, filename=name_ckpt)

path_conf = path_conf + '/?dl=1' # fix it
path_ckpt = path_ckpt + '/?dl=1' # fix it
path_conf = os.path.join(path_conf, name_conf)
path_ckpt = os.path.join(path_ckpt, name_ckpt)
return path_conf, path_ckpt

else:
Expand Down Expand Up @@ -267,4 +267,4 @@ def make_convolutional_sample(batch, model, mode="vanilla", custom_steps=None, e
log["sample"] = x_sample
log["time"] = t1 - t0

return log
return log