Save HFToken only if it is present (#2370)

Fixes https://github.com/invoke-ai/InvokeAI/issues/2083
This commit is contained in:
Lincoln Stein 2023-01-19 22:16:19 -05:00 committed by GitHub
commit 2d1eeec063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -676,6 +676,7 @@ def download_weights(opt:dict) -> Union[str, None]:
return
access_token = authenticate()
if access_token is not None:
HfFolder.save_token(access_token)
print('\n** DOWNLOADING WEIGHTS **')