Giter VIP home page Giter VIP logo

Comments (11)

chenxwh avatar chenxwh commented on September 28, 2024 2

think it is the issue is from cache_dir, here is an alternative way to load and save the model https://github.com/chenxwh/cog-stable-diffusion/tree/tmp_fix_cachedir

from cog-stable-diffusion.

daanelson avatar daanelson commented on September 28, 2024 1

looks like this issue comes from huggingface_hub >=0.13, which was released yesterday. Fun! specifying huggingface-hub==0.12.1 should also fix it.

from cog-stable-diffusion.

zeke avatar zeke commented on September 28, 2024

I tried disabling safety checker code but still seeing a similar error:

Downloading (…)ain/model_index.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 539/539 [00:00<00:00, 543kB/s]
Traceback (most recent call last):
  File "/src/script/download-weights", line 24, in <module>
    pipe = StableDiffusionPipeline.from_pretrained(
  File "/root/.pyenv/versions/3.10.10/lib/python3.10/site-packages/diffusers/pipeline_utils.py", line 459, in from_pretrained
    config_dict = cls.load_config(
  File "/root/.pyenv/versions/3.10.10/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 380, in load_config
    config_dict = cls._dict_from_json_file(config_file)
  File "/root/.pyenv/versions/3.10.10/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 479, in _dict_from_json_file
    with open(json_file, "r", encoding="utf-8") as reader:
FileNotFoundError: [Errno 2] No such file or directory: 'diffusers-cache/models--stabilityai--stable-diffusion-2-1/snapshots/36a01dc742066de2e8c91e7cf0b8f6b53ef53da1/model_index.json'
ⅹ exit status 1

from cog-stable-diffusion.

zeke avatar zeke commented on September 28, 2024

I see the cached files all greyed out, and some indication that there are symlinks... ?

Screenshot 2023-03-08 at 1 04 22 PM

from cog-stable-diffusion.

zeke avatar zeke commented on September 28, 2024

Getting the same error on a Lambda Labs machine. Looks like something is up with that config.json file:

Screenshot 2023-03-08 at 1 08 08 PM

from cog-stable-diffusion.

daanelson avatar daanelson commented on September 28, 2024

weird! I just ran it from main without issue. perhaps we can figure it out when pairing tomorrow.

the symlink from snapshots to blobs is expected, though perhaps a fun surprise.

from cog-stable-diffusion.

jiimmeh avatar jiimmeh commented on September 28, 2024

Hi,
I just recently started getting this kind of error as well. I always remove the safety checker as I am pulling custom SD models, looks like I am unable to download any SD weights from HuggingFace now.

Last time I successfully downloaded the same weights were a couple of days ago. Could it be something in HF that has changed?

Tried local Windows machine and Lambda labs.

image

from cog-stable-diffusion.

zeke avatar zeke commented on September 28, 2024

Looks like it's fixed in 0.13.2: https://github.com/huggingface/huggingface_hub/releases/tag/v0.13.2

from cog-stable-diffusion.

zeke avatar zeke commented on September 28, 2024

specifying huggingface-hub==0.12.1 should also fix it.

How do we do that? huggingface-hub is not specified in cog.yaml. It's a transitive dependency, presumably of diffusers. Does adding it to build.python_packages in cog.yaml take precedence?

from cog-stable-diffusion.

chenxwh avatar chenxwh commented on September 28, 2024

How do we do that? huggingface-hub is not specified in cog.yaml. It's a transitive dependency, presumably of diffusers. Does adding it to build.python_packages in cog.yaml take precedence?

I believe so if you specify huggingface-hub after diffuser in cog.yaml

from cog-stable-diffusion.

zeke avatar zeke commented on September 28, 2024

☝🏼 Yep that worked. 4ef4734

from cog-stable-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.