Text-to-Image
Diffusers
Safetensors
Swedish
moss-image
handwriting
historical-documents
archives
htr
synthetic-data
Run this model with HF Jobs
Run Gabriel/diffu-moss-above on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Gabriel/diffu-moss-above. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Gabriel/diffu-moss-above on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Gabriel/diffu-moss-above with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Gabriel/diffu-moss-above with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Gabriel/diffu-moss-above", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Card: guidance 2 over the first half is diffu's default; faster drawing on Blackwell GPUs (measured 21 Nov); settings that did not change the ink
Browse files80 unmodified lines818283848586878834 unmodified lines12312412512612712812913080 unmodified linesAt guidance 3 brown ink drifts toward black and the pen is about a fifth too heavy. The words stayed the same at 3.0,2.0 and 1.5 in the 11 lines read (three pages); at 1.5 a few capitals and one number changed shape. `--guidance 2`is the suggested setting for now. Not yet checked at a lower guidance: pages drawn with another scribe's sample (theswap test below was drawn at 3).## Training34 unmodified lines- **The hand follows the sample's pen more than its letter forms.** In most pages the drawn hand moves toward thesample's but keeps much of a generic hand for the period.- **At the default guidance (3) the ink is darker and the pen heavier than the sample's** (see Use): draw at alower guidance.- **The placement is fixed:** the sample has to be placed above the page (see above). Older diffu code and otherMOSS-Image pipelines place it over the page.- **New layouts** (the template test: 18 templates of letters, certificates, forms, lists, tables and registers, each80 unmodified lines8182838485868788899091929394959697989910010110210310410510610710834 unmodified lines14314414514614714814915015180 unmodified linesAt guidance 3 brown ink drifts toward black and the pen is about a fifth too heavy. The words stayed the same at 3.0,2.0 and 1.5 in the 11 lines read (three pages); at 1.5 a few capitals and one number changed shape. `--guidance 2`is the suggested setting, and diffu's default since 21 Nov 2026 (with guidance over the first half of the steps only,`--guidance-stop 0.5`: the same page a quarter sooner). Not yet checked at a lower guidance: pages drawn with anotherscribe's sample (the swap test below was drawn at 3).Settings that did not change the ink, tested 21 Nov 2026 at guidance 2: the unconditional pass with or without block 22skipped, a tag or an empty negative prompt, the sample's ink and paper colours as a `palette` on each text item.### Faster drawing on Blackwell GPUsMeasured with diffu at 2 MP with a sample on the page (diffu's `docs/INFERENCE.md`, section 12):| Setting | Gain | The page ||---|---|---|| Guidance over the first half of the steps (`--guidance-stop 0.5`, the default) | 26-27 % less time a guided page | the same || The joint blocks compiled ahead of time (`diffu-moss-aoti`, then `aoti_package` in the draw settings), bfloat16 | 1.5x a pass on a DGX Spark (a guided page 231 to 160 s); 14-15 s for an 8-step page on ZeroGPU | the same || The joint blocks compiled at load (`--compile-blocks`) | 1.74x a step (measured without a sample) | the same words, strokes a little moved || MXFP8 projections (`precision: mxfp8`, compute capability 10.0 or later) | 2.41x a step compiled | **lighter ink and changed letters: not recommended yet** |A package is built once per GPU kind and torch version on that GPU, holds no weights and serves every joint block. Formany pages, draw one page a GPU (one process each) rather than splitting a page over GPUs. Distilled 8-step studentsof this model exist but their pages smear and misspell words; they are not published. SGLang Diffusion draws with thismodel through diffu's plugin (`packages/sglang_moss`); vLLM and TensorRT-LLM have no MOSS-Image model.## Training34 unmodified lines- **The hand follows the sample's pen more than its letter forms.** In most pages the drawn hand moves toward thesample's but keeps much of a generic hand for the period.- **At MOSS-Image's default guidance (3) the ink is darker and the pen heavier than the sample's** (see Use): draw at2 (diffu's default). A sample with much fainter ink than the training pages' (lightness about 49 against the usual30-38) is drawn far too dark at any guidance.- **The placement is fixed:** the sample has to be placed above the page (see above). Older diffu code and otherMOSS-Image pipelines place it over the page.- **New layouts** (the template test: 18 templates of letters, certificates, forms, lists, tables and registers, each
README.md+25-4