A local, resumable dataset-preparation desktop app for AI image training.
Downloads · Changelog · Model support · Architecture
TrainKit prepares individual images or complete image folders without uploading them to a hosted service. Every run is deterministic, cancellable, and collision-aware; resumable manifest files are optional.
- Automatic NCNN input/output blob discovery instead of hard-coded
in0andout0names. - Individual-image selection for captioning, upscaling, tagging, and renaming.
- Manifests disabled by default, with explicit save, dry-run, and resume options.
- First processing errors remain visible even when no manifest is written.
- A single standard Windows ZIP distribution with no installer.
See the complete 1.2.1 changelog for details.
- Captioning: local standard Transformers multimodal-chat, BLIP, and InstructBLIP models; auto-detection, explicit preload/unload, prompt control, and token-level cancellation.
- Upscaling: safe
.safetensorsmodels through Spandrel, or NCNN.param+.binmodels through the Python bindings with automatic blob discovery, CPU/Vulkan, and tiled inference. - Tagging: local Hugging Face image-classification models with threshold/top-K controls and scored JSON, training-text, or paired sidecars.
- Renaming: natural input ordering, configurable zero padding, optional visual-duplicate filtering, and atomic copies.
- Safe processing: individual-image or folder input,
fail/skip/rename/overwritecollision policies, per-file status, atomic output replacement, and optional resumable manifests. - Hardened desktop boundary: sandboxed renderers, narrow IPC, user-granted file capabilities, an authenticated ephemeral loopback backend, and restricted navigation.
Input can be one PNG, JPEG, BMP, or WebP image or a folder containing those formats. Upscaled output can be PNG, JPEG, BMP, or WebP.
TrainKit currently targets 64-bit Windows 10/11. Before the first launch, install:
Download the Windows ZIP from GitHub Releases, extract the entire archive to a writable folder on the drive where you want TrainKit stored, and run TrainKit.exe. The current release is unsigned, so Windows SmartScreen or antivirus software may warn; download only from the GitHub release and verify SHA256SUMS.txt. On first launch, TrainKit uses the committed uv.lock to install Python 3.12 and the backend dependencies directly under resources/backend in the TrainKit folder. Setup downloads and temporary files stay there and are removed after a successful install. This requires a network connection and several gigabytes of free space.
Persistent session logs are written to logs beside TrainKit.exe. The Logs panel shows the exact current path and can open either the folder or current log. Older builds used %APPDATA%\TrainKit\backend-runtime; a successful self-contained setup removes that obsolete generated runtime.
An NVIDIA GPU is recommended for Transformers and Spandrel workloads. NCNN can run on CPU or use a compatible Vulkan device. CPU-only captioning and tagging are supported but can be slow.
Requirements: Git, Node.js 22.12 or newer, uv, Python 3.12 (uv can install it), and the Visual C++ x64 Redistributable on Windows.
git clone https://github.com/LightCyan01/TrainKit.git
cd TrainKit
npm ci
uv sync --project backend --locked
npm startUseful verification commands:
npm run verify
npm audit
npm run package
npm run verify:packagenpm run make creates the standard Windows ZIP. Local packages are unsigned unless the signing environment variables described in CONTRIBUTING.md are set.
Normal runs do not write a manifest. Enable Save resumable manifest when you want progress saved to:
<output>/.trainkit/manifests/<job-id>.json
Dry runs always write a manifest because the plan is their output. A resume uses the same operation and input/output paths, preserves completed and skipped items, retries failed items, and updates the selected manifest. Manifests are treated as untrusted input: paths outside the selected roots are rejected.
See model support for model layouts and NCNN assumptions, architecture for the desktop/backend trust boundaries, and the changelog for complete release history.
Version 1.2.1 completes the original processing roadmap and improves NCNN compatibility, input selection, and output control. New feature proposals and model-compatibility reports are welcome through GitHub issues.
See CONTRIBUTING.md before sending a change. Report vulnerabilities privately as described in SECURITY.md.
TrainKit is available under the MIT License.