File size: 8,104 Bytes
47cf0df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43e7f24
47cf0df
 
 
 
 
f19e63b
 
 
 
 
47cf0df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f19e63b
47cf0df
 
 
 
 
 
 
 
91bfeb5
47cf0df
91bfeb5
 
47cf0df
 
 
91bfeb5
47cf0df
df27b3e
47cf0df
 
91bfeb5
 
 
df27b3e
 
91bfeb5
 
47cf0df
 
91bfeb5
 
 
 
 
 
 
 
 
df27b3e
 
 
91bfeb5
47cf0df
 
 
 
 
 
 
 
 
 
 
 
ba06200
 
 
 
 
13490a2
 
 
 
 
47cf0df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91bfeb5
 
47cf0df
 
 
 
 
91bfeb5
47cf0df
 
 
 
 
 
 
 
91bfeb5
 
 
 
 
 
 
 
 
 
 
 
 
47cf0df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
---
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 checkpoint:** [`v0002`](RELEASES.md#v0002)

[Example gallery](GALLERY.md) 路 [Getting started](#getting-started) 路
[API and inference parameters](API.md) 路
[Technical report](TECHNICAL_REPORT.md) 路 [Releases](RELEASES.md)

ComfyUI custom nodes are available in
[`ComfyUI-Canter`](https://github.com/JTriggerFish/ComfyUI-Canter). They use
the package's conditioning, guidance, schedule, solver, preview-projection,
and VAE APIs.

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.13 (`>=2.13,<2.14`) 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.

### Install the latest code and checkpoint

Install the Hugging Face CLI, download the moving `main` revision, and install
the package in editable mode:

```bash
python -m pip install "huggingface-hub>=1.15,<2"
hf download data-archetype/canter --revision main --local-dir canter
cd canter
python -m pip install -e ".[webui]"
```

`main` contains the latest Canter code and the current default checkpoint.
Editable installation means that refreshing the same directory updates the
code used by the installed `canter-web` command.
For Python API use without the Gradio interface, install with
`python -m pip install -e .` instead.

The default checkpoint stores most weights in bfloat16. Numerically sensitive
parameters remain in float32.

### Update an existing download

Refresh a directory created with `hf download` by running:

```bash
hf download data-archetype/canter --revision main --local-dir canter
```

If the package was installed without `-e`, reinstall it afterwards with
`python -m pip install --upgrade "./canter[webui]"`. A Git clone on the `main`
branch can instead be updated with `git pull`; an editable installation
immediately uses the updated checkout.

### 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.
During sampling, each output slot receives asynchronous previews from the
bundled one-eighth-scale latent-RGB projection. Busy preview work is skipped,
so the sampler never waits for browser publication. The native one-eighth-size
preview is sent directly and scaled for display by the browser. The UI checkbox
below the size preset disables previews.
The negative prompt field appears when CFG or a contrastive-text PDG mode is
active. Blank negative text uses Canter's learned unconditional conditioning.
Downloaded PNG files contain the prompt, optional negative prompt, effective
per-image settings, Canter code version, and numbered checkpoint 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

The installed package supplies the inference code. Remote loading without a
revision uses the checkpoint pinned by that package:

```python
pipe = CanterPipeline.from_pretrained("data-archetype/canter")
```

Select an immutable older checkpoint while retaining the installed code:

```python
pipe = CanterPipeline.from_pretrained(
    "data-archetype/canter",
    revision="v0001",
)
```

The web interface supports the same separation:

```bash
canter-web \
  --model data-archetype/canter \
  --revision v0001 \
  --in-browser
```

Running `app.py` from a tagged standalone download intentionally uses the code
bundled with that historical snapshot. Use the installed `canter-web` command
as above when testing old weights with current code.

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.