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.
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.
Setting
Value
images
4,000
degradedImagesPerCleanImage
100
format
jpg
base.disableBrushesWithPixelatedEdges
true
inNodePromiseAll
true
checkSizes
true
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:
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
Descreen presets train models to remove halftone dot patterns (screentones) from scanned comics and manga. Multiple variants exist to cover different source-material characteristics.
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.
Setting
Value
images
5,000
degradedImagesPerCleanImage
10
format
jpg
halftone preset
halftone-hard.yml
inNodePromiseAll
false
checkSizes
true
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.
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.
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é.
Setting
Value
images
1,000
degradedImagesPerCleanImage
10
seed
2323
Key technique
Conditional 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:
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.
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.
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.
Setting
Value
images
1,000
degradedImagesPerCleanImage
10
halftone preset
halftone-soft.yml
Resize scale range
0.9–1.1 (weighted toward < 1)
Upscale
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.
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.
Setting
Value
images
20,000
degradedImagesPerCleanImage
5
format
jpg
base.scale
1
base.size
size: [250, 1000], multiple: 2
Resize scale
0.5 (fixed)
halftone preset
halftone-upscale.yml
disableBrushesWithPixelatedEdges
true
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.
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.
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.