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

部署好之后执行报错 #2

Open
kenyonxu opened this issue Apr 9, 2023 · 4 comments
Open

部署好之后执行报错 #2

kenyonxu opened this issue Apr 9, 2023 · 4 comments

Comments

@kenyonxu
Copy link

kenyonxu commented Apr 9, 2023

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 393, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1108, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 915, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "webui.py", line 56, in get_prompt_from_image
prompt = ci.interrogate(image)
File "/usr/local/lib/python3.8/dist-packages/clip_interrogator/clip_interrogator.py", line 257, in interrogate
merged = _merge_tables([self.artists, self.flavors, self.mediums, self.movements, self.trendings], self.config)
File "/usr/local/lib/python3.8/dist-packages/clip_interrogator/clip_interrogator.py", line 429, in _merge_tables
m = LabelTable([], None, None, None, config)
TypeError: init() takes 4 positional arguments but 6 were given

@kenyonxu
Copy link
Author

kenyonxu commented Apr 9, 2023

image

@soulteary
Copy link
Owner

应该是 pip install 到的版本有问题,评论已回复:
https://zhuanlan.zhihu.com/p/619702740

@Dorothy863
Copy link

Dorothy863 commented Apr 25, 2023

应该是 pip install 到的版本有问题,评论已回复: https://zhuanlan.zhihu.com/p/619702740

我的解决办法是将clip-interrogator版本替换为0.6.0版本(在默认安装中,我被安装了0.5.5版本),这个方法对我有效。

我的gradio版本是默认安装的3.27.0,是最新的版本,应该没有影响。
注意: 在将clip-interrogator替换为0.6.0版本后,pip将一些相关性的依赖库也做了修改,不过首先在大佬的仓库中没有对那些依赖做版本控制,而且最终我还是跑起来了,问题应该不大。
VTYR$IUPXE}C~{PIYZ(KROQ

——————————划掉——————————
大佬您好,在翻到这个仓库后迫不及待的fork后自行部署,一样的错误。方便告诉gradio库和clip_interrogator的版本号吗?
翻找了您的博客和回答之后没有找到跟gradio版本相关的信息,那个仓库几乎每周都在更新。clip_interrogator库的项目中,我发现了一个类似的issue,但是没有得到解决。
pharmapsychotic/clip-interrogator#74 (comment)

To create a public link, set share=True in launch().
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 401, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1302, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1025, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "webui.py", line 56, in get_prompt_from_image
prompt = ci.interrogate(image)
File "/usr/local/lib/python3.8/dist-packages/clip_interrogator/clip_interrogator.py", line 257, in interrogate
merged = _merge_tables([self.artists, self.flavors, self.mediums, self.movements, self.trendings], self.config)
File "/usr/local/lib/python3.8/dist-packages/clip_interrogator/clip_interrogator.py", line 429, in _merge_tables
m = LabelTable([], None, None, None, config)
TypeError: init() takes 4 positional arguments but 6 were given

@tornado404
Copy link

tornado404 commented Dec 28, 2023

应该是 pip install 到的版本有问题,评论已回复: https://zhuanlan.zhihu.com/p/619702740

我的解决办法是将clip-interrogator版本替换为0.6.0版本(在默认安装中,我被安装了0.5.5版本),这个方法对我有效。

我的gradio版本是默认安装的3.27.0,是最新的版本,应该没有影响。 注意: 在将clip-interrogator替换为0.6.0版本后,pip将一些相关性的依赖库也做了修改,不过首先在大佬的仓库中没有对那些依赖做版本控制,而且最终我还是跑起来了,问题应该不大。 VTYR$IUPXE}C~{PIYZ(KROQ

——————————划掉—————————— 大佬您好,在翻到这个仓库后迫不及待的fork后自行部署,一样的错误。方便告诉gradio库和clip_interrogator的版本号吗? 翻找了您的博客和回答之后没有找到跟gradio版本相关的信息,那个仓库几乎每周都在更新。clip_interrogator库的项目中,我发现了一个类似的issue,但是没有得到解决。 pharmapsychotic/clip-interrogator#74 (comment)

To create a public link, set share=True in launch(). Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 401, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1302, in process_api result = await self.call_function( File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1025, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "webui.py", line 56, in get_prompt_from_image prompt = ci.interrogate(image) File "/usr/local/lib/python3.8/dist-packages/clip_interrogator/clip_interrogator.py", line 257, in interrogate merged = _merge_tables([self.artists, self.flavors, self.mediums, self.movements, self.trendings], self.config) File "/usr/local/lib/python3.8/dist-packages/clip_interrogator/clip_interrogator.py", line 429, in _merge_tables m = LabelTable([], None, None, None, config) TypeError: init() takes 4 positional arguments but 6 were given

请问0.6.0版本是如何安装的,pip install clip_interrogator git+https://github.com/pharmapsychotic/BLIP.git@lib#egg=blip这个默认安装的就是0.5.5版本

pip uninstall clip-interrogator -y && pip install clip-interrogator==0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants