upscale_image

Upscale an image 4× using NovelAI’s standalone upscaler. The upscaler runs on the V5 model configured by NOVELAI_UPSCALE_MODEL, regardless of the model that produced the input image.

Parameters

Name

Type

Default

Notes

image

str

required

Base64-encoded PNG/JPEG to upscale.

factor

Literal[4]

4

4 only — the API exposes no other step.

Returns

list[ContentBlock] — base64 Image of the upscaled image + saved-path text.

Behavior

  • The upscaler is a separate NovelAI endpoint — it does not run a diffusion loop, so it’s faster than re-generating at a higher resolution.

  • Anlas cost scales with the source resolution (the step is fixed at 4×). Use estimate_anlas_cost before a big batch.

  • The output preserves the input’s color profile and aspect ratio. You cannot change aspect ratio during upscale.

Example

await ctx.session.call_tool("upscale_image", {
    "image": image_b64,
    "factor": 4,
})

CLI

uv run python -m novelai_image_mcp upscale ./portrait.png --factor 4

Tips

Tip

When to upscale vs re-generate?

  • Upscale when you already have a near-perfect image and just need higher resolution.

  • Re-generate when you want to change composition, lighting, or details. Re-generating at 2× the original resolution often produces cleaner results than upscaling, but costs more Anlas.

Memory usage

A 4× upscale of a 1024×1024 image produces a 4096×4096 output (~64 MB uncompressed PNG). Make sure your NOVELAI_OUTPUT_DIR volume has space.

See also