Connection error
After I run the simple test code:
from diffusers import StableDiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]
image.save("astronaut_rides_horse.png")
It shows me connection error below, Do you have any idea about this error?
Traceback (most recent call last):
File "test.py", line 6, in
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
File "/root/miniconda3/envs/imgnet/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 884, in from_pretrained
cached_folder = cls.download(
File "/root/miniconda3/envs/imgnet/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 1208, in download
config_file = hf_hub_download(
File "/root/miniconda3/envs/imgnet/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/root/miniconda3/envs/imgnet/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1291, in hf_hub_download
raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: Connection error, and we cannot find the requested files in the disk cache. Please try again or make sure your Internet connection is on.