Agatha and Lia: training records

This repository holds the training records of two small text-to-image models from the geofractal library, trained the same way and compared:

  • Agatha, a model built around a collective of expert towers whose pushes a damped oscillator integrates;
  • Lia, a plain transformer of the same size: Agatha's control.

It holds weights at milestones (raw and averaged), sample sheets, evaluation records, probes and logs. It holds no code: both models are in geofractal's src/geofractal/router/prefab/agatha_v2 folder.

The two models

Agatha Lia
role the design under test the control: the known working design at the same size and recipe
parameters 42,023,588 42,907,904
body a one-block transformer trunk; six towers; their pushes mixed by learned weights per noise level and integrated by a damped second-order step 13 transformer blocks
shared by both the picture as 2 x 2 patches of the 32 x 32 x 32 FLUX.2 latent (256 tokens, width 384, 6 heads); T5-base caption states read by cross-attention; the time step through layer-norm modulation that starts at zero
objective flow matching: predict the velocity that carries noise to the picture's latent the same

Agatha

Agatha predicts the velocity of a flow from noise to an image latent. A short transformer trunk reads the latent tokens and the caption. Six towers then give every token a push of their own: four attention towers, each with its own rotary position code (cantor, beatrix, simplex, helix), and two convolution towers (wide_resnet, and frequency, which sees a high-passed input). Learned weights, one set per noise level, mix the pushes, and a damped oscillator, solved in closed form, turns the mix into the predicted velocity. The math is written out in AGATHA_V2_CORE.md.

Where she comes from. Agatha began in December 2025 as a diffusion design in the geofractal library (prefab/agatha): pretrained encoders read by a head router; a collective of geometric towers, each with its own position geometry and its own opinion of the image; and the Beatrix core, described in BEATRIX_CORE.md as a covariant differential oscillation integrator that gathers the towers' opinions into one controlled state update for flow-matching diffusion. Version 2, the model trained here, is a complete rewrite made after an audit of the first version. It keeps the idea of expert towers whose pushes an oscillator integrates, and it states every part as an exact formula with tests. Its training objective is the straight-path flow of flow matching (Lipman et al.) and rectified flow (Liu et al.).

Lia

Lia is the control, built for this comparison from Agatha's own parts: the same embeddings, the same caption and time paths and the same transformer block as Agatha's trunk, stacked 13 deep and read out by one linear layer that starts at zero. She has no towers, no oscillator and no noise-level weights, and uses no outside code or weights.

Where her design comes from. She follows the published diffusion transformers. Her blocks take the time step through layer-norm modulation that starts at zero, the pattern of DiT (Peebles and Xie), without DiT's per-branch gates. Her depth and size match U-ViT-S/2 (Bao et al.: 13 layers, 44M parameters), the small model U-ViT trained on the same benchmark, COCO 2014 at 256 px. Her depth was set by matching Agatha's parameter count: 13 blocks come within 2.1%.

Her name. Lia is Leah, as Dante's Italian names her. In Purgatorio XXVII (lines 97-108), in a dream before dawn, Dante sees a young woman walking through a meadow, gathering flowers. She sings that she is Lia, and that she moves her hands to make herself a garland, while her sister Rachel never leaves her mirror and sits before it all day: seeing contents Rachel, doing contents Lia. Lia stands for the active life, which suits the plain working model that each new design is measured against. Lia names the line of control models for these diffusion engines; this is the first.

What is here

folder what
coco256/ COCO 2014 at 256 px: Agatha against Lia, two seeds each, plus a repeat of Agatha's first seed; weights at 20,000, 50,000 and 100,000 steps (raw and averaged), sample sheets, evaluations, and probes of Agatha's towers
prelim/2026-11-16_toy_descent_check/ a tiny model on made-up data, on a CPU: does the optimizer descend, and is the caption used
prelim/2026-11-16_cifar10_wide_vs_deep/ the real width on CIFAR-10 on one GPU: the default wide layout beside a deep stack of equal size

Results

COCO 2014 at 256 px, 100,000 steps, averaged (EMA) weights:

