|
|
--- |
|
|
language: |
|
|
- en |
|
|
pipeline_tag: text-to-image |
|
|
library_name: diffusers |
|
|
tags: |
|
|
- text-to-image |
|
|
- stable-diffusion |
|
|
- safetensors |
|
|
- stable-diffusion-xl |
|
|
- merge |
|
|
license: openrail++ |
|
|
base_model: |
|
|
- cagliostrolab/animagine-xl-3.1 |
|
|
- Eugeoter/anime_illust_diffusion_xl |
|
|
- RunDiffusion/Juggernaut-XL-v9 |
|
|
- KBlueLeaf/Kohaku-XL-Zeta |
|
|
- votepurchase/Starry-XL-v5.2 |
|
|
- cagliostrolab/animagine-xl-4.0 |
|
|
- kayfahaarukku/UrangDiffusion-2.0 |
|
|
- Raelina/Rae-Diffusion-XL-V2 |
|
|
- yodayo-ai/clandestine-xl-1.0 |
|
|
--- |
|
|
|
|
|
<style> |
|
|
.container { |
|
|
display: flex; |
|
|
gap: 2rem; |
|
|
align-items: flex-start; |
|
|
} |
|
|
.image-wrapper, |
|
|
.details { |
|
|
flex: 1 1 50%; |
|
|
} |
|
|
.image-wrapper { |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
} |
|
|
.model-image { |
|
|
width: 100%; |
|
|
max-width: 500px; |
|
|
min-width: 300px; |
|
|
border-radius: 8px; |
|
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); |
|
|
} |
|
|
.details h1 { |
|
|
margin-top: 0; |
|
|
font-size: 2rem; |
|
|
color: #fff; |
|
|
} |
|
|
.details .description { |
|
|
margin: 0.5rem 0 1.5rem; |
|
|
line-height: 1.5; |
|
|
color: #ccc; |
|
|
} |
|
|
.features-list { |
|
|
list-style: none; |
|
|
padding: 0; |
|
|
margin: 0 0 1.5rem; |
|
|
} |
|
|
.features-list li { |
|
|
display: flex; |
|
|
align-items: center; |
|
|
margin-bottom: 0.5rem; |
|
|
font-size: 1rem; |
|
|
color: #fff; |
|
|
} |
|
|
.features-list .icon { |
|
|
margin-right: 0.6rem; |
|
|
font-size: 1.2rem; |
|
|
} |
|
|
.badge-list { |
|
|
list-style: none; |
|
|
padding: 0; |
|
|
margin: 0; |
|
|
display: flex; |
|
|
flex-wrap: wrap; |
|
|
row-gap: 0.25rem; |
|
|
column-gap: 0.5rem; |
|
|
} |
|
|
.badge-list li { |
|
|
margin: 0; |
|
|
} |
|
|
.badge-btn { |
|
|
display: inline-flex; |
|
|
align-items: center; |
|
|
height: 28px; |
|
|
padding: 0 10px; |
|
|
font-size: 14px; |
|
|
font-weight: 500; |
|
|
color: #fff; |
|
|
text-decoration: none; |
|
|
border-radius: 4px; |
|
|
white-space: nowrap; |
|
|
transition: opacity 0.2s, transform 0.1s; |
|
|
} |
|
|
.badge-btn .btn-icon { |
|
|
width: 16px; |
|
|
height: 16px; |
|
|
margin-right: 6px; |
|
|
} |
|
|
.badge-btn:hover { |
|
|
opacity: 0.85; |
|
|
transform: translateY(-1px); |
|
|
} |
|
|
.badge-btn.civitai { |
|
|
background-color: #2975fa8d; |
|
|
} |
|
|
.badge-btn.hf { |
|
|
background-color: #ff66008d; |
|
|
} |
|
|
|
|
|
@media (max-width: 700px) { |
|
|
.container { |
|
|
flex-direction: column; |
|
|
align-items: center; |
|
|
} |
|
|
.image-wrapper, |
|
|
.details { |
|
|
flex: unset; |
|
|
width: 100%; |
|
|
} |
|
|
.model-image { |
|
|
width: 90%; |
|
|
max-width: 500px; |
|
|
min-width: auto; |
|
|
margin-bottom: 1rem; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
<div class="container"> |
|
|
<div class="image-wrapper"> |
|
|
<img |
|
|
src="https://huggingface.co/rityak/animagus/resolve/main/img.png" |
|
|
alt="Animagus XL 1.0 Example" |
|
|
class="model-image" |
|
|
/> |
|
|
</div> |
|
|
<div class="details"> |
|
|
<h1>Animagus XL 1.0</h1> |
|
|
<p class="description"> |
|
|
<strong>Animagus</strong> is an anime-themed finetuned model built on top of Stable Diffusion XL, created as part of the Animagine XL series. The model merges multiple specialized checkpoints using advanced multistage methods (<code>karcher_mean</code>, <code>ties_sum</code> and <code>task_arithmetic</code>) and is then fine-tuned on carefully selected illustration datasets. This process delivers more stable outputs, accurate anatomy, and rich colors, while preserving the “anime” style. |
|
|
</p> |
|
|
<ul class="badge-list"> |
|
|
<li> |
|
|
<a |
|
|
href="https://civitai.com/models/1783095" |
|
|
target="_blank" |
|
|
class="badge-btn civitai" |
|
|
> |
|
|
<img |
|
|
src="https://civitai.com/favicon-blue.ico" |
|
|
alt="CivitAI" |
|
|
class="btn-icon" |
|
|
/> |
|
|
View on CivitAI |
|
|
</a> |
|
|
</li> |
|
|
<li> |
|
|
<a |
|
|
href="https://huggingface.co/rityak/animagus/resolve/main/animagus.safetensors?download=true" |
|
|
target="_blank" |
|
|
class="badge-btn hf" |
|
|
> |
|
|
<img |
|
|
src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" |
|
|
alt="Hugging Face" |
|
|
class="btn-icon" |
|
|
/> |
|
|
Download Animagus XL 1.0 |
|
|
</a> |
|
|
</li> |
|
|
<li> |
|
|
<a |
|
|
href="https://huggingface.co/rityak/animagus/resolve/main/animagus-zero.safetensors?download=true" |
|
|
target="_blank" |
|
|
class="badge-btn hf" |
|
|
> |
|
|
<img |
|
|
src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" |
|
|
alt="Hugging Face" |
|
|
class="btn-icon" |
|
|
/> |
|
|
Download Animagus XL Zero |
|
|
</a> |
|
|
</li> |
|
|
</ul> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
- **Civitai hub** |
|
|
Explore model details, community examples, and usage tips: |
|
|
[View on CivitAI](https://civitai.com/models/1783095) |
|
|
|
|
|
- **Animagus XL 1.0 (fine‑tuned)** |
|
|
The final anime‑optimized model _after_ fine‑tuning on curated illustration datasets. |
|
|
[Download Animagus XL 1.0](https://huggingface.co/rityak/animagus/resolve/main/animagus.safetensors?download=true) |
|
|
|
|
|
- **Animagus XL Zero (raw merge)** |
|
|
A direct merge of all source checkpoints _before_ fine‑tuning. |
|
|
[Download Animagus XL Zero](https://huggingface.co/rityak/animagus/resolve/main/animagus-zero.safetensors?download=true) |
|
|
|
|
|
## Model Details |
|
|
|
|
|
- **Model type**: diffusion-based text-to-image |
|
|
- **Base checkpoint**: Stable Diffusion XL 1.0 |
|
|
- **Initial finetuned models**: Animagine XL 3.1 and Animagine XL 4.0 Opt |
|
|
- **License**: CreativeML Open RAIL++-M |
|
|
|
|
|
## Training Pipeline |
|
|
|
|
|
**Step 1: Model Merging** |
|
|
Multistage merging of over 20 anime-specific checkpoints using the following methods: |
|
|
|
|
|
- **Karcher mean** (Riemannian center of mass): a generalization of the arithmetic mean to curved spaces (Riemannian manifolds), finding the point that minimizes the sum of squared Riemannian distances to all checkpoints. |
|
|
- **subtract** and **add_difference** to preserve the unique characteristics of each checkpoint |
|
|
- **fallback** and **task_arithmetic** for flexible combination of UNet, VAE, and CLIP components |
|
|
|
|
|
**Step 2: Fine-tuning** |
|
|
A few short iterations on a small but high-quality dataset: |
|
|
|
|
|
- **pixiv** – a collection of illustrations with high aesthetic scores |
|
|
- **latum** – expressive artworks with pleasant tones and fine line work |
|
|
- **artists** – artworks by `asou`, `hara_harayutaka`, `hiroki_yyqw7151` in a vanilla anime screencap style |
|
|
- **aiga** – AI-generated images with high aesthetic scores |
|
|
- **anime** – screenshots and illustrations from anime and hentai |
|
|
|
|
|
> **Note:** UNet and CLIP were fine-tuned separately due to an initial configuration error. |
|
|
|
|
|
## Styles Reference |
|
|
|
|
|
You can influence the visual style of generated images by including artist or style tags in your prompt. For a curated list of artist tags that have been tested with Animagus (compiled from the various checkpoints used in the merge), download the reference here: |
|
|
|
|
|
**Download artist list**: |
|
|
https://huggingface.co/rityak/animagus/raw/main/artist_list.txt |
|
|
|
|
|
> **Note:** This list was gathered from models used during merging and serves as a helpful starting point, but not all tags are guaranteed to work equally well. Feel free to experiment and discover which styles best suit your use case. |
|
|
|
|
|
## Usage Guidelines |
|
|
|
|
|
The usage guidelines will be the same as for Animagine 3.1 and 4.0. For more details, please refer to: |
|
|
|
|
|
- https://huggingface.co/cagliostrolab/animagine-xl-4.0 |
|
|
- https://huggingface.co/cagliostrolab/animagine-xl-3.1 |
|
|
|
|
|
--- |
|
|
|
|
|
### Recipe |
|
|
|
|
|
**Step 1. Merging** **[Animagus XL Zero](https://huggingface.co/rityak/animagus/resolve/main/animagus-zero.safetensors?download=true)** - Non-trained merging of checkpoints. |
|
|
|
|
|
```yaml |
|
|
version: 0.1.0 |
|
|
model "SDXL\animagine\animagine-xl-4.0-opt.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\animagine\animagine-xl-3.1.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\babesByStableYogiSDXL_v50FP16.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\bigasp_v20.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\juggernautXL_ragnarokBy.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
merge "karcher_mean_with_blocks" &2 &3 &4 alpha_clip_l=null alpha_clip_g=null alpha_in=null alpha_mid=null alpha_out=null alpha_embed_time=null alpha_embed_label=null max_iter=30.000000000000007 tol="3e-08" alpha_global="0.4, 0.3, 0.3" |
|
|
merge "merge_checkpointing" &5 |
|
|
model "SDXL\sd_xl_base_1.0.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
merge "subtract" &6 &7 |
|
|
literal 0.0 model_config="sdxl-sgm" merge_space="param" |
|
|
merge "pick_component" &9 "clip_l" |
|
|
merge "pick_component" &9 "clip_g" |
|
|
merge "fallback" &10 &11 |
|
|
merge "pick_component" &9 "vae" |
|
|
merge "fallback" &12 &13 |
|
|
literal 1.0000000000000002 model_config="sdxl-sgm" merge_space="param" |
|
|
merge "pick_component" &15 "diffuser" |
|
|
merge "fallback" &14 &16 |
|
|
merge "add_difference" &1 &8 &17 |
|
|
merge "fallback" &18 &1 |
|
|
model "SDXL\tofuANIMEBASEMODEL_050.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\kohakuXLZeta_rev1.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\starryXLV52_v52.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\hassakuXL_betaV06.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\animeIllustDiffusion_v08.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
merge "karcher_mean_with_blocks" &1 &20 &21 &22 &23 &24 alpha_clip_l=null alpha_clip_g=null alpha_in=null alpha_mid=null alpha_out=null alpha_embed_time=null alpha_embed_label=null max_iter=30.000000000000007 tol="3e-08" alpha_global="0.1675, 0.1665, 0.1665, 0.1665, 0.1665, 0.1665" |
|
|
merge "merge_checkpointing" &25 |
|
|
merge "subtract" &26 &1 |
|
|
merge "add_difference" &19 &27 1.0 |
|
|
merge "fallback" &28 &19 |
|
|
model "SDXL\animagine\RaeDiffusion-XL-v2.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\animagine\UrangDiffusion-2.0.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\animagine\clandestine-xl-1.0.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
model "SDXL\animagine\ranimeXLBaseOnAnimagine_v10.safetensors" model_config="sdxl-sgm" merge_space="weight" |
|
|
merge "task_arithmetic" &1 &30 &31 &32 &33 lambda_=1.0 weights="0.22, 0.26, 0.26, 0.26" |
|
|
merge "merge_checkpointing" &34 |
|
|
merge "subtract" &30 &1 |
|
|
merge "subtract" &31 &1 |
|
|
merge "subtract" &32 &1 |
|
|
merge "subtract" &33 &1 |
|
|
merge "ties_sum_extended" &36 &37 &38 &39 k=0.20000000000000004 vote_sgn=true apply_stock=false apply_median=true cos_eps=1e-06 eps=1e-06 maxiter=100 ftol=1e-20 |
|
|
merge "add_difference" &35 &40 1.0 |
|
|
merge "fallback" &41 &35 |
|
|
merge "subtract" &42 &1 |
|
|
merge "add_difference" &29 &43 1.0 |
|
|
merge "fallback" &44 &29 |
|
|
merge "karcher_mean" &0 &45 max_iter=30.000000000000007 tol="1e-07" alphas="0.35, 0.65" |
|
|
``` |
|
|
|
|
|
**Step 2. Fine-tuning** **[Animagus XL](https://huggingface.co/rityak/animagus/resolve/main/animagus.safetensors?download=true)** A few short iterations on a small, high-quality dataset. |