toriato / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
1.34k stars 235 forks source link

Always showing loading, can't get result #94

Open Bavoch opened 1 year ago

Bavoch commented 1 year ago

MacOS 13.3.1, M1

image

error code: Loading wd14-vit-v2-git model file from SmilingWolf/wd-v1-4-vit-tagger-v2 Error completing request Loading wd14-vit-v2-git model file from SmilingWolf/wd-v1-4-vit-tagger-v2 Arguments: (<PIL.Image.Image image mode=RGB size=1024x1024 at 0x1772F4160>, '', False, '', '[name].[output_extension]', 'ignore', False, False, 'wd14-vit-v2-git', 0.35, '', '', False, False, True, '00, (o)(o), ++, +-, .., , <|><|>, ==, >_<, 3_3, 6_9, >o, @@, ^_^, o_o, u_u, xx, ||, ||_||', False, False) {} Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy conn.connect() File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/modules/call_queue.py", line 57, in f res = list(func(*args, kwargs)) File "/Users/Bavoch/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(*args, *kwargs) File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/ui.py", line 69, in on_interrogate ratings, tags = interrogator.interrogate(image) File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 275, in interrogate self.load() File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 238, in load model_path, tags_path = self.download() File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 231, in download model_path = Path(hf_hub_download( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn return fn(args, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1195, in hf_hub_download metadata = get_hf_file_metadata( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn return fn(*args, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1532, in get_hf_file_metadata r = _request_wrapper( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 407, in _request_wrapper response = _request_wrapper( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 442, in _request_wrapper return http_backoff( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 212, in http_backoff response = session.request(method=method, url=url, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 4, received: 3). Wanted outputs: [textbox, label, label, html] Received outputs: [None, "", "

SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

Time taken: 0.35s

"] Error completing request Arguments: (<PIL.Image.Image image mode=RGB size=1024x1024 at 0x1772F6980>, '', False, '', '[name].[output_extension]', 'ignore', False, False, 'wd14-vit-v2-git', 0.35, '', '', False, False, True, '00, (o)(o), ++, +-, .., , <|><|>, ==, >_<, 3_3, 6_9, >o, @@, ^_^, o_o, u_u, xx, ||, ||_||', False, False) {} Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy conn.connect() File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/modules/call_queue.py", line 57, in f res = list(func(*args, kwargs)) File "/Users/Bavoch/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(*args, *kwargs) File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/ui.py", line 69, in on_interrogate ratings, tags = interrogator.interrogate(image) File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 275, in interrogate self.load() File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 238, in load model_path, tags_path = self.download() File "/Users/Bavoch/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py", line 231, in download model_path = Path(hf_hub_download( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn return fn(args, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1195, in hf_hub_download metadata = get_hf_file_metadata( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn return fn(*args, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1532, in get_hf_file_metadata r = _request_wrapper( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 407, in _request_wrapper response = _request_wrapper( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 442, in _request_wrapper return http_backoff( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 212, in http_backoff response = session.request(method=method, url=url, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

Traceback (most recent call last): File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1326, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1229, in postprocess_data self.validate_outputs(fn_index, predictions) # type: ignore File "/Users/Bavoch/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1204, in validate_outputs raise ValueError( ValueError: An event handler (f) didn't receive enough output values (needed: 4, received: 3). Wanted outputs: [textbox, label, label, html] Received outputs: [None, "", "

SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

Time taken: 0.68s

"]

picobyte commented 1 year ago

That EOF occurred in violation of protocol may mean a truncated file, or it is part of the no response error. the bug seems to trgger after a: ratings, tags = interrogator.interrogate(image) so possibly you have a corrupted image. Does it print any image messages or does it stop at the start. Check the file that was messaged or the file after, in the order of a files listing

Bavoch commented 1 year ago

Thank you for your answer, but it's probably not image damage because all the images are the same result and have been stuck on loading without returning any results.

wcode-wzx commented 1 year ago

image

same question

japanvik commented 1 year ago

I'm seeing this too. It gets stuck on loading the model. Happening on Win10

mwkmbn commented 1 year ago

I manually downloaded the model and edited "/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py" as commented below. https://github.com/toriato/stable-diffusion-webui-wd14-tagger/issues/69#issuecomment-1513403499

japanvik commented 1 year ago

@mwkmbn Thanks. Yeah, hardcoding the path does work. I guess we will have to live with this for the time being.