stable-diffusion-webui-aesthetic-image-scorer icon indicating copy to clipboard operation
stable-diffusion-webui-aesthetic-image-scorer copied to clipboard

Unable to write tag or category

Open patrickmac110 opened this issue 2 years ago • 11 comments

I'm getting that pesky error, I'm saving png's currently, although I still got the error. I tried several variations of settings including no tag info or no category info, both gave the error, and I even tried it on jpgs. I'm on Windows btw, and this is my current settings Screenshot 2022-11-14 204815

patrickmac110 avatar Nov 15 '22 01:11 patrickmac110

No response?

patrickmac110 avatar Dec 08 '22 23:12 patrickmac110

Added additional logging to this error. Hopefully it gives more info as to what the cause is. Please retry and post what is logged.

tsngo avatar Dec 11 '22 06:12 tsngo

100%|██████████████████████████████████████████████████████████████████████████████████| 43/43 [00:22<00:00, 1.89it/s] ERROR:root:Aesthetic Image Scorer: Unable to write tag or category for A:\Desktop\00 AI Images\stable-diffusion-webui\outputs\txt2img-images\05024-3809171462-morgan freeman starring as (gandalf_1.3) in lord of the rings, ( stlz _0.5), (kc32-v4-5000 _1.3), scifi case, micro details.png Traceback (most recent call last): File "A:\Desktop\00 AI Images\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 66, in tag_files ps = set_property(file=file, property="System.Keywords", values=tags, File "A:\Desktop\00 AI Images\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 51, in set_property ps.SetValue(pk, newValue) pywintypes.com_error: (-2003292351, 'The bitmap codec does not support the bitmap property.', None, None) Total progress: 100%|██████████████████████████████████████████████████████████████████| 43/43 [00:22<00:00, 1.89it/s]

patrickmac110 avatar Dec 11 '22 21:12 patrickmac110

me to After deleting "-rotobuf" from venv\Lib\site-packages and re-installing win32com, I still get the same error. I also tried changing the file extension of the images output from WebUI to png, jpeg, and jpg, but there was no change.

ERROR:root:Aesthetic Image Scorer: Unable to write tag or category for H:\SDoutputs\txt2img-images\00028-2022-12-12-44bf0551-3023879094-30-8.5-2022-12-12.jpeg
Traceback (most recent call last):
  File "H:\Git\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 68, in tag_files
    ps = set_property(file=file, property="System.Category", values=categories,
  File "H:\Git\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 51, in set_property        
    ps.SetValue(pk, newValue)
pywintypes.com_error: (-2003292351, 'ビットマップ コーデックでビットマップ プロパティがサポートされていません。', None, None)

NEXTAltair avatar Dec 12 '22 09:12 NEXTAltair

I seem to be getting the same/similar error - stable diffusion and aesthetic image scorer are both up-to-date as of today. I've seen this error as long as I've had the extension (over a month)

ERROR:root:Aesthetic Image Scorer: Unable to write tag or category forD:\AIOutput\17\00002-4226643954.png Traceback (most recent call last): File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 66, in tag_files ps = set_property(file=file, property="System.Keywords", values=tags, File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 51, in set_property ps.SetValue(pk, newValue) pywintypes.com_error: (-2003292351, 'The bitmap codec does not support the bitmap property.', None, None)

cakeller98 avatar Jan 12 '23 01:01 cakeller98

Getting the exact same error as @cakeller98 and @NEXTAltair

ERROR:root:Aesthetic Image Scorer: Unable to write tag or category for G:\AI\stable-diffusion-webui\outputs\txt2img-images\2023-01-18\00004-2381805432.png Traceback (most recent call last): File "G:\AI\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 66, in tag_files ps = set_property(file=file, property="System.Keywords", values=tags, File "G:\AI\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 51, in set_property ps.SetValue(pk, newValue) pywintypes.com_error: (-2003292351, 'The bitmap codec does not support the bitmap property.', None, None)

kingsushi001 avatar Jan 18 '23 06:01 kingsushi001

I have the exact same error as @kingsushi001. I think I've only tried to use this extension in the last two weeks and it has never worked. My AUTOMATIC1111 webui is always up to date.

MalikKillian avatar Feb 20 '23 17:02 MalikKillian

I have just been playing around with this issue a bit. I can see you guys are generating PNG images, in the documentation it says that "Save as tag (Windows Only)" only works on JPG by default. You could install https://github.com/Dijji/FileMeta/releases Or you can change the settings, I have it set up like this: image

And that works for me, hope this helps

WildDogOne avatar Mar 07 '23 22:03 WildDogOne

I have just been playing around with this issue a bit. I can see you guys are generating PNG images, in the documentation it says that "Save as tag (Windows Only)" only works on JPG by default. You could install https://github.com/Dijji/FileMeta/releases Or you can change the settings, I have it set up like this: image

And that works for me, hope this helps

Did what you said and still got this after scoring a jpeg:

Traceback (most recent call last):
  File "E:\AI\stable-diffusion-webui\modules\script_callbacks.py", line 151, in before_image_saved_callback
    c.callback(params)
  File "E:\AI\stable-diffusion-webui\extensions\aesthetic-image-scorer\scripts\image_scorer.py", line 243, in on_before_image_saved
    if len(params.pnginfo["parameters"]) > 0:
KeyError: 'parameters'```

jockisen avatar Mar 23 '23 10:03 jockisen

that is a shame, just a quick question, do you get this error on txt2img/img2img or on upscaling? because yea, on upscaling I have the same issue, I know why, but cba to fix it (basically in upscaling it is looking for parameters in the file, which don't exist because somehow they are not transfered from base image)

WildDogOne avatar Mar 23 '23 11:03 WildDogOne

that is a shame, just a quick question, do you get this error on txt2img/img2img or on upscaling? because yea, on upscaling I have the same issue, I know why, but cba to fix it (basically in upscaling it is looking for parameters in the file, which don't exist because somehow they are not transfered from base image)

same issue no matter what. even tried to downgrade python as a suggestion from someone using the same version of auto. get this error:

Traceback (most recent call last):
  File "E:\AI\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 66, in tag_files
    ps = set_property(file=file, property="System.Keywords", values=tags,
  File "E:\AI\stable-diffusion-webui\extensions\stable-diffusion-webui-aesthetic-image-scorer\tools\add_tags.py", line 51, in set_property
    ps.SetValue(pk, newValue)
pywintypes.com_error: (-2003292351, 'Bitmapp-codecen stöder inte bitmappsegenskapen.', None, None)```

jockisen avatar Mar 23 '23 11:03 jockisen