Civitai Safe Helper - [SDXL/Pony/Illus/NAI] version

Details

Download Files

Model description

Civitai propose, as part as helpers for on-site generation, a set of embeddings to avoid NSFW and CSAM content.

Those are the well know "safe_pos" and "safe_neg" and "civit_nsfw".

But those embeddings are SD1.5 embeddings => they only impact the CLIP_L not the CLIP_G (and this is only if the software does want to import them. A1111/Forge will not load SD1.5 embeddings when generating a picture using SDXL and derivatives).

As such, i felt this was too large a problem to let it fly. That's why i took upon myself to convert those and propose them here.

They are NOT perfect of course, but on a often guilty checkpoint like WAI, that generate easily far too young characters, they do the job (i will NOT display a comparaison here):

  • "young" characters are automatically aged

  • less naugthy bit exposed

As a bonus, they are now provided as safetensors.

NB: as usual, they MAY not work with the on-site generator.

But i think i found a trick to it. Remove all resources, switch to an SDXL model (like Juggernaut XL), the "experimental mode" button appear

Activate it, switch back to an Illustrious model, add the resources (you need to be in advanced mode to do so)

They will be listed with a warning:

But you can add them to your prompt and negative prompt and generate. The resulting image list the embeddings as resources used in the metadata.

Log of the conversion tool:

(venv) c:\tools\sdxl-embeddings>python convert.py todo\civit_nsfw.pt civit_nsfw.safetensors
WARNING! You are loading a PickleTensor file, please confirm... (Y/N) Y
Found 15 embeddings to convert.
Starting conversion...
100%|█████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 254.56it/s]
Done! Saving civit_nsfw.safetensors
Finished!

(venv) c:\tools\sdxl-embeddings>python convert.py todo\safe_pos.pt safe_pos.safetensors
WARNING! You are loading a PickleTensor file, please confirm... (Y/N) Y
Found 9 embeddings to convert.
Starting conversion...
100%|███████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 230.76it/s]
Done! Saving safe_pos.safetensors
Finished!

(venv) c:\tools\sdxl-embeddings>python convert.py todo\safe_neg.pt safe_neg.safetensors
WARNING! You are loading a PickleTensor file, please confirm... (Y/N) Y
Found 12 embeddings to convert.
Starting conversion...
100%|█████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 333.34it/s]
Done! Saving safe_neg.safetensors
Finished!

Images made by this model

No Images Found.