Open schoenid opened 11 months ago
Have you encountered any error logs in the console?
There's a newer version available currently. Please update and check if the issue persists.
I had the same problem of nothing being added to the Agent Scheduler queue when I clicked the Enqueue button, even with everything fully up-to-date. I just tried disabling all "extra" extensions in Automatic1111 except Agent Scheduler and it now appears to work. I will try to figure out which extension(s) may be conflicting, but there didn't appear to be any useful information in the console. I may also try increasing the logging level to a more VERBOSE level.
It appears that it may be a conflict with the sd_civitai_extension, at least in my case. Perhaps when the Civitai extension is unable to connect to the Civitai API, it is preventing AgentScheduler from queueing correctly. When I tried disconnecting from my Civitai connection, the AgentScheduler began to work again.
Alright... so every other time I restart the Automatic1111 WebUI, the content of the Extensions tab fails to populate. When it fails to populate, the Agent Scheduler does not function correctly. When I disable the Civitai extension, the content of the Extensions tab populates successfully every time, and the Agent Scheduler extension functions correctly every time. I have all of my other extensions except Civitai enabled. @schoenid Do you have the Civitai extension enabled? If so, could you check if the contents of the Extensions tab fail to populate every other time you restart the WebUI? And if so, if the Agent Scheduler extension works those times when the Extensions tab succeeds in populating? Or perhaps in your case, it is a different extension conflicting. In any case, I think the next step would be to determine why the contents of the Extension tab are often not loading when Civitai is enabled, because whatever is causing that is probably preventing Agent Scheduler from working in those cases. And quite possibly other extensions as well. Maybe those that require API-based functionality? I just installed Agent Scheduler today, so maybe @artventuredev would have better leads? I look forward to using the extension now that I have a workaround!
Thank you. I've got the Civitai extension disabled, but it's still not working - no wait - after a second restart of the webui it works !!! I'll do it a third time ... no problem.
What a great extension !
So, I enable Civitai again ... yes it stops working. After the first restart, the transfer from an image to txt2img is working now, but not the Enqueue function. I know, there was an update of the Civitai extension in the meantime. That let's me hope ...
I've disabled the sd-webui-agent-scheduler, restarted completely (even the terminal), enabled it again and it's still not working. So I've pressed the Generate button, waiting, until the image was finished and pressed the Enqueue button again: Oh wonder, it's working now!
So, it works now with the Civitai extension together.
One thing: I've realized even on other extension, that I have to restart the whole system several times, to make it working. What's not clear for me is, why I had to generate one image in advance, to make your extension working. I think, if I would have done this after the enabling of the Civitai extension, it would have been working there.
It's now clear for me: the main problem came from the Civitai extension, before it's update. So in my eyes, you could close this, except you would like to find out, why the extension does sometimes not properly initialize, until the "Generate" button is pressed.
Oh I did the update:
Have you encountered any error logs in the console?
There's a newer version available currently. Please update and check if the issue persists.
Now I've got problems again. No errors in the console.
Yes, it don't works anymore. Even with Civitai disabled. The trick with first pressing the "Generation" button does also not help. All other extensions are working fine.
The Civitai conflict is intriguing. I see that @webequate is using sd_civitai_extension and @schoenid is using sd-civitai-browser-plus, which are two distinct extensions. I attempted to replicate the issue using both extensions, but everything is functioning correctly on my PC so far, even without internet access.
Could you please check the browser console for any error logs? You can access this by pressing F12 on the browser tab, or by right-clicking anywhere on the page, selecting 'Inspect', and then opening the 'Console' tab. Please refresh the page and capture any error logs that appear.
@schoenid, could you try starting the webui with the --listen --api
arguments and let me know if the issue persists?
Now, I've disabled "OneButtonPrompt" and "Civitai". It is working now without the need of several restarts. Also a "Generate" is not required. Btw: "OneButtonPrompt" generates errors in the console, I just never used it before ...
If I enable "Civitai", it's no more working. After disabling it, it's still not working ... I have to disable "sd-webui-agent-scheduler" and enable it again, then it's working fine, directly after a restart of the webui.
I've enabled and disabled "Civitai" again, now it works without the need of disabling "sd-webui-agent-scheduler" and enabling it again. I'll do it another time ... now it works with "Civitai" enabled !!!
Log:
################################################################
Launching launch.py...
################################################################
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements for CivitAI Browser
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark
Using sqlite file: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-agent-scheduler/task_scheduler.sqlite3
2023-10-25 00:00:16,837 - ControlNet - INFO - ControlNet v1.1.411
ControlNet preprocessor location: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-10-25 00:00:16,905 - ControlNet - INFO - ControlNet v1.1.411
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [31e35c80fc] from /home/sd/Games/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors
Creating model from config: /home/sd/Games/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL: http://127.0.0.1:7860
Applying attention optimization: xformers... done.
Model loaded in 2.7s (load weights from disk: 0.3s, create model: 0.4s, apply weights to model: 1.6s, calculate empty prompt: 0.4s).
To create a public link, set `share=True` in `launch()`.
Startup time: 20.9s (prepare environment: 6.2s, import torch: 2.6s, import gradio: 0.7s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.3s, load scripts: 4.0s, create ui: 1.2s, gradio launch: 2.2s, app_started_callback: 2.5s).
Civitai enabled, no queue function.
################################################################
Launching launch.py...
################################################################
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark
Using sqlite file: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-agent-scheduler/task_scheduler.sqlite3
2023-10-25 00:01:06,393 - ControlNet - INFO - ControlNet v1.1.411
ControlNet preprocessor location: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-10-25 00:01:06,482 - ControlNet - INFO - ControlNet v1.1.411
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [31e35c80fc] from /home/sd/Games/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors
Creating model from config: /home/sd/Games/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL: http://127.0.0.1:7860
Applying attention optimization: xformers... done.
Model loaded in 2.4s (load weights from disk: 0.8s, create model: 0.2s, apply weights to model: 0.9s, calculate empty prompt: 0.4s).
To create a public link, set `share=True` in `launch()`.
Startup time: 17.0s (prepare environment: 4.9s, import torch: 2.6s, import gradio: 0.7s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.3s, load scripts: 1.9s, create ui: 0.5s, gradio launch: 2.4s, app_started_callback: 2.5s).
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 35/35 [00:10<00:00, 3.19it/s]
==========================================================================================███▏ | 35/49 [00:11<00:04, 3.45it/s]
A tensor with all NaNs was produced in VAE.
Web UI will now convert VAE into 32-bit float and retry.
To disable this behavior, disable the 'Automatically revert VAE to 32-bit floats' setting.
To always start with 32-bit VAE, use --no-half-vae commandline flag.
==========================================================================================
Tile 1/9
Tile 2/9
Tile 3/9
Tile 4/9
Tile 5/9
Tile 6/9
Tile 7/9
Tile 8/9
Tile 9/9
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:08<00:00, 1.66it/s]
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 49/49 [00:26<00:00, 1.85it/s]
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 49/49 [00:26<00:00, 1.75it/s]
Civitai disabled, queue is working.
################################################################
Launching launch.py...
################################################################
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements for CivitAI Browser
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark
Using sqlite file: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-agent-scheduler/task_scheduler.sqlite3
2023-10-25 00:04:09,227 - ControlNet - INFO - ControlNet v1.1.411
ControlNet preprocessor location: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-10-25 00:04:09,304 - ControlNet - INFO - ControlNet v1.1.411
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [31e35c80fc] from /home/sd/Games/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors
Creating model from config: /home/sd/Games/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 21.0s (prepare environment: 6.1s, import torch: 2.5s, import gradio: 0.7s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.3s, load scripts: 4.0s, create ui: 1.1s, gradio launch: 2.3s, app_started_callback: 2.8s).
Applying attention optimization: xformers... done.
Model loaded in 7.2s (load weights from disk: 0.3s, create model: 0.4s, apply weights to model: 6.0s, calculate empty prompt: 0.4s).
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 35/35 [00:11<00:00, 3.16it/s]
==========================================================================================███▏ | 35/49 [00:11<00:04, 3.44it/s]
A tensor with all NaNs was produced in VAE.
Web UI will now convert VAE into 32-bit float and retry.
To disable this behavior, disable the 'Automatically revert VAE to 32-bit floats' setting.
To always start with 32-bit VAE, use --no-half-vae commandline flag.
==========================================================================================
Tile 1/9
Tile 2/9
Tile 3/9
Tile 4/9
Tile 5/9
Tile 6/9
Tile 7/9
Tile 8/9
Tile 9/9
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:08<00:00, 1.63it/s]
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 49/49 [00:26<00:00, 1.83it/s]
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 49/49 [00:26<00:00, 1.74it/s]
Civitai enabled, queue is working.
I did this several time now, always with the same result. It's a miracle ... Everything is working now together.
After enabling or disabling other extension, I have to restart the UI twice, sometimes even the console. Otherwise the queue is not working. Maybe it's a problem of the webui itself.
could you try starting the webui with the --listen --api arguments and let me know if the issue persists?
Altough I think it's too late, I've tried it.
What I've realized in the console after a restart from the webui:
################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements for CivitAI Browser
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark
After restarting the console:
################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements for CivitAI Browser
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark --listen --api
Ok, seems clear to me. The console adds the options from webui-user.sh
on startup, so I have to restart the console.
The result makes no difference.
After a new restart of the console, the queue is no more working again. I've got errors.
Log:
################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements for CivitAI Browser
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark --listen --api
Aria2 RPC started
Using sqlite file: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-agent-scheduler/task_scheduler.sqlite3
2023-10-25 02:08:23,235 - ControlNet - INFO - ControlNet v1.1.411
ControlNet preprocessor location: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-10-25 02:08:23,309 - ControlNet - INFO - ControlNet v1.1.411
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [31e35c80fc] from /home/sd/Games/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors
Creating model from config: /home/sd/Games/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 20.2s (prepare environment: 6.2s, import torch: 2.5s, import gradio: 0.7s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.3s, load scripts: 3.9s, create ui: 1.1s, gradio launch: 2.3s, app_started_callback: 2.2s).
Applying attention optimization: xformers... done.
Model loaded in 7.5s (load weights from disk: 0.6s, create model: 0.2s, apply weights to model: 6.3s, calculate empty prompt: 0.4s).
Traceback (most recent call last):
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1429, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1222, in preprocess_data
self.validate_inputs(fn_index, inputs)
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1209, in validate_inputs
raise ValueError(
ValueError: An event handler (save_user_metadata) didn't receive enough input values (needed: 3, got: 2).
Check if the event handler calls a Javascript function, and make sure its return value is correct.
Wanted inputs:
[textbox, textbox, textbox]
Received inputs:
["Greek mythology mother nature,human gaia plants growing on her,sitting in the heavenly Garden full of greenery and lush beauty,finely detailed,dramatic,ray tracing,Intricate,insane intricate detailed,very high quality,", 36]
Traceback (most recent call last):
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1077, in call_function
assert block_fn.fn, f"function with index {fn_index} not defined."
AssertionError: function with index 366 not defined.
A restart from the webui does also not generate outputs in the console - just the browser window refreshes. But interestingly the queue is working now! And now it's even working after a restart of the console. ??? !!!
Log:
################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements for CivitAI Browser
Launching Web UI with arguments: --xformers --medvram-sdxl --opt-split-attention-v1 --theme dark --listen --api
Aria2 RPC started
Using sqlite file: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-agent-scheduler/task_scheduler.sqlite3
2023-10-25 02:14:45,420 - ControlNet - INFO - ControlNet v1.1.411
ControlNet preprocessor location: /home/sd/Games/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-10-25 02:14:45,488 - ControlNet - INFO - ControlNet v1.1.411
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [31e35c80fc] from /home/sd/Games/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors
Creating model from config: /home/sd/Games/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 20.4s (prepare environment: 6.1s, import torch: 2.6s, import gradio: 0.6s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.3s, load scripts: 3.8s, create ui: 1.1s, gradio launch: 2.4s, app_started_callback: 2.3s).
Applying attention optimization: xformers... done.
Model loaded in 6.6s (load weights from disk: 0.6s, create model: 0.2s, apply weights to model: 5.4s, calculate empty prompt: 0.3s).
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38/38 [01:00<00:00, 1.59s/it]
==========================================================================================
A tensor with all NaNs was produced in VAE.
Web UI will now convert VAE into 32-bit float and retry.
To disable this behavior, disable the 'Automatically revert VAE to 32-bit floats' setting.
To always start with 32-bit VAE, use --no-half-vae commandline flag.
==========================================================================================
Total progress: 38it [01:06, 1.76s/it]
Restarting UI...38it [01:06, 1.64s/it]
Doing a webui restart (Reload UI):
Closing server running on port: 7860
2023-10-25 02:16:50,517 - ControlNet - INFO - ControlNet v1.1.411
sd-webui-prompt-all-in-one background API service started successfully.
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 6.5s (load scripts: 1.4s, create ui: 0.6s, gradio launch: 2.1s, app_started_callback: 2.4s).
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38/38 [01:00<00:00, 1.60s/it]
Total progress: 38it [01:04, 1.70s/it]
Total progress: 38it [01:04, 1.65s/it]
I also often have this errors after changing some settings and starting something:
Traceback (most recent call last):
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1103, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/sd/Games/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "/home/sd/Games/stable-diffusion-webui/modules/ui_extra_networks.py", line 392, in pages_html
return refresh()
File "/home/sd/Games/stable-diffusion-webui/modules/ui_extra_networks.py", line 400, in refresh
ui.pages_contents = [pg.create_html(ui.tabname) for pg in ui.stored_extra_pages]
File "/home/sd/Games/stable-diffusion-webui/modules/ui_extra_networks.py", line 400, in <listcomp>
ui.pages_contents = [pg.create_html(ui.tabname) for pg in ui.stored_extra_pages]
File "/home/sd/Games/stable-diffusion-webui/modules/ui_extra_networks.py", line 162, in create_html
self.items = {x["name"]: x for x in self.list_items()}
File "/home/sd/Games/stable-diffusion-webui/modules/ui_extra_networks.py", line 162, in <dictcomp>
self.items = {x["name"]: x for x in self.list_items()}
File "/home/sd/Games/stable-diffusion-webui/extensions-builtin/Lora/ui_extra_networks_lora.py", line 69, in list_items
for index, name in enumerate(networks.available_networks):
RuntimeError: dictionary changed size during iteration
Elsewhere it's working fine.
Well some thoughts about the webui: The order of the initialization is not correct. The need to restart the console twice, could be caused by some requirements in some parts of the whole software, which will created on a later point, so these are missing. After the second pass, these are there and can be loaded. If I would know more about software ... but I'm not sure.
Restarting webui is not that stable, I usually do a full console restart instead. So you could try browser refresh first, and if it doesn't fix the issue, then do a full restart.
???