[GH-ISSUE #299] [Bug] Exception in ASGI application #259

Closed
opened 2026-11-07 17:42:48 +07:00 by bsakaguchi · 9 comments
Owner

Originally created by @hben35096 on GitHub (Feb 12, 2024).
Original GitHub issue: https://github.com/Physton/sd-webui-prompt-all-in-one/issues/299

Issue Feedback

  • I confirm that I have searched for a solution to this issue in the FAQ and couldn't find a solution.
  • I confirm that I have searched for this issue in the Issues list (including closed ones) and couldn't find a solution.
  • I confirm that I have read the Wiki and couldn't find a solution.

Describe the Issue

I have installed the 'all-in-one' plugin in stable-diffusion-webui-forge.
https://github.com/lllyasviel/stable-diffusion-webui-forge

The 'all-in-one' plugin can be used normally, but every time:

1.Press Enter after entering text in the input box;
2.Manually input English in the prompt and then click the 'Generate Image' button for the first time.
The following prompt appears:

image

ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/root/miniconda3/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/applications.py", line 273, in call
await super().call(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
await self.app(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/root/miniconda3/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/root/miniconda3/lib/python3.10/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
File "/root/stable-diffusion-webui-forge/extensions/sd-webui-prompt-all-in-one/scripts/on_app_started.py", line 108, in _token_counter
return get_token_counter(data['text'], data['steps'])
File "/root/stable-diffusion-webui-forge/extensions/sd-webui-prompt-all-in-one/scripts/physton_prompt/get_token_counter.py", line 21, in get_token_counter
token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts],
File "/root/stable-diffusion-webui-forge/extensions/sd-webui-prompt-all-in-one/scripts/physton_prompt/get_token_counter.py", line 21, in
token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts],
TypeError: StableDiffusionModelHijack.get_prompt_lengths() missing 1 required positional argument: 'cond_stage_model'
To load target model BaseModel
Begin to load 1 model
Moving model(s) has taken 0.43 seconds
0%| | 0/20 [00:00<?, ?it/s]
5%|██▏ | 1/20 [00:00<00:10, 1.82it/s]
25%|███████████ | 5/20 [00:00<00:01, 8.27it/s]
35%|███████████████▍ | 7/20 [00:00<00:01, 10.76it/s]
45%|███████████████████▊ | 9/20 [00:01<00:00, 12.71it/s]
55%|███████████████████████▋ | 11/20 [00:01<00:00, 14.21it/s]
65%|███████████████████████████▉ | 13/20 [00:01<00:00, 15.34it/s]
75%|████████████████████████████████▎ | 15/20 [00:01<00:00, 15.83it/s]
85%|████████████████████████████████████▌ | 17/20 [00:01<00:00, 15.69it/s]
100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 12.19it/s]
To load target model AutoencoderKL
Begin to load 1 model

Total progress: 100%|███████████████████████████| 20/20 [00:01<00:00, 14.05it/s]

Steps to Reproduce

No response

Screenshot or log

No response

OS

Ubuntu

Browser

Edge

Stable Diffusion WebUI version

No response

Extension version

No response

Python version

No response

Gradio version

No response

