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/common/ directory contains modular YAML fragments that the options loader merges into parent files via the file: key. When the loader encounters a file: entry inside an object, it reads the referenced file, merges its keys with the sibling keys in the parent object, and then removes the file: key from the merged result. Local keys in the parent always win over keys from the referenced file, which makes file: a clean mechanism for establishing shared defaults while still allowing per-preset overrides. Array-valued files (like drawings.yml, blur.yml, and dots-and-circles.yml) are inlined by spreading their entries into the parent array.
# Example: reference a common block and override a single key
base:
  file: options/common/base.yml
  size:
    size: [250, 1000]
    multiple: 2
In the example above, every key from base.yml is used as-is except size, which is replaced by the local definition.
options/common/base.yml provides the default values for the base: object in every preset. It defines background color probabilities, the global halftone angle distribution, default canvas size, and all lineart brush options. It also sets disableBrushesWithPixelatedEdges: true as its top-level default.Background color is a weighted list covering white (weight 10), near-white gray (weight 5), dark gray (weight 2.5), and black (weight 5):
background:
  - value: {gray: 255}
    weight: 10.0
  - value: {gray: [200, 254]}
    weight: 5.0
  - value: {gray: [1, 55]}
    weight: 2.5
  - value: {gray: 0}
    weight: 5.0
Default canvas size is a random square in [500, 2000] px, snapped to a multiple of 4:
size:
  size: [500, 2000]
  multiple: 4
Lineart brush is randomly selected from the pencil, ink, charcoal, and sketching categories, with size in [3, 20] px and colors sourced from colors.yml. The cubicPercentage controls the smoothness of Bézier curves used for drawing paths.
lineart:
  brush:
    name: ''          # empty → random brush from category
    category: [pencil, ink, charcoal, sketching]
    size: [3, 20]
    colors:
      file: options/common/colors.yml
  cubicPercentage: [0.6, 1.0]
The same brush pattern (name: '' + category) and colors.yml reference are used for lineart-texture and lineart-random layer types.Colors sub-object (also reflected in colors.yml) covers grayscale range, alpha, optional colorTone offset, and optional colored mode with Krita palette names.

options/common/drawings.yml is an array-valued file that defines the set of drawing modes and their full configuration. When referenced from drawings: { file: ... }, the loader expands all entries into the drawings list.The file defines three weighted top-level variants:
VariantWeightDescription
3layered1.0Full three-layer composite with lineart, paint, texture-stamp, and lineart-random layers
singlelayered1.0Single canvas with texture-stamp, paint, and lineart-random
singlelayered (gradients)0.5Gradient or paper-texture fill with lineart-random overlay
Each variant’s list array contains drawing step objects. Key drawing types across the variants:
  • lineart — Bezier-curve lineart with amount: [5, 20] strokes, distributed across up, middle, and down sub-layers.
  • colorize-mask — Adds gray-tone fill areas; also used in black-and-white images to introduce non-white regions.
  • paint — Broad brush strokes using airbrush, basic, bristles, dry, chalk, charcoal, wet, watercolor, rgba, shapes, texture, and stamp categories.
  • lineart-texture — Texture and stamp brush strokes used as large-brush lineart.
  • lineart-random — Small random pencil/ink/charcoal strokes scattered across the canvas (prob 0.2); disableBrushesWithPixelatedEdgesInSmallSize: true is set here to prevent small-size aliasing.
  • texture — Paper-texture overlay using Krita fill-layer patterns (currently disabled by prob: 0.0 in most variants due to compatibility issues with paint layers).
  • gradient — A full-canvas gradient fill (singlelayered gradient variant only, prob 0.5).
  • dots and circles / circles-with-dot — Inlined from dots-and-circles.yml.
  • parallel-lines and grid — Inlined from parallel-lines-and-grid.yml.
The blender-paint type appears in all variants with prob: 0.1 but is marked as not yet implemented. It will be ignored by the current pipeline version.

