mcpField
I
image-upscale

image-upscale

github.com/agntswrmCreative & media646 installsUpdated 34w ago
Repository

About image-upscale

image-upscale is a command-line skill for enlarging images with AI super-resolution models. It accepts a file path or URL and offers local and hosted provider options.

Key features

  1. 012x or 4x scaling options
  2. 02Local CPU processing with Transformers.js
  3. 03fal and Replicate provider support
  4. 04Custom model and output path

Use cases

  1. 01Enlarging an image from a local file
  2. 02Upscaling an image supplied by URL
  3. 03Choosing a provider for an upscale job

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/agntswrm/agent-media --skill image-upscale

After installing, type/image-upscalein Claude Code to confirm it loaded.

Details

From the project README

Image Upscale

Upscales an image using AI super-resolution models, increasing resolution while generating realistic detail.

Command

npx agent-media@latest image upscale --in <path> [options]

Inputs

OptionRequiredDescription
--inYesInput file path or URL
--scaleNoScale factor (2 or 4, default: 2)
--outNoOutput path, filename or directory (default: ./)
--providerNoProvider to use (local, fal, replicate)
--modelNoModel to use (overrides provider default)

Output

Returns a JSON object with the upscaled image path:

{
  "ok": true,
  "media_type": "image",
  "action": "upscale",
  "provider": "local",
  "output_path": "upscaled_123_abc.png",
  "mime": "image/png",
  "bytes": 456789
}

Examples

Upscale an image (default 2x):

npx agent-media@latest image upscale --in photo.jpg

Upscale 4x with specific provider:

npx agent-media@latest image upscale --in photo.jpg --scale 4 --provider fal

Upscale with custom output:

npx agent-media@latest image upscale --in photo.jpg --out ./upscaled

Providers

local

Runs locally on CPU using Transformers.js, no API key required.

  • Uses Xenova/swin2SR-compressed-sr-x4-48 model (~1.3MB)
  • Always outputs 4x upscale regardless of --scale (model architecture limitation)
  • Models downloaded on first use
  • You may see a mutex lock failed error — ignore it, the output is correct if "ok": true
npx agent-media@latest image upscale --in photo.jpg --provider local
fal
  • Requires FAL_API_KEY
  • Uses fal-ai/esrgan (Real-ESRGAN) model
  • Supports 2x and 4x scale
replicate
  • Requires REPLICATE_API_TOKEN
  • Uses nightmareai/real-esrgan model
  • Supports 2-10x scale

Comments

Markdown supported