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.

The options/ directory ships with a set of ready-to-use preset files, each tuned for a specific restoration or enhancement task. Every preset follows the same schema described in the Options Schema reference and composes shared building blocks from options/common/. You can use any preset as-is or copy and modify it to fit your data requirements — for example, adjusting images, degradedImagesPerCleanImage, or the quality ranges of compression steps.
Run your target preset with the --print-options flag before starting a full generation run. The pipeline will resolve all Rand values for the first few images and print the concrete parameters to stdout, letting you verify that settings such as halftone size, scale factor, and compression quality are falling in the expected ranges before committing GPU and storage resources.

opencomic-ai-artifact-removal.yml

Designed to train a model to remove compression artifacts, moiré patterns, and halftone dot remnants from comic images. It generates a large volume of degraded variants per clean image to capture the full diversity of real-world artifact combinations.
SettingValue
images4,000
degradedImagesPerCleanImage100
formatjpg
base.disableBrushesWithPixelatedEdgestrue
inNodePromiseAlltrue
checkSizestrue
Krita-side (inKrita): Hard halftone applied with singleRun: true and sameInAllLayers: true from halftone-hard.yml. The applyIn field is a weighted list with without at weight 10.0 and both at weight 1.0, strongly favouring no halftone on the clean image. For colored images a separate CMYKA-weighted colored block is applied with independent_channels mode and size: [2.5, 9.99].Node.js-side (inNode): All steps run in parallel (inNodePromiseAll: true). The full pipeline:
inNode:
  - type: rotate
    prob: 0.2
    angle: [-2.99, 2.99]
    background: '#ffffff'

  - type: resize
    prob: 0.5
    both: true
    scale: [0.3, 0.7]
    kernel: [linear, cubic, mitchell, lanczos2, lanczos3, mks2013, mks2021,
             bicubic, bilinear, nohalo, lbb, vsqbs]
    clean:
      kernel: [mitchell, lanczos2, lanczos3, mks2013, mks2021]

  - type: jpeg
    prob: 0.8
    quality: [30, 100]

  - type: webp
    prob: 0.1
    quality: [30, 100]

  - type: jpeg
    prob: 0.1
    quality: [30, 100]

  - type: jpeg
    prob: 0.1
    quality: [30, 100]

  - type: jpeg
    prob: 0.1
    quality: [30, 100]

  - type: jpeg
    prob: 0.1
    quality: [30, 100]

  - type: avif
    prob: 0.2
    quality: [30, 100]

  - type: jxl
    prob: 0.2
    quality: [30, 100]

  - file: options/common/blur.yml

  - type: rotate
    prob: 0.05
    skipIf: [null, rotate]
    angle: [-45, 45]
    background: '#ffffff'

  - type: resize
    prob: 0.1
    both: true
    scale: [0.9, 1.1]
    kernel: [linear, cubic, mitchell, lanczos2, lanczos3, mks2013, mks2021,
             bicubic, bilinear, nohalo, lbb, vsqbs]
    clean:
      kernel: [mitchell, lanczos2, lanczos3, mks2013, mks2021]
The clean.kernel sub-object restricts the resampling kernel used on the clean copy to filters that do not introduce moiré, while the degraded copy uses the full kernel list. Because clean and degraded images may end up at slightly different resolutions when kernels differ, checkSizes: true validates the ratio after every image pair.

Descreen presets train models to remove halftone dot patterns (screentones) from scanned comics and manga. Multiple variants exist to cover different source-material characteristics.

opencomic-ai-descreen-hard.yml

The primary hard-halftone descreen preset. Halftone angle is biased toward 45° (weight 5.0) with small random deviation (42.1–47.9°, weight 1.0) and occasional 0° (weight 1.0). The same file also defines a second degradation block named opencomic-ai-descreen-hard-moire in the same run — that block forces moiré by selecting resize scale values conditioned on inKrita.halftone.config.size.
SettingValue
images5,000
degradedImagesPerCleanImage10
formatjpg
halftone presethalftone-hard.yml
inNodePromiseAllfalse
checkSizestrue
Krita-side: Hard halftone with singleRun: false, sameInAllLayers: false — each degraded variant gets independently randomized halftone parameters. applyIn defaults from halftone-hard.yml (strongly favouring degraded-only application).Node.js-side: rotate (prob 0.05, angle ±45°, skipIf: [null, rotate]), resize (prob 0.8, scale 0.20–1.20 weighted toward downscaling), jpeg (prob 0.3), webp (prob 0.1), avif (prob 0.1), jxl (prob 0.1), double-JPEG (prob 0.1), blur.yml block, and a secondary small resize at prob 0.05.

opencomic-ai-descreen-hard-any-angle.yml

