Open ClickToConfirm opened 1 year ago
Hi there - what exactly is the problem?
I'm unable to copy and past the token from my hugging face account into either Command Prompt nor Powershell, is there another way to login?
Many ways to deal with this...
One way is to just pass the token directly to pipeline on init with use_auth_token
.
from stable_diffusion_videos import StableDiffusionWalkPipeline
import torch
pipeline = StableDiffusionWalkPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4",
use_auth_token="YOUR TOKEN HERE",
torch_dtype=torch.float16,
revision="fp16",
).to("cuda")
I don't like tokens in my code though...you can write a script real quick to do this separately. (Relevant Docs Link)
from huggingface_hub import HfFolder
HfFolder().save_token("YOUR TOKEN")
If you do the above, you should be logged in, and can use the code as you were before with use_auth_token=True
. You can verify by running huggingface-cli whoami
from the terminal.
So, which file do I need to modify in order to acheive this task?
You could run that last snippet in a separate file, and you'll be logged in. By running it, it creates the ~/.huggingface/token
file which contains your token. This is how we check if you're logged in.
Unable to copy paste token from Huggingface, regards login. tried both Powershell and CMD