Merge branch 'phase/66-scene-prompt'

This commit is contained in:
Leonid Pershin
2026-08-20 23:43:13 +03:00
27 changed files with 1021 additions and 27 deletions
+8 -3
View File
@@ -507,11 +507,16 @@ land under `saves/{id}.portraits/` and survive until the school is deleted.
### `GET /api/schools/{id}/people/{personId}/portrait/prompt`
Returns the positive and negative prompts SwarmUI would receive, without generating an image.
Same `kind` query as GET portrait. For `kind=custom`, optional query `promptExtra` is appended after
Same `kind` query as GET portrait. POST generate uses this same assembly (scene included) before
calling Swarm. For `kind=custom`, optional query `promptExtra` is appended after
the shot type; when omitted, the last saved custom prompt is used if one exists. Configured
embeddings appear as `<embed:name>` (weight ≠ 1: `<embed:name:w>`); LoRA is not written into the
prompt. Unknown school is `404` `unknown-school`; unknown person is `404` `unknown-person`. Invalid
`kind` is `400` `invalid-query`; custom without a usable prompt is `400` `invalid-body`.
prompt. Scene fragments from the person's room, map fill, worn/held defs and outdoor weather follow
clothing, capped by `Simulation.PortraitSceneFragmentLimit` (default 6). Scene LoRA is merged into
Swarm `loras` / `loraweights` (default 2); scene embeddings use the same `<embed:…>` tags (default 2).
Empty `prompt` blocks are silent. Unknown school is `404` `unknown-school`; unknown person is `404`
`unknown-person`. Invalid `kind` is `400` `invalid-query`; custom without a usable prompt is `400`
`invalid-body`.
```json
{