-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Model/Pipeline/Scheduler description
We have just released a paper introducing Safe Latent Diffusion (SLD) for text2image diffusion models.
SLD mitigates the well known issue that models like Stable Diffusion that are trained on unfiltered, web-crawled datasets tend to suffer from inappropriate degeneration. For instance SD may unexpectedly generate nudity, violence, images depicting self-harm, or otherwise offensive content.
SLD suppresses the vast majority of such content and is very sophisticated in that it offers hyper parameters to target exactly what content you want to suppress, to what extent, and in which stage of the diffusion process. Therefore, the overall image image composition and intent of the image remains the same with just the unwanted content being removed/replaced.
Additionally, SLD also improves perceived image quality and image-text-alignment as user studies on DrawBench show.
I believe an SLD pipeline would be a great contribution to the diffusers library.
Example
Below one of the rather benign examples. SLD also suppresses far more problematic content, that I'd rather not display here:

Top is SD v1.5 and below are the same images with SLD enabled.
Open source status
- The model implementation is available
- The model weights are available (Only relevant if addition is not a scheduler).
Provide useful links for the implementation
Implementation:
https://github.com/ml-research/safe-latent-diffusion
Weights:
Compatible with Stable Diffusion checkpoints. e.g.:
https://huggingface.co/CompVis/stable-diffusion-v1-4
https://huggingface.co/runwayml/stable-diffusion-v1-5
Authors
@manuelbrack, @PatrickSchrML