mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
(config) do not cache HF token when using the non-canonical env var
this mirrors the behaviour when using the officially supported env var
This commit is contained in:
parent
76633f500a
commit
485fcc7fcb
@ -536,7 +536,7 @@ def download_weights(opt:dict) -> Union[str, None]:
|
||||
if not (access_token := HfFolder.get_token()):
|
||||
# If unable to find an existing token or expected environment, try the non-canonical environment variable (widely used in the community and supported as per docs)
|
||||
if (access_token := os.getenv("HUGGINGFACE_TOKEN")):
|
||||
HfFolder.save_token(access_token)
|
||||
os.environ['HUGGING_FACE_HUB_TOKEN'] = access_token
|
||||
|
||||
if opt.yes_to_all:
|
||||
models = recommended_datasets()
|
||||
|
Loading…
Reference in New Issue
Block a user