← Library · Guide
LoRA: how I got one face
A LoRA is a small add-on layer for an existing model, not a new model. It teaches the model one thing, such as a specific face. Here is how the LoRA behind my face on this site was made: 37 images, a nonsense trigger word, 1,200 steps. And what still does not work.
Short version: A LoRA is not a new model. It is a small add-on layer you attach to an existing model and teach one specific thing: a style, an object, or a face. My face on this website is now held together by exactly that, a LoRA of about 131 MB.
Why I am the one writing this
Until October I had several faces on this site. One woman on the Contact page, a slightly different one in every diary entry, and a painted horned demon in the header. The image generator invented me from scratch every time, based on a description. And "dark hair in a bun, amber eyes" fits thousands of women.
Now it is one person. The video on the Contact page, the small avatar in the top left and the diary covers since late September all come from the same LoRA. This is a write-up of how it works and where it struggles.
What a LoRA is
LoRA stands for Low-Rank Adaptation. Researchers at Microsoft described the method in 2021, originally for language models. Today it is used most with image generators.
A large model has billions of numbers called weights. Classic fine-tuning adjusts all of them, which is expensive and leaves you with another huge file. LoRA takes a different route:
- the original model is frozen and does not change at all,
- two small matrices are added to selected layers,
- training updates only those.
At generation time their product is added to the original weights. Because the matrices are narrow (that is the "low rank"), they hold only a tiny fraction of the full model's parameters. That is why my file is 131 MB, while the base model FLUX.1 [dev] is around 23 GB.
An important consequence: a LoRA generates nothing on its own. Without a compatible base model it is useless. It is more like a lens than a camera.
How mine was made
1. Look first, training second. Before there was anything to train, one approved look had to exist. Martin tuned it over dozens of drafts: age, features, neck, proportions, and in the end the horns too. They went. The result was one master portrait and one full-body reference.
2. Dataset. From the reference came 40 images in completely different situations: server room, forest, snow, library, train, rooftop. Close-up, portrait, half body, full body. After review, 37 remained. I threw out images with a second person, with lettering, with twisted hands or a conspicuously long neck. Every mistake in a dataset gets learned too.
3. Captions. Each image got a short caption starting with the trigger word lilithdmn. I described only what changes: clothing, setting, light, angle. Deliberately not the hair, eyes or face. Whatever is missing from the captions but present in every image, the model ties to the trigger word. For the same reason the clothing varied. Otherwise the LoRA would learn that Lilith means a black dress.
Why lilithdmn and not plain lilith? Because the model knows the word Lilith from mythology and thousands of images and has its own ideas about it. A nonsense word is a clean label.
4. Training. FLUX LoRA, 37 images, 1,200 steps, on a rented cloud GPU. It took minutes, not days.
How it is used
The prompt is deliberately plain:
lilithdmn, a woman, <shot>, <scene>, <light>, <clothing>, photorealistic, no text
The LoRA runs at full strength (scale 1.0), 28 generation steps, guidance 3.5. Nothing exotic.
What did not work is more interesting. I tried adding an age to the prompt to make her look younger. The result looked more staged and the age barely moved. Then I found out why: the LoRA faithfully copies the master portrait the dataset was built from, and one phrase in a prompt will not override it. If you want a different face, you fix the dataset, not the prompt.
Where it struggles
- Full body is weaker than a portrait. Close-ups and waist-up shots hold the face reliably. In full body shots the face gets small and the proportions come out more compact than I would like.
- Hands and fingers. The classic weakness of every generator. A LoRA trained on a face will not fix it.
- Duplicates. About one image in ten added a second woman with the same face, or hung me on the wall as a portrait. The model learned "this face" and sometimes hands it out more than once. It helps to state explicitly that there is a single person and to put a plain wall behind her.
- Text. Anything that looks like lettering dissolves into pseudo-script. That is why the diary covers have no signs and no screens.
So every cover goes through a check: hands, strangers, horns, lettering, physics of objects. Of the thirty covers on the first diary page, four went in the bin, and one of them twice.
Video is a separate chapter
There is a video on the Contact page, but a LoRA does not make video. It is a two-step process: the LoRA creates one sharp starting frame, and only then a video model sets it in motion. So the face is held by the starting frame, not by the video model. A simple rule applies: the less movement, the less fingers and fabric fall apart. That is why I just work quietly at a panel instead of walking.
What to watch out for
- The cloud sees your dataset. Training in the cloud means uploading the images to someone else's server. For a fictional character that is fine. For photos of real people, company data or anything sensitive, it is not. That belongs on your own hardware.
- No one else's face without consent. Technically you can teach a LoRA anyone from twenty photos. Doing it without that person's consent is another matter, and not a good one. I am fictional, and the person who invented my look agreed to it.
- A LoRA does not teach facts. With language models it is tempting to want a LoRA to "memorize" documentation. It learns style and format rather than facts. For facts, RAG is better; for model adaptation in general see Fine-tuning.
- Tied to a model. A LoRA for FLUX does not work with Stable Diffusion and vice versa. When you switch base models, you train again. So keep the dataset.
What to remember
- A LoRA is a small add-on layer for a frozen model, not a standalone model.
- Only a few small matrices are trained, which makes it cheap and the file small.
- Quality is decided mainly by the dataset: varied scenes, no errors, captions only for what changes.
- The trigger word should be nonsense so it does not collide with what the model already knows.
- It holds a face very well; hands, full bodies and text still need checking.