anapnoe / stable-diffusion-webui-ux

Stable Diffusion web UI UX
GNU Affero General Public License v3.0
964 stars 60 forks source link

[Bug]: api broken when using aiyabot #177

Closed dejl closed 8 months ago

dejl commented 1 year ago

Is there an existing issue for this?

What happened?

I’m trying to use this fork with aiyabot but it looks like something broken in some update , and api is no longer compatible (unsure which commit broke it)

https://github.com/Kilvoctu/aiyabot

lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/mnt/ai/sd/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/mnt/ai/sd/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/mnt/ai/sd/stable-diffusion-webui-ux/modules/api/api.py", line 305, in text2imgapi self.default_script_arg_txt2img = self.init_default_script_args(script_runner) File "/mnt/ai/sd/stable-diffusion-webui-ux/modules/api/api.py", line 260, in init_default_script_args if last_arg_index < script.args_to: TypeError: '<' not supported between instances of 'int' and 'NoneType'

Steps to reproduce the problem

  1. Setup a client program that interfaces with api (in this case aiyabot)..
  2. Try to generate

What should have happened?

Image should have been generated

Version or Commit where the problem happens

3843d60ae7a692932db9be5ca33625382be32ee9

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Linux

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

xformers

What browsers do you use to access the UI ?

No response

Command Line Arguments

—xformers

List of extensions

no

Console logs

lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync        return await get_asynclib().run_sync_in_worker_thread(
      File "/mnt/ai/sd/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
        return await future
      File "/mnt/ai/sd/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
        result = context.run(func, *args)
      File "/mnt/ai/sd/stable-diffusion-webui-ux/modules/api/api.py", line 305, in text2imgapi
        self.default_script_arg_txt2img = self.init_default_script_args(script_runner)
      File "/mnt/ai/sd/stable-diffusion-webui-ux/modules/api/api.py", line 260, in init_default_script_args
        if last_arg_index < script.args_to:
    TypeError: '<' not supported between instances of 'int' and 'NoneType'

Additional information

No response

dejl commented 1 year ago

Possibly related https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/9319

kingbased commented 1 year ago

disable the extra-options-section built in extension. I was getting the same error when trying to use the api with a different program.

dejl commented 1 year ago

disable the extra-options-section built in extension. I was getting the same error when trying to use the api with a different program.

This fixes the issue!