Readme
Video NSFW Filter
Check sampled video frames for visual NSFW content using the Stable Diffusion safety checker. Returns a JSON report and optional JPEG screenshots, without calling other Replicate models.
Usage
Upload a short video. Start with num_frames=8 and return_frames=all to inspect sampled screenshots alongside the report.
num_frames: 1–32 uniformly spaced samples; default8. Multiple samples include both ends of the declared frame range; one sample selects the middle.threshold_offset: default0.02. Higher values make normal NSFW matching less strict. Scores are similarity margins, not probabilities.strict_special_care: defaulttrue. Preserves stricter normal matching after a special-care match. Setfalseto disable that adjustment;speciallabels are still returned.return_frames:none(default),flagged, orall.include_details: defaultfalse. Enable for full scores, threshold settings, and diagnostic metadata.
Output
Returns one video-nsfw-report_*.json file and optional JPEGs. File order is not guaranteed: identify the report by filename and match screenshots using each frame’s image_filename.
The report includes nsfw_detected, checked_frames, flagged_frame_count, sampling_complete, and per-frame results with NSFW labels, special labels, frame numbers, and estimated timestamps.
Any NSFW-matched sample sets nsfw_detected=true. Special-care labels alone do not. Screenshot and detail settings do not affect detection.
Limitations
Only sampled visual frames are checked—not every frame, audio, or temporal context. A no-match result does not guarantee a safe video. Special-care labels are model predictions, not verified age or identity information.
False positives and negatives are possible. Timestamps are estimates. Intended for short videos; decoding time increases with video length.
Attribution and licenses
An unofficial adaptation of m1guelpf/cog-nsfw-filter, using the Stable Diffusion v1.5 safety checker. Not affiliated with or endorsed by the original authors.
Original code: MIT License. Model weights: CreativeML OpenRAIL-M, including its use-based restrictions.
More AI tools
Explore AI models with SeeAPI — a unified platform for multimodal generation.