diffusers: `lpw_stable_diffusion` pipeline is broken. Again.

Describe the bug

Just as in #3199 , lpw_stable_diffusion pipeline has suddenly broke today on an ordinary Factory reboot of my space.

Reproduction

I’ve created a public HF space to reproduce the bug: https://huggingface.co/spaces/NickKolok/test-20230424-bug-reprod/

Feel free to duplicate it and play with it. If you remove the custom pipeline, everything runs.

Logs

/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py:645: FutureWarning: `cached_download` is the legacy way to download files from the HF hub, please consider upgrading to `hf_hub_download`
  warnings.warn(

Downloading (…)_stable_diffusion.py:   0%|          | 0.00/10.5k [00:00<?, ?B/s]Could not locate the pipeline.py inside lpw_stable_diffusion.
Traceback (most recent call last):
  File "app.py", line 16, in <module>
    pipe = DiffusionPipeline.from_pretrained(
  File "/home/user/.local/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 856, in from_pretrained
    cached_folder = cls.download(
  File "/home/user/.local/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 1227, in download
    pipeline_class = _get_pipeline_class(
  File "/home/user/.local/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 335, in _get_pipeline_class
    return get_class_from_dynamic_module(
  File "/home/user/.local/lib/python3.8/site-packages/diffusers/utils/dynamic_modules_utils.py", line 445, in get_class_from_dynamic_module
    final_module = get_cached_module_file(
  File "/home/user/.local/lib/python3.8/site-packages/diffusers/utils/dynamic_modules_utils.py", line 285, in get_cached_module_file
    resolved_module_file = cached_download(
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 788, in cached_download
    http_get(
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 543, in http_get
    raise EnvironmentError(
OSError: Consistency check failed: file should be of size 10495 but has size 57300 ((…)_stable_diffusion.py).
We are sorry for the inconvenience. Please retry download and pass `force_download=True, resume_download=False` as argument.
If the issue persists, please let us know by opening an issue on https://github.com/huggingface/huggingface_hub.

Downloading (…)_stable_diffusion.py: 57.3kB [00:00, 491kB/s]

System Info

HuggingFace free space

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

The issues lies in the latest release of huggingface_hub (0.14.0) from yesterday. We are working on a fix. In the meantime you can downgrade huggingface_hub to 0.13.4 and it should continue to work.

I’ll keep you posted about a fix.

Thank you for the workaround. It is working again by now. @nickkolok

Thank you all for pointing out the workaround! For me it works like a charm. If anyone from the amazing HuggingFace team wants to dive deeper into the bug with factory reboot, I will be really glad to transfer the affected space to them.

Otherwise, the issue can be surely closed.