TemporAlyx / StreamStableDiffusion

Simple Twitch bot for StableDiffusion !generate chat commands
7 stars 1 forks source link

Errors (Help needed) #1

Closed ajaxniix closed 1 year ago

ajaxniix commented 1 year ago

I'm getting this errors and was wondering what could be the issue here. (KeyError: 'data') I'm not that good with stuff like these, appreciate any help, thank you.

After getting !generate these errors comes.

image

Traceback (most recent call last):
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\repositories\StreamStableDiffusion-main\streambot.py", line 474, in <module>
    main()
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\repositories\StreamStableDiffusion-main\streambot.py", line 427, in main
    images, params = check_outputs(Webui_Interface, active_command)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\repositories\StreamStableDiffusion-main\streambot.py", line 236, in check_outputs
    return webui.get_outputs(command)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\repositories\StreamStableDiffusion-main\websocket_interface.py", line 84, in get_outputs
    b64img = resp.json()['data'][0][0][22:]
             ~~~~~~~~~~~^^^^^^^^
KeyError: 'data'

While I'm getting these errors in web-ui cmd after getting the !generate.

image

Traceback (most recent call last):
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\modules\generation_parameters_copypaste.py", line 155, in send_image_and_dimensions
    img = image_from_url_text(x)
  File "E:\AI\SUPER SD 2.0 Dependencies\stable-diffusion-webui\modules\generation_parameters_copypaste.py", line 72, in image_from_url_text
    filedata = base64.decodebytes(filedata.encode('utf-8'))
  File "E:\Python\Python310\lib\base64.py", line 562, in decodebytes
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
TemporAlyx commented 1 year ago

It looks the auto1111 webui updated / changed their api. I've pushed a fix that seems to be working for now, but it may have other issues. (also sorry I did see your post for several months, hopefully you found a different application/solution in the meantime)