Repolode
isixe

isixe/bg2x

A free, browser-based AI image upscaler that runs models locally, so uploaded images never leave your device.

Open-source alternative to:Topaz Gigapixel AILet's Enhance

Stars
99
Forks
4
Open issues
0
Last commit
10 days ago

What is it?

bg2x upscales images up to 4x using Real-ESRGAN, Swin2SR, and Real-CUGAN models. Inference runs entirely in the browser through ONNX Runtime Web inside a Web Worker, so there is no backend and no image upload step.

The tool offers ten models aimed at different inputs, including anime and illustration models, photo models, and models for noisy or heavily compressed JPEGs. Models are downloaded on first use from Hugging Face, with a ModelScope fallback, and cached in IndexedDB. It uses WebGPU when available and falls back to WASM otherwise.

It supports batch queues with drag-and-drop input, exports PNG, JPG, or WebP, and can download a batch as a ZIP. A Vue and Astro frontend is included, along with an Electron build for Windows, macOS, and Linux.

Key features

  • 01Upscales images up to 4x with Real-ESRGAN, Swin2SR, and Real-CUGAN models.
  • 02Runs entirely client-side in the browser, with no image uploads.
  • 03Offers ten models for photos, anime, illustrations, and compressed images.
  • 04Uses WebGPU when available and falls back to WASM.
  • 05Exports PNG, JPG, or WebP and downloads batches as ZIP.
  • 06Caches models in IndexedDB after the first download.
  • 07Provides an Electron desktop build for Windows, macOS, and Linux.

Use cases

  • Upscaling old or low-resolution anime and illustration artwork.
  • Enlarging compressed or noisy photos without sending them to a server.
  • Batch-enlarging a folder of images and exporting them as a ZIP.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/isixe/bg2x.git
  2. 2

    Enter the project folder

    cd bg2x
  3. 3

    Install dependencies

    pnpm install
  4. 4

    Start the development server, then open http://localhost:4321

    pnpm dev

Things to know

  • Uses pnpm for installs, and the repo contains both package-lock.json and pnpm-lock.yaml, so package managers must not be mixed.
  • Threaded WASM inference needs cross-origin isolation headers on your production host, or it falls back to a single thread.
  • Models are downloaded on first use from Hugging Face (with a ModelScope fallback), so an initial network connection is needed.

Topics

FAQ

What is bg2x?
A free, browser-based AI image upscaler that runs models locally, so uploaded images never leave your device. bg2x upscales images up to 4x using Real-ESRGAN, Swin2SR, and Real-CUGAN models. Inference runs entirely in the browser through ONNX Runtime Web inside a Web Worker, so there is no backend and no image upload step.
Is bg2x free to use? What license does it have?
bg2x is open source under the MIT license. Check the license terms before using it in commercial products.
Is bg2x still maintained?
Actively maintained. The last commit to bg2x was on Oct 10, 2026.
What can I use bg2x for?
Upscaling old or low-resolution anime and illustration artwork. Enlarging compressed or noisy photos without sending them to a server. Batch-enlarging a folder of images and exporting them as a ZIP.
How do I install bg2x?
Clone the repository: git clone https://github.com/isixe/bg2x.git Enter the project folder: cd bg2x Install dependencies: pnpm install Start the development server, then open http://localhost:4321: pnpm dev
Where can I get bg2x?
The source code and installation instructions are on GitHub: https://github.com/isixe/bg2x

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects