Skip to content

Repository files navigation

AnimaTrainHub

A local studio for training LoRA / LoKr adapters for Anima and Krea 2.
From raw images to test renders in a single browser window, including from your phone.

Русский Version License GPU UI

Features Β· Differences from upstream Β· Quick start Β· From your phone Β· Documentation


Projects: every LoRA project with its current step, the running task and the queue

At a glance

🧭 The whole cycle in one place
Dataset β†’ curation β†’ preprocess β†’ tags β†’ reg set β†’ training β†’ queue β†’ monitor β†’ generation. The current step is highlighted in the sidebar and configs save themselves.

πŸ“– Every setting explains itself
All 182 training options carry a plain-language description and a recommended value, in English or Russian: hover the setting name to see it.

πŸ“± Works from your phone at a permanent link
Tailscale Funnel or ngrok give you an address that never changes. The "open on startup" checkbox brings the link up by itself, and every page is laid out for a phone.

πŸͺΆ Trains on 6 GB
Block swap, fp8, latent and text-encoder caches, NaViT packing. Before you start you see the step count, the expected time and whether it fits in VRAM.


A quick tour

Project overview
Project overview Β· The pipeline of the active version, KPIs, tasks and versions on one page.
Dataset
Dataset Β· Drag & drop or Booru scrape, with format and size stats.
Curation
Curation Β· Dataset β†’ train set, concept folders with repeats, validation set.
Train
Train Β· Config with a hover tip on every setting, step budget and a live preview.
Task
Task Β· Loss and LR curves, samples per epoch, logs and outputs.
Queue
Queue Β· One GPU slot, a timeline to the end of the queue, pause and resume.

Features

πŸ—‚ Dataset

  • Import images and zip archives by drag & drop or from the server's disk, scrape Booru, see format and size stats.
  • Curation: a two-pane "dataset β†’ train" view, N_name concept folders with repeats, a separate validation set.
  • Preprocess (optional): perceptual-hash duplicate review, upscaling (ESRGAN / Real-ESRGAN), cropping with aspect-ratio clustering, inpainting. Every action can be undone.
  • Tag editor: bulk add / remove / replace, dedupe, tag distribution, dictionary autocomplete, restore points.
  • Regularization set: generated by the base model (DreamBooth-style prior) or pulled from Booru based on the train set's tag distribution.

πŸŽ› Training

  • Projects and versions: one dataset, many versions, each with its own config, reg set and outputs.
  • Two-way presets: save a version's config as a global preset, or pull a preset into a version.
  • Config form: Simple / Advanced modes, section index, YAML preview, autosave.
  • An honest estimate before you start: step count, expected time (measured from your own last run) and a VRAM check using the same arithmetic as the OOM guard.
  • GPU queue: pause with progress saved, resume, hold the queue, schedule a start.
  • Monitoring: loss / LR curves, per-step samples, logs, output files with a zip export.

Task page: progress, loss and learning rate, samples per epoch

πŸ§ͺ Algorithms

Adapters LoRA and LyCORIS (LoKr / LoHa, DoRA, rs-LoRA, dropout), per-layer ranks via lora_rank_rules
Optimizers AdamW, Lion, Automagic, Prodigy, Prodigy + ScheduleFree (how to choose)
Loss MSE / Huber with min_snr, cosmap, detail_inv_t weighting and more
Timesteps uniform, logit_normal, mode, mixed_uniform, InfoNoise, Style-Friendly SNR (details)
Against overfitting EMA of the adapter weights and DOP, differential output preservation (details)
Memory block swap (Anima from 6 GB, Krea 2 on 16 GB), fp8, caches, NaViT packing (details)
Attention xformers / flash-attn / PyTorch SDPA

🎨 Generation and comparison

  • Single images and XY matrices over parameters, served by a persistent daemon.
  • Prompts straight from dataset captions, several LoRAs with individual weights.
  • Checkpoint soup: average several epochs or runs into one file and test it right away. Incompatible checkpoints are refused up front with the reason.

βš™οΈ Environment

  • The first launch creates a venv, picks a PyTorch build for your driver (cu118–cu130) and installs dependencies.
  • All caches (pip, HuggingFace, torch, npm) stay inside the project folder.
  • One-click model downloads (HuggingFace, your own mirror or ModelScope), custom VAEs and text encoders, local base models.
  • Local and Colab modes, English and Russian UI, command palette on Ctrl + K.

Outputs are saved as lora_unet_* and load into ComfyUI without conversion.


From your phone

Every page is laid out for a phone: columns stack, the monitor takes the full width, crop handles and thumbnail checkboxes work with a finger.

Settings β†’ Remote access

Provider Address What you need
Tailscale Funnel permanent https://<computer>.<tailnet>.ts.net Tailscale on this computer, sign in once
ngrok permanent, on the free static domain authtoken and domain from the ngrok dashboard
Cloudflare new on every start nothing
  1. Pick a provider. Tailscale is the easiest way to get a permanent link.
  2. Press Open link. On the first start Tailscale may ask you to allow Funnel; the link to do that appears right in the panel.
  3. Turn on Open the link when the studio starts and bookmark the link on your phone.

Nothing is opened on your router. The link carries a persistent access key, and the studio does not answer without it. If the link leaks, New access key revokes every old one.


Differences from upstream

Note

AnimaTrainHub started as a fork of WalkingMeatAxolotl/AnimaLoraStudio. The training core and backend are synced with upstream v0.20.2. Everything a person actually touches is reworked.

🎨 Interface
New design, ported page by page from an approved mockup: warm neutrals, a lime accent, Geist type. Every setting explains itself on hover. Fully in English and Russian.

πŸ“– Explanations
Every setting has a plain description and a recommended starting value.

⏱ Honest estimate
Steps, time and VRAM are shown before you press Start.

