Repository: stable-diffusion-webui
Issue: [Bug]: ScuNET disappears when the extension is enabled
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

For example, enabling controlnet, aesthetic-gradients or other (not all) removes ScuNET from the Upscaler list. Disabling extensions restores ScuNET to the Upscaler list.

### Steps to reproduce the problem

instruct-pix2pix or openpose-editor with aesthetic-gradients cause the problem after restart webui, but alone (without AG) not
and always controlnet - hard refresh browser (ctrl+F5) is needed

### What should have happened?

ScuNet should stay on the list because it's a great upscaler

### Commit where the problem happens

0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8

### What platforms do you use to access the UI ?

Linux

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
--xformers
```


### List of extensions





openpose-editor | https://github.com/fkunn1326/openpose-editor.git | 124e47c5 (Sun Mar 5 22:55:09 2023) | unknown
sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet | f51b2174 (Mon Mar 6 13:46:01 2023) | unknown
sd-webui-depth-lib | https://github.com/jexom/sd-webui-depth-lib | 04ac5c4d (Mon Mar 6 06:23:01 2023) | unknown
sd-webui-riffusion | https://github.com/enlyth/sd-webui-riffusion.git | 044ff5fa (Wed Jan 25 13:24:31 2023) | unknown
stable-diffusion-webui-aesthetic-gradients | https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients.git | 2624e5dd (Fri Jan 6 10:59:30 2023) | unknown
stable-diffusion-webui-composable-lora | https://github.com/opparco/stable-diffusion-webui-composable-lora.git | d4963e48 (Mon Feb 27 17:40:08 2023) | unknown
stable-diffusion-webui-instruct-pix2pix | https://github.com/Klace/stable-diffusion-webui-instruct-pix2pix.git | a5a4c6b8 (Sun Feb 5 22:19:05 2023) | unknown
stable-diffusion-webui-two-shot | https://github.com/ashen-sensored/stable-diffusion-webui-two-shot.git | 1dfc95ff (Mon Mar 6 03:55:31 2023) | unknown
LDSR | built-in |   |  
Lora | built-in |   |  
ScuNET | built-in |   |  
SwinIR | built-in |   |  
prompt-bracket-checker | built-in |  


### Console logs

```Shell
(base) user@debian:~/stable-diffusion-webui$ ./webui.sh --xformers

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on user user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.9 (main, Jan 11 2023, 15:21:40) [GCC 11.2.0]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI
Launching Web UI with arguments: --xformers
Loading weights [c35782bad8] from /home/user/stable-diffusion-webui/models/Stable-diffusion/realisticVisionV13_v13.safetensors
Creating model from config: /home/user/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0): 
Model loaded in 2.1s (create model: 0.4s, apply weights to model: 0.5s, apply half(): 0.3s, load VAE: 0.6s, move model to device: 0.4s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 271, in __call__
    await super().__call__(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 125, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 706, in __call__
    await route.handle(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
    return await dependant.call(**values)
  File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 402, in predict
    if app.get_blocks().dependencies[fn_index_inferred]["cancels"]:
IndexError: list index out of range
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Restarting UI...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
^CInterrupted with signal 2 in <frame at 0x2a701710, file '/home/user/stable-diffusion-webui/webui.py', line 173, code wait_on_server>
(base) user@debian:~/stable-diffusion-webui$ ./webui.sh --xformers

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on user user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.9 (main, Jan 11 2023, 15:21:40) [GCC 11.2.0]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI
Launching Web UI with arguments: --xformers
Loading weights [c35782bad8] from /home/user/stable-diffusion-webui/models/Stable-diffusion/realisticVisionV13_v13.safetensors
Creating model from config: /home/user/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0): 
Model loaded in 2.1s (create model: 0.3s, apply weights to model: 0.5s, apply half(): 0.3s, load VAE: 0.6s, move model to device: 0.4s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
```


### Additional information

https://youtu.be/O22RE7Jv4JU