Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: circlestone-labs-non-commercial-license
|
| 4 |
+
license_link: https://huggingface.co/circlestone-labs/Anima/blob/main/LICENSE.md
|
| 5 |
+
base_model: circlestone-labs/Anima
|
| 6 |
+
pipeline_tag: text-to-image
|
| 7 |
+
tags:
|
| 8 |
+
- anime
|
| 9 |
+
- stable-diffusion
|
| 10 |
+
- lokr
|
| 11 |
+
- lycoris
|
| 12 |
+
- diffusion-pipe
|
| 13 |
+
- finetune
|
| 14 |
+
- anima
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Anima-Telescopa
|
| 18 |
+
|
| 19 |
+
<!-- Drop your best sample images into an `images/` folder in this repo, using these exact filenames, and they'll appear here automatically. Feel free to add/remove rows/columns as needed. -->
|
| 20 |
+
|
| 21 |
+
<p align="center">
|
| 22 |
+
<img src="./images/sample1.webp" width="32%" />
|
| 23 |
+
<img src="./images/sample2.webp" width="32%" />
|
| 24 |
+
<img src="./images/sample3.webp" width="32%" />
|
| 25 |
+
</p>
|
| 26 |
+
<p align="center">
|
| 27 |
+
<img src="./images/sample4.webp" width="32%" />
|
| 28 |
+
<img src="./images/sample5.webp" width="32%" />
|
| 29 |
+
<img src="./images/sample6.webp" width="32%" />
|
| 30 |
+
</p>
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## I. Introduction
|
| 35 |
+
|
| 36 |
+
Anima-Telescopa is a **full matrix LoKr** fine-tune (a cheaper, slower stand-in for a full finetune) of [Anima Base v1.0](https://huggingface.co/circlestone-labs/Anima/blob/main/split_files/diffusion_models/anima-base-v1.0.safetensors) by [CircleStone Labs](https://huggingface.co/circlestone-labs), built using the [LyCoRIS](https://github.com/kohakublueleaf/lycoris) full matrix LoKr method ([paper](https://arxiv.org/abs/2309.14859)) introduced by KohakuBlueleaf.
|
| 37 |
+
|
| 38 |
+
This was my first attempt at fine-tuning an image model on a dataset above 10k samples. Alongside general practice, the run was also used to:
|
| 39 |
+
|
| 40 |
+
- Test whether a carefully hand-curated aesthetic dataset could improve Anima's background generation quality (a secondary, low-confidence goal)
|
| 41 |
+
- Compare full matrix LoKr training against a true full finetune on the same settings
|
| 42 |
+
|
| 43 |
+
Compared to other Anima fine-tunes such as Tdrussel's Aes B, Motimalu's KirazuriV4, duongve's AnimaYume, and the Silvermoon mixes, Telescopa is likely a bit behind on fine detail, stability, and knowledge/style retention β but it shows noticeably stronger background composition and detail than the base model and most contemporaries. For a first larger-scale training run, that's a solid result.
|
| 44 |
+
|
| 45 |
+
This model is produced independently, as a hobbyist project, with no external funding.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## II. Model Details
|
| 50 |
+
|
| 51 |
+
| | |
|
| 52 |
+
|---|---|
|
| 53 |
+
| **Base model** | [circlestone-labs/Anima](https://huggingface.co/circlestone-labs/Anima) (v1.0) |
|
| 54 |
+
| **Method** | Full Matrix LoKr ([LyCoRIS](https://github.com/kohakublueleaf/lycoris)) |
|
| 55 |
+
| **Trainer** | [Bluvoll diffusion-pipe fork](https://github.com/bluvoll/diffusion-pipe) (originally by Anima's creator, Tdrussel) |
|
| 56 |
+
| **Hardware** | 2x NVIDIA RTX A4000 16GB, courtesy of [Astromahdi's gpu.garden](https://gpu.garden/) |
|
| 57 |
+
| **Total training time** | ~3 days (~68 hours) |
|
| 58 |
+
| **Total samples seen (unbatched steps)** | ~100,000 |
|
| 59 |
+
| **Training resolutions** | 1024Β², 1280Β² |
|
| 60 |
+
|
| 61 |
+
### Training run (initial 3-epoch run β extended 7-epoch run)
|
| 62 |
+
|
| 63 |
+
Full config: [TelescopaLOKR.toml](https://github.com/RicemanT/model-training-configs/blob/main/diffusion-pipe/Anima/configs/TelescopaLOKR.toml)
|
| 64 |
+
|
| 65 |
+
- **Samples seen:** ~30,000 + ~70,000
|
| 66 |
+
- **Learning rate:** 3e-6
|
| 67 |
+
- **LR scheduler:** Constant with warmup
|
| 68 |
+
- **LLM adaptor LR:** Disabled
|
| 69 |
+
- **Precision:** Full BF16
|
| 70 |
+
- **Optimizer:** AdamW8bit with Kahan summation (to offset BF16 precision roundoff)
|
| 71 |
+
- **Weight decay:** 0.01
|
| 72 |
+
- **Timestep sampling:** Logit-Normal, shift 4, sigmoid scale 1.3
|
| 73 |
+
|
| 74 |
+
### LoKr configuration
|
| 75 |
+
|
| 76 |
+
- Dim / rank: 16
|
| 77 |
+
- Alpha: 16
|
| 78 |
+
- Dtype: bfloat16
|
| 79 |
+
- Dropout: 0.0
|
| 80 |
+
- Factor: 2 (~800MB file size)
|
| 81 |
+
|
| 82 |
+
### Additional training features
|
| 83 |
+
|
| 84 |
+
- Tag dropout: 10%
|
| 85 |
+
- Caption dropout: 5%
|
| 86 |
+
- Mixed captions at a 25/25/25/25 ratio
|
| 87 |
+
- Tag shuffle
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
## III. Recommended Settings
|
| 92 |
+
|
| 93 |
+
These are the settings used for the sample images above (ComfyUI, `ModelSamplingAuraFlow` node):
|
| 94 |
+
|
| 95 |
+
- **Shift:** 5.0
|
| 96 |
+
- **Steps:** 28
|
| 97 |
+
- **CFG:** 4.0
|
| 98 |
+
- **Sampler:** `er_sde`
|
| 99 |
+
- **Scheduler:** simple
|
| 100 |
+
- **Denoise:** 1.0
|
| 101 |
+
- **Upscale model:** [4x-NMKD-Superscale-SP_178000_G](https://openmodeldb.info/models/4x-NMKD-Superscale-SP_178000_G) (optional, for latent upscale/hires pass)
|
| 102 |
+
|
| 103 |
+
These aren't the only settings that work well β feel free to experiment, especially with samplers like `euler_a` or `sa_solver_pece` at a lower 15β20 steps.
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
## IV. Dataset
|
| 108 |
+
|
| 109 |
+
Sourced from Danbooru (curated by artist background quality) and [Akanyan's personal anime screencap collection](https://www.reddit.com/r/anime/comments/4lhd5l/complete_monogatari_series_background_art/). Dataset tooling lives in the [`utils` folder](https://github.com/RicemanT/model-training-configs/tree/main/diffusion-pipe/Anima/utils) of the training repo.
|
| 110 |
+
|
| 111 |
+
**Curation:** ~43k Danbooru images plus ~7-8k screencaps (50k+ raw) were hand-reviewed for background quality β about two weeks of manual review, landing on a final **10,143-image** dataset.
|
| 112 |
+
|
| 113 |
+
**Processing:** PNGs converted to lossless WebP, resolutions capped at 2000px (cv2 `INTER_AREA`), deduplicated, and filtered for unusual aspect ratios. A YOLO β IOPaint watermark/logo removal pass was planned but skipped due to time constraints and unreliable open-source detection.
|
| 114 |
+
|
| 115 |
+
**Tagging:** [convnextv2_huge.dbv4-full](https://huggingface.co/animetimm/convnextv2_huge.dbv4-full) by animetimm/DeepGHS, run on a free Colab T4.
|
| 116 |
+
|
| 117 |
+
**Captioning:** [Qwen 3.6 27B FP8](https://huggingface.co/Qwen/Qwen3.6-27B-FP8) via VLLM on an H100 (~3h for ~9k images, non-thinking mode), with the remaining ~1k finished on Qwen 3.6 27B Q6_K via llama.cpp on 2x A4000. Captioning [system prompt](https://github.com/RicemanT/model-training-configs/blob/main/diffusion-pipe/Anima/utils/Anima-Telescopa-captioning-sysprompt.md).
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
+
|
| 121 |
+
## V. Failed Full-Finetune Comparison
|
| 122 |
+
|
| 123 |
+
A full finetune run with matching settings was also attempted on 4x A4000, finishing in 1.5 days. Training was stable, but the resulting model lost a significant amount of character and artist-style knowledge, making it uncompetitive as an Anima tune β likely because a learning rate of 3e-6 was still too high for full finetuning at the batch size available, and Anima appears unusually sensitive to new information relative to other models. That config is included in the training repo for reference.
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
## VI. Notes from the Training Diary
|
| 128 |
+
|
| 129 |
+
- **Always back up your dataset before deleting anything locally.** During transfer to the HF dataset repo, an upload silently failed to commit, and ~4k already-"transferred" screencap images (much of it curated Monogatari content) were lost after being deleted locally. The dataset was rebuilt with a more diverse series selection β which ended up improving overall balance.
|
| 130 |
+
- WebP isn't always smaller than JPEG β worth checking before batch-converting a dataset.
|
| 131 |
+
|
| 132 |
+
Full training diary (unedited, written without LLM assistance): [TelescopaLOKR-diary.md](https://github.com/RicemanT/model-training-configs/blob/main/diffusion-pipe/Anima/notes/TelescopaLOKR-diary.md)
|
| 133 |
+
|
| 134 |
+
---
|
| 135 |
+
|
| 136 |
+
## VII. License
|
| 137 |
+
|
| 138 |
+
This model is a Derivative of Anima and is distributed under the same **[CircleStone Labs Non-Commercial License v1.1](https://huggingface.co/circlestone-labs/Anima/blob/main/LICENSE.md)** as the base model, with no additional restrictions. Non-commercial use only β see the license for full terms.
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
## VIII. Acknowledgments
|
| 143 |
+
|
| 144 |
+
- [CircleStone Labs](https://huggingface.co/circlestone-labs) / Tdrussel β for Anima and the original diffusion-pipe trainer
|
| 145 |
+
- [Bluvoll](https://github.com/bluvoll/diffusion-pipe) β diffusion-pipe fork used for training
|
| 146 |
+
- [Astromahdi](https://gpu.garden/) β compute via gpu.garden
|
| 147 |
+
- [KohakuBlueleaf](https://github.com/kohakublueleaf/lycoris) β LyCoRIS / LoKr method
|
| 148 |
+
- [animetimm/DeepGHS](https://huggingface.co/animetimm/convnextv2_huge.dbv4-full) β tagging model
|
| 149 |
+
- Format inspired by [Motimalu's Kirazuri diary](https://github.com/motimalu/diffusion-training-configs/blob/main/diffusion-pipe/anima/notes/kirazuri4.0-notes%20.md)
|