Compare nsfw models against inputs
Input image
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run fofr/nsfw-model-comparison using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fofr/nsfw-model-comparison:684e5e879da2bcdbddc1a094650e17179d14024398d1d6146c6382ff07488fc1", { input: { image: "https://replicate.delivery/pbxt/LZ407zJWvzliNmeTeeb7VVlSo8IMdFanNlGEziaIHHxXvmcS/ComfyUI_00301_.png" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "fofr/nsfw-model-comparison:684e5e879da2bcdbddc1a094650e17179d14024398d1d6146c6382ff07488fc1", input={ "image": "https://replicate.delivery/pbxt/LZ407zJWvzliNmeTeeb7VVlSo8IMdFanNlGEziaIHHxXvmcS/ComfyUI_00301_.png" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "684e5e879da2bcdbddc1a094650e17179d14024398d1d6146c6382ff07488fc1", "input": { "image": "https://replicate.delivery/pbxt/LZ407zJWvzliNmeTeeb7VVlSo8IMdFanNlGEziaIHHxXvmcS/ComfyUI_00301_.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
falcon_is_safe
compvis_is_safe
falcon_time_taken
compvis_time_taken
{ "completed_at": "2024-09-04T13:10:34.940274Z", "created_at": "2024-09-04T13:06:31.104000Z", "data_removed": false, "error": null, "id": "1cbcbr6c81rgm0chqmjbtj9bg0", "input": { "image": "https://replicate.delivery/pbxt/LZ407zJWvzliNmeTeeb7VVlSo8IMdFanNlGEziaIHHxXvmcS/ComfyUI_00301_.png" }, "logs": "Falcon safety check took 0.15 seconds\nCompVis safety check took 0.46 seconds\nFalcon output: True\nCompvis output: True", "metrics": { "predict_time": 1.149604509, "total_time": 243.836274 }, "output": { "falcon_is_safe": true, "compvis_is_safe": true, "falcon_time_taken": 0.14787530899047852, "compvis_time_taken": 0.4556546211242676 }, "started_at": "2024-09-04T13:10:33.790670Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/1cbcbr6c81rgm0chqmjbtj9bg0", "cancel": "https://api.replicate.com/v1/predictions/1cbcbr6c81rgm0chqmjbtj9bg0/cancel" }, "version": "684e5e879da2bcdbddc1a094650e17179d14024398d1d6146c6382ff07488fc1" }
Falcon safety check took 0.15 seconds CompVis safety check took 0.46 seconds Falcon output: True Compvis output: True
This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input