Text-to-Image
Diffusers
Safetensors
Swedish
moss-image
handwriting
historical-documents
archives
htr
synthetic-data
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
Guidance: measured against the sample pages, 3 is too high for the ink; suggest 2
Browse files
README.md
CHANGED
|
@@ -64,8 +64,24 @@ The sample page is an ordinary scan (JPEG or PNG) of a page whose paper, ink and
|
|
| 64 |
Run files for many pages work as for r6b (see its card and diffu's `docs/INFERENCE.md`).
|
| 65 |
|
| 66 |
Drawn in the checks below: 2 MP, 50 steps, guidance 3, shift 5, block 22 skipped in the unconditional pass
|
| 67 |
-
(MOSS-Image's own recipe), no reference guidance. Reference guidance (a third pass toward the sample)
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
## Training
|
| 71 |
|
|
@@ -106,6 +122,8 @@ Letter size and line spacing stay with the layout, as they should: the line boxe
|
|
| 106 |
|
| 107 |
- **The hand follows the sample's pen more than its letter forms.** In most pages the drawn hand moves toward the
|
| 108 |
sample's but keeps much of a generic hand for the period.
|
|
|
|
|
|
|
| 109 |
- **The placement is fixed:** the sample has to be placed above the page (see above). Older diffu code and other
|
| 110 |
MOSS-Image pipelines place it over the page.
|
| 111 |
- **New layouts** (the template test: 18 templates of letters, certificates, forms, lists, tables and registers, each
|
|
|
|
| 64 |
Run files for many pages work as for r6b (see its card and diffu's `docs/INFERENCE.md`).
|
| 65 |
|
| 66 |
Drawn in the checks below: 2 MP, 50 steps, guidance 3, shift 5, block 22 skipped in the unconditional pass
|
| 67 |
+
(MOSS-Image's own recipe), no reference guidance. Reference guidance (a third pass toward the sample) at scales 2
|
| 68 |
+
and 3 gave no visible gain with this model.
|
| 69 |
+
|
| 70 |
+
**Guidance: 3 is too high for the ink.** Measured on 20 Nov 2026 against the sample page each of the six held-out
|
| 71 |
+
pages was drawn with (ink colour as the CIE Lab colour of the strokes' cores, stroke width as the mean horizontal run
|
| 72 |
+
of ink):
|
| 73 |
+
|
| 74 |
+
| Guidance (`--guidance`) | Ink colour distance to the sample (Delta E) | Ink lightness against the sample | Stroke width against the sample |
|
| 75 |
+
|---|---|---|---|
|
| 76 |
+
| 3.0 (the default) | 11.0 | 8.7 darker | 1.23x |
|
| 77 |
+
| 2.5 | 7.8 | 6.5 darker | 1.18x |
|
| 78 |
+
| 2.0 | 5.2 | 4.2 darker | 1.13x |
|
| 79 |
+
| 1.5 | 3.2 | 1.5 darker | 1.06x |
|
| 80 |
+
|
| 81 |
+
At guidance 3 brown ink drifts toward black and the pen is about a fifth too heavy. The words stayed the same at 3.0,
|
| 82 |
+
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`
|
| 83 |
+
is the suggested setting for now. Not yet checked at a lower guidance: pages drawn with another scribe's sample (the
|
| 84 |
+
swap test below was drawn at 3).
|
| 85 |
|
| 86 |
## Training
|
| 87 |
|
|
|
|
| 122 |
|
| 123 |
- **The hand follows the sample's pen more than its letter forms.** In most pages the drawn hand moves toward the
|
| 124 |
sample's but keeps much of a generic hand for the period.
|
| 125 |
+
- **At the default guidance (3) the ink is darker and the pen heavier than the sample's** (see Use): draw at a
|
| 126 |
+
lower guidance.
|
| 127 |
- **The placement is fixed:** the sample has to be placed above the page (see above). Older diffu code and other
|
| 128 |
MOSS-Image pipelines place it over the page.
|
| 129 |
- **New layouts** (the template test: 18 templates of letters, certificates, forms, lists, tables and registers, each
|