Repository navigation
Real time Upscaling
English | 中文
Pages are upscaled in the background while you read and replace the originals once they are ready. This works for every source the reader shows: sites read online, Komga servers, downloaded galleries and archives, and local folders.
It is independent of upstream's "Upscale downloaded galleries" (upstream guide):
| Upscale downloaded galleries (upstream) | Upscale while reading (this fork) | |
|---|---|---|
| Works on | a whole downloaded gallery or archive | the page being read and the next few |
| Results kept | on disk | in memory (up to 512 MB, gone when the app closes) |
| Programs and models | the ones in "Model Directory Path" | its own, separate |
- Desktop (Windows, macOS, Linux): the upscaler programs run on this computer; a GPU with Vulkan support is needed.
- Phones and tablets: the programs cannot run there; another computer with a GPU runs the upscaling service.
- Open
Setting→Advanced→Image Super Resolution. - In the "Upscale while reading" group, tap the download button of
Upscaler programs: realesrganandUpscaler programs: realcugan. The app downloads and unpacks the ncnn-vulkan builds of Real-ESRGAN and Real-CUGAN; each then shows as installed. - Turn on
Upscale pages while reading. The HD icon in the top menu of the reader switches it as well.
| Setting | What it does |
|---|---|
| Model |
realesr-animevideov3 (x2, x3, x4), realesrgan-x4plus-anime (x4), realesrgan-x4plus (x4), realcugan-se (x2, x3, x4), realcugan-pro (x2, x3), realcugan-nose (x2). |
| Scale | The scales the model has. |
| Denoise level | realcugan models only: -1 conservative, 0 no denoise, 3 strong denoise. |
| Leave pages at least this wide as they are | 1600 px by default. Pages wide enough already are not upscaled. |
| Pages per run | 4 by default. Starting the program costs far more than a page (about 0.85 s against 0.03 to 0.08 s per page on an RTX 5090), so the reader fetches pages ahead and upscales them a batch at a time. |
The reader's own settings (top right; a side drawer on desktop) start with the model, scale, denoise level and width. A change is applied at once to the page being read, so models can be compared while reading; a setting tried before is served from memory.
Benchmark on the Image Super Resolution page times every model and scale on a folder of images or a JM chapter (downloaded once), writes report.json and report.md, and keeps the upscaled pages for comparison.
Phones, tablets, or computers without a suitable GPU can hand the pages to another computer that has one. The service runs the same versions of the programs and models as the desktop, so a setting gives the same result on every device.
Server: the sr_server/ folder of the repository; its README has the deployment steps.
- Needs Linux, a GPU driver with Vulkan, uv and Tailscale.
- It listens on the machine itself only and is published to your tailnet with
tailscale serve; the phone joins the same tailnet. The service has no token of its own, so do not expose it to the internet. - The GPU runs one batch at a time; requests of several devices wait their turn. Pages pass through a folder in memory that is removed after each run; the server keeps no pages and no results.
In the app:
- Open
Setting→Advanced→Image Super Resolutionand fill inUpscaling service addressin the "Upscale while reading" group, e.g.https://gpu-pc.example.ts.net:8790. - Tap
Test connection: it shows the GPU and the number of models available. - On a desktop, also turn on
Use an upscaling service; phones and tablets always use the service.
JPEG, PNG and WebP pages are sent as they are; JM pages are put back in order first. When the service cannot be reached, nothing is sent to that address for 30 seconds and the pages show as they are. The first connection over Tailscale can take about ten seconds.
- Animated images are left as they are.
- It stays off while the reader shows a gallery upscaled by "Upscale downloaded galleries".
- Higher scales cost memory once decoded: a 1280 px wide page upscaled 4 times is about 5120 × 7240, about 150 MB decoded. On phones, x2 is the safer choice.