soulteary / docker-prompt-generator

Using a Model to generate prompts for Model applications. / 使用模型来生成作图咒语的偷懒工具,支持 MidJourney、Stable Diffusion 等。
https://soulteary.com/2023/04/05/eighty-lines-of-code-to-implement-the-open-source-midjourney-and-stable-diffusion-spell-drawing-tool.html
MIT License
1.16k stars 111 forks source link

部署好之后执行报错 #2

Open kenyonxu opened 1 year ago

kenyonxu commented 1 year ago

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 commented 1 year ago

image

soulteary commented 1 year ago

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

Dorothy863 commented 1 year ago

应该是 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,但是没有得到解决。 https://github.com/pharmapsychotic/clip-interrogator/issues/74#issue-1677541503

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 commented 10 months ago

应该是 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