add-training-support

Wires an existing model ecosystem into the Civitai LoRA training form and orchestrator.

7.2k|734|Updated Oct 11, 2022
One-click install
npx skills add https://github.com/civitai/civitai --skill add-training-support
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-training-support
Source: https://github.com/civitai/civitai/tree/main/.claude/skills/add-training-support
Command: npx skills add https://github.com/civitai/civitai --skill add-training-support

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @civitai/client.

What problem does it solve?

Adding a new AI model ecosystem to Civitai's LoRA training flow requires coordinated edits across many files — base-model type unions, zod schemas, orchestrator validation, feature flags, and per-ecosystem UI defaults — and missing any one of them causes typecheck failures or rejected training submissions. This Skill provides the complete, ordered checklist for wiring an ecosystem into the training system correctly.

Core Features & Use Cases

  • SDK type verification: Checks @civitai/client for the ecosystem's *AiToolkitTrainingInput type first to learn required fields, model variants, and fixed constraints like batch size.
  • Guided multi-file edits: Walks through training.ts, model-version and orchestrator schemas, feature flags, training form components, and basemodel.constants.ts with exact insertion points.
  • Validation and verification: Ends with pnpm run typecheck and an optional dev-server smoke test of the training form and whatif pricing call.
  • Use Case: After adding the Anima ecosystem to the platform, use this Skill to make it appear as a selectable, trainable base model in Training Step 1 with correct default steps, learning rate, and resolution.

Quick Start

Add training support for the Boogu ecosystem so it shows up as a trainable base model in the LoRA training form.

Frequently Asked Questions about add-training-support

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new base model to the Civitai LoRA training form?

Add the base type to trainingBaseModelTypesImage in training.ts, register it in trainingModelInfo with its AIR and AI-Toolkit ecosystem, extend the zod schema aggregates and aiToolkitTrainingParams union, add a feature flag, and wire a ModelSelector block in TrainingSubmitModelSelect.tsx.

What is the difference between training support and generation support for an ecosystem?

Training and generation are separate subsystems in Civitai. Training support touches training.ts, training schemas, and the training form components, while generation handlers in orchestrator/ecosystems and data-graph/generation are independent and must not be modified.

Does the ecosystem need to exist before adding training support?

Yes. The ecosystem, base model, family, and license must already exist in basemodel.constants.ts as an EcosystemRecord and BaseModelRecord. If any are missing, run the add-ecosystem skill first before wiring training.

Why does training submission fail validation for a new ecosystem?

Submission fails when the aiToolkitTrainingParams discriminated union in training.schema.ts lacks a branch with the ecosystem's z.literal value. Also verify the baseModel string matches the BaseModelRecord name exactly, since a mismatch produces a malformed AIR and a 400 on the post-train scan.

How do I handle ecosystems with a fixed batch size like Boogu?

Check the SDK training input type for fixed fields, then set the trainBatchSize override in TrainingParams.tsx to default, min, and max of 1. Leave aiToolkitBatchMax at its default since it already returns 1.