Download
1 variant available
bf16 SafeTensor
AdventureTimeStyle_5000.safetensors
BF16, good balance • 65.09 MB
Verified: 18 hours ago
https://huggingface.co/mnemic/adventure_time_style_nanosaur2
Adventure Time Style LoRA for Nanosaur2
https://huggingface.co/well9472/Nanosaur2-670M
This document describes the training script changes made in this repo, the local setup used to run them, and the specific training run that produced the Adventure Time style LoRA for the Nanosaur2 670M illustration model.
Training script changes
The original train_lora.py from the base Nanosaur2 repo was a single-purpose script meant to be dropped into ComfyUI/custom_nodes and pointed at one folder of images at a time, with every hyperparameter hardcoded at the top of the file and no way to resume a run or preview progress. It has been reworked into a small standalone training tool that can live outside ComfyUI (but links to it).
Features:
- Project-based configuration. Training is now driven by a training/projects/<name>/config.ini file per LoRA, generated from training/config.template.ini. Each project config sets its own dataset path, LoRA rank/alpha/target modules, optimizer, learning rate, scheduler, epoch/step caps, batch size, resolution, dropout rates, and sampling settings, so several styles or characters can be trained side by side with independent settings and outputs.
- Decoupled from ComfyUI's folder layout. A repo-root settings.ini now points at an external ComfyUI installation so comfy can be imported without copying or symlinking this repo into ComfyUI/custom_nodes.
- Optimizers and schedulers. AdamW + cosine-with-warmup setup, and Prodigy (via the prodigyopt package) plus constant and linear schedules alongside cosine.
- Checkpointing and resume. Full-precision resume state (LoRA weights, optimizer state, scheduler state, step count) is now saved alongside the bf16 safetensors export, so you can resume from the last saved step instead of restarting from scratch.
- Step accounting. Both an epoch cap and an explicit max_steps cap can be set; training stops at whichever is reached first.
- Bucketing preview. The script prints a breakdown of images per bucket, dropped leftover images per batch, and the resulting total step count before training starts, so the actual length of a run is clear up front.
- Aspect bucket scaling. The native 1024px aspect buckets can be scaled down via max_resolution.
- Periodic sample generation. The script now runs its own small Euler+CFG sampler at a configurable interval, generating preview images from a configurable prompt list into a project samples/ folder.
## Adventure Time style training run
- GPU: RTX 5090. At batch size 4 the run swung between roughly 7 GB and 31 GB of VRAM used over the course of training.
- Dataset: training/datasets/AdventureTimeStyle, 48 captioned images (matching .png.txt pairs), resized and cropped to the closest native 1024x aspect bucket.
- LoRA: rank 64, alpha 64
- Optimizer: Prodigy (self-tuning learning rate), with learning rate set to 1.0
- Schedule: cosine with 50 warmup steps.
- Length: epoch cap set high (100000) and effectively capped by max_steps = 20000.
- Batch size: 4
- Regularization: 10% caption dropout, 5% sparse (path-drop) skip rate, matching the base model's own SPRINT/CFG training recipe.
Results
The model picks up on this animated style fairly quickly. After about 300-500 steps you can definitely start to feel the direction of it.
I think the best epoch I got was at 5000 steps. It's the one used for the project images.
I've included a copy of the training setup in case you want to use the same, as well as the samples from the training run.