Identical pipeline to descreen-hard, but the halftone angle is drawn uniformly from [0.1, 89.9] — useful for training on scans with arbitrary screentone rotation. Also bundles a descreen-hard-moire-any-angle degradation block.
SettingValue
images1,000
degradedImagesPerCleanImage10
halftone angle[0.1, 89.9] (uniform range)

opencomic-ai-descreen-moire-only.yml

Focuses exclusively on moiré artifacts by using a size-conditioned scale that guarantees beat-frequency aliasing between the halftone grid and the resize step. No JPEG/WebP/AVIF/JXL compression degradations are applied — the only impairment is moiré.
SettingValue
images1,000
degradedImagesPerCleanImage10
seed2323
Key techniqueConditional resize scale based on inKrita.halftone.config.size
The resize step uses a conditional Rand array to select scale ranges that produce strong moiré for each halftone dot size bucket:
- type: resize
  prob: 1
  both: true
  scale:
    - value: [0.27, 0.31]
      if: inKrita.halftone.config.size >= 9.2
    - value: [[0.65, 0.70], [0.47, 0.54], [0.29, 0.39]]
      if: inKrita.halftone.config.size >= 7.8
    - value: [[0.74, 0.84], [0.55, 0.64], [0.27, 0.34]]
      if: inKrita.halftone.config.size >= 6.4
    # ...additional size buckets down to 2.2
    - value: [1, [0.4, 1.08]]
      if: default
  kernel: [bicubic, bilinear, nohalo, lbb, vsqbs]
Because sameInAllLayers: true is required to expose inKrita.halftone.config.size as a resolved value, all layers share the same dot size in this preset. inNodePromiseAll must be false when using conditional scale expressions.

opencomic-ai-descreen-30deg.yml

Halftone angle is biased toward 45° for the degraded image, but the clean image is always rendered at 330° (30°). This cross-angle setup exercises the model’s ability to separate content from angle-dependent screentone patterns. Also contains a descreen-30deg-moire block in the same file.
SettingValue
images1,000
degradedImagesPerCleanImage10
base.halftone.clean.angle330 (30°)
inNodePromiseAlltrue

opencomic-ai-descreen-soft.yml

Uses halftone-soft.yml instead of halftone-hard.yml, producing smaller, lighter halftone dots (size range 2.5–4.3) typical of softer printing processes. Resize scale is constrained to a narrow range (0.9–1.1 weighted toward downscale) to avoid excessive size changes that might dominate over the subtle soft halftone signal. Also contains a descreen-soft-moire block.
SettingValue
images1,000
degradedImagesPerCleanImage10
halftone presethalftone-soft.yml
Resize scale range0.9–1.1 (weighted toward < 1)

Upscale presets generate training pairs where the clean image is the high-resolution ground truth and the degraded image is a downsampled (and optionally compressed) version. The model learns to reconstruct the high-resolution image from the low-resolution input.

opencomic-ai-upscale-2x.yml

Produces 2× upscale pairs: the degraded image is exactly half the size of the clean image (scale: 0.5, multiple: 2). Square canvas sizes are sampled uniformly in [250, 1000] pixels at the degraded side, yielding clean images up to 2000 × 2000 px.
SettingValue
images20,000
degradedImagesPerCleanImage5
formatjpg
base.scale1
base.sizesize: [250, 1000], multiple: 2
Resize scale0.5 (fixed)
halftone presethalftone-upscale.yml
disableBrushesWithPixelatedEdgestrue
Node.js pipeline: optional rotation ±45° at prob 0.2, then fixed 0.5 resize (degraded only, both: false), JPEG (prob 0.5, quality 30–100), WebP (prob 0.05), double JPEG (prob 0.05 each), AVIF (prob 0.1), JXL (prob 0.1), and the blur.yml block.
- type: resize
  prob: 1
  both: false
  scale: 0.5
  kernel: [linear, cubic, mitchell, lanczos2, lanczos3, mks2013, mks2021,
           bicubic, bilinear, nohalo, lbb, vsqbs]

opencomic-ai-upscale-3x.yml

3× upscale. Clean images are generated at sizes divisible by 3; the degraded image is resized to exactly one-third (scale: 0.33333333333). base.scale: 2 is set so internal size references scale up correspondingly.
SettingValue
images20,000
degradedImagesPerCleanImage5
base.scale2
base.sizesize: [250, 1000], multiple: 3
Resize scale0.33333333333 (fixed)
halftone presethalftone-upscale.yml

opencomic-ai-upscale-4x.yml

4× upscale. Dimensions are forced to multiples of 4; the degraded image is resized to one-quarter (scale: 0.25). Otherwise identical in structure to the 3× preset.
SettingValue
images20,000
degradedImagesPerCleanImage5
base.scale2
base.sizesize: [250, 1000], multiple: 4
Resize scale0.25 (fixed)
halftone presethalftone-upscale.yml

Build docs developers (and LLMs) love