Prediction
jingyunliang/swinir:660d922d33153019e8c263a3bba265de882e7f4f70396546b6c9c8f9d47a021aID
xnboddbbsmatzzhuis26tconxa
Status
Succeeded
Source
Web
Hardware
A100 (40GB)
Total duration
Created
by @fofr
Input
{
"jpeg": 40,
"image": "https://replicate.delivery/pbxt/KK4WleeNoUgjF8PXPPLBLbpBUgRwsoS9EGdBMpwhs0PfLuU0/low-quality-landscape.jpg",
"noise": 15,
"task_type": "Real-World Image Super-Resolution-Large"
}
Install Replicate’s Node.js client library:
npm install replicate
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jingyunliang/swinir using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jingyunliang/swinir:660d922d33153019e8c263a3bba265de882e7f4f70396546b6c9c8f9d47a021a",
{
input: {
jpeg: 40,
image: "https://replicate.delivery/pbxt/KK4WleeNoUgjF8PXPPLBLbpBUgRwsoS9EGdBMpwhs0PfLuU0/low-quality-landscape.jpg",
noise: 15,
task_type: "Real-World Image Super-Resolution-Large"
}
}
);
// 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.
Install Replicate’s Python client library:
pip install replicate
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:
import replicate
Run jingyunliang/swinir using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jingyunliang/swinir:660d922d33153019e8c263a3bba265de882e7f4f70396546b6c9c8f9d47a021a",
input={
"jpeg": 40,
"image": "https://replicate.delivery/pbxt/KK4WleeNoUgjF8PXPPLBLbpBUgRwsoS9EGdBMpwhs0PfLuU0/low-quality-landscape.jpg",
"noise": 15,
"task_type": "Real-World Image Super-Resolution-Large"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run jingyunliang/swinir 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": "jingyunliang/swinir:660d922d33153019e8c263a3bba265de882e7f4f70396546b6c9c8f9d47a021a",
"input": {
"jpeg": 40,
"image": "https://replicate.delivery/pbxt/KK4WleeNoUgjF8PXPPLBLbpBUgRwsoS9EGdBMpwhs0PfLuU0/low-quality-landscape.jpg",
"noise": 15,
"task_type": "Real-World Image Super-Resolution-Large"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{
"completed_at": "2024-01-31T15:24:34.043267Z",
"created_at": "2024-01-31T15:24:29.581795Z",
"data_removed": false,
"error": null,
"id": "xnboddbbsmatzzhuis26tconxa",
"input": {
"jpeg": 40,
"image": "https://replicate.delivery/pbxt/KK4WleeNoUgjF8PXPPLBLbpBUgRwsoS9EGdBMpwhs0PfLuU0/low-quality-landscape.jpg",
"noise": 15,
"task_type": "Real-World Image Super-Resolution-Large"
},
"logs": null,
"metrics": {
"predict_time": 4.445069,
"total_time": 4.461472
},
"output": "https://replicate.delivery/pbxt/EthhfyIboFxtQC67kjwAHCiglfMjPHuaHNHUNXQcgRRxgBSSA/out.png",
"started_at": "2024-01-31T15:24:29.598198Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/xnboddbbsmatzzhuis26tconxa",
"cancel": "https://api.replicate.com/v1/predictions/xnboddbbsmatzzhuis26tconxa/cancel"
},
"version": "660d922d33153019e8c263a3bba265de882e7f4f70396546b6c9c8f9d47a021a"
}
Generated in