anima
decoder
sorryhyun commited on
Commit
4893387
·
verified ·
1 Parent(s): 05452d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -26
README.md CHANGED
@@ -9,26 +9,24 @@ tags:
9
  - decoder
10
  ---
11
 
12
- # Anima pixel head
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), CFG-combined as f_u + g·(f_c − f_u), and x_t at that step as 2×2 latent patches (64 values per token) |
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 blocks at token resolution (width 1024), one 2× pixel-shuffle upsample, 1 ConvNeXt block at width 512, linear to 8×8×3 per upsampled position |
25
- | DiT | `anima-base-v1.0` (28 blocks), fp32 residual stream |
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
- ## Where it was trained
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). The turbo point was trained with
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
- Outside those settings the head still decodes; quality there is unmeasured.
44
-
45
- ## Measured
46
 
47
  ### In ComfyUI
48
 
49
- Turbo 4 steps, CFG 1, RTX 5070 Ti, 16 prompts at ~1 MP, one seed, in ComfyUI 0.43.0 (dynamic
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
- | PSNR against the VAE decode | — | 35.4 dB |
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, 37.3 dB | ![colour, VAE](samples/color_vae.png) | ![colour, pixel head](samples/color_head.png) |
97
  | crop | ![colour crop, VAE](samples/color_vae_crop.png) | ![colour crop, pixel head](samples/color_head_crop.png) |
98
- | monochrome, comic, 31.1 dB | ![mono, VAE](samples/mono_vae.png) | ![mono, pixel head](samples/mono_head.png) |
99
  | crop | ![mono crop, VAE](samples/mono_vae_crop.png) | ![mono crop, pixel head](samples/mono_head_crop.png) |
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| ![colour, VAE](samples/color_vae.png) | ![colour, pixel head](samples/color_head.png) |
84
  | crop | ![colour crop, VAE](samples/color_vae_crop.png) | ![colour crop, pixel head](samples/color_head_crop.png) |
85
+ | monochrome | ![mono, VAE](samples/mono_vae.png) | ![mono, pixel head](samples/mono_head.png) |
86
  | crop | ![mono crop, VAE](samples/mono_vae_crop.png) | ![mono crop, pixel head](samples/mono_head_crop.png) |
87
 
88
  On the monochrome crop the VAE keeps the screentone dots on the shorts; the head renders them as