options/common/colors.yml configures the color and alpha parameters used by brush layers. It is referenced inside brush colors: fields throughout base.yml and drawings.yml.
gray:
  - value: {min: 0, max: 0}     # pure black strokes
    weight: 5.0
  - value: {min: 150, max: 255} # light gray to white
    weight: 2.0
  - value: {min: 0, max: 255}   # full grayscale range
    weight: 1.0

alpha:
  - value: {min: 255, max: 255} # fully opaque
    weight: 5.0
  - value: {min: 100, max: 255} # semi-transparent
    weight: 1.0

colorTone:
  active:
    prob: 0.1
  offset:
    r: [-20, 20]
    g: [-20, 20]
    b: [-20, 20]

colored:
  active:
    prob: 0.1
  colors: [1, 3]
  paletteColors: [3, 20]
  similarColors: [0, 3]
  differentColors:
    prob: 0.2
  palette:
    name: ['rand', 'Animation Color Set', 'Concept-cookie', 'Default',
           'Swatches', 'PixelArt 32', 'Gradient', 'Markers']
The base.yml counterpart uses a slightly different distribution — colorTone probability is 0.2 instead of 0.1, and colored probability is 0.2 with paletteColors: [3, 20] and named similarColors entries as a weighted list rather than a plain range.

options/common/halftone-hard.yml defines the screentone configuration used by the descreen and artifact-removal presets. It produces the dense, crisp halftone dots typical of commercially printed manga and comics.
colorSpace:
  - value: 'RGBA'
    weight: 10.0
  - value: 'CMYKA'
    weight: 1.0

applyIn:
  - value: without    # halftone on degraded only
    weight: 1.0
  - value: degraded
    weight: 5.0

degraded:
  pattern: dots
  size: [2.5, 9.99]
  mode: intensity
  shapes:
    - value: dot
      weight: 10.0
    - value: [elipse, diamond, square]
      weight: 2.0
  interpolation:
    - value: lineal
      weight: 5.0
    - value: sinusoidal
      weight: 1.0

both:           # same settings as degraded, used when applyIn == both
  pattern: dots
  size: [2.5, 9.99]
  mode: intensity
  # ...

colored:
  colorSpace:
    - value: 'RGBA'
      weight: 1.0
    - value: 'CMYKA'
      weight: 5.0
  applyIn:
    - value: without
      weight: 3.0
    - value: degraded
      weight: 3.0
  degraded:
    pattern: dots
    size: [2.5, 9.99]
    mode: independent_channels
Key characteristics: dot size 2.5–10 px, heavily biased toward circular dots, lineal interpolation preferred, and intensity mode for grayscale images (vs. independent_channels for color).

options/common/halftone-soft.yml is used by the descreen-soft preset. It produces lighter, smaller halftone dots appropriate for softer printing processes.Compared to halftone-hard.yml:
  • degraded.size is reduced to [2.5, 4.3] (smaller dots)
  • both.size is [6.40, 15.99] (larger when applied to both)
  • applyIn adds a both option with weight 1.0 in addition to without (weight 1.0) and degraded (weight 3.0)
  • degraded.interpolation is a plain list [lineal, sinusoidal] (uniform choice)
  • CMYKA colorSpace weight is 5.0 (vs 1.0 in the hard preset) for colored images
applyIn:
  - value: without
    weight: 1.0
  - value: degraded
    weight: 3.0
  - value: both
    weight: 1.0

degraded:
  pattern: dots
  size: [2.5, 4.3]
  mode: intensity
  interpolation: [lineal, sinusoidal]

options/common/halftone-upscale.yml is designed for upscale datasets where halftone occurrence should be rare. The applyIn weights are heavily skewed toward without (no halftone, weight 20.0) versus both (weight 1.0). There is no degraded-only option — if halftone fires at all, it appears in both images, ensuring the model is not penalised for halftone patterns that are absent from the clean image.
applyIn:
  - value: without
    weight: 20.0
  - value: both
    weight: 1.0

