UpscalerJS
UpscalerJS copied to clipboard
Enhance Images with Javascript and AI. Increase resolution, retouch, denoise, and more. Open Source, Browser & Node Compatible, MIT License.
UpscalerJS
UpscalerJS is a tool for increasing image resolution in Javascript via a Neural Network up to 4x.
Announcement
A beta version of 1.0.0
was released on 7/15/22. Learn more here about what's included.
If you are migrating from <=0.12
, and you are using a custom model, you will need to modify how you load models. If you are using the default model (e.g., not providing a model
argument) then no changes are needed.
Examples
You can view runnable code examples on CodeSandbox.
To run an example locally, navigate to the relevant folder and run:
pnpm start
If you are developing UpscalerJS locally and wish to run an example during development, use the following command:
pnpm example {folder-name-of-example}
This will automatically start a watcher in the example folder, as well as set the local UpscalerJS package to build in the background.
Quick Start
import Upscaler from 'upscaler';
const upscaler = new Upscaler();
upscaler.upscale('/path/to/image').then(upscaledImage => {
console.log(upscaledImage); // base64 representation of image src
});