picobyte / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
540 stars 64 forks source link

error when using DeepDanbooru models #51

Closed grapefruit25 closed 10 months ago

grapefruit25 commented 10 months ago

works fine with WD14 but error with deepdanbooru can anyone help

Loading deepdanbooru-v3-20211112-sgd-e28 from <DirEntry 'deepdanbooru-v3-20211112-sgd-e28'> 2023-08-12 14:51:10.918747: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. Error completing request Arguments: (<PIL.Image.Image image mode=RGB size=192x720 at 0x132445AEA10>, 'deepdanbooru-v3-20211112-sgd-e28', '', '', '', '', '', '') {} Traceback (most recent call last): File "D:\stable-diffusion-webui-new\modules\call_queue.py", line 58, in f res = list(func(*args, *kwargs)) File "D:\stable-diffusion-webui-new\modules\call_queue.py", line 37, in f res = func(args, *kwargs) File "D:\stable-diffusion-webui-new\extensions\stable-diffusion-webui-wd14-tagger\tagger\ui.py", line 94, in on_interrogate_image return on_interrogate_image_submit(args) File "D:\stable-diffusion-webui-new\extensions\stable-diffusion-webui-wd14-tagger\tagger\ui.py", line 113, in on_interrogate_image_submit interrogator.interrogate_image(image) File "D:\stable-diffusion-webui-new\extensions\stable-diffusion-webui-wd14-tagger\tagger\interrogator.py", line 150, in interrogate_image data = ('', '', fi_key) + self.interrogate(image) File "D:\stable-diffusion-webui-new\extensions\stable-diffusion-webui-wd14-tagger\tagger\interrogator.py", line 302, in interrogate self.load() File "D:\stable-diffusion-webui-new\extensions\stable-diffusion-webui-wd14-tagger\tagger\interrogator.py", line 277, in load import deepdanbooru.project as ddp File "D:\stable-diffusion-webui-new\venv\lib\site-packages\deepdanbooru__init.py", line 8, in import deepdanbooru.data File "D:\stable-diffusion-webui-new\venv\lib\site-packages\deepdanbooru\data\init__.py", line 5, in import tensorflow_io as tfio ModuleNotFoundError: No module named 'tensorflow_io'


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

ModuleNotFoundError: No module named 'tensorflow_io'

Time taken: 0.0 sec.

A: 4.00 GB, R: 4.11 GB, Sys: 6.6/10 GB (66.1%)

"]

picobyte commented 10 months ago

On some platforms tensorflow_io cannot be installed, they complained here so I removed the dependency. Just run pip install tensorflow_io and use it only if you can install it. If you search this forum the issues on tensorflow_io then you can find this

grapefruit25 commented 10 months ago

I tried pip install tensorflow_io and I think I install it successfully but It's still doesn't work..

PS D:\stable-diffusion-webui-new> pip install tensorflow_io Requirement already satisfied: tensorflow_io in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (0.31.0) Requirement already satisfied: tensorflow-io-gcs-filesystem==0.31.0 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from tensorflow_io) (0.31.0)

picobyte commented 10 months ago

Did you have the venv enabled when you installed it? Otherwise you're not installing in the virtual environment that you run the webui in. Maybe easier solution is to just add the line back in requirements.txt and see if it then runs again; the inverse of ebc9bfc.

If that does not resolve there is a second problem, but you did not post the error thereof.

grapefruit25 commented 10 months ago

Thank you! It works after adding a line! But a new problem is that when I click on send to txt2img, the page will turn to txt2img page but no prompt copied. no error appeared in cmd so I record a video for it. https://streamable.com/5yvjnc

picobyte commented 10 months ago

I never use that button, I seem to have broken it with the clickable tags, but I can fix it, one sec.

picobyte commented 10 months ago

fixed with d21b5d7fce13c48766d0561981a0f1e64a894d81, thanks for reporting.

grapefruit25 commented 10 months ago

Thanks for answering and fixing!!