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.

This guide walks you through cloning the repository, installing dependencies, wiring up Krita with the kra-remote plugin, and running your first dataset generation job using the built-in opencomic-ai-upscale-2x preset. By the end you will have a folder of matched clean and degraded image pairs ready to feed into a training framework.
Prerequisites before you begin:
  • Krita 5.3.0 or newer — the kra-remote plugin requires APIs introduced in 5.3.
  • kra-remote plugin — must be installed and enabled inside Krita.
  • Node.js (any recent LTS release) with npm included.
  • Linux — the pipeline is tested on Ubuntu. Windows and macOS are untested and may require adjustments; see System Requirements for details.

Steps

1

Clone the repository and install dependencies

Clone the project from GitHub and install all Node.js dependencies:
git clone https://github.com/ollm/opencomic-ai-training.git
cd opencomic-ai-training
npm install
npm install fetches runtime dependencies (including sharp, @napi-rs/canvas, yaml, and dbus-next) as well as dev dependencies for the TypeScript build (tsc, rollup, and related type packages).
2

Build the project

Compile the TypeScript source and bundle the output with rollup:
npm run prepare
The prepare script runs tsc followed by npx rollup -c, producing the compiled generator at dist/index.mjs (ESM) and dist/index.cjs (CJS) along with type declarations. You must re-run this command any time you modify source files under src/.
3

Download and prepare the Krita AppImage

Download the Krita 5.3.x AppImage from the official Krita website and place it in the project root:
# Download from https://krita.org/en/download/
chmod +x krita-5.3.1-x86_64.AppImage
The AppImage is a self-contained Linux executable — no system-wide installation is required. Make sure the file is executable before proceeding.
4

Install the kra-remote plugin in Krita

The generator communicates with Krita over D-Bus using the kra-remote plugin. Follow the installation instructions in the kra-remote repository to install and enable the plugin inside Krita.Once installed, launch Krita at least once manually to confirm the plugin loads without errors before running the generator.
5

Run the generator with the upscale-2x preset

With Krita and the plugin ready, start the generation pipeline using the built-in 2× upscale preset:
npm run generate -- --options ./options/opencomic-ai-upscale-2x.yml --krita ./krita-5.3.1-x86_64.AppImage
The generator will:
  1. Load and resolve the preset options from opencomic-ai-upscale-2x.yml.
  2. Launch the Krita AppImage and connect to the kra-remote plugin over D-Bus.
  3. Procedurally render synthetic comic panels and apply 2× downscale degradations.
  4. Write matched image pairs to the output directories.
  5. Automatically restart Krita every 20 images to prevent memory leaks (configurable with --restart-krita-every <number>).
A progress bar in the terminal shows clean images completed, total degraded images produced, current speed, elapsed time, and estimated time remaining.
6

Find your generated images

When the run completes, the paired dataset is written to:
datasets/opencomic-ai-upscale-2x/
  clean/       ← ground-truth high-resolution images
  degraded/    ← matched low-resolution input images
  options/     ← resolved options snapshot for reproducibility
Point your training framework at the clean/ and degraded/ directories. If you are using traiNNer-redux, the options/train/ folder in the repository contains ready-made training configuration files.
Before starting a long generation run, use the --print-options flag to inspect the fully resolved and randomized configuration that will be used — without launching Krita or writing any files:
npm run generate -- --options ./options/opencomic-ai-upscale-2x.yml --krita ./krita-5.3.1-x86_64.AppImage --print-options
This prints the parsed options object to stdout and exits immediately, which is useful for verifying preset overrides or debugging unexpected configuration values.

Other Available Presets

The options/ directory ships with presets for every supported task:
Preset fileTask
opencomic-ai-artifact-removal.ymlArtifact removal
opencomic-ai-descreen-hard.ymlHalftone removal (fixed angle)
opencomic-ai-descreen-hard-any-angle.ymlHalftone removal (any angle)
opencomic-ai-descreen-moire-only.ymlMoiré removal only
opencomic-ai-upscale-2x.yml2× super-resolution
opencomic-ai-upscale-3x.yml3× super-resolution
opencomic-ai-upscale-4x-new.yml4× super-resolution
Swap the --options argument to generate datasets for any of these tasks. Shared building blocks used across presets are located under options/common/.

Build docs developers (and LLMs) love