Unverified Commit edcbe803 authored by Álvaro Somoza's avatar Álvaro Somoza Committed by GitHub
Browse files

Fix huggingface-hub failing tests (#11994)

* login

* more logins

* uploads

* missed login

* another missed login

* downloads

* examples and more logins

* fix

* setup

* Apply style fixes

* fix

* Apply style fixes
parent c02c4a6d
...@@ -60,7 +60,7 @@ You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need ...@@ -60,7 +60,7 @@ You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need
Run the following command to authenticate your token Run the following command to authenticate your token
```bash ```bash
huggingface-cli login hf auth login
``` ```
If you have already cloned the repo, then you won't need to go through these steps. If you have already cloned the repo, then you won't need to go through these steps.
......
...@@ -551,7 +551,7 @@ def main(): ...@@ -551,7 +551,7 @@ def main():
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = os.path.join(args.output_dir, args.logging_dir) logging_dir = os.path.join(args.output_dir, args.logging_dir)
......
...@@ -153,7 +153,7 @@ def parse_args(): ...@@ -153,7 +153,7 @@ def parse_args():
"--use_auth_token", "--use_auth_token",
action="store_true", action="store_true",
help=( help=(
"Will use the token generated when running `huggingface-cli login` (necessary to use this script with" "Will use the token generated when running `hf auth login` (necessary to use this script with"
" private models)." " private models)."
), ),
) )
......
...@@ -41,7 +41,7 @@ You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need ...@@ -41,7 +41,7 @@ You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need
Run the following command to authenticate your token Run the following command to authenticate your token
```bash ```bash
huggingface-cli login hf auth login
``` ```
If you have already cloned the repo, then you won't need to go through these steps. If you have already cloned the repo, then you won't need to go through these steps.
......
...@@ -415,7 +415,7 @@ def main(): ...@@ -415,7 +415,7 @@ def main():
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
if args.non_ema_revision is not None: if args.non_ema_revision is not None:
......
...@@ -46,7 +46,7 @@ You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need ...@@ -46,7 +46,7 @@ You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need
Run the following command to authenticate your token Run the following command to authenticate your token
```bash ```bash
huggingface-cli login hf auth login
``` ```
If you have already cloned the repo, then you won't need to go through these steps. If you have already cloned the repo, then you won't need to go through these steps.
......
...@@ -566,7 +566,7 @@ def main(): ...@@ -566,7 +566,7 @@ def main():
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = os.path.join(args.output_dir, args.logging_dir) logging_dir = os.path.join(args.output_dir, args.logging_dir)
......
...@@ -280,7 +280,7 @@ def main(args): ...@@ -280,7 +280,7 @@ def main(args):
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = os.path.join(args.output_dir, args.logging_dir) logging_dir = os.path.join(args.output_dir, args.logging_dir)
......
...@@ -562,7 +562,7 @@ def main(): ...@@ -562,7 +562,7 @@ def main():
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = Path(args.output_dir, args.logging_dir) logging_dir = Path(args.output_dir, args.logging_dir)
......
...@@ -40,7 +40,7 @@ cd examples/research_projects/pytorch_xla/inference/flux/ ...@@ -40,7 +40,7 @@ cd examples/research_projects/pytorch_xla/inference/flux/
As the model is gated, before using it with diffusers you first need to go to the [FLUX.1 [dev] Hugging Face page](https://huggingface.co/black-forest-labs/FLUX.1-dev), fill in the form and accept the gate. Once you are in, you need to log in so that your system knows you’ve accepted the gate. Use the command below to log in: As the model is gated, before using it with diffusers you first need to go to the [FLUX.1 [dev] Hugging Face page](https://huggingface.co/black-forest-labs/FLUX.1-dev), fill in the form and accept the gate. Once you are in, you need to log in so that your system knows you’ve accepted the gate. Use the command below to log in:
```bash ```bash
huggingface-cli login hf auth login
``` ```
Then run: Then run:
......
...@@ -80,7 +80,7 @@ pip3 install .' ...@@ -80,7 +80,7 @@ pip3 install .'
Run the following command to authenticate your token. Run the following command to authenticate your token.
```bash ```bash
huggingface-cli login hf auth login
``` ```
This script only trains the unet part of the network. The VAE and text encoder This script only trains the unet part of the network. The VAE and text encoder
......
...@@ -535,7 +535,7 @@ def main(args): ...@@ -535,7 +535,7 @@ def main(args):
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = Path(args.output_dir, args.logging_dir) logging_dir = Path(args.output_dir, args.logging_dir)
......
...@@ -19,7 +19,7 @@ mkdir -p $your_local_path # Create the directory if it doesn't exist ...@@ -19,7 +19,7 @@ mkdir -p $your_local_path # Create the directory if it doesn't exist
Download the SANA Sprint teacher model from Hugging Face Hub. The script uses the 1.6B parameter model. Download the SANA Sprint teacher model from Hugging Face Hub. The script uses the 1.6B parameter model.
```bash ```bash
huggingface-cli download Efficient-Large-Model/SANA_Sprint_1.6B_1024px_teacher_diffusers --local-dir $your_local_path/SANA_Sprint_1.6B_1024px_teacher_diffusers hf download Efficient-Large-Model/SANA_Sprint_1.6B_1024px_teacher_diffusers --local-dir $your_local_path/SANA_Sprint_1.6B_1024px_teacher_diffusers
``` ```
*(Optional: You can also download the 0.6B model by replacing the model name: `Efficient-Large-Model/Sana_Sprint_0.6B_1024px_teacher_diffusers`)* *(Optional: You can also download the 0.6B model by replacing the model name: `Efficient-Large-Model/Sana_Sprint_0.6B_1024px_teacher_diffusers`)*
......
...@@ -940,7 +940,7 @@ def main(args): ...@@ -940,7 +940,7 @@ def main(args):
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
if torch.backends.mps.is_available() and args.mixed_precision == "bf16": if torch.backends.mps.is_available() and args.mixed_precision == "bf16":
......
your_local_path='output' your_local_path='output'
huggingface-cli download Efficient-Large-Model/SANA_Sprint_1.6B_1024px_teacher_diffusers --local-dir $your_local_path/SANA_Sprint_1.6B_1024px_teacher_diffusers hf download Efficient-Large-Model/SANA_Sprint_1.6B_1024px_teacher_diffusers --local-dir $your_local_path/SANA_Sprint_1.6B_1024px_teacher_diffusers
# or Sana_Sprint_0.6B_1024px_teacher_diffusers # or Sana_Sprint_0.6B_1024px_teacher_diffusers
......
...@@ -854,7 +854,7 @@ def main(args): ...@@ -854,7 +854,7 @@ def main(args):
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = Path(args.output_dir, args.logging_dir) logging_dir = Path(args.output_dir, args.logging_dir)
......
...@@ -782,7 +782,7 @@ def main(args): ...@@ -782,7 +782,7 @@ def main(args):
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = Path(args.output_dir, args.logging_dir) logging_dir = Path(args.output_dir, args.logging_dir)
......
...@@ -1054,7 +1054,7 @@ def main(args): ...@@ -1054,7 +1054,7 @@ def main(args):
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
if args.do_edm_style_training and args.snr_gamma is not None: if args.do_edm_style_training and args.snr_gamma is not None:
......
...@@ -547,7 +547,7 @@ def main(): ...@@ -547,7 +547,7 @@ def main():
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
if args.non_ema_revision is not None: if args.non_ema_revision is not None:
......
...@@ -442,7 +442,7 @@ def main(): ...@@ -442,7 +442,7 @@ def main():
if args.report_to == "wandb" and args.hub_token is not None: if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError( raise ValueError(
"You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token." "You cannot use both --report_to=wandb and --hub_token due to a security risk of exposing your token."
" Please use `huggingface-cli login` to authenticate with the Hub." " Please use `hf auth login` to authenticate with the Hub."
) )
logging_dir = Path(args.output_dir, args.logging_dir) logging_dir = Path(args.output_dir, args.logging_dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment