Medieval Marginalia โ€” FLUX.2 [klein] LoRA

A style LoRA for FLUX.2 [klein] that produces medieval manuscript marginalia: the drolleries drawn in the margins of 13thโ€“15th century manuscripts. Parchment tone, iron-gall ink line work, gold leaf, jewel-tone pigments, rabbit knights and jousting snails.

Trained on 30 public-domain manuscript images with ostris/ai-toolkit. The full write-up of how it was built is in the blog post (link below); the dataset is published separately at stephenbtl/marginalia-drolleries-dataset.

Trigger

Start every prompt with MRGN_DRLR. then describe the subject in plain terms (the style comes from the weights, so you don't need to write "medieval" or "manuscript"):

MRGN_DRLR. a rabbit in chainmail jousting a giant snail with a lance, green ground line

Usage

The LoRA is trained against FLUX.2-klein-base-4B but runs on the distilled FLUX.2-klein-4B at 4 steps, which is faster and usually gives better results.

import torch
from diffusers import Flux2KleinPipeline

pipe = Flux2KleinPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein-4B", torch_dtype=torch.bfloat16
).to("cuda")
pipe.load_lora_weights(
    "stephenbtl/marginalia-drolleries-klein-4b-lora",
    weight_name="marginalia_drolleries_klein_4b_v1_000001000.safetensors",
)
image = pipe(
    "MRGN_DRLR. a rabbit in chainmail jousting a giant snail with a lance, green ground line",
    num_inference_steps=4,
    guidance_scale=4.0,
).images[0]
image.save("marginalia.png")

Run it without a GPU

The LoRA is also hosted on the Black Forest Labs platform, so you can generate from it through the API with no local GPU. POST to the klein finetuned endpoint with the trigger in the prompt:

curl -s -X POST 'https://api.bfl.ai/v1/flux-2-klein-4b-finetuned' \
  -H "x-key: $BFL_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "MRGN_DRLR. a rabbit in chainmail jousting a giant snail with a lance, green ground line",
    "finetune_id": "marginalia_drolleries",
    "finetune_strength": 1.0
  }'

Then poll the returned polling_url until status is Ready. See the FLUX.2 LoRA inference docs for the full request and polling pattern.

Training

  • Base model: FLUX.2-klein-base-4B (Apache 2.0)
  • Trainer: ostris/ai-toolkit
  • Dataset: 30 public-domain images (Wikimedia Commons), captioned with the subject only
  • Steps: 2000, checkpoint every 250; the published checkpoint is step 1000 (picked by eye, not by loss โ€” the later checkpoints overfit)
  • GPU: RTX 4090, ~37 minutes

License

Apache 2.0, matching the FLUX.2-klein-4B base model. You can ship what you build with it.

Downloads last month
5
Inference Examples
Examples
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for stephenbtl/marginalia-drolleries-klein-4b-lora

Adapter
(49)
this model