toshiaki1729 / dataset-tag-editor-standalone

WebUI to edit dataset captions for txt2img models
MIT License
134 stars 15 forks source link

[Error/Bug] Can't use editor #20

Closed Squibeel closed 6 months ago

Squibeel commented 1 year ago

Can't use the standalone version, gives me an error right after pressing "Load"

(venv) PS C:\a1111\dataset-tag-editor-standalone> .\launch_user.bat Volume in drive C has no label. Volume Serial Number is 389A-7BDC

Directory of C:\a1111\dataset-tag-editor-standalone\venv\Scripts

09/07/2023 16:19 266 664 python.exe 1 File(s) 266 664 bytes 0 Dir(s) 376 176 189 440 bytes free PyTorch device: cpu Running on local URL: http://127.0.0.1:7862

To create a public link, set share=True in launch(). Task exception was never retrieved future: <Task finished name='gvlll0otw4m_5' coro=<Queue.process_events() done, defined at C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 5, 'data': [...on_hash': 'gvlll0otw4m'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.1.2/v/missing> Traceback (most recent call last): File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events client_awake = await self.gather_event_data(event) File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data data, client_awake = await self.get_message(event, timeout=receive_timeout) File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 456, in get_message return PredictBody(data), True File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\pydantic\main.py", line 150, in init pydantic_self.pydantic_validator.validate_python(data, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 5, 'data': [...on_hash': 'gvlll0otw4m'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.1.2/v/missing Task exception was never retrieved future: <Task finished name='gvlll0otw4m_7' coro=<Queue.process_events() done, defined at C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 7, 'data': [...on_hash': 'gvlll0otw4m'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.1.2/v/missing> Traceback (most recent call last): File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events client_awake = await self.gather_event_data(event) File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data data, client_awake = await self.get_message(event, timeout=receive_timeout) File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 456, in get_message return PredictBody(data), True File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\pydantic\main.py", line 150, in init pydantic_self.pydantic_validator.validate_python(data, self_instance=pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 7, 'data': [...on_hash': 'gvlll0otw4m'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.1.2/v/missing Task exception was never retrieved future: <Task finished name='gvlll0otw4m_44' coro=<Queue.process_events() done, defined at C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 44, 'data': ...on_hash': 'gvlll0otw4m'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.1.2/v/missing> Traceback (most recent call last): File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events client_awake = await self.gather_event_data(event) File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data data, client_awake = await self.get_message(event, timeout=receive_timeout) File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 456, in get_message return PredictBody(**data), True File "C:\a1111\dataset-tag-editor-standalone\venv\lib\site-packages\pydantic\main.py", line 150, in init pydantic_self.pydantic_validator.validate_python(data, self_instance=pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 44, 'data': ...on_hash': 'gvlll0otw4m'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.1.2/v/missing

kristost commented 1 year ago

@Squibeel , I had the same issue. I tried different release versions of this project, both on Windows and WSL Ubuntu, all generating the same error when I tried to load images. I googled the error about pydantic and found this issue related to gradio and a recent pydantic update.

The solution that worked for me was to update my gradio by changing the version in the requirements.txt and reinstall, e.g.:

gradio>=3.36.1

You could also just do a pip install gradio --upgrade within your venv to get the latest version (3.36.1 at the time of writing), but I chose to do a clean install to make sure it worked.

Squibeel commented 1 year ago

@Squibeel , I had the same issue. I tried different release versions of this project, both on Windows and WSL Ubuntu, all generating the same error when I tried to load images. I googled the error about pydantic and found this issue related to gradio and a recent pydantic update.

The solution that worked for me was to update my gradio by changing the version in the requirements.txt and reinstall, e.g.:

gradio>=3.36.1

You could also just do a pip install gradio --upgrade within your venv to get the latest version (3.36.1 at the time of writing), but I chose to do a clean install to make sure it worked.

This worked, thanks!

toshiaki1729 commented 6 months ago

I've updated gradio to 4.28.3 in >= ver0.0.6. Version related issue may be solved. I'm grad if you can check it.