scripts for sdapi in Stable Diffusion web UI
modified from extension: stable-diffusion-webui-nsfw-censor
I make it running as a selectable script, so you can control NSFW content through sdapi.
NSFW check: run safety_checker, it may take seconds for checking and print results in console:
NSFW with mosaic: add mosaic to NSFW content:
add two paramters below:
txt2imgreq.script_name = "CensorScript"
txt2imgreq.script_args = [true,true]