zixaphir / Stable-Diffusion-Webui-Civitai-Helper

Stable Diffusion Webui Extension for Civitai, to manage your model much more easily.
194 stars 25 forks source link

New NSFW rating system on Civitai, Stable-Diffusion-Webui-Civitai-Helper 's "XXX" setting is too low #120

Closed SpoffNinja closed 3 weeks ago

SpoffNinja commented 1 month ago

Have you read document?

yes

Have you checked console log window's msg?

yes

Describe Issue

XXX setting in the Civitai Helper's setting page should allow ALL NSFW images. Unfortunately it doesn't seem to be the case. There is still a NSFW rating check being done and Civitai Helper will skip images because the rating is higher than the highest setting.

Possible solution is not to perform a equal to and smaller than check if the setting is XXX, but rather just purely download, no check. Or at least perform a greater than check as well. This would allow the highest setting to always be able to download NSFW images from citivai. Instead of needing to be updated in the code everytime Civitai updates their rating system.

SDWCHS: Stable-Diffusion-Webui-Civitai-Helper Setting

Bad: checks if equal or smaller than

If "SDWCHS: XXX" >= Civitai Image Rating then download else skip

Good: XXX is highest rating setting, so ignore check if "SDWCHS == XXX" then Ignore NSFW check and just download else if "SDWCHS >= Civitai Image Rating then download else skip

Another solution is to let us manually set the rating in a advance setting. So instead of just a drop down. If the drop down is set to "XXX" then a extra text box for a custom rating number. So If I set it to XXX then there can be a textbox where I can enter a rating number. So currently the images are a rating of 32. The highest XXX is only 16. But with the extra text field, I can enter 32. Then when the XXX check is done and it is too low for NSFW images, then it will pull a rating from the text box in the settings page. This of course is only applicable to XXX setting. If its on any of the lower settings, it will ignore the textbox with custom rating.

Screenshot for UI issue

Issue: image

Settings page: image

Console log's msg or screenshot for function issue

CHv1.8.10: Downloading model image. CHv1.8.10: Checking preview image for model: D:\SD\stable-diffusion-webui\models\Lora[Name redacted for being NSFW].safetensors CHv1.8.10: This image is NSFW: 32 CHv1.8.10: Skip NSFW image CHv1.8.10: This image is NSFW: 32 CHv1.8.10: Skip NSFW image CHv1.8.10: This image is NSFW: 32 CHv1.8.10: Skip NSFW image CHv1.8.10: This image is NSFW: 16 CHv1.8.10: Start downloading from: https://image.civitai.com/[Name redacted for being NSFW].jpeg CHv1.8.10: Target file path: D:\SD\stable-diffusion-webui\models\Lora[Name redacted for being NSFW].preview.png CHv1.8.10: File size: 163414 (159.58K) CHv1.8.10: Downloading to temp file: D:\SD\stable-diffusion-webui\models\Lora[Name redacted for being NSFW].preview.png.downloading 100%|██████████████████████████████████████████████████████████████████████████████| 160k/160k [00:00<00:00, 31.2MiB/s]

zixaphir commented 1 month ago

Can you include the model url? I need to see Civitai's API response to figure out what I need to check against because Civitai doesn't document changes on release.

zixaphir commented 1 month ago

I need more data to work out whether this is an error or not. Currently, Civitai's code reflects the value shown in the issue to be a "blocked" image. I am not even sure such images are intended to be API-accessible, and cannot further pursue this issue without a model which has such images.

zixaphir commented 3 weeks ago

Closing due to lack of information.