docs: explain the format, both payloads, and the training run
Browse files
README.md
CHANGED
|
@@ -1,3 +1,121 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- inline-studio
|
| 5 |
+
- character
|
| 6 |
+
- lora
|
| 7 |
+
- flux2
|
| 8 |
+
- krea2
|
| 9 |
---
|
| 10 |
+
|
| 11 |
+
# Unified Face Models
|
| 12 |
+
|
| 13 |
+
One character file that works on more than one image model. `emmy-s5.char` carries FLUX.2
|
| 14 |
+
reference images and a trained Krea 2 adapter in the same 107 MB container, so the same face
|
| 15 |
+
renders on either model without keeping two sets of files in sync.
|
| 16 |
+
|
| 17 |
+
Built and trained on the canvas in [Inline Studio](https://github.com/inlineresearch/Inline-Studio).
|
| 18 |
+
|
| 19 |
+
## Why one file holds two things
|
| 20 |
+
|
| 21 |
+
FLUX.2 klein and Krea 2 accept a character in completely different ways, so a single artifact
|
| 22 |
+
cannot work for both.
|
| 23 |
+
|
| 24 |
+
FLUX.2 klein has a reference channel. Reference images become tokens the model attends to at every
|
| 25 |
+
denoising step, which is why a prompt can address them by position. Feeding it resized copies of
|
| 26 |
+
the originals is enough, and no training is involved.
|
| 27 |
+
|
| 28 |
+
Krea 2 has no reference channel. Its image input is ordinary img2img: the picture is encoded once
|
| 29 |
+
into the starting latent and then denoised away, so there is nothing left for the model to hold on
|
| 30 |
+
to. The only way to give Krea 2 a persistent identity is a trained LoRA.
|
| 31 |
+
|
| 32 |
+
A `.char` stores identity once and compiles a payload per model family:
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
+
emmy-s5.char
|
| 36 |
+
manifest.json payload index, fingerprints, training record
|
| 37 |
+
refs/000..004.png the 5 reference images, immutable
|
| 38 |
+
derived/face_000..004.png YuNet face crops at 512px
|
| 39 |
+
text/description.md the locked description, which is also the trigger
|
| 40 |
+
scoring/centroid_sface.json 128-d SFace identity centroid
|
| 41 |
+
scoring/centroid_dinov2-base.json 768-d DINOv2 subject centroid
|
| 42 |
+
scoring/embeds_*.json per-reference embeddings
|
| 43 |
+
payloads/flux2-klein/ref_000..004.png references resized onto FLUX.2's policy
|
| 44 |
+
payloads/krea2-lora/adapter.safetensors the trained Krea 2 LoRA, 183 MB
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
The references and the description are the truth. Everything under `payloads/` and `scoring/` is
|
| 48 |
+
cache and can be rebuilt from `refs/`. Adding a third model means adding a payload, not rebuilding
|
| 49 |
+
the character.
|
| 50 |
+
|
| 51 |
+
## What is in this one
|
| 52 |
+
|
| 53 |
+
| | |
|
| 54 |
+
| --- | --- |
|
| 55 |
+
| References | 5 images, three at 2048px and two at 640px |
|
| 56 |
+
| Trigger | `emmy4k woman with, natural unretouched skin, black hairs, fair skin` |
|
| 57 |
+
| FLUX.2 payload | `flux2-klein`, 5 compiled references, max 1 MP, dimensions rounded to a multiple of 16 |
|
| 58 |
+
| Krea 2 payload | `krea2-lora`, adapter fused at strength 1.0 |
|
| 59 |
+
|
| 60 |
+
### Krea 2 training
|
| 61 |
+
|
| 62 |
+
| | |
|
| 63 |
+
| --- | --- |
|
| 64 |
+
| Base | `krea2_raw_bf16.safetensors` (Krea 2 RAW) |
|
| 65 |
+
| Steps | 500 |
|
| 66 |
+
| Rank / alpha | 16 / 16 |
|
| 67 |
+
| Learning rate | 1e-4, constant, Adam8bit |
|
| 68 |
+
| Resolution | 512 |
|
| 69 |
+
| Batch size | 1 |
|
| 70 |
+
| Scope | full (attention + feed-forward) |
|
| 71 |
+
| Caption dropout | 0.05 |
|
| 72 |
+
|
| 73 |
+
Trained on RAW rather than Turbo on purpose. Turbo is step-distilled and trains badly; the adapter
|
| 74 |
+
still loads on Turbo afterwards, which is faster and usually better. Every training image used the
|
| 75 |
+
description above as its caption, so `emmy4k` is what the adapter binds to.
|
| 76 |
+
|
| 77 |
+
The 500-step checkpoint beat the 800-step one on the same references. With five images that is 100
|
| 78 |
+
passes each, and past roughly that point the adapter starts returning the training frames instead
|
| 79 |
+
of the person in them.
|
| 80 |
+
|
| 81 |
+
## Using it
|
| 82 |
+
|
| 83 |
+
Drop the file in `models/characters/` and add a **Load Character** node, then wire it into the
|
| 84 |
+
`character` input of a FLUX.2 or Krea 2 node.
|
| 85 |
+
|
| 86 |
+
Inline Studio picks the payload for whichever model you wired it to. FLUX.2 gets the five
|
| 87 |
+
references and a prompt line naming their positions. Krea 2 gets the adapter. Either way the
|
| 88 |
+
description is prepended to your prompt, so type only what changes:
|
| 89 |
+
|
| 90 |
+
```
|
| 91 |
+
walking on a forest trail, half body shot
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Not the description again. It is already there, and repeating it pushes the adapter harder toward
|
| 95 |
+
the frames it trained on.
|
| 96 |
+
|
| 97 |
+
For Krea 2, generate with **Krea 2 Turbo** at 8 steps and guidance 0. The adapter trained against
|
| 98 |
+
RAW and loads onto Turbo as intended.
|
| 99 |
+
|
| 100 |
+
## Building your own
|
| 101 |
+
|
| 102 |
+
The full graph that produced this file, from five photos to a `.char` with both payloads, is
|
| 103 |
+
published here:
|
| 104 |
+
|
| 105 |
+
[FLUX.2 + Krea 2: multi-model portable consistent characters](https://inlinestudio.art/workflows/flux-2-krea-2-multi-model-portable-consistent-characters-training-only)
|
| 106 |
+
|
| 107 |
+
Import it into Inline Studio, swap the reference images, and run the graph. It encodes the
|
| 108 |
+
character, compiles the FLUX.2 references, builds a training dataset from the same references,
|
| 109 |
+
trains the Krea 2 LoRA, attaches it, and writes the `.char`.
|
| 110 |
+
|
| 111 |
+
## Links
|
| 112 |
+
|
| 113 |
+
- [Inline Studio](https://github.com/inlineresearch/Inline-Studio): the node canvas and UI
|
| 114 |
+
- [Inline Core](https://github.com/inlineresearch/Inline-Core): the generation and training engine
|
| 115 |
+
- [inlinestudio.art](https://inlinestudio.art): downloads and guides
|
| 116 |
+
- [Inline Registry](https://github.com/inlineresearch/Inline-Registry): the model and extension index
|
| 117 |
+
|
| 118 |
+
## License
|
| 119 |
+
|
| 120 |
+
MIT. The reference images are the character's own; check that you have the rights to any faces you
|
| 121 |
+
train on before publishing a `.char`.
|