upscale_image
Upscale PNG or JPEG images 2x or 4x with super-resolution models that add plausible detail; preserve PNG transparency and process large images in tiles.
Instructions
Upscale an image (PNG or JPEG) 2x or 4x with a super resolution model, adding plausible detail.
model: "realesrgan-x4plus" (default; general purpose, suits concept art, renders and photos, and cleans up mild noise and JPEG artefacts) or "pbrify-v4" (made for game textures such as albedo, roughness or normal maps; keeps fine surface detail; about 3 times slower). scale: 4 (the models' native scale) or 2 (the 4x result downscaled by half with Lanczos). keep_alpha: a PNG with transparency keeps it; the alpha channel is upscaled smoothly, the colour by the model. keep_alpha=False writes an opaque RGB PNG. Large images are processed in tiles inside the backend, so any size fits in VRAM; the result is limited to 8192 px per side (for example 2048 px at 4x, 4096 px at 2x) and is an 8-bit PNG. Measured on this GPU: about 0.5 s per megapixel of 4x output with the default model and 1.5 s with pbrify-v4 (a 1024 px image takes about 9 s and 25 s), plus any wait for the shared queue. Output: <output_dir or /ai/output/localgen/upscale/>/_x.png. Returns the path, input and output sizes, whether alpha was kept, and timings.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_image": "<input_image>"
},
"name": "upscale_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| scale | No | ||
| keep_alpha | No | ||
| output_dir | No | ||
| input_image | Yes | ||
| idle_timeout_seconds | No |