add-training-support
БесплатноБез исполняемых скриптовНе проверенWire an existing ecosystem into the LoRA training system so it appears as a trainable base model in the training form. Adds the base-model entry, schema…
от civitai★ 7 333 звезды на GitHubОб этом скилле
Add Training Support
Wires an existing ecosystem into the training form (the "Train a LoRA" flow), distinct from the generation form. After this, the ecosystem shows up as a selectable base model in Training Step 1 and submits a valid training step to the orchestrator.
Training is a separate subsystem from generation. The generation handlers/graphs in src/server/services/orchestrator/form-graph/* and src/shared/form-graph/generation/* are NOT part of this — do not touch them. The files below are the training path.
When to use
- A new model family was just added via
add-ecosystemand now needs to be trainable - Re-enabling training for an ecosystem that was commented out
- The orchestrator/
@civitai/orchestration-clientgained a new*TrainingInputtype
Prerequisites
The ecosystem, base model, family and license must already exist in
basemodel.constants.ts (ECO.<Name>,
an EcosystemRecord, a BaseModelRecord). If any are missing, run add-ecosystem first.
Almost every ecosystem added recently is AI-Toolkit-based (engine 'ai-toolkit',
mandatory). The worked reference is anima — it is the simplest complete example
(image, AI-Toolkit-only, no modelVariant). The single highest-leverage move when adding
a new ecosystem: grep every file below for anima and add a parallel entry.
Step 0 — Check @civitai/orchestration-client for the training input type
Always confirm the SDK ships the ecosystem's training type before wiring. It tells you
the exact field shape, whether modelVariant is required, and any fixed fields.
grep -niE "<Name>AiToolkitTrainingInput|ecosystem: '<name>'" \
node_modules/@civitai/orchestration-client/dist/generated/types.gen.d.ts
Note from the type:
ecosystemliteral — the exact string the orchestrator expects (e.g.'boogu').modelVariant— present (e.g. flux1'dev'|'schnell', wan'2.1'|'2.2') or absent.- Fixed/constrained fields — e.g. Boogu declares
batchSize?: null | number"Fixed at 1 for this ecosystem". Honor these in the UI param bounds. readonlyoutputs (defaultSteps,storageBuzzPerEpoch,maxBatchSize, …) — server- computed; never send them.
If the type is missing in the installed version, check the latest (npm view @civitai/orchestration-client version) and bump to it in every package.json that lists the client
(git grep -l '"@civitai/orchestration-client"' -- '*package.json'), then pnpm install;
src/__tests__/orchestration-client-single-version.test.ts fails on a partial bump. If still absent, the
orchestrator dispatch (training.orch.ts) already casts ecosystem as any, so it works — but
prefer a typed SDK.
Step 1 — Gather the ecosystem's training defaults
Get these from the user, the model card, or an orchestrator whatif sample request:
- Default steps (the AI-Toolkit primary length knob — drives pricing)
- lr (unet LR), whether the text encoder is trained (usually disabled)
- networkDim / networkAlpha, lrScheduler, optimizerType, noiseOffset
- batch size bounds (many AI-Toolkit image ecosystems are fixed at 1)
- resolution (image ecosystems are typically 1024)
- The base-model AIR. If the model isn't on civitai yet, use the HF repository URN from the
sample as a placeholder and leave a comment to swap in
urn:air:<eco>:checkpoint:civitai:<modelId>@<versionId>once uploaded. For AI-Toolkit-only ecosystems this AIR is NOT sent to the orchestrator (it resolves the base model from the ecosystem); it's used for UI display /getTrainingFields.getModel.
Pick a stable base-model key (the trainingModelInfo key, e.g. boogu) and a
baseType (the TrainingBaseModelType, e.g. 'boogu'). They can differ (SD has
sd_1_5/anime/… keys all mapping to baseType sd15), but for a single-checkpoint
ecosystem keep them the same.
Step 2 — Confirm the plan with the user
Adding training support for: <Name> (baseType: <baseType>, key: <key>)
Engine: ai-toolkit (mandatory) Variant: <none | enum>
Defaults: steps <n>, lr <n>, dim/alpha <n>/<n>, scheduler <x>, batch <n> (max <n>), res <n>
AIR: <placeholder|civitai urn> Feature flag: <name>Training / <name>-training (Flipt)
Wait for confirmation, then make all edits in one pass.
Step 3 — Edits
3a. src/utils/training.ts (the core — ~7 spots)
trainingBaseModelTypesImage(or…Video/…Audio) — add'<baseType>'.aiToolkitStepDefault— add a branch returning the ecosystem's default steps if it differs from 2000.aiToolkitBatchMax— add a branch only if max batch > 1 (default returns 1).trainingModelInfo— add the<key>: { label, pretty, type: '<baseType>', description, air, baseModel: '<BaseModelName>', isNew: true, aiToolkit: { ecosystem: '<eco>' [, modelVariant] } }entry.baseModelMUST match the `BaseModelRecord.na
Установить add-training-support в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-training-support?
Wire an existing ecosystem into the LoRA training system so it appears as a trainable base model in the training form. Adds the base-model entry, schema enums, orchestrator validation, feature flag, and per-ecosystem default params. Use when a model family (already in basemodel.constants.ts) needs training support — e.g. AI-Toolkit ecosystems like Anima, HiDream, Boogu. Always checks @civitai/orchestration-client for the ecosystem's training input type first.
Как установить скилл add-training-support?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-training-support запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic