我正在尝试运行 Huggingface StableDiffusion 生成文本到图像模型的 Colab 示例:
\nhttps://huggingface.co/CompVis/stable-diffusion \n https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/stable_diffusion.ipynb#scrollTo=xSKWBKFPArKS
\n然而,它在模型加载时卡住了:
\n\n使用该模型需要在 Huggingface 注册和一个令牌 - 我有一个,我还得到了一个令牌,该令牌在上一个单元格中已被接受:
\n\n错误发生后,我还执行了建议的命令:\n!git config --global credential.helper store
虽然我不认为这是必须要做的事情。
\n我发现了这个:\n https://huggingface.co/docs/hub/repositories-getting-started \n(虽然我不会推送,但只会下载。)
\n\n\n为了能够将您的代码推送到集线器,您\xe2\x80\x99需要\以某种方式进行身份验证。最简单的方法是安装\nhuggingface_hub CLI 并运行登录命令:
\n
python -m pip install huggingface_hub\nhuggingface-cli login\nRun Code Online (Sandbox Code Playgroud)\n我安装并运行它:
\n!python -m pip install huggingface_hub\n!huggingface-cli login\nRun Code Online (Sandbox Code Playgroud)\n\n我使用我的令牌(读取)登录 - 登录成功。
\n但是,在尝试下载模型时它仍然返回相同的错误。
\n如何“确保我已登录huggingface-cli login”?
谢谢!
\n