both:
  pattern: dots
  size: [2.5, 9.99]
  mode: intensity
  shapes:
    - value: dot
      weight: 10.0
    - value: [elipse, diamond, square]
      weight: 5.0
  interpolation:
    - value: lineal
      weight: 5.0
    - value: sinusoidal
      weight: 2.0
For colored images the colored.applyIn mirrors the same 20:1 ratio. The colored.both mode uses independent_channels.

options/common/blur.yml is an array fragment inlined into inNode lists. It provides two blur steps: a single Gaussian blur at low probability, and a double-blur group at very low probability.
- type: blur
  prob: 0.1
  sigma: [0.3, 0.5]

- type: group
  prob: 0.05
  list:
    - type: blur
      prob: 1
      sigma: [0.3, 0.4]
    - type: blur
      prob: 1
      sigma: [0.3, 0.4]
The single blur fires 10% of the time with a subtle sigma of 0.3–0.5. The double-blur group fires 5% of the time and applies two sequential blurs, each at sigma 0.3–0.4, to simulate heavier lens or scan blur.

options/common/resize-blur.yml provides a resize-blur step that downscales and then upscales (or vice versa) using cubic interpolation, simulating the blur introduced by a rescaling round-trip. Like blur.yml, it also includes a double-step group.
- type: resize-blur
  prob: 1
  scale: [0.3, 1.50]
  kernel: cubic

- type: group
  prob: 0.05
  list:
    - type: resize-blur
      prob: 1
      scale: [0.3, 1.50]
      kernel: cubic
    - type: resize-blur
      prob: 1
      scale: [0.3, 1.50]
      kernel: cubic
The primary step has prob: 1 (always fires when the block is reached) with scale ranging from a strong downscale (0.3×) to a mild upscale (1.5×). This block is not used by the default presets but is available for custom pipelines that need a heavier blur simulation via scaling.

options/common/dots-and-circles.yml defines four drawing types inlined into the drawings list to add circular detail elements that help the model distinguish halftone dots from intentional comic artwork.
TypeprobDescription
dots (sequential)0.1Small sequential dots placed in lines or at random; verticalAndHorizontalChance: 0.5
dots (spread)0.05Larger dots with a spread radius of 30–120 px
circles0.05Open circles; amount weighted toward 5–15 (weight 2) or 50–150 (weight 1)
circles-with-dot0.05Circles with a filled center dot; amount weighted toward 5–15 (weight 2)
All four types share the same segments range [1, 32] (controlling roundness), brush: {name: 'b) Basic-1', size: 2}, and colors from colors.yml. The flatten sub-object optionally distorts circles into ellipses (ratio 0.25–1.0).

options/common/parallel-lines-and-grid.yml adds two drawing types that introduce ruled-line patterns, helping the model learn to distinguish halftone lines from intentional hatching.parallel-lines (prob 0.05):
  • amount: 5–15 line groups
  • lines.min: 5, lines.max: 200
  • length.min: 5, length.max: 500 px
  • separation: 0.5–4.9 px between lines
  • verticalAndHorizontalChance: 0.25 (most lines at random angles)
  • Brush: random from pencil, ink, charcoal, sketching; size 0.1–4.1 px
grid (prob 0.05):
  • amount: 5–30 grid cells
  • lines.min: 5, lines.max: 20
  • length.min: 5, length.max: 100 px
  • separation: 0.5–14.9 px
  • Same brush selection and angle distribution as parallel-lines
- type: parallel-lines
  prob: 0.05
  amount: [5, 15]
  lines:
    min: 5
    max: 200
  length:
    min: 5
    max: 500
  brush:
    name: ''
    category: [pencil, ink, charcoal, sketching]
    disableBrushesWithPixelatedEdgesInSmallSize: true
    size:
      min: [0.1, 2.1]
      max: [2.1, 4.1]
    colors:
      file: options/common/colors.yml
  separation:
    min: 0.5
    max: 4.9
  verticalAndHorizontalChance: 0.25

Build docs developers (and LLMs) love