Update README.md
Browse files
README.md
CHANGED
|
@@ -9,26 +9,24 @@ tags:
|
|
| 9 |
- decoder
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Anima
|
| 13 |
|
| 14 |
A 25M-parameter decoder that reads the last-layer features of the
|
| 15 |
[Anima](https://huggingface.co/circlestone-labs/Anima) DiT at the final sampling step and
|
| 16 |
writes RGB pixels directly, in place of the VAE decode. The head and its training follow
|
| 17 |
-
FastFrames' pixel head (a ConvNeXt readout on the diffusion transformer's features).
|
| 18 |
|
| 19 |
| | |
|
| 20 |
|---|---|
|
| 21 |
| File | `anima_pixel_head.safetensors` (fp32, 95 MB; shape in the file's metadata) |
|
| 22 |
-
| Input | the input of the DiT's `final_layer.linear` (2048-dim per token, after the adaLN-modulated LayerNorm)
|
| 23 |
| Output | a 16×16 RGB patch per token, in [-1, 1] |
|
| 24 |
-
| Architecture | linear projection of the feature + linear embedding of the x_t patch, 2 ConvNeXt
|
| 25 |
-
| DiT | `anima-base-v1.0` (28 blocks)
|
| 26 |
| Target | VAE(x̂0) of the same forward, x̂0 = x_t − σ·v |
|
| 27 |
|
| 28 |
-
The file also holds an unused `linear.*` tensor pair (a skip that is off in this head,
|
| 29 |
-
`skip = 0` in the metadata).
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
Read the head only where it was trained:
|
| 34 |
|
|
@@ -36,20 +34,13 @@ Read the head only where it was trained:
|
|
| 36 |
Spectrum included (its last step is an actual forward).
|
| 37 |
- **Turbo**: the 4-step turbo LoRA of
|
| 38 |
[anima-turbo-4step](https://huggingface.co/sorryhyun/anima-turbo-4step), Euler 4 steps,
|
| 39 |
-
shift 3, CFG 1 (last-step σ 0.5).
|
| 40 |
-
`old/anima_turbo_4step.safetensors` from that repo; on v3 and v4 the head reads about
|
| 41 |
-
3 dB lower against the VAE (31.5 / 31.4 dB vs 34.6 dB, 32 generated images).
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
## Measured
|
| 46 |
|
| 47 |
### In ComfyUI
|
| 48 |
|
| 49 |
-
Turbo 4 steps, CFG 1, RTX 5070 Ti, 16 prompts at ~1 MP, one seed
|
| 50 |
-
VRAM, PyTorch attention); medians. Workflow: Load Diffusion Model → Anima Adapter Loader (turbo LoRA, fp32 stream) →
|
| 51 |
-
Anima Block Compile → KSampler (euler, simple, 4 steps, CFG 1) → VAE Decode; the head column adds
|
| 52 |
-
Anima Pixel Head Tap before the KSampler and uses Anima Pixel Decode in place of VAE Decode.
|
| 53 |
|
| 54 |
| | KSampler + VAE Decode | KSampler + Anima Pixel Decode |
|
| 55 |
|---|---|---|
|
|
@@ -70,16 +61,12 @@ card for the decode.
|
|
| 70 |
| | turbo + VAE | turbo + pixel head |
|
| 71 |
|---|---|---|
|
| 72 |
| DiT sampling | 0.97 s | 0.97 s |
|
|
|
|
| 73 |
| VAE move to the card and back | 35 ms | — |
|
| 74 |
| decode | 141 ms | 7 ms |
|
| 75 |
| decode peak VRAM above the DiT | 1.38 GB | 0.24 GB |
|
| 76 |
-
|
|
| 77 |
-
| **total per image (DiT + decode)** | **1.15 s** | **0.98 s (1.17×)** |
|
| 78 |
|
| 79 |
-
The move row is the moved-VAE path (176 ms) minus a decode with the VAE already on the card
|
| 80 |
-
(141 ms). Loading the VAE from disk per image instead costs ~710 ms (851 ms with the decode,
|
| 81 |
-
total 1.82 s); keeping it on the card saves the move (total 1.11 s, 1.30 GB). Text encoding
|
| 82 |
-
(~0.3 s per prompt) is outside the totals.
|
| 83 |
|
| 84 |
## Samples
|
| 85 |
|
|
@@ -93,9 +80,9 @@ x 192–576, y 512–896.
|
|
| 93 |
|
| 94 |
| | VAE Decode | pixel head |
|
| 95 |
|---|---|---|
|
| 96 |
-
| colour
|
| 97 |
| crop |  |  |
|
| 98 |
-
| monochrome
|
| 99 |
| crop |  |  |
|
| 100 |
|
| 101 |
On the monochrome crop the VAE keeps the screentone dots on the shorts; the head renders them as
|
|
|
|
| 9 |
- decoder
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Anima Pixel Decoder
|
| 13 |
|
| 14 |
A 25M-parameter decoder that reads the last-layer features of the
|
| 15 |
[Anima](https://huggingface.co/circlestone-labs/Anima) DiT at the final sampling step and
|
| 16 |
writes RGB pixels directly, in place of the VAE decode. The head and its training follow
|
| 17 |
+
[FastFrames](https://arxiv.org/html/2611.23226)' pixel head (a ConvNeXt readout on the diffusion transformer's features).
|
| 18 |
|
| 19 |
| | |
|
| 20 |
|---|---|
|
| 21 |
| File | `anima_pixel_head.safetensors` (fp32, 95 MB; shape in the file's metadata) |
|
| 22 |
+
| Input | the input of the DiT's `final_layer.linear` (2048-dim per token, after the adaLN-modulated LayerNorm) |
|
| 23 |
| Output | a 16×16 RGB patch per token, in [-1, 1] |
|
| 24 |
+
| Architecture | linear projection of the feature + linear embedding of the x_t patch, 2 ConvNeXt, one 2× pixel-shuffle upsample, 1 ConvNeXt, linear to 8×8×3 |
|
| 25 |
+
| DiT | `anima-base-v1.0` (28 blocks) |
|
| 26 |
| Target | VAE(x̂0) of the same forward, x̂0 = x_t − σ·v |
|
| 27 |
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
## Compatibility
|
| 30 |
|
| 31 |
Read the head only where it was trained:
|
| 32 |
|
|
|
|
| 34 |
Spectrum included (its last step is an actual forward).
|
| 35 |
- **Turbo**: the 4-step turbo LoRA of
|
| 36 |
[anima-turbo-4step](https://huggingface.co/sorryhyun/anima-turbo-4step), Euler 4 steps,
|
| 37 |
+
shift 3, CFG 1 (last-step σ 0.5).
|
|
|
|
|
|
|
| 38 |
|
| 39 |
+
## Benchmark
|
|
|
|
|
|
|
| 40 |
|
| 41 |
### In ComfyUI
|
| 42 |
|
| 43 |
+
Turbo 4 steps, CFG 1, RTX 5070 Ti, 16 prompts at ~1 MP, one seed
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
| | KSampler + VAE Decode | KSampler + Anima Pixel Decode |
|
| 46 |
|---|---|---|
|
|
|
|
| 61 |
| | turbo + VAE | turbo + pixel head |
|
| 62 |
|---|---|---|
|
| 63 |
| DiT sampling | 0.97 s | 0.97 s |
|
| 64 |
+
| load VAE | 710 ms | — |
|
| 65 |
| VAE move to the card and back | 35 ms | — |
|
| 66 |
| decode | 141 ms | 7 ms |
|
| 67 |
| decode peak VRAM above the DiT | 1.38 GB | 0.24 GB |
|
| 68 |
+
| **total per image (DiT + decode)** | **1.86 s** | **0.98 s** |
|
|
|
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
## Samples
|
| 72 |
|
|
|
|
| 80 |
|
| 81 |
| | VAE Decode | pixel head |
|
| 82 |
|---|---|---|
|
| 83 |
+
| colour|  |  |
|
| 84 |
| crop |  |  |
|
| 85 |
+
| monochrome |  |  |
|
| 86 |
| crop |  |  |
|
| 87 |
|
| 88 |
On the monochrome crop the VAE keeps the screentone dots on the shorts; the head renders them as
|