Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
wzesk /littoral_upsample:331109b1
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 wzesk/littoral_upsample using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"wzesk/littoral_upsample:331109b1b1fea81550537ebc723bb9c9f1ea2fb7a6e2018e636e9d299dabd735",
{
input: {
image: "https://raw.githubusercontent.com/Wzesk/Real-ESRGAN/7e18ad3530a145074d230497323d6ec012b2f811/test_images/20240121T052111_20240121T053340_T43NBG_nir.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 wzesk/littoral_upsample using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"wzesk/littoral_upsample:331109b1b1fea81550537ebc723bb9c9f1ea2fb7a6e2018e636e9d299dabd735",
input={
"image": "https://raw.githubusercontent.com/Wzesk/Real-ESRGAN/7e18ad3530a145074d230497323d6ec012b2f811/test_images/20240121T052111_20240121T053340_T43NBG_nir.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 wzesk/littoral_upsample 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": "wzesk/littoral_upsample:331109b1b1fea81550537ebc723bb9c9f1ea2fb7a6e2018e636e9d299dabd735",
"input": {
"image": "https://raw.githubusercontent.com/Wzesk/Real-ESRGAN/7e18ad3530a145074d230497323d6ec012b2f811/test_images/20240121T052111_20240121T053340_T43NBG_nir.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": "2025-01-17T14:47:39.413626Z",
"created_at": "2025-01-17T14:46:49.552000Z",
"data_removed": false,
"error": null,
"id": "1ffnd8s5t1rj40cmejxt4y4a14",
"input": {
"image": "https://raw.githubusercontent.com/Wzesk/Real-ESRGAN/7e18ad3530a145074d230497323d6ec012b2f811/test_images/20240121T052111_20240121T053340_T43NBG_nir.png"
},
"logs": "/src/RealESRGAN/model.py:49: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\nloadnet = torch.load(model_path)",
"metrics": {
"predict_time": 1.024635476,
"total_time": 49.861626
},
"output": "https://replicate.delivery/yhqm/PWom14LDS442E18QqiBBz0WzgoZGfSazprOoyfIMPoVLeDMoA/upsampled_image.png",
"started_at": "2025-01-17T14:47:38.388991Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/qoxq-xtxtpyk2racnaxefp4lljr67tkysxsfdhcpwsg6ahxmb7e7wa4ya",
"get": "https://api.replicate.com/v1/predictions/1ffnd8s5t1rj40cmejxt4y4a14",
"cancel": "https://api.replicate.com/v1/predictions/1ffnd8s5t1rj40cmejxt4y4a14/cancel"
},
"version": "331109b1b1fea81550537ebc723bb9c9f1ea2fb7a6e2018e636e9d299dabd735"
}
/src/RealESRGAN/model.py:49: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
loadnet = torch.load(model_path)