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

add cmd_arg --disable-extensions all extra #12294

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Aug 4, 2023

Description

[Feature Request]: command-line argument to disable extensions
new arg
--disable-extensions all
--disable-extensions extra
I think it's pretty self-explanatory
this is useful for people that are constantly switching between without extensions
like when developing stuff / testing

Checklist:

@AUTOMATIC1111
Copy link
Owner

make it two args:

  • --disable-all-extensions - prevent all extensions from running regardless of any other settings
  • --disable-extra-extensions - prevent all extensions except built-in from running regardless of any other settings

@w-e-w w-e-w force-pushed the cmd_arg-disable-extensions branch from d7fde55 to bbfff77 Compare August 4, 2023 03:46
@w-e-w
Copy link
Collaborator Author

w-e-w commented Aug 4, 2023

done and added different message variant depending on which is applied
image

@AUTOMATIC1111 AUTOMATIC1111 merged commit 220e298 into dev Aug 4, 2023
6 checks passed
@AUTOMATIC1111 AUTOMATIC1111 deleted the cmd_arg-disable-extensions branch August 5, 2023 06:33
@halr9000
Copy link

LGTM except possibly one thing. An extension seems to be able to install requirements. Is that expected/desired?

venv "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.5.1-377-gae6b3090
Commit hash: ae6b30907db2060962c533de79ab4bd2c6b12297
Installing Miaoshou assistant requirement: gpt_index==0.4.24
Installing Miaoshou assistant requirement: langchain==0.0.132
Installing Miaoshou assistant requirement: gradio_client==0.2.7




Launching Web UI with arguments: --autolaunch --medvram --xformers --listen --enable-insecure-extension-access --port 5555 --disable-all-extensions
*** "--disable-all-extensions" arg was used, will not load any extensions ***

@w-e-w
Copy link
Collaborator Author

w-e-w commented Aug 12, 2023

LGTM except possibly one thing. An extension seems to be able to install requirements. Is that expected/desired?

venv "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.5.1-377-gae6b3090
Commit hash: ae6b30907db2060962c533de79ab4bd2c6b12297
Installing Miaoshou assistant requirement: gpt_index==0.4.24
Installing Miaoshou assistant requirement: langchain==0.0.132
Installing Miaoshou assistant requirement: gradio_client==0.2.7




Launching Web UI with arguments: --autolaunch --medvram --xformers --listen --enable-insecure-extension-access --port 5555 --disable-all-extensions
*** "--disable-all-extensions" arg was used, will not load any extensions ***

thanks that's not intended

@halr9000
Copy link

Manual tested both all and extra flags. I'm getting a ton of gradio noise which I think existed before (had not run in a week). But when I go into Extensions tab, the list of them does not load. @w-e-w LMK if you cannot repro and I will clean house and try again.

image

console output (unsure if this is relevant at quick glance):

venv "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.5.1-388-g4e869090
Commit hash: 4e8690906c02f14a81974200775bfc81718a9250
Launching Web UI with arguments: --autolaunch --medvram --xformers --listen --enable-insecure-extension-access --port 5555 --disable-extra-extensions
*** "--disable-extra-extensions" arg was used, will only load built-in extensions ***
Loading weights [de3a92d7da] from D:\hal\stable-diffusion\auto\stable-diffusion-webui\models\Stable-diffusion\progenuberanalogmix_v10.safetensors
Running on local URL:  http://0.0.0.0:5555
Creating model from config: D:\hal\stable-diffusion\auto\stable-diffusion-webui\configs\v1-inference.yaml

To create a public link, set `share=True` in `launch()`.
Startup time: 19.0s (prepare environment: 3.7s, import torch: 4.3s, import gradio: 1.5s, setup paths: 1.3s, initialize shared: 0.3s, other imports: 1.0s, setup codeformer: 0.3s, load scripts: 1.6s, create ui: 0.4s, gradio launch: 4.5s).
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
    await super().__call__(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
    await responder(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
    raise e
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app
    response = await func(request)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 292, in api_info
    return gradio.blocks.get_api_info(config, serialize)  # type: ignore
  File "D:\hal\stable-diffusion\auto\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 575, in get_api_info
    if type in client_utils.SKIP_COMPONENTS:
AttributeError: module 'gradio_client.utils' has no attribute 'SKIP_COMPONENTS'
Applying attention optimization: xformers... done.
Model loaded in 16.0s (load weights from disk: 0.7s, create model: 0.6s, apply weights to model: 9.4s, apply half(): 0.8s, load textual inversion embeddings: 0.1s, calculate empty prompt: 4.4s).

@w-e-w
Copy link
Collaborator Author

w-e-w commented Aug 12, 2023

well nothing I did here would cause this
and I don't really know the cause but a wild guess would be some extension has done some thing that messed up your environment
some extensions does things that are persistent even after beeing disabled
I suggest you do a fresh install and make sure that extension is not the cause of this issue

@w-e-w
Copy link
Collaborator Author

w-e-w commented Aug 12, 2023

also so we did switch to gradio 3.39.0 couple days ago

@halr9000
Copy link

Figured, no big deal. Your stuff looks good! I just didn't have the time to inspect my latest issues to see if related. Sounds like it's not, thanks for the detail.

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

Successfully merging this pull request may close these issues.

3 participants