AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.6k stars 26.61k forks source link

[Bug]: WebUI no longer starts after UI settings change #14895

Open dot3x3q opened 7 months ago

dot3x3q commented 7 months ago

Checklist

What happened?

Been using this install of A1111 for weeks now without much issue. The issues I have had I've been able to resolve by searching the issues on this repo (it's been very helpful). I did a search for this particular one, however, but was unable to find anything before writing this up.

Basically, I changed a few settings and webui.bat no longer successfully boots at all.

image The errors go on and on; see console logs for full errors in the cmd terminal.

Steps to reproduce the problem

UPDATE: See my comment below. These settings changes appear to not be what caused the issue. Errors persist.

If I can recall specifically, I changed:

  1. Increased the checkpoints limit from 1 to 2. (note: I did NOT change the "Checkpoints to cache in RAM option, because it said it was no longer supported in this version.)
  2. Added the number of loaded checkpoints quick slider (to quickly change this setting if needed) to the "Quicksettings" list.

I may have changed a few more settings in the UI before applying a reload, but I just can't remember.

What should have happened?

Running webui.bat should boot as it always normally has.

What browsers do you use to access the UI ?

Brave

Sysinfo

sysinfo-2024-02-11-07-32.json

Console logs

venv "D:\Github\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Style database not found: D:\Github\stable-diffusion-webui\styles.csv
ControlNet preprocessor location: D:\Github\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-02-11 00:28:10,603 - ControlNet - INFO - ControlNet v1.1.440
2024-02-11 00:28:10,665 - ControlNet - INFO - ControlNet v1.1.440
Loading weights [368bcd108f] from D:\Github\stable-diffusion-webui\models\Stable-diffusion\epicrealismXL_v10.safetensors*** Error calling: D:\Github\stable-diffusion-webui\extensions-builtin\extra-options-section\scripts\extra_options_section.py/ui
    Traceback (most recent call last):
      File "D:\Github\stable-diffusion-webui\modules\scripts.py", line 489, in wrap_call
        return func(*args, **kwargs)
      File "D:\Github\stable-diffusion-webui\extensions-builtin\extra-options-section\scripts\extra_options_section.py", line 45, in ui
        comp = ui_settings.create_setting_component(setting_name)
      File "D:\Github\stable-diffusion-webui\modules\ui_settings.py", line 28, in create_setting_component
        args = info.component_args() if callable(info.component_args) else info.component_args
      File "D:\Github\stable-diffusion-webui\modules\shared_options.py", line 360, in <lambda>
        'postprocessing_enable_in_main_ui': OptionInfo([], "Enable postprocessing operations in txt2img and img2img tabs", ui_components.DropdownMulti, lambda: {"choices": [x.name for x in shared_items.postprocessing_scripts()]}),
    TypeError: 'NoneType' object is not iterable

---
*** Error calling: D:\Github\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py/ui
    Traceback (most recent call last):
      File "D:\Github\stable-diffusion-webui\modules\scripts.py", line 489, in wrap_call
        return func(*args, **kwargs)
      File "D:\Github\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 319, in ui
        group, state = self.uigroup(f"ControlNet-{i}", is_img2img, elem_id_tabname, photopea)
      File "D:\Github\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 260, in uigroup        return group, group.render(tabname, elem_id_tabname)
      File "D:\Github\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py", line 407, in render
        self.photopea.attach_photopea_output(self.generated_image)
      File "D:\Github\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\photopea.py", line 178, in attach_photopea_output
        output.upload(
      File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\events.py", line 140, in __call__
        dep, dep_index = self.trigger.set_event_trigger(
      File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 242, in set_event_trigger
        raise AttributeError(
    AttributeError: upload() and other events can only be called within a Blocks context.

---
*** Error calling: D:\Github\stable-diffusion-webui\scripts\prompts_from_file.py/ui
    Traceback (most recent call last):
      File "D:\Github\stable-diffusion-webui\modules\scripts.py", line 489, in wrap_call
        return func(*args, **kwargs)
      File "D:\Github\stable-diffusion-webui\scripts\prompts_from_file.py", line 122, in ui
        file.change(fn=load_prompt_file, inputs=[file], outputs=[file, prompt_txt, prompt_txt], show_progress=False)
      File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\events.py", line 140, in __call__
        dep, dep_index = self.trigger.set_event_trigger(
      File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 242, in set_event_trigger
        raise AttributeError(
    AttributeError: change() and other events can only be called within a Blocks context.

---
*** Error calling: D:\Github\stable-diffusion-webui\scripts\xyz_grid.py/ui
    Traceback (most recent call last):
      File "D:\Github\stable-diffusion-webui\modules\scripts.py", line 489, in wrap_call
        return func(*args, **kwargs)
      File "D:\Github\stable-diffusion-webui\scripts\xyz_grid.py", line 457, in ui
        swap_xy_axes_button.click(swap_axes, inputs=xy_swap_args, outputs=xy_swap_args)
      File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\events.py", line 140, in __call__
        dep, dep_index = self.trigger.set_event_trigger(
      File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 242, in set_event_trigger
        raise AttributeError(
    AttributeError: click() and other events can only be called within a Blocks context.

---
Traceback (most recent call last):
  File "D:\Github\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "D:\Github\stable-diffusion-webui\launch.py", line 44, in main
    start()
  File "D:\Github\stable-diffusion-webui\modules\launch_utils.py", line 464, in start
    webui.webui()
  File "D:\Github\stable-diffusion-webui\webui.py", line 64, in webui
    shared.demo = ui.create_ui()
  File "D:\Github\stable-diffusion-webui\modules\ui.py", line 355, in create_ui
    custom_inputs = scripts.scripts_txt2img.setup_ui()
  File "D:\Github\stable-diffusion-webui\modules\scripts.py", line 663, in setup_ui
    dropdown.change(
  File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\events.py", line 140, in __call__
    dep, dep_index = self.trigger.set_event_trigger(
  File "D:\Github\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 242, in set_event_trigger
    raise AttributeError(
AttributeError: change() and other events can only be called within a Blocks context.
Creating model from config: D:\Github\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Applying attention optimization: Doggettx... done.
Model loaded in 3.2s (load weights from disk: 0.5s, create model: 0.3s, apply weights to model: 2.1s, calculate empty prompt: 0.1s).
Press any key to continue . . .

Additional information

No response

dot3x3q commented 7 months ago

Reverting the two changes I made back in config.json to how they were originally, did not fix the boot errors , so that was clearly not the issue.

UPDATE: I've found the source of the problem, at least in my case. In comparing my config.json to a default one, adding postprocessing_enable_in_main_ui to extra_options_txt2img causes boot to fail.

Full snippet: "extra_options_txt2img": [ "postprocessing_enable_in_main_ui" ],

Does anyone have any idea why this might have caused errors on startup?