Optional local AI · Setup guide

Upscale web images with local Real-ESRGAN

Connect Click Image Zoom to Real-ESRGAN on your device. Install the local helper once; AI then tries it automatically before browser AI.

How the local path works

The extension fetches the original image from its source website. When AI clarity is triggered, Chrome sends the image to an installed local helper through Native Messaging.

  1. Chrome extension

    Select an image and trigger AI clarity

  2. Local helper

    Chrome Native Messaging · Python

  3. Real-ESRGAN CLI

    Local model inference · 4x output

Native path: the result returns to the viewer. If the helper is missing or fails, the extension tries its browser AI fallback using LiteRT/WebGPU. If that also fails, it uses Lanczos sharpening. Image pixels are not uploaded to a cloud AI service.

Before you install

The local helper is optional. The free image viewer, 10x zoom, and panning work without it. Native AI creates a fixed 4x result; it cannot recover facts or text absent from the original.

Supported setup

Google Chrome on macOS or Linux. The project’s Native Messaging installer does not support Windows, even though the upstream CLI has a Windows release.

Python and local files

The installer calls /usr/bin/python3, and the helper also needs python3 on PATH. Both must be available; only Python’s standard library is used, with no pip packages to install. Keep the CLI executable and its .param/.bin model files in permanent local locations.

Device requirements

Use an upstream CLI build compatible with your operating system and GPU. Runtime, memory use, and model availability vary by device.

Install and connect in four steps

Use your installed extension’s actual ID and absolute local paths.

  1. Install the extension and copy its ID

    Add Click Image Zoom from the Chrome Web Store. Open chrome://extensions, turn on Developer mode, and copy the ID shown for Click Image Zoom. Use that exact ID, including for an unpacked development build.

  2. Download the CLI and model files

    Download the correct operating-system archive from the official Real-ESRGAN-ncnn-vulkan releases and extract it. The model directory must contain realesrgan-x4plus.param and realesrgan-x4plus.bin. For the Faster model, also keep the realesr-general-x4v3.param and realesr-general-x4v3.bin pair. Read the official Real-ESRGAN project for model background.

  3. Register the local helper with Chrome

    Download both install.sh and host.py. Save them with these exact filenames in the same folder named native-host. Open a terminal in its parent directory. If you already have the full project source, run these commands from the project root. Replace all placeholders below with your actual extension ID, CLI path, and model directory; quote paths that contain spaces.

    chmod +x native-host/install.sh
    ./native-host/install.sh EXTENSION_ID "/absolute/path/to/realesrgan-ncnn-vulkan" "/absolute/path/to/models"

    The installer copies the helper and registers com.image_zoom.esrgan for this extension ID. It records the CLI and model paths, so keep those files in place. It currently registers Google Chrome only.

  4. Restart Chrome and trigger AI clarity

    Quit Chrome completely, reopen it, and reload your webpage. In the extension popup, choose AI clarity under Enlarged image quality. Choose Faster or Better quality, and trigger AI on first zoom or viewer open. The defaults are Faster and first zoom. Hold your shortcut key, click a web image, and zoom if using the default trigger. The installed helper is tried automatically.

Which local model does the popup select?

Popup settingLocal CLI modelRequired files
Faster (default)realesr-general-x4v3realesr-general-x4v3.param + .bin
Better qualityrealesrgan-x4plusrealesrgan-x4plus.param + .bin

Both local modes produce 4x output. If the Faster model pair is missing, the helper uses the installed x4plus pair. The installer requires x4plus files even when Faster is selected. The labels select models; actual speed and quality depend on the image and device.

FAQ

Setup questions and troubleshooting

How can I tell whether the helper ran?

The popup has no connected indicator. For a diagnostic check, open DevTools on the webpage and filter Console messages by [ImageZoom][enhancement]. native_cli_fallback means the native attempt failed. A successful upscale_request_applied without native fallback or browser ai_upscale_start is evidence that the native path completed.

The helper is unavailable. What should I check?

Check the exact extension ID, the executable CLI path, /usr/bin/python3, and the model directory. Confirm both helper files were downloaded with their original names. Quit and reopen Chrome after installation. If the extension ID or CLI/model paths change, rerun the installer with the new values. The ordinary image viewer remains available.

What if installation reports missing model files?

Use an absolute model directory containing realesrgan-x4plus.param and realesrgan-x4plus.bin. The explicit third argument avoids dependence on the current working directory. Faster additionally uses the realesr-general-x4v3 pair when available.

Can I connect any RealESRNet or .pth model?

This integration uses the Real-ESRGAN NCNN/Vulkan CLI and its supported .param/.bin model pairs. It does not accept arbitrary RealESRNet files or PyTorch .pth checkpoints directly.

Has browser AI been removed?

No. After a native failure, the extension tries its browser Real-ESRGAN path using LiteRT/WebGPU. That fallback depends on browser and GPU support and model loading. If browser AI cannot run either, the extension uses Lanczos sharpening; you can also choose Quick sharpening or Zoom only in the popup.

Do images stay inside the browser?

The native path sends image pixels to a local process outside Chrome, on the same device. The helper writes temporary input and output files while the CLI runs and removes the temporary directory afterward. Images may be fetched from their source website, but enhancement does not upload them to a cloud AI service.

Can I use the native helper on Windows?

The upstream CLI offers Windows builds, but this project’s installer currently registers the Chrome helper only on macOS and Linux. A Windows CLI download alone does not connect it to the extension.

Your images, a closer look

Use the free image viewer, then add the local helper when you want native AI enhancement.