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

Extension no longer shows up in Forge #256

Open
dronelove opened this issue Aug 14, 2024 · 36 comments
Open

Extension no longer shows up in Forge #256

dronelove opened this issue Aug 14, 2024 · 36 comments

Comments

@dronelove
Copy link

Hi, it seems Agent Scheduler no longer works in Forge -- the extension tab and Enqueue button are gone.

Currently running this version: lllyasviel/stable-diffusion-webui-forge@aadc0f0

@EleVicted
Copy link

+1 , excellent extension too. Hopefully we can figure it out. I get this at startup:

Using sqlite file: /content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/task_scheduler.sqlite3
*** Error loading script: task_scheduler.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/modules/scripts.py", line 525, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/modules/script_loading.py", line 13, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/scripts/task_scheduler.py", line 24, in
from agent_scheduler.task_runner import TaskRunner, get_instance
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/agent_scheduler/task_runner.py", line 26, in
from .db import TaskStatus, Task, task_manager
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/agent_scheduler/db/init.py", line 6, in
from .task import TaskStatus, Task, TaskManager
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/agent_scheduler/db/task.py", line 22, in
from ..models import TaskModel
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/agent_scheduler/models.py", line 53, in
class Txt2ImgApiTaskArgs(StableDiffusionTxt2ImgProcessingAPI):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui-forge/extensions/sd-webui-agent-scheduler/agent_scheduler/models.py", line 71, in Txt2ImgApiTaskArgs
class Config(StableDiffusionTxt2ImgProcessingAPI.config):
File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_model_construction.py", line 237, in getattr
raise AttributeError(item)
AttributeError: config


@ICodeDiffusion
Copy link

Hi, it seems Agent Scheduler no longer works in Forge -- the extension tab and Enqueue button are gone.

Currently running this version: lllyasviel/stable-diffusion-webui-forge@aadc0f0

probably because of Gradio 4.0 update

@Miuna88
Copy link

Miuna88 commented Aug 15, 2024

I haven't updated forge recently and the extension has stopped working there too. It does still appear in the UI but pressing the "enqueue" button doesn't do anything - worked fine up until maybe a day or two ago. Weird how base queue systems aren't included in GUI's at this point considering its such a useful tool.

@dronelove
Copy link
Author

dronelove commented Aug 15, 2024 via email

@supersonic13
Copy link

One of the best extensions around. Hope it gets updated to support Gradio 4 on Forge.

@younyokel
Copy link

Forge needs a good built-in queue system.

@cuom1705
Copy link

same here. I hope that we get update soon to use with forge

@gohan2091
Copy link

I would like to get this working in Forge also

@supersonic13
Copy link

ok - I got it working - but barely. Forked this repo and fixed a few issues:
https://github.com/supersonic13/sd-webui-agent-scheduler

Caveats: Forge now does not automatically load a model - so this breaks the agent scheduler. Only workaround is to generate manually first and then the enqueue should work. I haven’t tested a lot but this patch is not perfect but hope to sort out the issues over the next few days and hopefully submit a pull request to this repo.

Submitted a pull request but deleted as it was a half baked approach (disclaimer: first time figuring out Gradio etc)

@Mark-Reiser
Copy link

I too think this extension should be embedded by default into Forge. pleeeeease!

@raffetazarius
Copy link

This issue looks like a dupe of #253

@hendra2222
Copy link

hendra2222 commented Sep 25, 2024

ok - I got it working - but barely. Forked this repo and fixed a few issues: https://github.com/supersonic13/sd-webui-agent-scheduler

Caveats: Forge now does not automatically load a model - so this breaks the agent scheduler. Only workaround is to generate manually first and then the enqueue should work. I haven’t tested a lot but this patch is not perfect but hope to sort out the issues over the next few days and hopefully submit a pull request to this repo.

Submitted a pull request but deleted as it was a half baked approach (disclaimer: first time figuring out Gradio etc)

I've tried this, all the buttons is there but nothing happend when I press enqueue.

@supersonic13
Copy link

Hi - yes so you need to "generate" first - and only then the enqueue would work with future generations. This is because of the way Forge has been re-written, where it does not auto load models/checkpoints.

I am hoping to find some time this week to fix the Enqueue button action so it starts working as soon as it is clicked.

@hendra2222
Copy link

Hi - yes so you need to "generate" first - and only then the enqueue would work with future generations. This is because of the way Forge has been re-written, where it does not auto load models/checkpoints.

I am hoping to find some time this week to fix the Enqueue button action so it starts working as soon as it is clicked.

Hi,
First of all thank you so much for the effort! I played around with it today and yeah it kind of works. But when using multiple models for different queues this one dont work.
For example model1 for queue 1 with xxx prompt then model2 for queue 2 with xxx prompt. The prompt is there but the model doesnt changed ^^

@cupofwater1
Copy link

cupofwater1 commented Sep 29, 2024

Hi - yes so you need to "generate" first - and only then the enqueue would work with future generations. This is because of the way Forge has been re-written, where it does not auto load models/checkpoints.

I am hoping to find some time this week to fix the Enqueue button action so it starts working as soon as it is clicked.

Hey, I just wanted to thank you for taking the time to create this—it's super helpful and really convenient to use and I'm also glad you're bringing it to Forge. However, I followed the steps, but it’s still not working for me. After generating a photo and clicking 'enqueue,' nothing appears in the agent scheduler tab. Am I missing something?
image
image

@brknsoul
Copy link

brknsoul commented Oct 2, 2024

Yeah, @supersonic13 's fork doesn't work anymore, even after genning first.

@coderCK2
Copy link

coderCK2 commented Oct 2, 2024

Yeah, @supersonic13 's fork doesn't work anymore, even after genning first.

