brycedrennan / imaginAIry

Pythonic AI generation of images and videos
MIT License
7.96k stars 444 forks source link

hf_hub_download() got an unexpected keyword argument 'token' #180

Closed vivekhaldar closed 1 year ago

vivekhaldar commented 1 year ago

Getting the following backtrace on first invocation when trying to download the model:

Downloading https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/889b629140e71758e1e0006e355c331a5744b4bf/v1-5-pruned-emaonly.ckpt from huggingface
Traceback (most recent call last):
  File "/Users/haldar/.pyenv/versions/3.10.4/bin/imagine", line 8, in <module>
    sys.exit(imagine_cmd())
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/cmds.py", line 265, in imagine_cmd
    return _imagine_cmd(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/cmds.py", line 701, in _imagine_cmd
    imagine_image_files(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/api.py", line 84, in imagine_image_files
    for result in imagine(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/api.py", line 159, in imagine
    model = get_diffusion_model(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 145, in get_diffusion_model
    return _get_diffusion_model(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 203, in _get_diffusion_model
    model.num_timesteps_cond  # noqa
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 60, in __getattr__
    model = load_model_from_config(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 95, in load_model_from_config
    ckpt_path = get_cached_url_path(weights_location, category="weights")
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 284, in get_cached_url_path
    return huggingface_cached_path(url)
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 344, in huggingface_cached_path
    dest_path = hf_hub_download(
  File "/Users/haldar/.pyenv/versions/3.10.4/lib/python3.10/site-packages/imaginairy/model_manager.py", line 331, in hf_hub_download
    return _hf_hub_download(*args, **kwargs)
TypeError: hf_hub_download() got an unexpected keyword argument 'token'
brycedrennan commented 1 year ago

several people have reported this but I need more information. can you copy/paste the output of pip freeze here?

vivekhaldar commented 1 year ago
pip3 freeze
absl-py==1.2.0
aiohttp==3.8.3
aiosignal==1.3.1
altair==4.2.0
antlr4-python3-runtime==4.9.3
async-timeout==4.0.2
attrs==22.1.0
black==22.10.0
bleach==5.0.1
blinker==1.5
bokeh==2.4.3
cachetools==5.2.1
certifi==2022.6.15
chardet==3.0.4
charset-normalizer==2.0.12
click==8.1.3
click-shell==2.1
commonmark==0.9.1
contourpy==1.0.5
cycler==0.11.0
decorator==4.4.2
diffusers==0.11.1
dr-doc-search==1.4.1
einops==0.6.0
entrypoints==0.4
et-xmlfile==1.1.0
exceptiongroup==1.1.0
facexlib==0.2.5
fairscale==0.4.13
faiss-cpu==1.7.3
ffmpeg-python==0.2.0
filelock==3.8.0
filterpy==1.4.5
Flask==2.0.2
fonttools==4.37.2
frozenlist==1.3.3
fsspec==2023.1.0
ftfy==6.1.1
future==0.18.2
gitdb==4.0.10
GitPython==3.1.30
google-search-results==2.4.1
huggingface-hub==0.10.1
idna==2.10
imageio==2.19.3
imageio-ffmpeg==0.4.7
imaginAIry==8.0.0
importlib-metadata==6.0.0
iniconfig==2.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
joblib==1.2.0
jsonschema==4.17.3
kiwisolver==1.4.4
kornia==0.6.9
lambdaprompt==0.3.3
langchain==0.0.57
lightning-utilities==0.5.0
llvmlite==0.39.1
Markdown==3.4.1
MarkupSafe==2.1.1
matplotlib==3.6.0
mediapipe-silicon==0.8.11
more-itertools==9.0.0
moviepy==1.0.3
multidict==6.0.4
mypy-extensions==0.4.3
nest-asyncio==1.5.6
networkx==2.8.4
nltk==3.8.1
numba==0.56.4
numpy==1.22.4
omegaconf==2.3.0
open-clip-torch==2.9.3
openai==0.25.0
opencv-contrib-python==4.6.0.66
opencv-python==4.7.0.68
openpyxl==3.0.10
packaging==21.3
pandas==1.5.2
pandas-stubs==1.5.2.221213
panel==0.14.2
param==1.12.3
pathspec==0.10.2
Pillow==9.1.1
platformdirs==2.5.4
pluggy==1.0.0
proglog==0.1.10
protobuf==3.20.3
psutil==5.8.0
py-executable-checklist==1.3.1
pyarrow==10.0.1
pyct==0.4.8
pydantic==1.10.4
pydeck==0.8.0
Pygments==2.14.0
Pympler==1.0.1
pyparsing==3.0.9
pypdf==3.2.1
pyrsistent==0.19.3
pytest==7.2.1
python-dateutil==2.8.2
python-dotenv==0.21.0
pytorch-lightning==1.9.0
pytz==2022.6
pytz-deprecation-shim==0.1.0.post0
pyviz-comms==2.2.1
PyWavelets==1.3.0
PyYAML==6.0
regex==2022.10.31
requests==2.24.0
rich==13.1.0
safetensors==0.2.8
scikit-image==0.19.3
scikit-learn==1.2.0
scipy==1.8.1
semver==2.13.0
sentence-transformers==2.2.2
sentencepiece==0.1.97
six==1.16.0
slug==2.0
smmap==5.0.0
SQLAlchemy==1.4.45
srt==3.5.2
streamlit==1.17.0
threadpoolctl==3.1.0
tifffile==2022.5.4
timm==0.6.12
tokenizers==0.13.2
toml==0.10.2
tomli==2.0.1
toolz==0.12.0
torch==1.13.0
torchdiffeq==0.2.3
torchmetrics==0.11.0
torchvision==0.14.1
tornado==6.2
tqdm==4.64.0
transformers==4.24.0
types-pytz==2022.7.0.0
typing_extensions==4.4.0
tzdata==2022.7
tzlocal==4.2
urllib3==1.25.11
validators==0.20.0
wcwidth==0.2.6
webencodings==0.5.1
Werkzeug==2.2.2
whisper==1.0
yarl==1.8.2
zipp==3.11.0
brycedrennan commented 1 year ago

Thanks. Fixed in just release 8.0.2