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

[Bug]: Fails to load if control net is not installed. TypeError: '<' not supported between instances of 'NoneType' and 'int' #47

Closed
3 tasks done
tpsjr7 opened this issue Apr 17, 2023 · 1 comment

Comments

@tpsjr7
Copy link

tpsjr7 commented Apr 17, 2023

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

What happened?

i tried to install this extension but it fails with this error

Traceback (most recent call last):
  File "X:\stable-diffusion-webui\modules\scripts.py", line 270, in wrap_call
    res = func(*args, **kwargs)
  File "X:\stable-diffusion-webui\extensions\sd-webui-segment-anything\scripts\sam.py", line 329, in ui
    priorize_sam_scripts(is_img2img)
  File "X:\stable-diffusion-webui\extensions\sd-webui-segment-anything\scripts\sam.py", line 304, in priorize_sam_scripts
    if cnet_idx < sam_idx:c
TypeError: '<' not supported between instances of 'NoneType' and 'int'`

When I look at it, it appears to fail on cnet_idx < sam_idx: and I believe that is because I don't have the control net extension installed so it fails because cnet_idx is None.

Steps to reproduce the problem

  1. Don't have control net extension installed.
  2. Install this sd-webui-segment-anything extension
  3. Start the app, and view the error 'TypeError: '<' not supported between instances of 'NoneType' and 'int'`'

What should have happened?

The app should load and I should see this extension appear.

Commit where the problem happens

webui: ebd3758129d3dbfc9796273fea2022e0ef4e6daf ( should be latest )
extension: 4ee968b

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

no

Console logs

not relevant

Additional information

maybe you can initialize cnet_idx to a high number like 100000000 instead of None, then it wouldn't fail the comparison.

@continue-revolution
Copy link
Owner

Yes, my bad. I will update soon.

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

2 participants