Metadata-Version: 2.4
Name: anima-mlx
Version: 0.1.0
Summary: Anima-2.9B anime text-to-image on Apple Silicon via MLX (CLI + Python API, auto-downloads weights)
Author: yunfengwang
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: mlx>=0.20
Requires-Dist: numpy
Requires-Dist: pillow
Requires-Dist: transformers>=4.40
Requires-Dist: huggingface_hub>=0.23

# anima-mlx

[Anima-2.9B](https://huggingface.co/Gazingstars123/Anima-2.9B) anime text-to-image on Apple
Silicon, implemented in [MLX](https://github.com/ml-explore/mlx). Weights are downloaded
automatically from the Hugging Face hub on first run.

## CLI (one-liner)

```bash
uvx anima-mlx -p "masterpiece, best quality, safe, 1girl, smile, long hair" -o out.png
```

Common options: `-W/-H` resolution (multiples of 16, e.g. 816x1216), `--steps` (28),
`--cfg` (4.5), `--seed`, `--qbits 8` (default, int8 DiT) or `--fp16`.

## Python API

```python
from anima_mlx import AnimaPipeline, to_numpy
from PIL import Image

pipe = AnimaPipeline.from_pretrained()   # downloads + caches weights
img = pipe.generate_text("masterpiece, best quality, 1girl, smile", seed=1)
Image.fromarray(to_numpy(img)).save("out.png")
```

## Notes

- Requires an Apple Silicon Mac (MLX). ~7 GB of weights are cached under `~/.cache/anima-mlx`.
- Sampling reproduces the ComfyUI Anima defaults (flow matching, shift=3.0, euler, sgm_uniform, CFG).
- The model is non-commercial (CircleStone Labs license); see the upstream model card.
