You're looking at a specific version of this model. Jump to the model overview.
cjwbw /night-enhancement:4328e402
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run cjwbw/night-enhancement using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cjwbw/night-enhancement:4328e402cfedafa70ad7cec04412e86ab61832204deccd94108ae5222c9b1ae1",
{
input: {
image: "https://replicate.delivery/mgxm/5a860a3d-90b8-4eb5-9428-68398c3326ee/23.png"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run cjwbw/night-enhancement using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cjwbw/night-enhancement:4328e402cfedafa70ad7cec04412e86ab61832204deccd94108ae5222c9b1ae1",
input={
"image": "https://replicate.delivery/mgxm/5a860a3d-90b8-4eb5-9428-68398c3326ee/23.png"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run cjwbw/night-enhancement using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "cjwbw/night-enhancement:4328e402cfedafa70ad7cec04412e86ab61832204deccd94108ae5222c9b1ae1",
"input": {
"image": "https://replicate.delivery/mgxm/5a860a3d-90b8-4eb5-9428-68398c3326ee/23.png"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-08-13T17:15:29.898541Z",
"created_at": "2022-08-13T17:13:55.647688Z",
"data_removed": false,
"error": null,
"id": "5zpn2gfxoncvpm66wwpol7r4bu",
"input": {
"image": "https://replicate.delivery/mgxm/5a860a3d-90b8-4eb5-9428-68398c3326ee/23.png"
},
"logs": "# datasetpath : LOL\nresults/LOL/model/*.pt\nmodel_list ['results/LOL/model/LOL_params_0900000.pt']\niter 900000\n Load SUCCESS\npredicting: 1 / 1",
"metrics": {
"predict_time": 6.080014,
"total_time": 94.250853
},
"output": "https://replicate.delivery/mgxm/60c4c0d8-c82f-42e0-96ee-71392d32b6fe/output.png",
"started_at": "2022-08-13T17:15:23.818527Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/5zpn2gfxoncvpm66wwpol7r4bu",
"cancel": "https://api.replicate.com/v1/predictions/5zpn2gfxoncvpm66wwpol7r4bu/cancel"
},
"version": "4328e402cfedafa70ad7cec04412e86ab61832204deccd94108ae5222c9b1ae1"
}
# datasetpath : LOL
results/LOL/model/*.pt
model_list ['results/LOL/model/LOL_params_0900000.pt']
iter 900000
Load SUCCESS
predicting: 1 / 1