SDXL Safety Checker

I’m trying to specify a safety checker in SDXL with:

pipe = DiffusionPipeline.from_pretrained(model, torch_dtype = torch.float16, variant="fp16", safety_checker=??)

I was able to get it to work on 1.5 with the below:

pipe = StableDiffusionPipeline.from_pretrained(model_path, scheduler=scheduler, safety_checker=StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker"), feature_extractor=CLIPImageProcessor.from_pretrained("openai/clip-vit-base-patch32"))

Is there a safety checker for SDXL out yet? Thanks for any help!

1 Like