Skip to content

Repository files navigation

upscaler-cli

What’s new

✅ Rewritten in TypeScript.
✅ Full upscalejsmodels support!
✅ Scale support (2x, 3x, 4x, and 8x!).

using upscalerjs

Install

npm install upscaler-cli -g

Usage

upscaler <img or dir> [options]
# example
upscaler align_landscape.png -m @upscalerjs/esrgan-medium -s 4x -o upscales/

Artist: stable-diffusion
Prompt: a fantastic alien landscape

Tip

If upscaling appears "stuck" - it's probably maxing out the nodejs memory limit trying to upscale the image.
Try a lower scale, or a different model to see if it improves result time.

Commands

namedescriptionexample
path/to/imgpath to image/directory to upscaleupscaler alien_landscape.png
list, lslist all supported upscale models and their respective supported scalesupscaler ls, upscaler ls

Options

namedescriptiontypeexample
modelupscale model to usestring-m @upscalerjs/esrgan-medium
outputoutput directorystring-o upscales/
scalescale of upscale model to usestring-s 4x

Models

upscalerjs models page

namescale
@upscalerjs/esrgan-slim2x 3x 4x 8x
@upscalerjs/esrgan-medium2x 3x 4x 8x
@upscalerjs/esrgan-thick2x 3x 4x 8x
@upscalerjs/esrgan-legacydiv2kx2 div2kx3 div2kx4 gans
@upscalerjs/maxim-deblurring64 256
@upscalerjs/maxim-dehazing-indoor64 256
@upscalerjs/maxim-dehazing-outdoor64 256
@upscalerjs/maxim-denoising64 256
@upscalerjs/maxim-deraining64 256
@upscalerjs/maxim-enhancement64 256
@upscalerjs/maxim-retouching64 256

Examples

upscale an image using the default upscaling model

upscaler image.png
exampledescription
upscaler lslist all available upscale models and their supported scales
upscaler image.pngupscale image using the default model and save to current directory
upscaler image.png -o ./upscalesupscale image using the default model and save to ./upscaels (directory ./upscales will be created if it doesn't exist)
upscaler image.png -s 4xupscale image using the default model with a scale of 4 and save to current directory
upscaleer -m @upscalerjs/esrgan-medium -s 8xupscale image using @upscalerjs/esrgan-medium model with a scale of 8 and save to current directory

About

⬆️ upscale images from your terminal using AI

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages