Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ollm/opencomic-ai-training/llms.txt

Use this file to discover all available pages before exploring further.

Upscale models increase the pixel resolution of a comic image while simultaneously restoring scan quality. A low-resolution scan or a heavily compressed image loses fine linework detail, introduces softness at edges, and compresses tonal gradients. The upscale models are trained to reconstruct that lost detail — producing sharp, clean output at 2×, 3×, or 4× the input size — rather than simply interpolating pixels. Because the training pairs are generated procedurally in Krita using real comic-style brushes and artwork, the models learn the specific visual characteristics of comic imagery rather than natural photographs.

Scale Factors

Three output resolutions are supported:
  • — doubles the linear resolution (4× pixel count). The starting point for the 3× and 4× models.
  • — triples the linear resolution (9× pixel count). Fine-tuned from the 2× checkpoint.
  • — quadruples the linear resolution (16× pixel count). Fine-tuned from the 2× checkpoint.

Datasets

Dataset sizes vary by scale factor, reflecting the amount of new training signal needed when fine-tuning from a larger pretrained base:
ScaleImage PairsDegraded Variants per Image
25,0005
100,0005
100,0005

Key Dataset Design: disableBrushesWithPixelatedEdges

All upscale dataset presets set disableBrushesWithPixelatedEdges: true. This flag excludes Krita brushes that produce hard pixel-level aliasing in the clean images. Without this exclusion, the model would learn to sharpen already-pixelated strokes in an inconsistent way, producing staircase artefacts in the output. Disabling those brushes ensures that every linework edge in the training data is clean and sub-pixel smooth, so the model learns a consistent sharpening prior.
# Excerpt from options/opencomic-ai-upscale-2x.yml
disableBrushesWithPixelatedEdges: true  # Disable brushes that produce pixelated edges,
                                         # useful for upscaling datasets or to avoid
                                         # pixelated restoration

All Upscale Models

ModelArchitecturePre-trained FromScaleIterations
opencomic-ai-upscale-2xESRGANartifact-removal1,000,000
opencomic-ai-upscale-2x-liteESRGAN Liteartifact-removal-lite1,000,000
opencomic-ai-upscale-2x-compactCompactartifact-removal-compact450,000
opencomic-ai-upscale-3xESRGANupscale-2x500,000
opencomic-ai-upscale-3x-liteESRGAN Liteupscale-2x-lite500,000
opencomic-ai-upscale-3x-compactCompactupscale-2x-compact450,000
opencomic-ai-upscale-4xESRGANupscale-2x500,000
opencomic-ai-upscale-4x-liteESRGAN Liteupscale-2x-lite500,000
opencomic-ai-upscale-4x-compactCompactupscale-2x-compact450,000
NCNN weights are stored as .bin + .param pairs under:
models/upscale/ncnn/
  opencomic-ai-upscale-2x.bin
  opencomic-ai-upscale-2x.param
  opencomic-ai-upscale-2x-lite.bin
  opencomic-ai-upscale-2x-lite.param
  opencomic-ai-upscale-2x-compact.bin
  opencomic-ai-upscale-2x-compact.param
  opencomic-ai-upscale-3x.bin
  opencomic-ai-upscale-3x.param
  opencomic-ai-upscale-3x-lite.bin
  opencomic-ai-upscale-3x-lite.param
  opencomic-ai-upscale-3x-compact.bin
  opencomic-ai-upscale-3x-compact.param
  opencomic-ai-upscale-4x.bin
  opencomic-ai-upscale-4x.param
  opencomic-ai-upscale-4x-lite.bin
  opencomic-ai-upscale-4x-lite.param
  opencomic-ai-upscale-4x-compact.bin
  opencomic-ai-upscale-4x-compact.param

Pre-Training Chain

The upscale models form the second and third links in the OpenComic AI training chain. The 2× models start from the artifact-removal checkpoint, inheriting its restoration knowledge before being fine-tuned to also increase resolution. The 3× and 4× models then begin from the 2× checkpoint, meaning they inherit both restoration and 2× upscaling knowledge before specializing on their own scale factor.
artifact-removal ──► upscale-2x ──► upscale-3x
                               ──► upscale-4x

artifact-removal-lite ──► upscale-2x-lite ──► upscale-3x-lite
                                          ──► upscale-4x-lite

artifact-removal-compact ──► upscale-2x-compact ──► upscale-3x-compact
                                                ──► upscale-4x-compact
The 3× and 4× models are trained for 500,000 iterations rather than 1,000,000 (ESRGAN/Lite) because they start from a well-converged 2× checkpoint that already encodes comic-domain knowledge. Less fine-tuning is needed to shift from 2× to 3× or 4× scale output.

Training Configuration

Training options for all upscale models are in:
options/train/ESRGAN/opencomic-ai-upscale-2x.yml
options/train/ESRGAN/opencomic-ai-upscale-2x-lite.yml
options/train/ESRGAN/opencomic-ai-upscale-3x.yml
options/train/ESRGAN/opencomic-ai-upscale-3x-lite.yml
options/train/ESRGAN/opencomic-ai-upscale-4x.yml
options/train/ESRGAN/opencomic-ai-upscale-4x-lite.yml
options/train/Compact/opencomic-ai-upscale-2x-compact.yml
options/train/Compact/opencomic-ai-upscale-3x-compact.yml
options/train/Compact/opencomic-ai-upscale-4x-compact.yml
Dataset generation presets for reproducing the training data are:
options/opencomic-ai-upscale-2x.yml
options/opencomic-ai-upscale-3x.yml
options/opencomic-ai-upscale-4x.yml
Generate the 2× upscale training dataset with:
npm run prepare && npm run generate -- \
  --options ./options/opencomic-ai-upscale-2x.yml \
  --krita ./krita-5.3.1-x86_64.AppImage

Build docs developers (and LLMs) love