πŸ“± Phone + remote access
Phone layout on every page and a permanent link with autostart and an access key.

πŸ§ͺ Training toolbox
Checkpoint soup, EMA, DOP with a trigger-word field, Style-Friendly SNR.

☁️ Local / Colab
Runtime mode chosen on first launch: binding, browser and data location follow it.

Backported from upstream v0.21–v0.25: training-side block swap (Krea 2 on 16 GB, Anima on 6 GB), fixes for memory leaks and spurious OOMs; NaViT packing now works together with block swap.
Not backported: generation-side block swap, the v0.22 evaluation page rework, GPU selection on multi-GPU machines.


Quick start

1 Β· Prepare

  • NVIDIA driver
  • Python 3.10+
  • Node.js 18+ (builds the UI)
  • Git

2 Β· Launch

git clone https://github.com/DualChimerra/AnimaTrainHub
cd AnimaTrainHub

Windows: AnimaLoraStudio.exe or studio.bat
Linux / macOS: ./studio.sh

3 Β· Get models

Open Settings β†’ Models and press download for your model family. Files go to ./models/.

Then create a project and follow the sidebar.

Tip

The first launch takes a while: it creates the environment, downloads PyTorch for your GPU and builds the UI. Then http://127.0.0.1:8765 opens by itself.

How a LoRA gets made

flowchart LR
    A[πŸ“₯ Dataset] --> B[1 Β· Curation]
    B --> C[2 Β· Preprocess]
    C --> D[3 Β· Tags]
    D --> E[4 Β· Reg set]
    E --> F[5 Β· Train]
    F --> G[πŸ“ˆ Queue / Monitor]
    G --> H[🎨 Generate / Soup]
    style C stroke-dasharray: 4 3
    style E stroke-dasharray: 4 3
Loading

Dashed steps are optional.

Step by step
Step What you do
Projects β†’ New project The first version is created automatically
Dataset Upload images or a zip with captions, or scrape Booru
Curation Move what you want into train, group it into concepts, set aside a validation set
Preprocess Remove duplicates, upscale small images, crop β€” or skip
Tags Clean up captions with bulk operations
Reg set Generate one with the base model, collect one from Booru β€” or skip
Train Pick a preset, adjust parameters, enter the trigger word for DOP, press Start training
Queue / Monitor Watch loss, samples and logs; pause and resume
Generate Test epochs with single renders or an XY matrix, blend the best into a soup
Commands and flags
python -m studio              # build the UI if needed and start the server
python -m studio dev          # dev mode: Vite :5173 + uvicorn :8765 --reload
python -m studio build        # build the UI only
python -m studio test         # pytest + vitest

studio.bat --torch=cu128      # force a specific PyTorch build
studio.bat --reinstall        # recreate venv (studio_data is kept)
AnimaLoraStudio.exe --check   # diagnostics: Python, venv, GPU, cache paths

python tools/download_models.py                  # every model from HuggingFace
python tools/download_models.py --modelscope     # via ModelScope
python tools/download_models.py --endpoint URL   # via your own mirror

Requirements

πŸ–₯ Hardware

Minimum Recommended
GPU NVIDIA 6 GB NVIDIA 16 GB+
RAM 16 GB 32 GB
Disk SSD, ~20 GB SSD with headroom

6 GB works for Anima with block swap. Block swap pins up to 3.6 GB of RAM for Anima and ~11 GB for Krea 2 fp8.

🧠 Models

Model Base Text encoder
Anima Cosmos-Predict2 DiT, 2B Qwen3-0.6B
Krea 2 single-stream MMDiT, fp8 base supported Qwen3-VL-4B

Both train LoRA, LoKr and LoHa; outputs load into ComfyUI as they are.

Warning

AMD GPUs and Apple Silicon are not supported.


Documentation

πŸ“˜ User guide
Captions and tags, regularization, optimizers, training parameters, custom models.

πŸ§ͺ Algorithms
EMA and DOP Β· Style-Friendly SNR Β· NaViT packing

πŸ— Architecture
How the studio is built Β· Decision records Β· Backend and frontend Β· Training core and plugins

🀝 Project
Contributing Β· Changelog Β· Third-party notices

Repository layout
AnimaTrainHub/
β”œβ”€β”€ runtime/        # training core, generation, inference daemon (usable from the CLI)
β”œβ”€β”€ studio/         # web studio: FastAPI (api / services / domain / infrastructure / workers)
β”‚   └── web/        # UI: React + Vite + Tailwind
β”œβ”€β”€ modeling/       # model implementations
β”œβ”€β”€ utils/          # shared training utilities
β”œβ”€β”€ tools/          # CLI: model downloads, torch selection, flash-attn install, launcher build
β”œβ”€β”€ models/         # weights and tokenizers (large files are not in git)
β”œβ”€β”€ studio_data/    # projects, database, presets, tasks (created on first run)
└── docs/           # documentation

Acknowledgements

Part Source
Original project WalkingMeatAxolotl/AnimaLoraStudio
Training scripts Moeblack/AnimaLoraToolkit
Model and VAE circlestone-labs/Anima
Adapters LyCORIS
Everything else THIRD_PARTY_NOTICES.md

License

Code: GPL-3.0 (LICENSE). Some third-party components (NVIDIA Cosmos, Wan2.1) are Apache-2.0 (LICENSE-APACHE).

Important

Model weights (Anima, Qwen, VAE) have their own licenses, including non-commercial restrictions. Check the model cards before using a trained LoRA commercially.


AnimaTrainHub Β· made for people who train LoRAs, not for people who read training scripts

Screenshots use demo data.

About

Local web studio for training LoRA / LoKr adapters for Anima and Krea 2: dataset to test renders in one browser window, works from your phone. EN / RU UI.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages