| --- |
| 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. |
|
|