Ethical dataset generation pipeline for OpenComic AI models. The models have been designed to preserve as much detail from the original image as possible, modifying only the necessary parts.
This repository contains the scripts and configuration files used to generate paired training datasets with Krita. The generated pairs are used to train OpenComic AI models for artifact removal, descreening, and upscaling.
OpenComic AI models are trained with ethically generated images created procedurally/randomly in Krita and have been designed to preserve as much detail from the original image as possible, modifying only the necessary parts.
This repository focuses on dataset generation. For model training, the project has been used with the-database/traiNNer-redux and the training options in options/train, but you can use any training framework that supports paired datasets.
- Linux (Tested on Ubuntu)
- Windows and macOS (Untested, may require adjustments)
- Krita 5.3.0 or newer (AppImage works)
ollm/kra-remoteplugin installed in Krita- Node.js + npm
npm install
npm run prepare && npm run generate -- --options ./options/opencomic-ai-upscale-2x.yml --krita ./krita-5.3.1-x86_64.AppImageGenerate a dataset of clean and degraded images using Krita and an options file.
npm run prepare && npm run generate -- --options <file> --krita <path> --options <file> Path to the options file (YAML).
--krita <path> Path to the Krita executable or AppImage (Krita 5.3.0 or later with the kra-remote plugin).
--restart-krita-every <number> Restart Krita every N images to avoid memory leaks (default: 20).
--print-options Print the loaded options (Randomized) and exit.
--print-krita-filters Print the Krita plugin filters and exit.
--print-krita-gradients Print the Krita plugin gradients and exit.
--help, -h Show help.Dataset generation presets are stored in options.
Main presets:
opencomic-ai-artifact-removal.ymlopencomic-ai-descreen-hard.ymlopencomic-ai-descreen-hard-any-angle.ymlopencomic-ai-descreen-moire-only.ymlopencomic-ai-upscale-2x.ymlopencomic-ai-upscale-3x.ymlopencomic-ai-upscale-4x-new.yml
Shared building blocks are available under options/common.
Each generated dataset follows the paired format:
datasets/<dataset-name>/
clean/
degraded/
options/
clean: Ground-truth images.degraded: Input images with synthetic degradations.options: Resolved options used for reproducibility.
Examples of generated dataset pairs (clean vs degraded):
| Clean | Degraded |
|---|---|
![]() |
![]() |
| Clean | Degraded |
|---|---|
![]() |
![]() |
| Clean | Degraded |
|---|---|
![]() |
![]() |
Use fix-images.mjs to verify that all paired images in a dataset have the expected scale and matching files.
node fix-images.mjs
Check dataset consistency between clean and degraded images
Usage:
node fix-images.mjs --dataset opencomic-ai-upscale-2x --scale 2
Arguments:
--dataset Dataset name (required)
--scale Scale factor (optional, auto-detected from dataset name)
--print Print mismatched rows
--delete Delete unmatched imagesTraining options used with traiNNer-redux are available in options/train.
Typical workflow:
- Generate paired datasets with this repository.
- Point your training framework to the generated
cleananddegradedfolders or useoptions/trainoptions. - Train from scratch or continue from a pretrained model.
The models can be found in the models folder, in the ollm/opencomic-ai-models repository, or in the releases section.
| Model | Type | Pretrained From | Image Pairs | Iterations |
|---|---|---|---|---|
opencomic-ai-artifact-removal-compact |
Compact | - | 400,000 | 450,000 |
opencomic-ai-artifact-removal-lite |
ESRGAN Lite | - | 400,000 | 1,000,000 |
opencomic-ai-artifact-removal |
ESRGAN | - | 400,000 | 1,000,000 |
| Model | Type | Pretrained From | Image Pairs | Iterations |
|---|---|---|---|---|
opencomic-ai-descreen-hard-compact |
Compact | artifact-removal-compact |
120,000 | 450,000 |
opencomic-ai-descreen-hard-lite |
ESRGAN Lite | artifact-removal-lite |
120,000 | 1,000,000 |
opencomic-ai-descreen-hard |
ESRGAN | artifact-removal |
120,000 | 1,000,000 |
| Model | Type | Pretrained From | Image Pairs | Iterations |
|---|---|---|---|---|
opencomic-ai-upscale-2x-compact |
Compact | artifact-removal-compact |
25,000 | 450,000 |
opencomic-ai-upscale-2x-lite |
ESRGAN Lite | artifact-removal-lite |
25,000 | 1,000,000 |
opencomic-ai-upscale-2x |
ESRGAN | artifact-removal |
25,000 | 1,000,000 |
opencomic-ai-upscale-3x-compact |
Compact | upscale-2x-compact |
100,000 | 450,000 |
opencomic-ai-upscale-3x-lite |
ESRGAN Lite | upscale-2x-lite |
100,000 | 500,000 |
opencomic-ai-upscale-3x |
ESRGAN | upscale-2x |
100,000 | 500,000 |
opencomic-ai-upscale-4x-compact |
Compact | upscale-2x-compact |
100,000 | 450,000 |
opencomic-ai-upscale-4x-lite |
ESRGAN Lite | upscale-2x-lite |
100,000 | 500,000 |
opencomic-ai-upscale-4x |
ESRGAN | upscale-2x |
100,000 | 500,000 |
This project builds upon and is made possible thanks to:
- The Krita development team
- The
kra-remoteplugin by NMaghfurUsman traiNNer-reduxby the-database
If you use this project, please cite it as follows.
@software{opencomic_ai,
author = {Llopart Mora, Oleguer},
title = {{OpenComic AI}},
year = {2026},
version = {1.0.1},
doi = {10.5281/zenodo.20802371},
url = {https://doi.org/10.5281/zenodo.20802371}
}Release models citation. To see the differences between versions, you can check the CHANGELOG.md file.
@software{opencomic_ai_models_v1_0,
author = {Llopart Mora, Oleguer},
title = {{OpenComic AI v1.0 Models}},
year = {2026},
version = {1.0.1},
doi = {10.5281/zenodo.20802371},
url = {https://doi.org/10.5281/zenodo.20802371}
}| Component | License |
|---|---|
| Source code | MIT |
| OpenComic AI model weights | CC BY 4.0 |
The source code of this repository is licensed under the MIT License.
OpenComic AI model weights are licensed under the CC BY 4.0.
See LICENSE and LICENSE_MODELS for details.





