3 ms·
You have the version which filters out NSFW images based on keywords. The code literally replaces images it thinks are NSFW with Rick Astley. Copyright aside (y
by beiller 4y ago
You have the version which filters out NSFW images based on keywords. The code literally replaces images it thinks are NSFW with Rick Astley. Copyright aside (yes it's probably wrong to hard code an image of Rick Astley in the actual stable diffusion git repository) that image is not contained in the weights of the model.
- edit - please god tell me this is not an elaborate rick roll :)
- shagie 4y agoIt's not... though if stable-diffusion % python scripts/txt2img.py --prompt "Rick Astley Never Gonna Give You Up" --n_samples 1 --n_iter 1 --plms is such that it triggers NSFW sometimes, then... I'm... let's say "confused" about what entails NSFW prompts. (digging through scroll back) Creating invisible watermark encoder (see https://github.com/ShieldMnt/invisible-watermark)... Sampling: 0%| | 0/1 [00:00<?, ?it/sData shape for PLMS sampling is (1, 4, 64, 64) | 0/1 [00:00<?, ?it/s] Running PLMS Sampling with 50 timesteps PLMS Sampler: 100%|| 50/50 [03:23<00:00, 4.06s/it] Potential NSFW content was detected in one or more images. A black image will be returned instead. Try again with a different prompt and/or seed.:00, 3.99s/it] data: 100%|| 1/1 [03:29<00:00, 209.20s/it] Sampling: 100%|| 1/1 [03:29<00:00, 209.20s/it] Your samples are ready and waiting for you here: outputs/txt2img-samples Apparently you're right... though the "black image" is a poor description of the image.
- beiller 4y agoYeah I see noisy images in your output it may just be glitching. I may have poorly described how it worked because I'm not fully sure. It may be a nsfw image detection model and not based on the prompt. Either way you can disable it in code, I tried