Originally created by @hben35096 on GitHub (Feb 12, 2024). Original GitHub issue: https://github.com/Physton/sd-webui-prompt-all-in-one/issues/299 ### Issue Feedback - [X] I confirm that I have searched for a solution to this issue in the [FAQ](https://aiodoc.physton.com/FAQ.html) and couldn't find a solution. - [X] I confirm that I have searched for this issue in the [Issues](https://github.com/Physton/sd-webui-prompt-all-in-one/issues) list (including closed ones) and couldn't find a solution. - [X] I confirm that I have read the [Wiki](https://aiodoc.physton.com/) and couldn't find a solution. ### Describe the Issue I have installed the 'all-in-one' plugin in stable-diffusion-webui-forge. https://github.com/lllyasviel/stable-diffusion-webui-forge The 'all-in-one' plugin can be used normally, but every time: 1.Press Enter after entering text in the input box; 2.Manually input English in the prompt and then click the 'Generate Image' button for the first time. The following prompt appears: ![image](https://github.com/Physton/sd-webui-prompt-all-in-one/assets/139383150/c65e99d8-d62a-4b2c-b266-2f249247ab3f) ERROR: Exception in ASGI application Traceback (most recent call last): File "/root/miniconda3/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi result = await app( # type: ignore[func-returns-value] File "/root/miniconda3/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/fastapi/applications.py", line 273, in __call__ await super().__call__(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__ raise exc File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response await self.app(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__ await responder(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__ await self.app(scope, receive, self.send_with_gzip) File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__ raise exc File "/root/miniconda3/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "/root/miniconda3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__ raise e File "/root/miniconda3/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/root/miniconda3/lib/python3.10/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/root/miniconda3/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app raw_response = await run_endpoint_function( File "/root/miniconda3/lib/python3.10/site-packages/fastapi/routing.py", line 163, in run_endpoint_function return await dependant.call(**values) File "/root/stable-diffusion-webui-forge/extensions/sd-webui-prompt-all-in-one/scripts/on_app_started.py", line 108, in _token_counter return get_token_counter(data['text'], data['steps']) File "/root/stable-diffusion-webui-forge/extensions/sd-webui-prompt-all-in-one/scripts/physton_prompt/get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], File "/root/stable-diffusion-webui-forge/extensions/sd-webui-prompt-all-in-one/scripts/physton_prompt/get_token_counter.py", line 21, in <listcomp> token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], TypeError: StableDiffusionModelHijack.get_prompt_lengths() missing 1 required positional argument: 'cond_stage_model' To load target model BaseModel Begin to load 1 model Moving model(s) has taken 0.43 seconds 0%| | 0/20 [00:00<?, ?it/s] 5%|██▏ | 1/20 [00:00<00:10, 1.82it/s] 25%|███████████ | 5/20 [00:00<00:01, 8.27it/s] 35%|███████████████▍ | 7/20 [00:00<00:01, 10.76it/s] 45%|███████████████████▊ | 9/20 [00:01<00:00, 12.71it/s] 55%|███████████████████████▋ | 11/20 [00:01<00:00, 14.21it/s] 65%|███████████████████████████▉ | 13/20 [00:01<00:00, 15.34it/s] 75%|████████████████████████████████▎ | 15/20 [00:01<00:00, 15.83it/s] 85%|████████████████████████████████████▌ | 17/20 [00:01<00:00, 15.69it/s] 100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 12.19it/s] To load target model AutoencoderKL Begin to load 1 model Total progress: 100%|███████████████████████████| 20/20 [00:01<00:00, 14.05it/s] ### Steps to Reproduce _No response_ ### Screenshot or log _No response_ ### OS Ubuntu ### Browser Edge ### Stable Diffusion WebUI version _No response_ ### Extension version _No response_ ### Python version _No response_ ### Gradio version _No response_
Author
Owner

@Physton commented on GitHub (Feb 13, 2024):

Thank you for your feedback, I will fix this issue in the future.

<!-- gh-comment-id:1940305628 --> @Physton commented on GitHub (Feb 13, 2024): Thank you for your feedback, I will fix this issue in the future.
Author
Owner

@Physton commented on GitHub (Feb 14, 2024):

Thanks to the developer @serick4126 for helping with the fix.

<!-- gh-comment-id:1943756513 --> @Physton commented on GitHub (Feb 14, 2024): Thanks to the developer @serick4126 for helping with the fix.
Author
Owner

@hben35096 commented on GitHub (Feb 14, 2024):

@serick4126
Thank you very much, the problem was solved perfectly.

<!-- gh-comment-id:1943820030 --> @hben35096 commented on GitHub (Feb 14, 2024): @serick4126 Thank you very much, the problem was solved perfectly.
Author
Owner

@Mohsyn commented on GitHub (Apr 12, 2024):

I have the same issue on version: f0.0.17v1.8.0rc-latest-282-g29be1da  •  python: 3.10.6  •  torch: 2.1.2+cu121  •  xformers: N/A  •  gradio: 3.41.2

<!-- gh-comment-id:2051096745 --> @Mohsyn commented on GitHub (Apr 12, 2024): I have the same issue on version: [f0.0.17v1.8.0rc-latest-282-g29be1da](https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7)  •  python: 3.10.6  •  torch: 2.1.2+cu121  •  xformers: N/A  •  gradio: 3.41.2
Author
Owner

@Physton commented on GitHub (Apr 12, 2024):

I have the same issue on version: f0.0.17v1.8.0rc-latest-282-g29be1da  •  python: 3.10.6  •  torch: 2.1.2+cu121  •  xformers: N/A  •  gradio: 3.41.2

Backup the "storage" directory, then delete the "storage" directory, and try restarting.

<!-- gh-comment-id:2051211041 --> @Physton commented on GitHub (Apr 12, 2024): > I have the same issue on version: [f0.0.17v1.8.0rc-latest-282-g29be1da](https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7)  •  python: 3.10.6  •  torch: 2.1.2+cu121  •  xformers: N/A  •  gradio: 3.41.2 Backup the "storage" directory, then delete the "storage" directory, and try restarting.
Author
Owner

@Mohsyn commented on GitHub (Apr 13, 2024):

Backup the "storage" directory, then delete the "storage" directory, and try restarting.

Deleted storage directory and restarted, error still persists.

this is the log

