optimum icon indicating copy to clipboard operation
optimum copied to clipboard

Safety checker is not working

Open rupeshs opened this issue 5 months ago • 0 comments

The safety checker is not working with OVStableDiffusionPipeline.

System Info

- `diffusers` version: 0.23.0
- Platform: Windows-10-10.0.22631-SP0
- Python version: 3.11.0
- PyTorch version (GPU?): 2.0.1+cpu (False)
- Huggingface_hub version: 0.17.3
- Transformers version: 4.35.0
- Accelerate version: 0.23.0
- xFormers version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

Who can help?

@ph

Information

  • [X] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

from optimum.intel import OVStableDiffusionPipeline

model_id = "runwayml/stable-diffusion-v1-5"
pipeline = OVStableDiffusionPipeline.from_pretrained(model_id, export=True)
prompt = "NSFW prompt"
image = pipeline(prompt).images[0]

Expected behavior

It should detect NSFW content and return black images.

rupeshs avatar Jan 09 '24 01:01 rupeshs