File size: 6,178 Bytes
66ab0dd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | ---
license: other
license_name: mg-by-sa-2.0
license_link: https://ids.nus.edu.sg/docs/modelgo/v2/MG-BY-SA/LICENSE
library_name: canter
pipeline_tag: text-to-image
tags:
- flow-matching
- text-to-image
- photography
- pytorch
base_model:
- HuggingFaceTB/SmolLM2-360M
---
# Canter
## An efficient, photography-oriented text-to-image model
> **Preview release**
>
> The model is still training. Checkpoints and behavior may change during
> the preview period, and generation quality is still quite variable.
**Current release:** [`v0001`](RELEASES.md#v0001)
[Example gallery](GALLERY.md) 路 [Getting started](#getting-started) 路
[API and inference parameters](API.md) 路
[Technical report](TECHNICAL_REPORT.md) 路 [Releases](RELEASES.md)
This is a 2 billion parameter indie model trained on a single GPU. It is
designed for efficient text-to-image generation with a strong focus on
photography, natural scenes, people, objects, and places.
The repository bundles the flow-matching denoiser, text tokenizer with a copy
of the required
[`SmolLM2-360M`](https://huggingface.co/HuggingFaceTB/SmolLM2-360M) weights,
Python package, and Gradio interface. Image decoding uses
[`data-archetype/dinac_ae_d2`](https://huggingface.co/data-archetype/dinac_ae_d2)
VAE, which is downloaded automatically.
## Getting started
### Requirements
The release requires:
- Python 3.10 to 3.13
- PyTorch 2.12 (`>=2.12,<2.13`) with a compatible CUDA build
- an NVIDIA GPU with CUDA and bfloat16 support
- 8 GB VRAM for 1024 by 1024 generation with the default bfloat16 release
- Linux or Windows
Install a CUDA-enabled PyTorch build for your system first. The
[PyTorch installation selector](https://pytorch.org/get-started/locally/)
provides the appropriate command.
### Download and install
Install the Hugging Face CLI, download the repository, and install the package
from the downloaded directory:
```bash
python -m pip install "huggingface-hub>=1.15,<2"
hf download data-archetype/canter --revision v0001 --local-dir canter
cd canter
python -m pip install .
```
The default release stores most weights in bfloat16. Numerically sensitive
parameters remain in float32.
### Start the Gradio interface
Run the application from the downloaded repository:
```bash
python app.py --in-browser
```
`app.py` loads the weights from its own repository directory and
downloads the latest compatible DINAC-AE-D2 VAE.
The interface appears immediately and reports model loading and pytorch dynamo compilation
progress.
Downloaded PNG files contain the prompt, effective per-image settings, and
numbered model release as JSON metadata.
The server listens on port 7860. To select the bind address explicitly:
```bash
python app.py --server-name 0.0.0.0 --server-port 7860
```
Use `--server-name 127.0.0.1` to restrict access to the local machine.
After package installation, the interface can also download and run the model
directly from Hugging Face:
```bash
canter-web --model data-archetype/canter --in-browser
```
Run `python app.py --help` or `canter-web --help` for model revision, weight
dtype, text backend, device, cache, and server options.
### Generate an image with Python
```python
from canter import CanterPipeline
pipe = CanterPipeline.from_pretrained("data-archetype/canter")
result = pipe(
"A weathered wooden boardwalk descending toward a rugged coastline "
"under a stormy sky"
)
result.image.save("canter.png")
```
The default configuration generates a 1216 by 832 image with seed 42, 50 ABM2
updates, a Beta(0.6, 0.6) schedule, PDG 2.5, and image self-attention gain
-0.03. The selected text backend is compiled during model loading.
See [API and inference parameters](API.md) for configuration examples,
guidance modes, solvers, schedules, output types, and loading options.
## Example gallery
See the [example gallery](GALLERY.md).
## Limitations
The model has more limited knowledge than larger models. Some concepts may be
unknown or undertrained, especially uncommon subjects and specialist domains.
Text rendering is currently undertrained and unreliable.
The model has been trained almost exclusively on photographs. It has seen
limited artwork outside a few thousand classical paintings, so results for
illustration and other non-photographic styles may be weak or inconsistent.
## Responsible use
The model and its outputs are provided without guarantees of accuracy,
suitability, or safety. Users are responsible for reviewing generated content
and complying with applicable laws, privacy obligations, and third-party
rights.
## Releases
Remote loading without a revision uses the package's pinned default release.
It does not follow changes to `main`:
```python
pipe = CanterPipeline.from_pretrained("data-archetype/canter")
```
Pin an immutable checkpoint tag for reproducible use:
```python
pipe = CanterPipeline.from_pretrained(
"data-archetype/canter",
revision="v0001",
)
```
Release tags follow the `v0001`, `v0002`, and later numbering scheme. Optional
full-float32 releases use tags such as `v0001-fp32`.
See the [release table and update instructions](RELEASES.md).
## Documentation
- [Example gallery](GALLERY.md)
- [API and inference parameters](API.md)
- [Technical report](TECHNICAL_REPORT.md)
- [Releases](RELEASES.md)
- [Attribution](ATTRIBUTION.md)
## Citation
```bibtex
@misc{canter,
title = {Canter: An Efficient, Photography-Oriented Text-to-Image Model},
author = {data-archetype},
email = {data-archetype@proton.me},
year = {2026},
month = jul,
url = {https://huggingface.co/data-archetype/canter},
}
```
## License
The original weights, architecture, model-specific code, and
documentation are licensed under the ModelGo Attribution-ShareAlike License
2.0 (`MG-BY-SA-2.0`). Commercial use, modification, redistribution, and hosted
use are permitted subject to its attribution, source-disclosure, and
share-alike conditions. Distributions must retain `NOTICE`.
The bundled SmolLM2 subset remains under Apache License 2.0. See
`LICENSE-APACHE-2.0` and [Attribution](ATTRIBUTION.md). DINAC-AE-D2 remains
under the license published in its own repository.
|