ERROR: Exception in ASGI application████████████████████████████████████████████████| 22/22 [00:23<00:00, 1.10s/it] Traceback (most recent call last): File "c:\forge\system\python\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 404, in run_asgi result = await app( # type: ignore[func-returns-value] File "c:\forge\system\python\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\fastapi\applications.py", line 273, in __call__ await super().__call__(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__ await responder(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__ await self.app(scope, receive, self.send_with_gzip) File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__ raise e File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 237, in app raw_response = await run_endpoint_function( File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function return await dependant.call(**values) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\on_app_started.py", line 108, in _token_counter return get_token_counter(data['text'], data['steps']) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in <listcomp> token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], TypeError: StableDiffusionModelHijack.get_prompt_lengths() missing 1 required positional argument: 'cond_stage_model' ERROR: Exception in ASGI application Traceback (most recent call last): File "c:\forge\system\python\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 404, in run_asgi result = await app( # type: ignore[func-returns-value] File "c:\forge\system\python\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\fastapi\applications.py", line 273, in __call__ await super().__call__(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__ await responder(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__ await self.app(scope, receive, self.send_with_gzip) File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__ raise e File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 237, in app raw_response = await run_endpoint_function( File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function return await dependant.call(**values) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\on_app_started.py", line 108, in _token_counter return get_token_counter(data['text'], data['steps']) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in <listcomp> token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], TypeError: StableDiffusionModelHijack.get_prompt_lengths() missing 1 required positional argument: 'cond_stage_model'

<!-- gh-comment-id:2053115128 --> @Mohsyn commented on GitHub (Apr 13, 2024): > > Backup the "storage" directory, then delete the "storage" directory, and try restarting. Deleted storage directory and restarted, error still persists. this is the log `ERROR: Exception in ASGI application████████████████████████████████████████████████| 22/22 [00:23<00:00, 1.10s/it] Traceback (most recent call last): File "c:\forge\system\python\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 404, in run_asgi result = await app( # type: ignore[func-returns-value] File "c:\forge\system\python\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\fastapi\applications.py", line 273, in __call__ await super().__call__(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__ await responder(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__ await self.app(scope, receive, self.send_with_gzip) File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__ raise e File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 237, in app raw_response = await run_endpoint_function( File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function return await dependant.call(**values) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\on_app_started.py", line 108, in _token_counter return get_token_counter(data['text'], data['steps']) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in <listcomp> token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], TypeError: StableDiffusionModelHijack.get_prompt_lengths() missing 1 required positional argument: 'cond_stage_model' ERROR: Exception in ASGI application Traceback (most recent call last): File "c:\forge\system\python\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 404, in run_asgi result = await app( # type: ignore[func-returns-value] File "c:\forge\system\python\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\fastapi\applications.py", line 273, in __call__ await super().__call__(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "c:\forge\system\python\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__ await responder(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__ await self.app(scope, receive, self.send_with_gzip) File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__ raise exc File "c:\forge\system\python\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__ raise e File "c:\forge\system\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "c:\forge\system\python\lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 237, in app raw_response = await run_endpoint_function( File "c:\forge\system\python\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function return await dependant.call(**values) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\on_app_started.py", line 108, in _token_counter return get_token_counter(data['text'], data['steps']) File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in <listcomp> token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], TypeError: StableDiffusionModelHijack.get_prompt_lengths() missing 1 required positional argument: 'cond_stage_model'`
Author
Owner

@Mohsyn commented on GitHub (Apr 20, 2024):

should i make a new bug report ?

<!-- gh-comment-id:2067805545 --> @Mohsyn commented on GitHub (Apr 20, 2024): should i make a new bug report ?
Author
Owner

@serick4126 commented on GitHub (Apr 23, 2024):

@Mohsyn
In your error log you have included the following error
File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts],)

The code that calculates the token_count in line 21 of get_token_counter.py is the code before I made the modifications to https://github.com/Physton/sd-webui-prompt-all-in-one/pull/301

Please update your extension as I believe you are using outdated code.

<!-- gh-comment-id:2071921041 --> @serick4126 commented on GitHub (Apr 23, 2024): @Mohsyn In your error log you have included the following error ` File "C:\forge\webui\extensions\sd-webui-prompt-all-in-one\scripts\physton_prompt\get_token_counter.py", line 21, in get_token_counter token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts],) ` The code that calculates the token_count in line 21 of get_token_counter.py is the code before I made the modifications to https://github.com/Physton/sd-webui-prompt-all-in-one/pull/301 Please update your extension as I believe you are using outdated code.
Author
Owner

@Mohsyn commented on GitHub (Apr 24, 2024):

Extension showed updated in both Manager and using Git
However I removed the extension completely and reinstalled.
I have not seen the error yet.
Thanks for your help!

<!-- gh-comment-id:2074233801 --> @Mohsyn commented on GitHub (Apr 24, 2024): Extension showed updated in both Manager and using Git However I removed the extension completely and reinstalled. I have not seen the error yet. Thanks for your help!
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Physton/sd-webui-prompt-all-in-one#259
No description provided.