Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build invoke ui - get "ImportError" on "ModelSearchArguments" #630

Open
1 task done
points-unknown opened this issue Dec 22, 2023 · 3 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@points-unknown
Copy link

Has this issue been opened before?

  • [x ] It is not in the FAQ, I checked.
  • It is not in the issues, I searched.

Describe the bug

On building with

docker compose --profile invoke up --build

get the following:
image

Which UI

invoke

Hardware / Software

  • OS: Ubuntu 22.04
  • OS version: 22.04.3 LTS
  • Docker Version: 24.0.7
  • Docker compose version: 2.21.0

Steps to Reproduce

  1. type: docker compose --profile invoke up --build
  2. See error
@points-unknown points-unknown added the bug Something isn't working label Dec 22, 2023
@tired-engineer
Copy link

My bet is on huggingface_hub v0.19, which removed ModelSearchArguments completely.
Similar to @peacheniya solution for the torchmetrics issue, I went through dependencies and got something like the following in the ./services/invoke/Dockerfile after torchmetrics fix:

RUN --mount=type=cache,target=/root/.cache/pip \
  pip uninstall -y huggingface-hub && \
  pip install huggingface-hub==0.18

RUN --mount=type=cache,target=/root/.cache/pip \
  pip uninstall -y transformers && \
  pip install transformers==4.28

RUN --mount=type=cache,target=/root/.cache/pip \
  pip uninstall -y werkzeug && \
  pip install werkzeug==2.2.2

It does not fix the underlying issue, dependency on the old libraries, but at least makes it runnable.

@AbdBarho AbdBarho linked a pull request Feb 3, 2024 that will close this issue
@gitwittidbit
Copy link

RUN --mount=type=cache,target=/root/.cache/pip
pip uninstall -y huggingface-hub &&
pip install huggingface-hub==0.18

RUN --mount=type=cache,target=/root/.cache/pip
pip uninstall -y transformers &&
pip install transformers==4.28

RUN --mount=type=cache,target=/root/.cache/pip
pip uninstall -y werkzeug &&
pip install werkzeug==2.2.2

Sadly, doesn't work for me. Same error as before.

Hoping now for AbdBarho's fix to be merged.

@TotalBogus
Copy link

To anyone else who runs into this issue before the update comes out, you can patch your copy by changing the following two lines in the middle of the invokeai/Dockerfile after the torchmetrics fix:

#git reset --hard f3b2e02921927d9317255b1c3811f47bd40a2bf9 && \
  git reset --hard dedead672f2e9f995b6b96d7ada37456dab15b55 && \ 

#ARG BRANCH=main SHA=f3b2e02921927d9317255b1c3811f47bd40a2bf9
ARG BRANCH=main SHA=dedead672f2e9f995b6b96d7ada37456dab15b55

And then adding this third line right before COPY . /docker/:

RUN sed -i 's/https:\/\/civitai.com\/api\/download\/models\/63006/https:\/\/huggingface.co\/XpucT\/Loras\/resolve\/main\/LowRA_v2.safetensors?download=true/' invokeai/configs/INITIAL_MODELS.yaml

Apparently the bundled version of InvokeAI tries to pull a model (LowRA) from Civitai that's been removed (apparently the creator didn't like their updated T&Cs) but it seems to also be available on huggingface (LowRA_v2.safetensors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants