The OpenComic AI Training generator connects to a running Krita instance via theDocumentation 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.
kra-remote plugin, draws procedural artwork using randomized brushes and compositions, applies configurable degradations (halftone patterns, compression, blur, resize, rotation), and saves matched clean/degraded image pairs to disk. Each run produces a dataset ready for use with any paired-image training framework.
Pre-Run Checklist
Before starting generation, confirm the following:- Krita is running with the
ollm/kra-remoteplugin active. The plugin must be listening before the generator starts. - Your options file is ready. Use a preset from the
options/directory (e.g.,options/opencomic-ai-artifact-removal.yml) or write a custom one. - Node.js and npm are installed and
npm installhas been run in the repository root. - Dependencies are prepared by running
npm run preparebefore your first generation run.
Running the Generator
Start Krita with the kra-remote plugin
Launch Krita and ensure the
kra-remote plugin is active before proceeding. The generator will fail to connect if Krita is not already running.Run generation
Start the generator by passing your options file and the path to the Krita executable or AppImage:For the upscale-2x preset:
Monitor progress
The CLI displays a live progress bar with the following fields:
The speed metric is a rolling average over the last
| Field | Description |
|---|---|
{percentage}% | Overall completion percentage |
{value} / {total} Clean Images | Number of clean images generated so far vs. total target |
{degradedImages} / {totalDegradedImages} Final Images | Total degraded images written (clean count × degradedImagesPerCleanImage) |
Speed | Rolling average throughput in images per second (img/s) |
Elapsed | Wall-clock time since generation started |
Remaining | Estimated time left based on current speed |
degradedImagesPerCleanImage × 10 samples, so it stabilizes as the run progresses.CLI Flags Reference
| Flag | Default | Description |
|---|---|---|
--options <file> | — | (Required) Path to the YAML options file. |
--krita <path> | — | (Required) Path to the Krita executable or AppImage. Must be Krita 5.3.0 or later with kra-remote installed. |
--restart-krita-every <n> | 20 | Restart Krita every N clean images to prevent memory leaks. |
--print-options | — | Print the randomized options object as resolved from the YAML file, then exit. |
--print-krita-filters | — | Connect to Krita, list available plugin filters, then exit. |
--print-krita-gradients | — | Connect to Krita, list available gradients, then exit. |
--help, -h | — | Show the help message. |
Resume Behavior
Whenresume: true is set in the options file and the output directory for the first degradation pipeline’s clean/ folder already contains images, the generator scans filenames for the highest-numbered image and resumes from that point. The last image is regenerated to ensure it is complete:
clean/ directory is empty or does not yet exist, generation starts from image 1.
Krita Connection Failure
If the generator cannot connect to thekra-remote plugin at startup, it prints an error and exits with code 1:
Inspecting the Environment Before Running
Use--print-krita-filters to see the full list of filters exposed by the kra-remote plugin in the connected Krita instance:
--print-krita-gradients to list all gradients available in Krita’s resource library: