Text-to-Image
Diffusers
Safetensors
stable-diffusion
safety
safe-generation
grpo
steering-reward
nsfw-removal
safediffusion-r1
Instructions to use ItsMaxNorm/SafeDiffusion-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ItsMaxNorm/SafeDiffusion-R1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ItsMaxNorm/SafeDiffusion-R1", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
File size: 798 Bytes
2fb9182 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ---
library_name: diffusers
pipeline_tag: text-to-image
license: mit
base_model: runwayml/stable-diffusion-v1-5
tags:
- stable-diffusion
- safety
- grpo
- steering-reward
- safediffusion-r1
---
# SafeDiffusion-R1 — `scaled` variant
Scaled-anchor variant (25 safe + 20 unsafe anchors, geneval_negative_steringreward_8gpus_scale @ epoch 280).
## Quick load
```python
from diffusers import StableDiffusionPipeline
import torch
pipe = StableDiffusionPipeline.from_pretrained(
"ItsMaxNorm/SafeDiffusion-R1", subfolder="scaled", torch_dtype=torch.float16
).to("cuda")
img = pipe("a photo of a cat sleeping on a couch").images[0]
img.save("out.png")
```
See the main repo card for the method, headline numbers, training
recipe, and citation: https://huggingface.co/ItsMaxNorm/SafeDiffusion-R1.
|