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.
alexgenovese /upscaler:ba013279
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 alexgenovese/upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"alexgenovese/upscaler:ba0132791dea9f3a80b18a9c04e96bdddbc6265e55cb79c61857365f9d172fd8",
{
input: {
scale: 2,
version: "v1.4",
image_url: "https://replicate.delivery/pbxt/JQzDGjeVoidhwN0GqodtojIsPBDgL1KP3duXhTIShyFZByal/1.webp"
}
}
);
// 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 alexgenovese/upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"alexgenovese/upscaler:ba0132791dea9f3a80b18a9c04e96bdddbc6265e55cb79c61857365f9d172fd8",
input={
"scale": 2,
"version": "v1.4",
"image_url": "https://replicate.delivery/pbxt/JQzDGjeVoidhwN0GqodtojIsPBDgL1KP3duXhTIShyFZByal/1.webp"
}
)
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 alexgenovese/upscaler 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": "alexgenovese/upscaler:ba0132791dea9f3a80b18a9c04e96bdddbc6265e55cb79c61857365f9d172fd8",
"input": {
"scale": 2,
"version": "v1.4",
"image_url": "https://replicate.delivery/pbxt/JQzDGjeVoidhwN0GqodtojIsPBDgL1KP3duXhTIShyFZByal/1.webp"
}
}' \
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": "2023-08-29T10:51:57.833375Z",
"created_at": "2023-08-29T10:50:42.591910Z",
"data_removed": false,
"error": null,
"id": "gok7fcdbqwm5lnbun3tnt3p2hm",
"input": {
"scale": 2,
"version": "v1.4",
"image_url": "https://replicate.delivery/pbxt/JQzDGjeVoidhwN0GqodtojIsPBDgL1KP3duXhTIShyFZByal/1.webp"
},
"logs": "/tmp/tmpimpp_rls1.webp v1.4 2.0 0.5\n/root/.pyenv/versions/3.8.18/lib/python3.8/site-packages/torch/nn/functional.py:3103: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.\nwarnings.warn(\"The default behavior for interpolate/upsample with float scale_factor changed \"",
"metrics": {
"predict_time": 2.316051,
"total_time": 75.241465
},
"output": "https://replicate.delivery/pbxt/ieGpOo2OrAW0JakNel96cvKHhO23o1ve6WnQcxcC9ohYef2LC/out..webp",
"started_at": "2023-08-29T10:51:55.517324Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/gok7fcdbqwm5lnbun3tnt3p2hm",
"cancel": "https://api.replicate.com/v1/predictions/gok7fcdbqwm5lnbun3tnt3p2hm/cancel"
},
"version": "ba0132791dea9f3a80b18a9c04e96bdddbc6265e55cb79c61857365f9d172fd8"
}
/tmp/tmpimpp_rls1.webp v1.4 2.0 0.5
/root/.pyenv/versions/3.8.18/lib/python3.8/site-packages/torch/nn/functional.py:3103: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "