Trojaner / text-generation-webui-stable_diffusion

Integrate image generation capabilities to text-generation-webui using Stable Diffusion.
Other
51 stars 5 forks source link

Unable to Load Stable Diffusion Samplers #9

Closed JPyke3 closed 9 months ago

JPyke3 commented 9 months ago

I am experiencing an issue where the Stable Diffusion extension does not load when enabled in the Text Generation WebUI. The error logs indicate a TypeError related to fetching samplers from the SD client, but the exact cause is unclear. This prevents me from accessing and using the Stable Diffusion features within the web UI.

Expected Behavior: The Stable Diffusion extension should load successfully within the Text Generation WebUI, allowing access to its features and options.

Actual Behavior: The web UI fails to load when the Stable Diffusion extension is enabled in settings.yaml.

Reproduction Details (if applicable): I am running the default settings.debug.yaml file applied to my settings.yaml file, using the latest version of Text Generation WebUI.

Logs (Excuse the redaction, work computer):

WARNING: Loading settings from settings.yaml...
INFO: Loading the extension "openai"...
OpenAI-compatible API URL: http://0.0.0.0:5000
INFO: Loading the extension "code_syntax_highlight"...
INFO: Loading the extension "gallery"...
INFO: Loading the extension "web_search"...
INFO: Started server process [49484]
Waiting for application startup.
Application startup complete.
Uvicorn running on http://0.0.0.0:5000 (Press CTRL+C to quit)
Loading the extension "stable_diffusion"...
[SD WebUI Integration] Ready. Connecting to Stable Diffusion WebUI...
Fetching Stable Diffusion WebUI options...
Fetching Stable Diffusion samplers...
Traceback (most recent call last):
  File "/path/to/extensions/stable_diffusion/ui.py", line 553, in _fetch_samplers
    sd_samplers = [sampler["name"] for sampler in sd_client.get_samplers()]
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/extensions/stable_diffusion/ui.py", line 553, in <listcomp>
    sd_samplers = [sampler["name"] for sampler in sd_client.get_samplers()]
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ TypeError: string indices must be integers, not 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/path/to/server.py", line 249, in <module> create_interface()
                        ^^^^^^^^^^^^^^^^^^^
  File "/path/to/server.py", line 154, in create_interface extensions_module.create_extensions_tabs() # Extensions tabs
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/modules/extensions.py", line 200, in create_extensions_tabs extension.ui()
                            ^^^^^^^^^^^^^^^^^^^^
  File "/path/to/extensions/stable_diffusion/script.py", line 227, in ui render_ui(ui_params)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/extensions/stable_diffusion/ui.py", line 42, in render_ui _refresh_sd_data(params)
                            ^^^^^^^^^^^^^^^^^^^^
  File "/path/to/extensions/stable_diffusion/ui.py", line 511, in _refresh_sd_data _fetch_samplers(sd_client)
                                ^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/extensions/stable_diffusion/ui.py", line 555, in _fetch_samplers logger.error(error)
                              ^^^^^^^^^^^^^^^^^^
  File "/path/to/installer_files/env/lib/python3.11/logging/__init__.py", line 1518, in error self._log(ERROR, msg, args, **kwargs)
                                ^^^^^^^^^^^
  File "/path/to/installer_files/env/lib/python3.11/logging/__init__.py", line 1634, in _log self.handle(record)
                              ^^^^^^^^^^^^
  File "/path/to/installer_files/env/lib/python3.11/logging/__init__.py", line 1644, in handle self.callHandlers(record)
                              ^^^^^^^^^^^^
  File "/path/to/installer_files/env/lib/python3.11/logging/__init__.py", line 1706, in callHandlers hdlr.handle(record)
                                ^^^^^^^^^^^^
  File "/path/to/installer_files/env/lib/python3.11/logging/__init__.py", line 978, in handle self.emit(record)
                                  ^^^^^^^^^^^
  File "/path/to/modules/logging_colors.py", line 99, in new args[1].msg = color + args[1].msg + '\x1b[0m' # normal
                              ~~~~~~~~~~~~~~~^ TypeError: can only concatenate str (not "TypeError") to str
Trojaner commented 9 months ago

Are you using AUTOMATIC1111 or are you using SD.Next instead?