There was a Forge update recently that makes the fork no longer work. Since I only really experiment with Flux and don't really use any new features, I just revert to an old commit and use the non-forked version of the scheduler, and everything works just fine again.

@cupofwater1
Copy link

Yeah, @supersonic13 's fork doesn't work anymore, even after genning first.

There was a Forge update recently that makes the fork no longer work. Since I only really experiment with Flux and don't any new features, I just revert to an old commit and use the non-forked version of the scheduler, and everything works just fine again.

Which one did you use?

@coderCK2
Copy link

coderCK2 commented Oct 2, 2024

Which one did you use?

I am a little bit perplexed, as I had been using a very old commit (lllyasviel/stable-diffusion-webui-forge@29be1da) and wanted to provide you with a newer one, as well as perhaps pinpoint the recent commit that broke the Enqueue button; unfortunately (fortunately?) I could not find it! Every commit I tested worked just fine, including the most recent commit, lllyasviel/stable-diffusion-webui-forge@f4d5e8c. With that commit and the forked version of the scheduler, I can schedule jobs just fine (I only tested queuing jobs after generating once). 🤷🏻‍♂️

EDIT: Okay this is strange. After doing some more generations on the latest commit, the Enqueue button stopped working at some point. Apparently it's not broken from the start, which is why my tests of doing one generation and then running a job kept working. I don't have any more time to figure out which commit causes this behavior, but if you want a working old version with no Flux support, switch to the first commit I mentioned, and be sure to also switch to the non-forked scheduler.

@cupofwater1
Copy link

Which one did you use?

I am a little bit perplexed, as I had been using a very old commit (lllyasviel/stable-diffusion-webui-forge@29be1da) and wanted to provide you with a newer one, as well as perhaps pinpoint the recent commit that broke the Enqueue button; unfortunately (fortunately?) I could not find it! Every commit I tested worked just fine, including the most recent commit, lllyasviel/stable-diffusion-webui-forge@f4d5e8c. With that commit and the forked version of the scheduler, I can schedule jobs just fine (I only tested queuing jobs after generating once). 🤷🏻‍♂️

EDIT: Okay this is strange. After doing some more generations on the latest commit, the Enqueue button stopped working at some point. Apparently it's not broken from the start, which is why my tests of doing one generation and then running a job kept working. I don't have any more time to figure out which commit causes this behavior, but if you want a working old version with no Flux support, switch to the first commit I mentioned, and be sure to also switch to the non-forked scheduler.

Oh yeah, unfortunately I need one what works with Flux

@coderCK2
Copy link

coderCK2 commented Oct 2, 2024

Oh yeah, unfortunately I need one what works with Flux

If you have time, you can try some older commits. I can tell you for a fact that commit lllyasviel/stable-diffusion-webui-forge@c2d290e is the first one where I noticed the Enqueue button was broken, so commits prior to that would be a good starting point.

@supersonic13
Copy link

supersonic13 commented Oct 4, 2024

@hendra2222 @cupofwater1 @brknsoul hello - pushed some changes to the fork:
https://github.com/supersonic13/sd-webui-agent-scheduler

I'm now able to enqueue straight away (without needing to generate first) and it all seems to work for me.
However, the queued tasks end up using the main checkpoint selected in the top bar.
Hoping to find more time to solve this. (feel it's very close, though there are tons of complaints on the Forge forums about the inability to choose checkpoints on the go - so maybe not as close to a complete solution as I think) but please do let me know here if it's still badly broken and I'll probably do a fresh install, etc, and try it out.

@brknsoul
Copy link

brknsoul commented Oct 5, 2024

While the elements (Enqueue button, AS tab) show up, the Enqueue button still does nothing.

Tested on commits 953e3f3 and 2d3903d.

@supersonic13
Copy link

@brknsoul hello. i'll try to do a clean install and test it out again. are there any console logs that show up when the Enqueue button is clicked ?

@brknsoul
Copy link

brknsoul commented Oct 7, 2024

Okay, it works, but only after I refresh the tab (Chrome, Windows 10). Might be a Chrome Thing ™ ;-)

@5n0wCr45h
Copy link

So I think on first launch the Generate button isn't set, therefore the Enqueue button cannot be bound:

ERROR:root:Generate button not set; cannot bind enqueue button.

But after the Generate button is used once it is set, then if the browser tab is refreshed the Enqueue button can bind...but I have no idea how to fix that :(

@supersonic13
Copy link

@5n0wCr45h thanks for the logs. i can add some code to bind the button after a couple of more IDs are set.

@5n0wCr45h
Copy link

Any success?

@supersonic13
Copy link

Any success?

Hello. I tried to reproduce this on my PC but couldn't. I have added another check in the code, in any case. Can you update the forked extension and try it out please ?

@5n0wCr45h
Copy link

I should have time to try it tomorrow and will post the results.

@5n0wCr45h
Copy link

Initial testing looks promising.

@5n0wCr45h
Copy link

:( sorry, second test and same thing, must press the generation button first, reload the tab, then Enqueue works.

@supersonic13
Copy link

:( sorry, second test and same thing, must press the generation button first, reload the tab, then Enqueue works.

That's not great. Would it be possible to provide any console logs you might have when that happens please ?

@5n0wCr45h
Copy link

Sorry, it will me a while before I can put time into this :(

@younyokel
Copy link

@supersonic13 I don't expect updates to this repository, so If you're interested in continuing development, could you consider opening issues in your fork?

@supersonic13
Copy link

@supersonic13 I don't expect updates to this repository, so If you're interested in continuing development, could you consider opening issues in your fork?

hi sure .. I've just updated the repo to include Issues .. Obviously, any PRs are also welcome ..

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