rupeshs / fastsdcpu

Fast stable diffusion on CPU
MIT License
1.43k stars 115 forks source link

Fix safety checker for some models #248

Open wbruna opened 1 month ago

wbruna commented 1 month ago

The first changeset fixes safety checker behavior for models which do not incorporate the safety model internally (safetensors and some diffusers models).

The other two are somewhat-related minor memory optimizations.

Unfortunately, I couldn't make the check work on OpenVINO at all, regardless of this change (but I can't test it very well, it's too memory-hungry for my PC). If the filter is enabled on OpenVINO, and not working, this change may cause a crash instead; but it shouldn't interfere on a correctly working checker.