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

diffusers: missing omegaconf #1537

Closed
35develr opened this issue Jan 3, 2024 · 4 comments · Fixed by #1540
Closed

diffusers: missing omegaconf #1537

35develr opened this issue Jan 3, 2024 · 4 comments · Fixed by #1540
Assignees
Labels
bug Something isn't working high prio regression

Comments

@35develr
Copy link

35develr commented Jan 3, 2024

I loaded a local safetensors SD Model, but when i try to query i get an 500 error at the backend.

models/stablediffusion.yaml:
name: stablediffusion parameters: model: realvis6.safetensors backend: diffusers step: 30 f16: false cuda: false diffusers: pipeline_type: StableDiffusionPipeline enable_parameters: "negative_prompt,num_inference_steps,clip_skip" scheduler_type: "k_dpmpp_sde" cfg_scale: 6 step: 30 clip_skip: 2

`
curl http://localhost:8080/v1/images/generations -H "Content-Type: application/json" -d '{"prompt": "a photo of a black cat on a table","size": "256x256"}'

{"error":{"code":500,"message":"could not load model (no success): Unexpected err=ValueError('\n{0} requires the omegaconf library but it was not found in your environment. You can install it with pip: pip\\ninstall omegaconf\n'), type(err)=\u003cclass 'ValueError'\u003e","type":""}}

I tried to install OmegaConf inside the docker container, but no success either:

pip install OmegaConf
Collecting OmegaConf
Downloading omegaconf-2.3.0-py3-none-any.whl (79 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 8.6 MB/s eta 0:00:00
Collecting antlr4-python3-runtime==4.9.* (from OmegaConf)
Downloading antlr4-python3-runtime-4.9.3.tar.gz (117 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.0/117.0 kB 8.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting PyYAML>=5.1.0 (from OmegaConf)
Downloading PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Downloading PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 738.9/738.9 kB 6.2 MB/s eta 0:00:00
Building wheels for collected packages: antlr4-python3-runtime
Building wheel for antlr4-python3-runtime (setup.py) ... done
Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144573 sha256=393e217e6a62c109c198b3b6a50db21a506d1664b20577a9e1afb5ce70f9b82c
Stored in directory: /root/.cache/pip/wheels/23/cf/80/f3efa822e6ab23277902ee9165fe772eeb1dfb8014f359020a
Successfully built antlr4-python3-runtime
Installing collected packages: antlr4-python3-runtime, PyYAML, OmegaConf
Successfully installed OmegaConf-2.3.0 PyYAML-6.0.1 antlr4-python3-runtime-4.9.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

:/build# pip list
Package Version


antlr4-python3-runtime 4.9.3
mercurial 5.6.1
omegaconf 2.3.0
pip 23.3.2
PyYAML 6.0.1
`

@35develr 35develr added the bug Something isn't working label Jan 3, 2024
@mudler
Copy link
Owner

mudler commented Jan 3, 2024

introduced by #1144 - wondering how this made it through from the CI tests

@35develr
Copy link
Author

35develr commented Jan 4, 2024

i pulled the new repo
git clone https://github.com/mudler/LocalAI/

in diffusers.yaml there is the new line: 56 - omegaconf
then i started the docker container and tried image generation with diffusers

this is the result:

{"error":{"code":500,"message":"could not load model (no success): Unexpected err=ValueError('\n{0} requires the omegaconf library but it was not found in your environment. You can install it with pip: pip\\ninstall omegaconf\n'), type(err)=\

please help, any suggestions?

@mudler mudler reopened this Jan 4, 2024
@mudler
Copy link
Owner

mudler commented Jan 4, 2024

have to try to reproduce it here then, where I'm using stablediffusion I'm running it from source I don't have that issue. Can you tell which image did you use in your tests? I've just tagged 2.4.0, so if you have a bit of patience new images will be available soon to test it out

@mudler mudler changed the title diffusers: diffusers: missing omegaconf Jan 4, 2024
@35develr
Copy link
Author

35develr commented Jan 8, 2024

I pulled the new docker images and it is working now for me.
Thank you for fixing so fast!

@35develr 35develr closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high prio regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants