pharmapsychotic / clip-interrogator-ext

Stable Diffusion WebUI extension for CLIP Interrogator
MIT License
492 stars 62 forks source link

TypeError: Config.__init__() got an unexpected keyword argument 'blip_model' #66

Open Trahloc opened 1 year ago

Trahloc commented 1 year ago

I get the following error when I try to run the interrogator:

Loading CLIP Interrogator 0.6.0...
load checkpoint from /home/trahloc/s/ai/stable-diffusion-webui/models/BLIP/model_base_caption_capfilt_large.pth
Traceback (most recent call last):
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/trahloc/mambaforge-pypy3/envs/sd/lib/python3.10/site-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "/home/trahloc/s/ai/stable-diffusion-webui/extensions/clip-interrogator-ext/scripts/clip_interrogator_ext.py", line 131, in image_to_prompt
    load(clip_model_name)
  File "/home/trahloc/s/ai/stable-diffusion-webui/extensions/clip-interrogator-ext/scripts/clip_interrogator_ext.py", line 63, in load
    config = Config(
TypeError: Config.__init__() got an unexpected keyword argument 'blip_model'
HTTP Request: POST http://localhost:7869/api/predict "HTTP/1.1 500 Internal Server Error"

I'm running Python 3.10.6 on an ubuntu 22.04 variant, pop os specifically. Running on port 7869 to avoid confliction with oobabooga which also runs on 7860. Included a list of all pip/mamba/conda modules installed in that environment.

mamba_list.txt

pip-packages.txt

pharmapsychotic commented 1 year ago

The extension uses clip-interrogator 0.5 to work with old version of transformers that webui used. Now it's updated to use 0.6, update extensions and restart webui and you should be in working order.