ArtVentureX / sd-webui-agent-scheduler

629 stars 66 forks source link

A1111 1.6.0 broken #124

Closed scottix closed 1 year ago

scottix commented 1 year ago

I know it just came out, but it seems to be broken with the 1.6.0 update.

When I push Generate on the txt2img, it attempts to start, but then just does nothing and the interface seems to lock up after that.

Disabled the plugin and my interface starts working again.

Other people with issue: Since the interface locks up you can use the new argument --disable-all-extensions then you can disable the plugin, to get the interface working again.

klgr commented 1 year ago

I was lucky enough to install the scheduler the same day a1111 updated so I couldn't tell which was at fault. Thanks for the tip how to disable it, I was about to do a complete reinstall

IntendedConsequence commented 1 year ago

Hitting F5 and refreshing the page seems to fix the ui for me

dave8x commented 1 year ago

confirm, unfortunately i've updated a1111 to 1.6 today and i made a huge mistake. the scheduler was quite the most needed extension for me, so i'll have to see how i can revert back to previous a1111 version (i kinda suck at all this coding thing so i already know its gonna be hassle)

artventuredev commented 1 year ago

If possible please share some additional information for better debugging:

You may want to try delete the venv folder and restart the webui to make sure all dependencies are up to date.

FriedGenera commented 1 year ago

@dave8x if you ever want to revert to a previous version just go to your stable diffusion folder, open terminal in that folder, and type "git checkout [commit hash of the version/version if it has a tag]". So if you want 1.5.2 type "git checkout 1.5.2" or "git checkout c9c8485bc1e8720aba70f029d25cba1c4abf2b5c" and you'll be back to version 1.5.2. You can find the hash on the automatic1111 github releases page or by typing "git log" in the same terminal. Just make sure you don't have it automatically updating. If you want to go back to the newest version, you can type "git checkout master" then "git pull". Adding "--no-gradio-queue" to the arguements if you're having connection issues/hanging on an older version can help.

dave8x commented 1 year ago

@FriedGenera thanks for your help :) actually later that day i updated to the latest version and started working again so didnt need to revert, however just few minutes ago a new commit came out and updated aaand stopped working again

@artventuredev since its not working again (just updated few minutes ago) what and how should i provide you with? the issue is i'm clicking enqeue but nothing happens, no errors, nothing. the generate and all the rest works fine tho currently using A1111 ver 1.6 and the extension i have installed is this

sd-webui-agent-scheduler https://github.com/ArtVentureX/sd-webui-agent-scheduler.git main
310bb4ea
2023-08-30 02:18:52

the last update was this afternoon

edit quick follow up, just tried firefox for the sake of trying and... its working as it should. never loaded a1111 on FF yet so not sure whats going on but anyhow

artventuredev commented 1 year ago

@dave8x Could you please confirm the version or commit of the SD webui you are currently using? The most recent update to the SD webui was version 1.6.0, released last week. There hasn't been any new update since then. Similarly, the latest commit from agent-scheduler was made two weeks ago. Therefore, I don't anticipate any new updates at this time.

dave8x commented 1 year ago

@artventuredev sure, but pls tell me how to do that since im not very technical (more like i'm not technical) I'm using ver 1.6 of A1111 from stability matrix so it does its magic on its own behind the scene. The commit I dont know how/where to get the info from. The extension version i've pasted it up in my last reply. if you need anything else just guide me through how and i'll gladly do it (this is by far my favourite extension! congrats on your developers)

also this morning i've tested chrome again and its working fine. from my end there was no updates on chrome or windows or anything. the 'bug' showed up after closing the SD and reopening (cause i changed a saving option in the A1111 settings which is not related to the extension). Infact the setting is still there and this morning working fine, so can't say I can replicate the issue sorry

zethriller commented 1 year ago

There is that in the browser console if this can help. Pretty sure any generation triggers it.

Uncaught (in promise) TypeError: s.map is not a function
    getSamplers http://127.0.0.1:7860/file=extensions/sd-webui-agent-scheduler/javascript/agent-scheduler.iife.js?1693548449.5361376:302
[agent-scheduler.iife.js:302:3849](http://127.0.0.1:7860/file=extensions/sd-webui-agent-scheduler/javascript/agent-scheduler.iife.js?1693548449.5361376)

Uncaught (in promise) TypeError: s.map is not a function
    getCheckpoints http://127.0.0.1:7860/file=extensions/sd-webui-agent-scheduler/javascript/agent-scheduler.iife.js?1693548449.5361376:302

Script is a one-liner but here's the part it points to:

.then(s=>s.map(a=>a.name)),getCheckpoints:async()=>fetch("/sdapi/v1/sd-models").then(s=>s.json()).then(s=>s.map(a=>a.title))}}},bw="",Fw="",xw="",Lw="";

Agent Scheduler 310bb4ea on A1111 1.6.0

Edit:

Some more insight into this, put some chunks in the immediate console:

> fetch("/sdapi/").then(s=>s.json())
Promise { <state>: "pending" }
​<state>: "fulfilled"
​<value>: Object { detail: "Not Found" }

I don't know if those are related as well ?


Firefox can’t establish a connection to the server at ws://127.0.0.1:7860/queue/join. 3 [index.js:488:24](http://127.0.0.1:7860/client/js/dist/index.js)
The connection to ws://127.0.0.1:7860/queue/join was interrupted while the page was loading. 3 [index.js:488:24](http://127.0.0.1:7860/client/js/dist/index.js)
Firefox can’t establish a connection to the server at ws://127.0.0.1:7860/queue/join.
artventuredev commented 1 year ago

@zethriller, thank you for providing the logs. Based on them, I have an inkling about what might be causing the issue. Could you test the updated version and let me know if it resolves the problem?

zethriller commented 1 year ago

@artventuredev Looks good to one condition: you must start the webui with --api or the models/samplers polling will not be available this way. However now there is something else. Job finishes ok, image is saved in output directory but preview in txt2img tab dissapears and results with grid and output images never show up. Console has this traceback:

---
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 289, in __call__
    await super().__call__(scope, receive, send)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 109, in __call__
    await response(scope, receive, send)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 270, in __call__
    async with anyio.create_task_group() as task_group:
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 597, in __aexit__
    raise exceptions[0]
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 273, in wrap
    await func()
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 134, in stream_response
    return await super().stream_response(send)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\responses.py", line 255, in stream_response
    await send(
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in _send
    await send(message)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 490, in send
    output = self.conn.send(event=response)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 512, in send
    data_list = self.send_with_data_passthrough(event)
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 527, in send_with_data_passthrough
    raise LocalProtocolError("Can't send data when our state is ERROR")
h11._util.LocalProtocolError: Can't send data when our state is ERROR
'AsyncRequest' object has no attribute '_json_response_data'
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='erk299k7ema_679' coro=<Queue.process_events() done, defined at F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\gradio\queueing.py:384> exception=ValueError('[<gradio.queueing.Event object at 0x000001A0A3A12710>] is not in list')>
Traceback (most recent call last):
  File "F:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\gradio\queueing.py", line 471, in process_events
    self.active_jobs[self.active_jobs.index(events)] = None
ValueError: [<gradio.queueing.Event object at 0x000001A0A3A12710>] is not in list

I don't see any agent scheduler file here so i can only guess it's related...