nateraw / stable-diffusion-videos

Create 🔥 videos with Stable Diffusion by exploring the latent space and morphing between text prompts
Apache License 2.0
4.36k stars 417 forks source link

Potential NSFW content was detected in one or more images #113

Closed Dobermanswat closed 1 year ago

Dobermanswat commented 1 year ago

I want to make a video where the king and the forest, but writes that the prohibited content, I also tried with other words, other seeds, all without success, out of 200 pictures will be black. How to fix, remove these restrictions, I can’t make more than one video normally image

nateraw commented 1 year ago

You can remove the safety checker by providing safety_checker=None when instantiating the pipeline from_pretrained.

from stable_diffusion_videos import StableDiffusionWalkPipeline

from diffusers.models import AutoencoderKL
from diffusers.schedulers import LMSDiscreteScheduler
import torch

pipe = StableDiffusionWalkPipeline.from_pretrained(
    'runwayml/stable-diffusion-v1-5',
    vae=AutoencoderKL.from_pretrained(f"stabilityai/sd-vae-ft-ema"),
    torch_dtype=torch.float16,
    revision="fp16",
    safety_checker=None,
    scheduler=LMSDiscreteScheduler(
        beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear"
    )
).to("cuda")
xtagon commented 1 year ago

@nateraw Is there a way to do negative prompts or something so that we could avoid NSFW completely, instead of disabling the checker?

nateraw commented 1 year ago

Ha you know I haven't tried it, but it looks like its possible already in the pipeline __call__ fn. Would just need to be surfaced up to pipeline.walk.

nateraw commented 1 year ago

closing this since its not an issue. @xtagon I just made a new issue (#114) to discuss your feature request.