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

Today,after update sd-webui-segment-anything, when i use text2 img I got error from log,and can’t got the image #49

Closed
4 tasks done
491331952 opened this issue Apr 18, 2023 · 14 comments

Comments

@491331952
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Have you updated WebUI and this extension to the newest version?

  • I have updated WebUI and this extension to the most up-to-date version

Do you understand that you should go to https://github.com/IDEA-Research/Grounded-Segment-Anything/issues if you cannot install GroundingDINO?

  • My problem is not about installing GroundingDINO

Do you know that you should use the newest ControlNet extension and enable external control if you want SAM extension to control ControlNet?

  • I have updated ControlNet extension and enabled "Allow other script to control this extension"

What happened?

Today,after update sd-webui-segment-anything, when i use text2 img I got error from log,and can’t got the image

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

Today,after update sd-webui-segment-anything, when i use text2 img I got error from log,and can’t got the image

Commit where the problem happens

webui: can't use to make image
extension: after update

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

nohup bash webui.sh >/home/ubuntu/stable-diffusion-webui/nohup.log 2>&1  &

Console logs

Traceback (most recent call last):
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1073, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 962, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/components.py", line 1203, in preprocess
    return self.choices.index(x)
ValueError: '0' is not in list

Additional information

No response

@491331952
Copy link
Author

额。。。。能讲中文啊?憋了半天的洋文。 跟新了一下插件,并且也装了ControlNet,但是使用正常的 文生图功能出不来图, 后台有报错。卸载sd-webui-segment-anything 后回复正常。

@491331952
Copy link
Author

切换到 GroundingDINO 分支可以正常使用。
image
image

@continue-revolution
Copy link
Owner

应该是gradio的bug,我之前碰到过,后来想了点办法给解决了,现在可能不知道是哪儿又出现了这个毛病。能不能麻烦你把你出现这个毛病的详细过程描述一下,最好把图片也发发,方便我复现。

@zhongnannk
Copy link

切换到 GroundingDINO 分支可以正常使用。 image image

同样的报错,辛苦了

@continue-revolution
Copy link
Owner

continue-revolution commented Apr 18, 2023

@491331952 @zhongnannk 你们得把你们的图片和操作过程说明一下我才能复现,不然我没办法帮你们debug

@DevJake
Copy link

DevJake commented Apr 18, 2023

I can confirm I am also having this issue.

The steps I took to produce it were:

  1. Install Segment Anything via the URL in the Extensions tab.
  2. Download the SAM models and place them into the appropriate directory.
  3. Enter the txt2img tab and type in a term. In my case, I just wrote cheese.
  4. Hit run.
  5. No image generates and in the console I receive the following error:
Traceback (most recent call last):
  File "/home/[user]/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/[user]/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1073, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/home/[user]/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 962, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "/home/[user]/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/components.py", line 1203, in preprocess
    return self.choices.index(x)
ValueError: '0' is not in list

This is the only information available. If there's a way to get more information - such as the exact dropdown or field that is erroneous - then let me know and I'll give it a go. Thanks!

@continue-revolution
Copy link
Owner

Thank you very much. It is much more helpful if you can provide information. Could I say that you actually did not use this extension, but only installed, but is unable to do ordinary txt2img without any extension enabled?

@DevJake
Copy link

DevJake commented Apr 18, 2023

Yes, I did not use the extension, simply having it installed causes this issue. I actually removed all of my extensions then added them back individually, confirming that simply the presence of this extension causes the issue. I have gone through all of the configuration menus and changed whatever I can to ensure everything has a default or updated value, with no success. So the extension is not able to do ordinary txt2img unless it is completely removed from the extensions directory.

@continue-revolution
Copy link
Owner

It seems that gradio is having some very wierd behavior. Is your webui and the extension the most up-to-date? Please update your webui and extension and re-try. If it does no help, I will do some urgent fix to bypass some gradio bugs.

@continue-revolution
Copy link
Owner

OK I know the problem. Did you install ControlNet? If no, the problem comes from this. I'll try to fix this problem.

@continue-revolution
Copy link
Owner

I have fixed the problem. Please re-try and let me know if it is working.

@DevJake
Copy link

DevJake commented Apr 18, 2023

Hey, yes, ControlNet is installed. I just git pulled your latest commit and it is now working as expected. Unless @491331952 continues to have issues after pulling the latest changes then I believe this issue to be solved. Thank you!

@491331952
Copy link
Author

@DevJake @continue-revolution I test it,the problem has been fixed!Thanks。
点赞点赞!

@zhongnannk
Copy link

zhongnannk commented Apr 19, 2023 via email

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