read Agatha, seed 0 Agatha, seed 1 Lia, seed 0 Lia, seed 1
held-out loss, 2,000 validation photos (lower is better) 0.9737 0.9734 0.9632 0.9629
FID, 5,000 prompts, guidance 3 (lower is better) 24.00 23.58 18.96 18.86
CLIP score, guidance 3 (higher is better) 22.56 22.67 23.44 23.44

Lia leads on every read, on both seeds. The two seeds of each model agree to about 0.0003 in held-out loss; the gap between the models is 0.0105 on seed 0 and 0.0106 on seed 1, about 36 times Agatha's seed spread.

Verdict: the control wins. By the rule fixed before the runs, the comparison's noise bar is the larger of Agatha's seed spread and the difference between Agatha's first seed and a rerun of it from step 0. The rerun matched the original exactly, in every recorded number, so the bar is the seed spread, and Lia is lower in held-out loss by more than 35 times it on both seeds, with FID agreeing. At this size, on this data and with this recipe, the plain transformer beats Agatha's tower design. The protocol, the training curves and the tower probes are in coco256/README.md.

Using the models

The Agatha diffusion playground runs any published checkpoint of either model side by side from the same noise, blind or by name, with a switch for each of Agatha's towers. Its app.py is a complete working example:

step how
code geofractal installed at commit 46fabb02ec851e4a4fb03b3ada30185a26efe2f7
load geofractal.router.prefab.agatha_v2.trainer.load_checkpoint(path) builds either model from its file; the file's extra.latent_mean and extra.latent_std undo the latent normalization
caption T5-base (google-t5/t5-base, revision a9723ea7f1b39c1eae772870f3b547bf6ef7e6c1), last hidden states at the caption's true length, up to 128 tokens
sample geofractal.router.prefab.agatha_v2.hooks.sample_latents: the midpoint sampler (25 steps in the evaluations), classifier-free guidance
decode the FLUX.2 autoencoder (black-forest-labs/FLUX.2-klein-4B, subfolder vae, revision e7b7dc27f91deacad38e78976d1f2b499d76a294)

These are small research models: expect rough pictures, not a finished image generator.

License

  • Weights trained on COCO (coco256/): CC BY-NC-SA 4.0, for non-commercial research use only. They were trained on COCO 2014 photos, about 69% of which carry non-commercial Creative Commons licenses (BY-NC, BY-NC-SA, BY-NC-ND). The license tag of this repository is theirs.
  • prelim/: trained on no COCO data; MIT, as first published.
  • Code: Apache-2.0, in geofractal.
  • Pictures are encoded and decoded with the FLUX.2 autoencoder of black-forest-labs/FLUX.2-klein-4B (Apache-2.0), and captions are read by google-t5/t5-base (Apache-2.0). Neither is stored here, and no COCO photo or cached latent of one is stored here.

References

  • The Agatha design: geofractal, prefab/agatha/BEATRIX_CORE.md (December 2025) and prefab/agatha_v2/AGATHA_V2_CORE.md.
  • W. Peebles, S. Xie. Scalable Diffusion Models with Transformers (DiT). arXiv:2212.09748
  • F. Bao, S. Nie, K. Xue, Y. Cao, C. Li, H. Su, J. Zhu. All are Worth Words: A ViT Backbone for Diffusion Models (U-ViT). arXiv:2209.12152
  • Y. Lipman, R. T. Q. Chen, H. Ben-Hamu, M. Nickel, M. Le. Flow Matching for Generative Modeling. arXiv:2210.02747
  • X. Liu, C. Gong, Q. Liu. Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow. arXiv:2209.03003
  • T.-Y. Lin et al. Microsoft COCO: Common Objects in Context. arXiv:1405.0312
  • Dante Alighieri. Divina Commedia, Purgatorio XXVII, 97-108.

Citation

@misc{geofractal_agatha_lia_2026,
  title  = {Agatha and Lia: geofractal text-to-image training records},
  author = {AbstractPhil and Claude (Anthropic)},
  year   = {2026},
  url    = {https://huggingface.co/AbstractPhil/geofractal-agatha-diffusion-training}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using AbstractPhil/geofractal-agatha-diffusion-training 1

Papers for AbstractPhil/geofractal-agatha-diffusion-training