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

UserWarning: Expected 1 arguments for function <function Script.ui.<locals> #345

Open
D0n-A opened this issue Oct 15, 2024 · 1 comment
Open

Comments

@D0n-A
Copy link

D0n-A commented Oct 15, 2024

What happened?

Hello! I came across the following warnings / errors in console.

Steps to reproduce the problem:

  1. Clean installation of the AUTOMATIC1111 repository;
  2. Activating the item in the settings "Show warnings in console";
  3. Manual installation of insightface;
  4. Installing the ControlNet and ADetailer extensions;
  5. Closing the console and restarting the repository;
  6. There are warnings / errors in console.
...
...
...
scripts before_ui_callback: done in 0.004s
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:842: UserWarning: Expected 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x000002445C7AAA70>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:846: UserWarning: Expected at least 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x000002445C7AAA70>, received 0.
  warnings.warn(
Creating model from config: D:\AI\NS\configs\v1-inference.yaml
2024-10-16 01:11:04,308 - ControlNet - INFO - ControlNet UI callback registered.
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:842: UserWarning: Expected 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x000002445D104310>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:846: UserWarning: Expected at least 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x000002445D104310>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\huggingface_hub\file_download.py:1142: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
create ui: done in 1.777s
2024-10-16 01:11:05 DEBUG [asyncio] Using selector: SelectSelector
2024-10-16 01:11:05 DEBUG [httpx] load_ssl_context verify=None cert=None trust_env=True http2=False
Running on local URL:  http://127.0.0.1:7860
2024-10-16 01:11:05 DEBUG [urllib3.connectionpool] Starting new HTTP connection (1): 127.0.0.1:7860
2024-10-16 01:11:05 DEBUG [urllib3.connectionpool] http://127.0.0.1:7860 "GET /startup-events HTTP/11" 200 5
2024-10-16 01:11:05 DEBUG [urllib3.connectionpool] Starting new HTTP connection (1): 127.0.0.1:7860
2024-10-16 01:11:05 DEBUG [urllib3.connectionpool] http://127.0.0.1:7860 "HEAD / HTTP/11" 200 0

To create a public link, set `share=True` in `launch()`.
gradio launch: done in 0.343s
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:842: UserWarning: Expected 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x000002446476F760>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:846: UserWarning: Expected at least 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x000002446476F760>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:842: UserWarning: Expected 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x00000244675B9120>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:846: UserWarning: Expected at least 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x00000244675B9120>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:842: UserWarning: Expected 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x00000244732027A0>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:846: UserWarning: Expected at least 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x00000244732027A0>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:842: UserWarning: Expected 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x0000024473244160>, received 0.
  warnings.warn(
D:\AI\NS\venv\lib\site-packages\gradio\utils.py:846: UserWarning: Expected at least 1 arguments for function <function Script.ui.<locals>.<lambda> at 0x0000024473244160>, received 0.
  warnings.warn(
add APIs: done in 1.484s
...
...
...

Command Line Arguments:

--loglevel=DEBUG --xformers

List of enabled extensions:

  • LDSR | built-in;
  • Lora | built-in;
  • ScuNET | built-in;
  • SwinIR | built-in;
  • canvas-zoom-and-pan | built-in;
  • extra-options-section | built-in;
  • hypertile | built-in;
  • mobile | built-in;
  • postprocessing-for-training | built-in;
  • prompt-bracket-checker | built-in;
  • soft-inpainting | built-in;
  • adetailer | 03ec9d00;
  • sd-webui-controlnet | 56cec5b2.

Other details:

  • Windows 11 Version 23H2 (OS build 22631);
  • Google Chrome 129.0.6668.101 (x64);
  • SD Version: 1.10.1;
  • Python: 3.10.6;
  • Torch: 2.1.2+cu121;
  • Xformers: 0.0.23.post1;
  • Gradio: 3.41.2.

Warnings / errors are definitely related to the extension, since after its removal they disappeared.
I hope for a fix. Thank you very much!

@D0n-A
Copy link
Author

D0n-A commented Nov 22, 2024

Even though I don't understand the code, I took the time and looked it up. The possible culprit is this line:

areasimg.clear(fn=lambda x: None,outputs = [dummy_img])

After its change to
areasimg.clear(fn=lambda: None, outputs=[dummy_img])

and error is gone.

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

No branches or pull requests

1 participant