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-inDocumentation 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.
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
Clone the repository and install dependencies
Clone the project from GitHub and install all Node.js dependencies:
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).Build the project
Compile the TypeScript source and bundle the output with rollup: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/.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:The AppImage is a self-contained Linux executable — no system-wide installation is required. Make sure the file is executable before proceeding.
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.
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:The generator will:
- Load and resolve the preset options from
opencomic-ai-upscale-2x.yml. - Launch the Krita AppImage and connect to the kra-remote plugin over D-Bus.
- Procedurally render synthetic comic panels and apply 2× downscale degradations.
- Write matched image pairs to the output directories.
- Automatically restart Krita every 20 images to prevent memory leaks (configurable with
--restart-krita-every <number>).
Other Available Presets
Theoptions/ directory ships with presets for every supported task:
| Preset file | Task |
|---|---|
opencomic-ai-artifact-removal.yml | Artifact removal |
opencomic-ai-descreen-hard.yml | Halftone removal (fixed angle) |
opencomic-ai-descreen-hard-any-angle.yml | Halftone removal (any angle) |
opencomic-ai-descreen-moire-only.yml | Moiré removal only |
opencomic-ai-upscale-2x.yml | 2× super-resolution |
opencomic-ai-upscale-3x.yml | 3× super-resolution |
opencomic-ai-upscale-4x-new.yml | 4× super-resolution |
--options argument to generate datasets for any of these tasks. Shared building blocks used across presets are located under options/common/.