Compare commits

...
4 Commits
Author SHA1 Message Date
EnragedAntelope 15551de6bd 2.4.0: archetype scene coherence, creatures as one hybrid, gallery render fixes (#24)
- Figure Skater on the ice with standing poses; pose locks for Hockey Goalie, Roller Derby, Carhop, Scuba Diver and Samurai
- Archetypes moved to fitting locations; new venues: wrestling ring, tennis court, pit lane, racecourse paddock
- No leaning or perching in open landscapes; no blank-backdrop composition indoors
- Indie Sleaze men's costumes split from the women's; a man keeps a locked eyeliner; 1980s New Wave women draw 80s makeup
- A prop in each hand drops one-handed poses
- Yoda, Ahsoka, Piccolo, Bane and the Star Wars guards no longer draw a random human under the costume
- Anthropomorphic creatures render as one clothed hybrid: Monsters/Aliens lead "humanoid X", fitness_level dropped in Anthro form
- Optional per-creature anthro block (slot rewrites plus lead noun) for nautilus, gaseous alien, cicada, stegosaurus
- Optional Krea2T Enhancer in the gallery renderer (enhancer_text_scale)
- Bayonetta rebuilt to the Bayonetta 1 look; Baraka arm blades; Praetorian Guard gloves; TIE Pilot and Imperial Royal Guard helmets
- Gallery re-rendered for flagged entries, the rest rehashed; marginals re-baselined
- Docs: architecture, history, creature notes, AGENTS.md, regenerated reference docs and roster index
2026-11-01 08:46:04 -05:00
EnragedAntelope 29dcb52f68 2.3.0: offline picker previews, Outfit Sheet, Age Progression, Aztec Noble, back views (#23)
- Picker previews served through a server-side gallery cache (nodes/gallery_cache.py), working under --offline, with a Clear cached previews button
- Outfit Sheet node: one character in several outfit styles, outfits seeded per character, outfit_seed input to re-roll
- Age Progression node: one character at several ages, seeded per character
- Shared replay_base / release_fields / character_seed helpers in the Turnaround module
- Aztec Noble archetype, gallery tile at Full preset (_GALLERY_LOCK_LEVEL); Ancient Roman Patrician gallery tile pinned Male
- costume_back for caped and back-emblem heroes
- Example workflows for the two new nodes in example_workflows/
- render_gallery.py --publish-pending honours --dry-run
- Docs link test accepts folder links
- Docs, reference docs, roster index, frontend fixture and release stamps refreshed
2026-10-30 09:37:59 -04:00
EnragedAntelope a0d5c84d57 2.2.0: Cyberpunk roster, Volcana, court dress, palace location, picker franchise filter (#22)
- Cyberpunk cosplayers rebuilt to canon (David Martinez, Panam, Rebecca) and added (Maine, Kiwi, Talia Yang, Adam Smasher, Song So Mi with a weighted netrunner alternate)
- Volcana added
- Rococo Courtier, Medieval Monarch, Ottoman Court and Heian Court archetypes; Female variant for Ancient Roman Patrician
- Tattoo and piercing locks on eleven period archetypes; Essentials keeps a tattoos lock
- Costume-named earring or necklace suppresses the random one
- New location: gilded palace throne room
- Four punk and pinup outfit-corpus phrases
- Roster picker franchise filter, with test
- Render-review fixes: Darth Vader gloves, Reverse-Flash mask, The Maxx and Tusken Raider face cover, Tatsumaki aura, horseshoe crab anatomy, leprechaun palette
- Gallery pins the leprechaun tile to Male; 2.2.0 renders published
- Marginals baseline, random-pool snapshot, release stamps, reference docs, JS data and frontend fixture regenerated
- Declined Pilar and the extended Cyberpunk cast in suggested-additions
- README and Registry description mention the gender and franchise picker filters
- AGENTS.md and history.md updated for 2.2.0
2026-10-28 15:52:46 -04:00
EnragedAntelope 3e98078ac1 2.1.0: droids as droids, subject lead noun, Orion, catalogue survey (#21)
- R2-D2, BB-8 and Gonk Droid render as the droid (feral route, cosplay-only creature_class "Machines")
- New machine and enchanted-object entries: Claptrap, WALL-E, Dalek, Johnny 5, Codsworth, Mrs. Potts, Cogsworth
- Optional cosplay `subject` lead noun; subjects for Tellarite, aliens, monsters and mascots
- Full-head mask rewrites for Red Skull, Moon Knight, Ponda Baba, Porco Rosso; Pac-Man moved to the feral route
- Optional `costume_weights`; Orion entry with TOS dancer and cadet looks weighted 2:1
- sd-character-finder survey batches (Touhou, Snoopy, Doraemon, Domo-kun, RWBY, Nanoha, BlazBlue, Tiger & Bunny and others)
- Blue Beetle (Ted Kord) recoloured to canon; two-colour eye overrides worded in full
- Roster picker Female/Male filter
- Validator checks and tests for subject and costume_weights; random-pick snapshot refreshed
- Release stamps, reference docs, JS data and fixtures regenerated; gallery tiles rendered and published
- Docs: architecture, history 2.1.0, suggested-additions, AGENTS.md
2026-10-24 12:14:06 -04:00
47 changed files with 12937 additions and 3508 deletions
+9 -8
View File
@@ -8,20 +8,20 @@ investigation notes, 1.5.0+ — the reasoning for every item in the release list
## Current state
_Last verified: 2026-10-20 (2.0.0)_
_Last verified: 2026-11-01_
- **Status:** in active development; main is v2.0.0 (`pyproject.toml`), the seed-epoch release: every seed resolves differently from 1.x, by design. Published to the Comfy Registry via `.github/workflows/publish_action.yml`, which fires on a `pyproject.toml` version change on `main` - bump the version on every functional commit or the release never ships. CI (`.github/workflows/ci.yml`) is deliberately dependency-free, has a Windows leg, and `publish-node` needs it (1.8.0).
- **Works:** the constraint engine resolving dropdowns into coherent prose plus structured JSON, seed-reproducible; the four preset layer nodes (Archetype, Creature, Modifier, Cosplayer); searchable dropdown widgets, live preview, the `franchise_filter`, the `random_pool` scope-composing filter, and the save/load vault in `js/` (an atomic overwrite, a disk-change-aware cache fingerprint, and Windows-reserved-name handling as of 1.5.5); a searchable **in-node roster picker** (`js/identity_forge_picker.js`) on the Cosplayer/Archetype/Creature nodes — trait facets, cross-tab search, opt-in gallery thumbnails, backed by a generated `js/identity_forge_roster.json` search index; Stylebook interop, the composition axis, and the **Turnaround** reference-set node (which emits every camera view of one resolved character as a list, so one queue renders the set) and its face-side sibling the **Expression Sheet** (1.10.0: one view per curated expression/mood/smile triple); a free-text `held_item` on the Modifier node; a jsdom frontend suite alongside the Python one; generated reference docs and JS data, and a committed field-marginals baseline (`scripts/sweep_marginals.py`, 1.5.5 — catches a value drawing far more or less often than intended), plus a reachability gate (`--unreachable`, 1.8.0: every pool value some gender can draw, or a reasoned exception in `tests/fixtures/unreachable_by_design.json`), all with `--check` modes wired into the gate. A cosplay entry may render as a **person in a costume**, as a **mascot suit** (`covers_face` + `covers_body` + `mask`), or — since 0.95.0 — as the **beast itself** (`body_plan: "feral"`, which emits the Creature node's Species & Anatomy payload instead of a costume); see architecture.md → "Animal characters split four ways". `scripts/render_gallery.py` renders a roster entry's gallery image by driving a running ComfyUI over HTTP and publishes it to `gh-pages`, and `gallery/render_manifest.json` + `--check` fail CI when an entry's text changes without a re-render (architecture.md → "The gallery render pipeline"). Since 0.97.0 every roster entry also carries a **release stamp** (`data/versions.py`, written by `scripts/stamp_versions.py`, gated in CI), which is what lets the three sample gallery pages offer **A–Z / Newest first** and a **New in `<version>`** filter. Since 2.0.0: a **`gaze`** field drawn last with `pose` (both with live constraint rules; architecture.md -> "pose and gaze draw last"), opt-in **`costume_back`** for Turnaround back views, **per-garment `{slot}` variation** in the outfit corpus on its own seed stream, and a gallery hash over **resolved prose** so an engine change marks images stale.
- **In progress:** roster and coherence curation is the ongoing work, not a milestone - each release adds characters/creatures/archetypes and closes coherence bugs found by rendering them. `docs/suggested-additions.md` is the live backlog (under consideration / decided against / still to consider). Next: more `costume_back` entries (start with caped or back-emblem heroes) and more slotted corpus phrases; both are seed-safe additions now (a slot draws from its own stream; a back text touches only back views).
- **Status:** in active development; main is v2.4.0 (`pyproject.toml`); 2.0.0 was the seed epoch (every seed resolves differently from 1.x, by design). Published to the Comfy Registry via `.github/workflows/publish_action.yml`, which fires on a `pyproject.toml` version change on `main` - bump the version on every functional commit or the release never ships. CI (`.github/workflows/ci.yml`) is deliberately dependency-free, has a Windows leg, and `publish-node` needs it (1.8.0).
- **Works:** the constraint engine resolving dropdowns into coherent prose plus structured JSON, seed-reproducible; the four preset layer nodes (Archetype, Creature, Modifier, Cosplayer); searchable dropdown widgets, live preview, the `franchise_filter`, the `random_pool` scope-composing filter, and the save/load vault in `js/` (an atomic overwrite, a disk-change-aware cache fingerprint, and Windows-reserved-name handling as of 1.5.5); a searchable **in-node roster picker** (`js/identity_forge_picker.js`) on the Cosplayer/Archetype/Creature nodes — trait facets, gender and franchise filters, cross-tab search, opt-in gallery thumbnails, backed by a generated `js/identity_forge_roster.json` search index; Stylebook interop, the composition axis, and the **Turnaround** reference-set node (which emits every camera view of one resolved character as a list, so one queue renders the set) and its face-side sibling the **Expression Sheet** (1.10.0: one view per curated expression/mood/smile triple); a free-text `held_item` on the Modifier node; a jsdom frontend suite alongside the Python one; generated reference docs and JS data, and a committed field-marginals baseline (`scripts/sweep_marginals.py`, 1.5.5 — catches a value drawing far more or less often than intended), plus a reachability gate (`--unreachable`, 1.8.0: every pool value some gender can draw, or a reasoned exception in `tests/fixtures/unreachable_by_design.json`), all with `--check` modes wired into the gate. A cosplay entry may render as a **person in a costume**, as a **mascot suit** (`covers_face` + `covers_body` + `mask`), or — since 0.95.0 — as the **beast itself** (`body_plan: "feral"`, which emits the Creature node's Species & Anatomy payload instead of a costume); see architecture.md → "Animal characters split four ways". `scripts/render_gallery.py` renders a roster entry's gallery image by driving a running ComfyUI over HTTP and publishes it to `gh-pages`, and `gallery/render_manifest.json` + `--check` fail CI when an entry's text changes without a re-render (architecture.md → "The gallery render pipeline"). Since 0.97.0 every roster entry also carries a **release stamp** (`data/versions.py`, written by `scripts/stamp_versions.py`, gated in CI), which is what lets the three sample gallery pages offer **A–Z / Newest first** and a **New in `<version>`** filter. Since 2.0.0: a **`gaze`** field drawn last with `pose` (both with live constraint rules; architecture.md -> "pose and gaze draw last"), opt-in **`costume_back`** for Turnaround back views, **per-garment `{slot}` variation** in the outfit corpus on its own seed stream, and a gallery hash over **resolved prose** so an engine change marks images stale. Since 2.3.0: the **Outfit Sheet** and **Age Progression** sheet nodes (they release the fields a pin refuses via `lock_clash` rather than override them; architecture.md -> "Sheets that change the person"), and picker previews served through a **server-side gallery cache** (`nodes/gallery_cache.py`) so they work under ComfyUI `--offline`.
- **In progress:** roster and coherence curation is the ongoing work, not a milestone - each release adds characters/creatures/archetypes and closes coherence bugs found by rendering them. `docs/suggested-additions.md` is the live backlog (under consideration / decided against / still to consider). Next: more `costume_back` entries (2.3.0 covered the first caped and back-emblem heroes; continue with the rest of the capes) and more slotted corpus phrases; both are seed-safe additions now (a slot draws from its own stream; a back text touches only back views).
- **Recent releases** — one line each. **This list is a pointer, not a changelog:** the reasoning for every item is in `docs/history.md` (the sections are named there per release) and the full messages are in `git log`. Keep roughly the last eight and let older ones drop off; do not let an entry grow into a paragraph.
- **2.4.0** - Figure Skater on the ice with standing poses (Hockey Goalie, Roller Derby, Carhop, Scuba Diver and Samurai pose locks too), several archetypes moved to a location that fits them, four new venues (wrestling ring, tennis court, pit lane, racecourse paddock), no leaning or perching in open landscapes, no blank-backdrop composition indoors, Indie Sleaze men's costumes split from the women's, a man keeps a locked eyeliner, 1980s New Wave women draw 80s makeup, a prop in each hand drops one-handed poses, and Yoda, Ahsoka, Piccolo, Bane and the Star Wars guards no longer draw a random human under the costume. Anthropomorphic creatures render as one clothed hybrid (Monsters/Aliens lead "humanoid X", an optional per-creature `anthro` text block, and the optional Krea2T Enhancer in the gallery renderer). Random characters move (marginals re-baselined). See docs/history.md -> "2.4.0".
- **2.3.0** - Picker previews through a server-side cache (they now show under `--offline`, with a Clear cached previews button), Outfit Sheet and Age Progression nodes (shared `replay_base` / `release_fields` helpers in the Turnaround module), an Aztec Noble archetype, and `costume_back` for caped and back-emblem heroes. Random characters unchanged (the Archetype node's Random pick moves, as with any archetype addition). See docs/history.md -> "2.3.0".
- **2.2.0** - Cyberpunk roster (David Martinez, Panam and Rebecca rebuilt to canon; new Maine, Kiwi, Talia Yang, Adam Smasher, Song So Mi with a weighted netrunner alternate), Volcana, four period court archetypes (Rococo Courtier, Medieval Monarch, Ottoman Court, Heian Court) and a Female variant for Ancient Roman Patrician, a `tattoos` lock kept in Essentials, a costume-named earring or necklace suppressing the random one, a `gilded palace throne room` location, tattoo and piercing locks on eleven period archetypes, a franchise filter in the roster picker, and four punk/pinup outfit-corpus phrases (the location and the outfits move random seeds). See docs/history.md -> "2.2.0".
- **2.1.0** - R2-D2, BB-8 and Gonk Droid render as the droid (non-humanoid machines now take `body_plan: "feral"` with a cosplay-only `creature_class: "Machines"`), new machine and object entries (Claptrap, WALL-E, Dalek, Johnny 5, Codsworth, Mrs. Potts, Cogsworth), the sd-character-finder survey batch (first Touhou entries, Snoopy, Doraemon, Hello Kitty, Meta Knight and others), Blue Beetle (Ted Kord) recoloured to canon, a Female/Male filter in the roster picker, an optional cosplay `subject` lead noun (Tellarite, aliens, and mascots that drew a person with a plush now render as the character; single-eye cyclopes remain a model limit), Orion with a weighted alternate look (`costume_weights`), and the survey's second tier (RWBY, Nanoha, BlazBlue, Tiger & Bunny and others). Random characters unchanged (the droids move between the Masked, People-only and Beast scopes). See docs/history.md -> "2.1.0".
- **2.0.0** - Seed epoch: a `gaze` field (the old `looking` poses) drawn last with a deferred `pose` (`_repair_pose` retired), women's hair-length and 75/80 age weights, a portrait rig gated out of everyday interiors (`studio_shape` / `studio_mood` split), per-garment `{slot}` variation, opt-in `costume_back` for Turnaround back views, no "Name (Name)" label, an article for noun expressions, and a prose-based gallery hash (existing tiles accepted with `--rehash`, no full re-render). See docs/history.md -> "2.0.0".
- **1.11.0** - Roster release: new cosplayers (incl. Birdie, Vecna on the mascot route), retro archetypes (Carhop at a new drive-in location, Zoot Suit men's only), four creatures, a `_GALLERY_SHOT` framing pin, Lola Bunny's paws, Tellarite's canon text (snout still unrendered). Random characters move only through the new location (about 5% of seeds, those drawing an urban outdoor place). Corinthian, Feyd-Rautha, barreleye, vampire squid and the pachuca variant declined on the render bar. See docs/history.md -> "1.11.0".
- **1.10.0** - Expression Sheet node, free-text `held_item` on the Modifier, legwear dropped from prose in leg-cropping shots, "a coat of fur" no longer read as a pocketed garment, an overload drift test, and a gallery gate that fails on rendered-but-unpublished images (`--publish-pending`). Random characters unchanged; Bartok (now feral), Lola Bunny and Tasmanian Devil repaired and re-rendered (Tellarite deferred to 1.11.0). See docs/history.md -> "1.10.0".
- **1.9.0** - Sandman and independent-comics curation, Savage Dragon likeness repair, a Morris Dancer archetype, deployment-only gallery manifests, and accurate engine/preset typing. See docs/history.md -> "1.9.0".
- **1.8.0** — Picker trait facets read structured `traits` (Poison Ivy is no longer "Tiny"); ethnicity and skin tone lock only in Full character / Full preset; a seventh `subject_text` output (person and outfit, no scene); colour and pattern modifiers reach a generated outfit; widgets_values saved in schema order for headless tools; `--unreachable` gate; publish depends on CI with a Windows leg; new cosplayers (incl. The Invisibles), three archetypes and a stegosaurus; the duplicate Julia Carpenter entry folded into one. See docs/history.md → "1.8.0".
- **1.7.0** — Engine and UX fixes from the 1.6.0 review: "Roll + lock all" locks one engine roll (a new read-only `POST /identity_forge/roll` route) instead of uniform per-dropdown picks; a framing that crops the feet no longer names the shoes in the prose (the JSON keeps them); hair styles and noun lengths are voiced as prose, not a tag list; a footwear or legwear modifier now reaches a generated outfit; the Modifier help example decorates single fields; `generate_character` is keyword-only from `widget_locked`. See docs/history.md → "1.7.0".
- **1.6.0** — Content only, mined from third-party wildcard packs: weather as two `lighting` families (rain/drizzle/fog, falling snow) gated outdoors and by season; a `troubled` expression family for the heavy mood; social hand gestures; mohawk, faux hawk and three braid styles; new hair colours and highlights (skunk stripe weighted rare); new outfit-corpus entries weighted to the thin menswear/unisex cells, pyjamas under `loungewear`; new archetypes (Wedding Groom, Lehenga & Sherwani, Yukata, Hanfu, Kebaya, Metalhead and others) and alternate bridal gowns; three cultural archetypes no longer pin a pale skin tone in Full preset. Engine/UX findings are queued for 1.7.0. See docs/history.md → "1.6.0".
- **1.5.5** — Audit pass: `vitiligo patches`, three golden `eye_color` values and two tattoo placements were drawing far more than their peers (flat weight against a visually louder or near-always-survivable value) — weighted down; a buzz cut no longer draws "wet look" (the `loose_natural` family split so the exclusion drops a whole unit instead of a partial cull). A committed marginals sweep (`scripts/sweep_marginals.py --check`) joined the CI gate so a future weight/pool change that moves a share unintentionally is caught automatically. Vault hardening: an atomic overwrite (the old save survives a write failure), a disk-change-aware cache fingerprint on Vault Load, Windows-reserved-name handling, and several crash-on-malformed-entry fixes. `docs/history.md` split out of `docs/architecture.md` (the 1.5.0–1.5.4 sections, about half that file). See docs/history.md → "1.5.5".
- **Known gaps / next steps:** two deliberate, open items — not to be re-litigated without a fresh case (the old pockets-allowlist gap was measured and closed in 1.10.0): (1) the Turnaround node's back view still draws a costume's front-facing detail (e.g. a chest emblem) on the back for any entry without a `costume_back` (opt-in since 2.0.0, so far only a handful of flagship heroes); never parse the front text for back clauses (the regex-over-prose trap), add `costume_back` to the entry instead. (2) Costume text that asserts a body trait against an unpinned random field (e.g. "on a hulking frame" beside a random, unlocked `build`) — the `signature`/`physique` split that causes it is deliberate; measure again from scratch before touching it, a naive regex sweep has reported a wrong count here before. `docs/suggested-additions.md` is the live backlog for roster/field-option candidates.
- **Deep docs:** `docs/architecture.md` (deep reference — read before engine or data changes), `docs/history.md` (per-release investigation notes, 1.5.0+), `docs/usage.md`, `docs/cosplayer-notes.md`, `docs/creature-notes.md`, `docs/suggested-additions.md` (backlog), `docs/reference/*.md` (generated).
@@ -44,6 +44,7 @@ _Last verified: 2026-10-20 (2.0.0)_
| `scripts/` | Reference doc generator, JS data sync generator, frontend schema fixture generator, release stamper, gallery renderer + hash gate |
| `docs/` | Usage, architecture (deep reference), cosplayer/creature notes |
| `gallery/` | Sample render manifests and build scripts (images on `gh-pages` only) |
| `example_workflows/` | Ready-made workflows; ComfyUI lists them in its template browser. Build them in the real frontend (an isolated instance), never by hand: `widgets_values` order is positional |
## Build / test / run
+10 -1
View File
@@ -27,7 +27,7 @@ The Cosplayer node is where Identity Forge really shines. Most character wildcar
Ask a plain wildcard for Chun-Li and your prompt says `Chun-Li`. Ask this Cosplayer node and you get: *the blue qipao with gold trim, brown tights, white cross-laced boots, and spiked bracelets.* The look renders even on checkpoints that have never heard of the character.
**Find one fast:** open the in-node picker to browse and search the whole roster without leaving the node — trait facets (Giant, Masked, Mascot/full-suit, Beast) and optional thumbnail previews. Franchise is searchable too, just not a dedicated facet chip. The picker remembers your search, tab and facet while the workflow is open, so you can pick, close and come back to the same filtered view; reloading starts fresh.
**Find one fast:** open the in-node picker to browse and search the whole roster without leaving the node — trait facets (Giant, Masked, Mascot/full-suit, Beast), Female/Male and franchise filters, and optional thumbnail previews (fetched once by your ComfyUI server and cached on disk, so they still show when ComfyUI runs with `--offline`). The picker remembers your search, tab and facet while the workflow is open, so you can pick, close and come back to the same filtered view; reloading starts fresh.
**Characters from every major franchise:** Marvel, DC, Star Wars, anime, video games, fantasy, sci-fi, horror. Each one with multiple costume variants where applicable (Harley Quinn's three iconic looks, Catwoman's different suits, etc.). Characters rotate between variants by seed, so the same name yields a different signature costume each roll.
@@ -46,6 +46,13 @@ The **Expression Sheet** node is its face-side sibling: the same resolved charac
expression (neutral, smile, laughing, surprised, serious, sad, and more), with only the expression,
mood and smile changing. See [docs/usage.md](docs/usage.md#expression-sheets).
Two more sheets work the same way. The **Outfit Sheet** keeps the person and redresses them once per
outfit style (casual, business formal, evening formal and so on) on a plain studio backdrop, and the
**Age Progression** node shows the same person at several ages, greying natural hair as they age.
See [docs/usage.md](docs/usage.md#outfit-sheets) and [docs/usage.md](docs/usage.md#age-progression).
Ready-made workflows for both are in [example_workflows/](example_workflows/) and in ComfyUI's
template browser under Identity Forge.
### Additional layers
- **Archetype:** Themed looks (knight, sorceress, astronaut, surgeon, 1950s homemaker…) that set the *look* while the person randomizes.
@@ -139,6 +146,8 @@ randomized identities, so your own results will vary:
| **Vault Save / Load** | Save a generated character (with a thumbnail) to a local vault; recall it later as a chainable preset, with a Manage Vault gallery. |
| **Turnaround** | A reference-sheet builder: wire Identity Forge's `prompt_json` in and it emits front / three-quarter / profile / back as a **list**, so one queue renders the whole set of the same person. It only moves the camera - the character and the scene stay configured on Identity Forge. |
| **Expression Sheet** | The same idea for the face: wire `prompt_json` in and it emits one prompt per expression (Basic 6, Full 10 or Smiles 3) as a **list**. Only expression, mood and smile change (plus the gaze, if you pick one to hold). |
| **Outfit Sheet** | Wire `prompt_json` in and it emits one prompt per outfit style (Range 6, Everyday 4, Work to evening 4 or Every style) as a **list**: the same person redressed, on a studio backdrop or in their own scene; `outfit_seed` re-rolls every outfit for the same person. Makeup, jewellery and hair styling follow the outfit; face and body stay. A cosplay or full-suit character gives a single view. |
| **Age Progression** | Wire `prompt_json` in and it emits the same person at several ages (Life stages 4, Decades 6 or Young and old 2) as a **list**. Natural hair greys with age; dyed, vivid and costume hair stay as they are. A masked character gives a single view. |
---
+70 -2
View File
@@ -1,6 +1,6 @@
"""comfyui-identity-forge — V3 custom node pack entrypoint.
Exposes nine nodes:
Exposes eleven nodes:
* ``IdentityForge`` — a multi-field character description randomizer with a
constraint engine and dual prose/JSON output.
@@ -15,6 +15,10 @@ Exposes nine nodes:
view of it as a list, so one queue renders a whole reference set.
* ``IdentityForgeExpressionSheet`` - the same idea for the face: one resolved
character, several expressions, as a list.
* ``IdentityForgeOutfitSheet`` - the same idea for the clothes: one resolved
character, several outfit styles, as a list.
* ``IdentityForgeAgeProgression`` - one resolved character at several ages, as a
list.
* ``IdentityForgeVaultSave`` — save a generated character to a local vault.
* ``IdentityForgeVaultLoad`` — recall a saved character as a chainable preset.
@@ -43,6 +47,8 @@ try:
from .nodes.identity_forge_modifier import IdentityForgeModifier
from .nodes.identity_forge_turnaround import IdentityForgeTurnaround
from .nodes.identity_forge_expression_sheet import IdentityForgeExpressionSheet
from .nodes.identity_forge_outfit_sheet import IdentityForgeOutfitSheet
from .nodes.identity_forge_age_progression import IdentityForgeAgeProgression
from .nodes.identity_forge_vault_save import IdentityForgeVaultSave
from .nodes.identity_forge_vault_load import IdentityForgeVaultLoad
except ImportError: # pragma: no cover
@@ -53,6 +59,8 @@ except ImportError: # pragma: no cover
from nodes.identity_forge_modifier import IdentityForgeModifier
from nodes.identity_forge_turnaround import IdentityForgeTurnaround
from nodes.identity_forge_expression_sheet import IdentityForgeExpressionSheet
from nodes.identity_forge_outfit_sheet import IdentityForgeOutfitSheet
from nodes.identity_forge_age_progression import IdentityForgeAgeProgression
from nodes.identity_forge_vault_save import IdentityForgeVaultSave
from nodes.identity_forge_vault_load import IdentityForgeVaultLoad
@@ -204,8 +212,67 @@ def _register_roll_route() -> None:
return web.json_response({"values": roll_field_values(widgets, seed)})
def _register_gallery_routes() -> None:
"""2.3.0: the roster picker's preview images, served from ComfyUI's own origin.
The server fetches the gh-pages gallery on the browser's behalf and caches it on
disk (see ``nodes/gallery_cache.py``), so previews work under ``--offline``'s CSP
and survive a later loss of network. Only the picker's opt-in preview toggle calls
these. ``clear`` is a POST with a JSON body for the CSRF reason in
``_register_vault_routes``.
"""
try:
import asyncio
from aiohttp import web
from server import PromptServer # type: ignore[import-not-found]
from .nodes import gallery_cache
except Exception as exc: # noqa: BLE001 - never block node registration
_LOG.warning("Gallery routes not registered: %s", exc)
return
routes = PromptServer.instance.routes
async def _serve(fetch, *args): # type: ignore[no-untyped-def]
try:
# urllib blocks; keep it off the event loop.
path = await asyncio.to_thread(fetch, *args, gallery_cache.default_root())
except gallery_cache.GalleryError as exc:
return web.Response(status=404, text=str(exc))
return web.FileResponse(path)
@routes.get("/identity_forge/gallery/{kind}/manifest.json")
async def _manifest(request): # type: ignore[no-untyped-def]
response = await _serve(gallery_cache.manifest_path, request.match_info["kind"])
# Freshness is the cache's job (revalidated every 10 minutes); the browser
# must ask again rather than hold its own copy.
response.headers["Cache-Control"] = "no-cache"
return response
@routes.get("/identity_forge/gallery/{kind}/{relative:images/.+}")
async def _image(request): # type: ignore[no-untyped-def]
return await _serve(gallery_cache.image_path, request.match_info["kind"],
request.match_info["relative"])
@routes.get("/identity_forge/gallery/cache")
async def _size(_request): # type: ignore[no-untyped-def]
root = gallery_cache.default_root()
return web.json_response(
{"bytes": await asyncio.to_thread(gallery_cache.cache_bytes, root)})
@routes.post("/identity_forge/gallery/cache/clear")
async def _clear(request): # type: ignore[no-untyped-def]
_body, error = await _json_body(request)
if error is not None:
return error
await asyncio.to_thread(gallery_cache.clear, gallery_cache.default_root())
return web.json_response({"bytes": 0})
_register_vault_routes()
_register_roll_route()
_register_gallery_routes()
class IdentityForgeExtension(ComfyExtension):
@@ -214,7 +281,8 @@ class IdentityForgeExtension(ComfyExtension):
async def get_node_list(self) -> list[type[io.ComfyNode]]:
return [IdentityForge, IdentityForgeArchetype, IdentityForgeCosplayer,
IdentityForgeCreature, IdentityForgeModifier, IdentityForgeTurnaround,
IdentityForgeExpressionSheet,
IdentityForgeExpressionSheet, IdentityForgeOutfitSheet,
IdentityForgeAgeProgression,
IdentityForgeVaultSave, IdentityForgeVaultLoad]
+50 -6
View File
@@ -1165,6 +1165,18 @@ for _backdrop in _VOID_BACKDROPS:
"reason": f"a {_backdrop} is a seamless sweep: no horizon, no sky, and no "
f"lines in it to lead the eye"})
# 2.4.0: "small against open negative space" is the sweep look, so in a furnished interior
# the model drops the room for a blank wall (a nightclub rendered as a white backdrop).
# The photography studio keeps it: its backdrop is the point.
for _loc in _INDOOR_LOCATIONS:
if _loc != "photography studio with backdrop":
CONSTRAINT_RULES.append({
"type": "exclusion", "field": "location", "value": _loc,
"excludes_field": "composition",
"excludes_values": ["the subject small against open negative space"],
"reason": f"'{_loc}' is a furnished interior: open negative space renders "
f"as a blank backdrop"})
# --- outfit_style answers to the place (1.5.0) ------------------------------------
# Before 1.5.0 `outfit_style` was drawn with no reference to `location` at all:
@@ -1232,7 +1244,14 @@ OUTFIT_STYLE_VENUES: dict[str, frozenset[str]] = {
"local gym weight room", "yoga studio with wood floors",
"climbing gym with colorful holds", "dance studio with mirrors",
"martial arts dojo", "boxing gym with hanging heavy bags",
"high school gymnasium", "trampoline park with foam pits"], _GYM),
"high school gymnasium", "trampoline park with foam pits",
"wrestling ring under arena lights"], _GYM),
# 2.4.0 venues: players, crews and race-day spectators.
"outdoor tennis court with a net": frozenset(["athletic", "casual", "preppy", "streetwear"]),
"racetrack pit lane": _SHOP_FLOOR | {"athletic", "smart casual"},
"racecourse paddock with a white rail": frozenset([
"athletic", "casual", "smart casual", "preppy", "cocktail semi-formal",
"vintage retro"]),
"indoor swimming pool": frozenset(["athletic", "resort vacation", "casual"]),
**dict.fromkeys([
"factory floor", "warehouse interior", "auto repair shop service bay",
@@ -1270,7 +1289,8 @@ for _places, _styles in (
"art gallery opening night", "grand cathedral interior",
"hotel lobby with marble floors", "grand hotel suite",
"cruise ship interior corridor", "the back seat of a taxi", "rooftop cocktail bar",
"rooftop terrace overlooking the skyline", "castle courtyard"], _DRESSY),
"rooftop terrace overlooking the skyline", "castle courtyard",
"gilded palace throne room"], _DRESSY),
(["walk-in closet with mirrors", "tiled bathroom with a large mirror",
"tidy bedroom with a neatly made bed"], _DRESSY | {"business formal"}),
# A night out, a date, a wedding guest -- cocktail but not black tie.
@@ -1340,7 +1360,8 @@ for _places, _styles in (
"luxury retail boutique", "department store perfume counter",
"courtroom", "grand cathedral interior", "small chapel interior",
"mosque interior", "synagogue interior", "Buddhist temple hall",
"Shinto shrine interior", "art gallery opening night", "city hall rotunda"],
"Shinto shrine interior", "art gallery opening night", "city hall rotunda",
"gilded palace throne room"],
frozenset(["athletic"])),
(["neon-lit nightclub"], frozenset(["athletic", "business formal"])),
# 1.5.0 round 2: a hoodie-and-cargo look at a formal dinner or in court.
@@ -1655,7 +1676,7 @@ _STUDIO_LIT_INTERIORS = frozenset([
"photography studio with backdrop", "empty theater stage with the curtain up",
"community theatre auditorium", "backstage dressing room", "art gallery opening night",
"natural history museum hall", "luxury retail boutique", "newsroom with desks and monitors",
"high school gymnasium",
"high school gymnasium", "wrestling ring under arena lights",
])
_STUDIO_SHAPE_ONLY: list[str] = list(FIELD_FAMILIES["lighting"]["studio_shape"]["variants"])
for _loc, _fam in _LOCATION_FAMILY.items():
@@ -1681,7 +1702,7 @@ _FLOOR_FREE_PLACES = frozenset([
"the parking lot of a retro drive-in diner with classic cars",
"construction site with scaffolding", "working harbor dock", "Times Square",
"Shibuya Crossing", "the Brooklyn Bridge pedestrian walkway", "Trafalgar Square",
"rooftop cocktail bar",
"rooftop cocktail bar", "racetrack pit lane", "outdoor tennis court with a net",
])
for _loc, _fam in _LOCATION_FAMILY.items():
if _fam in _FLOOR_FREE_FAMILIES or _loc in _FLOOR_FREE_PLACES:
@@ -1690,6 +1711,28 @@ for _loc, _fam in _LOCATION_FAMILY.items():
"excludes_field": "pose", "excludes_values": list(_FLOOR_POSES),
"reason": f"nobody kneels, crouches or sits on the floor at '{_loc}'"})
# --- 2.4.0: no wall to lean on, no seat to perch on, in an open landscape -----------
# Whole `leaning` + `seated_perch` families, so no other seed moves. Places with rails,
# rocks or benches (piers, canyons, parks, the lighthouse) are left out on purpose.
_PROPLESS_POSES: list[str] = (list(FIELD_FAMILIES["pose"]["leaning"]["variants"])
+ list(FIELD_FAMILIES["pose"]["seated_perch"]["variants"]))
_OPEN_LANDSCAPES = frozenset([
"wide sandy beach", "rolling desert dune", "open meadow", "misty moor",
"flower field in bloom", "lavender field", "alpine meadow with wildflowers",
"cracked salt flats", "golden savanna with acacia trees", "frozen lake surface",
"rolling wheat field", "terraced rice paddies", "volcanic black sand beach",
"tide pools at low tide", "high desert with joshua trees",
"the red desert plain below Uluru", "a Yosemite valley meadow", "the Mount Fuji foothills",
"the Table Mountain plateau", "mountain overlook", "alpine glacier lake",
"geothermal geyser basin",
])
assert _OPEN_LANDSCAPES <= _LOCATION_FAMILY.keys(), _OPEN_LANDSCAPES - _LOCATION_FAMILY.keys()
for _loc in sorted(_OPEN_LANDSCAPES):
CONSTRAINT_RULES.append({
"type": "exclusion", "field": "location", "value": _loc,
"excludes_field": "pose", "excludes_values": _PROPLESS_POSES,
"reason": f"nothing to lean on or perch on at '{_loc}'"})
# --- grey hair comes with age -------------------------------------------------------
# The DRAW is age-aware (nodes.identity_forge._GREY_BY_AGE), so a random character never
# needs a re-pick. This rule is the other direction, for a LOCKED age-grey: it moves a
@@ -1811,7 +1854,8 @@ for _style, _denied in PALETTE_DENIED_BY_STYLE.items():
# --- casual headwear stays out of formal rooms; freckles on deep skin ----------------
for _loc in ("fine dining restaurant interior", "elegant hotel dining room",
"dimly lit cocktail lounge", "courtroom", "grand cathedral interior",
"small chapel interior", "art gallery opening night", "formal dining room with chandelier"):
"small chapel interior", "art gallery opening night", "formal dining room with chandelier",
"gilded palace throne room"):
CONSTRAINT_RULES.append({
"type": "exclusion", "field": "location", "value": _loc,
"excludes_field": "accessories",
+1363 -139
View File
File diff suppressed because it is too large Load Diff
+64 -16
View File
@@ -946,7 +946,8 @@ CREATURES: dict[str, dict] = {
"head": "a translucent sorrowful face that drifts in and out of focus",
"eyes": "hollow glowing eyes",
"integument": "a semi-transparent vaporous form",
"arms": "trailing wispy arms",
# 2.4.0: "trailing wispy arms" drew a third arm; the count anchors it.
"arms": "two wispy arms",
"hands": "fading translucent hands",
"legs_feet": "a dissolving misty trail instead of legs",
"extras": "a cold ectoplasmic glow",
@@ -1712,10 +1713,19 @@ CREATURES: dict[str, dict] = {
"class": "Marine Life", "palette": "cream and russet",
"head": "a hooded nautilus head ringed with slender tentacles",
"eyes": "simple pinhole eyes",
"integument": "a coiled chambered spiral shell over soft flesh",
# 2.4.0: placed on the back, or the shell vanished and only a person was left.
"integument": "a tiger-striped coiled spiral shell carried on the back like a snail's, over soft pale flesh",
"arms": "many small grasping tentacle-arms",
"hands": "clusters of fine tentacle tips",
"extras": "a gentle jet-propulsion siphon",
# 2.4.0: in Anthropomorphic form a whole nautilus rendered beside a person.
"anthro": {
"head": "a head shaped like a coiled nautilus shell, slender tentacles around the mouth",
"integument": "smooth skin banded with tiger stripes",
"arms": "two slender arms",
"hands": "hands with fine tentacle-tip fingers",
"extras": "",
},
},
"djinn": {
"class": "Mythic & Fantasy", "palette": "smokeless blue flame",
@@ -1733,10 +1743,17 @@ CREATURES: dict[str, dict] = {
"head": "a diffuse glowing core suggesting a head within a gas cloud",
"eyes": "scattered points of brighter light for eyes",
"integument": "a shifting translucent cloud of luminous gas",
"arms": "tendrils of condensing vapor for arms",
# 2.4.0: "tendrils ... for arms" rendered a third arm.
"arms": "two arms of condensing vapor",
"hands": "wisps that gather into hand-like shapes",
"extras": "a slow internal aurora",
"palette_pool": ["luminous cyan", "rose nebula", "amber haze", "violet plasma", "pale green glow"],
# 2.4.0: "humanoid gaseous alien" rendered a grey alien beside a gas cloud.
"anthro": {
"subject": "humanoid figure made entirely of glowing gas",
"head": "a head of dense glowing vapor with no solid face",
"integument": "a translucent body of swirling luminous gas",
},
},
# --- Mammals (0.44 expansion) ------------------------------------------
@@ -2222,8 +2239,17 @@ CREATURES: dict[str, dict] = {
"arms": "stout clasping forelimbs",
"hands": "small clawed grips",
"legs_feet": "six clinging clawed legs",
"wings": "large clear membranous wings veined and held roof-like",
# 2.4.0: "held roof-like" alone rendered the wings across the chest.
"wings": "large clear veined membranous wings folded roof-like over the back",
"extras": "a loud droning song from the abdomen",
# 2.4.0: in Anthropomorphic form a giant cicada rendered behind a shirt.
"anthro": {
"subject": "insectoid humanoid",
"head": "a human-sized cicada head with short bristle antennae",
"integument": "a chitinous exoskeleton over the torso",
"arms": "two clasping insect arms",
"legs_feet": "two jointed insect legs",
},
},
# --- Monsters ---
"ogre": {
@@ -2263,9 +2289,12 @@ CREATURES: dict[str, dict] = {
},
"leprechaun": {
"class": "Mythic & Fantasy", "palette": "ruddy freckled",
# 2.2.0: the palette supplies "ruddy freckled", so the integument must not repeat
# it. The beard is the folklore look; the gallery tile is pinned Male
# (render_gallery._GALLERY_GENDER) since creature slots have no gender gate.
"head": "a wizened impish face with a ruddy grin, pointed ears and a ginger beard",
"eyes": "twinkling green eyes",
"integument": "ruddy freckled skin",
"integument": "skin",
"arms": "wiry little arms",
"hands": "nimble small hands",
"legs_feet": "short bandy legs",
@@ -2392,16 +2421,18 @@ CREATURES: dict[str, dict] = {
"jiangshi": {
# Stiff-armed Qing-robed hopping undead: not a vampire (aristocratic,
# fanged, fluid) and not a zombie (shambling, rotted).
"class": "Monsters", "palette": "greyed corpse-blue",
"class": "Monsters", "palette": "pale greenish-white",
# The palette is prepended to `integument` only, never to `head`, so a
# creature's FACE has no colour anchor at all - the creature-layer
# equivalent of the green-body/pale-face bug. "corpse face" rendered as
# a healthy woman wearing a paper slip. Pallor has to be carried by
# colour-FREE words in the head slot itself (bloodless, waxen, sunken);
# naming a colour here would break the colour-free slot convention.
"head": "a bloodless, waxen corpse face, sunken and hollow-cheeked, the jaw slack and expressionless, a long yellow paper talisman pasted down the brow",
"head": "a bloodless, waxen corpse face, sunken and hollow-cheeked, small fangs at the slack lips, a long yellow paper talisman pasted down the brow",
"eyes": "clouded milky eyes with no life in them",
"integument": "stiff, desiccated corpse skin drawn tight over the bones",
# 2.4.0: palette + "stiff, desiccated corpse skin" voiced "greyed
# corpse-blue stiff, desiccated corpse skin"; the palette needs "skin" first.
"integument": "skin, stiff and desiccated, drawn tight over the bones like a corpse",
"arms": "arms locked straight out in front and held rigid",
"hands": "hooked stiffened fingers with long dark nails",
"legs_feet": "stiff unbending legs that move in short hops",
@@ -2994,14 +3025,20 @@ CREATURES: dict[str, dict] = {
"class": "Marine Life",
"palette": "dark bronze",
"palette_pool": ["dark bronze", "olive brown", "weathered slate"],
"head": "a smooth domed horseshoe of chitin drawn low over the face",
# 2.2.0: "drawn low over the face" rendered a plain man, and a "shell in place of
# a head" rendered a man wearing it as a hat, and a negated "no human head" was
# ignored. Lead with a positive "<creature> head", like the other arthropods.
"head": "a faceless horseshoe crab head, a broad flat chitin dome with no face, "
"no mouth and no human features",
"eyes": "a pair of kidney-shaped compound eyes set wide on the shell above smaller simple eyes ranked along its ridge",
"integument": "a hinged carapace plated in two smooth shields",
"arms": "short jointed arms tucked beneath the shell",
"hands": "small pincered claws",
"legs_feet": "ranks of walking legs under a plated abdomen fringed with spines",
"tail": "a long rigid spike of a tail",
"extras": "stacked pages of book gills flexing beneath the rear shield",
# 2.2.0: free-floating parts ("two shields", "a plated abdomen", "the rear
# shield") rendered as a second whole crab held at the side; anchor each to the body.
"integument": "a smooth hinged chitin carapace covering the back and chest",
"arms": "segmented chitin arms",
"hands": "small pincers in place of hands",
"legs_feet": "chitin-plated legs, with a row of short spiny walking legs along each side of the belly",
"tail": "a long rigid spike of a tail trailing from the lower back",
"extras": "stacked book gills along the underside of the torso",
},
# ======================================================================
@@ -3287,7 +3324,7 @@ CREATURES: dict[str, dict] = {
"stegosaurus": {
"class": "Reptiles & Amphibians", "palette": "mottled olive",
"palette_pool": ["mottled olive", "earthy brown", "slate grey-green"],
"head": "a small low narrow head with a toothless beaked snout",
"head": "a small low narrow dinosaur head with a toothless beaked snout",
"eyes": "small dark eyes set on the sides of the head",
"integument": "a double row of broad upright diamond-shaped bony plates running "
"down the back over thick pebbled hide",
@@ -3295,6 +3332,17 @@ CREATURES: dict[str, dict] = {
"hands": "broad blunt-toed forefeet",
"legs_feet": "tall massive hind legs",
"tail": "a heavy tail ending in four long horizontal bony spikes",
# 2.4.0: in Anthropomorphic form a whole stegosaurus rendered beside a person.
"anthro": {
"subject": "scaly reptilian humanoid",
"head": "a stegosaurus-like dinosaur head with a toothless beaked snout",
"integument": "a double row of broad upright diamond-shaped bony plates running "
"down the spine over thick pebbled hide",
"arms": "thick scaly arms",
"hands": "broad blunt-clawed hands",
"legs_feet": "sturdy scaly legs",
"tail": "a short tail ending in four bony spikes",
},
},
# ======================================================================
+24 -8
View File
File diff suppressed because one or more lines are too long
+291 -33
View File
@@ -163,7 +163,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"outfit_style": "edgy alternative",
"accessories": "no accessories",
"expression": "confident",
"location": "factory floor",
"location": "blacksmith forge with an anvil",
"lighting": "warm incandescent lamp glow",
"shot_type": "low angle looking up",
"mood": "self-assured",
@@ -486,7 +486,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"outfit_style": "casual",
"accessories": "no accessories",
"expression": "confident",
"location": "sleek modern kitchen with marble countertops",
"location": "commercial kitchen",
"lighting": "warm incandescent lamp glow",
"shot_type": "medium shot from waist up",
"mood": "self-assured",
@@ -810,8 +810,8 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"complexion": "ruddy", "outfit_style": "edgy alternative",
"outfit_description": "weathered brown leather coat over a loose linen shirt, a wide red sash, and a tricorn hat",
"bag": "no bag", "accessories": "no accessories",
"expression": "smirking", "location": "dimly lit cocktail lounge",
"lighting": "warm candlelight",
"expression": "smirking", "location": "harbor with moored boats",
"lighting": "golden hour sunlight",
"shot_type": "cowboy shot from mid-thigh up", "mood": "carefree",
# 1.5.1 (maintainer): a gender-neutral role coin-flips; the Male look
# is the old lean, unchanged.
@@ -1059,7 +1059,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"Gladiator": {
"accessories": "no accessories",
"gender": "Any", "body_type": "athletic", "fitness_level": "muscular", "hair_color": ["dark brown", "medium brown", "near black"], "outfit_style": "athletic", "expression": "determined",
"location": "museum gallery with white walls", "lighting": "dramatic chiaroscuro side lighting",
"location": "the Colosseum exterior", "lighting": "harsh overhead midday sun",
"shot_type": "cowboy shot from mid-thigh up", "mood": "intense",
# 1.5.1 (maintainer): a gender-neutral role coin-flips; the Male look
# is the old lean, unchanged.
@@ -1102,8 +1102,12 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"accessories": "no accessories",
"gender": "Any", "ethnicity": "Japanese", "hair_color": ["jet black", "raven black", "near black"],
"outfit_style": "edgy alternative", "expression": "stern",
"location": "photography studio with backdrop", "lighting": "soft studio three-point lighting",
# 2.4.0: out of the photo studio and into the landscape the look belongs to.
"location": "the Mount Fuji foothills", "lighting": "overcast diffused daylight",
"shot_type": "full body shot", "mood": "tense",
# Armour and a horned helm: a warrior's stance or seiza, not a lounge or a hair touch.
"pose": ["standing with feet planted wide", "standing tall with shoulders back",
"standing with arms crossed", "kneeling seiza-style"],
# 1.5.1 (maintainer): a gender-neutral role coin-flips; the Male look
# is the old lean, unchanged.
"variants": {
@@ -1160,6 +1164,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"shot_type": "medium close-up from chest up", "mood": "intense",
},
"Renaissance Noble": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories",
# 1.5.1: a doublet is menswear and soft glam put makeup on men (render #00656):
# each gender gets its own noble dress, and only the woman's look is made up.
@@ -1332,7 +1339,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"Veterinarian": {
"hair_length": ["shoulder length", "long"], "hair_style": "low ponytail",
"outfit_style": "business casual",
"expression": "warm smile", "location": "doctor's examination room",
"expression": "warm smile", "location": "veterinary clinic exam room",
"lighting": "cool LED overhead lighting",
"shot_type": "medium shot from waist up", "mood": "cheerful",
},
@@ -1345,7 +1352,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
"Glassblower": {
"outfit_style": "casual", "expression": "determined",
"location": "factory floor", "lighting": "fire and flame warm flicker",
"location": "glassblowing studio with a furnace", "lighting": "fire and flame warm flicker",
"shot_type": "medium shot from waist up", "mood": "intense",
},
@@ -1639,7 +1646,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"gender": "Any", "ethnicity": "Cuban", "body_type": "athletic", "height": "tall",
"fitness_level": "muscular", "hair_color": ["jet black", "raven black", "near black"],
"skin_tone": "warm brown", "outfit_style": "athletic",
"expression": "intense gaze", "location": "local gym weight room",
"expression": "intense gaze", "location": "boxing gym with hanging heavy bags",
"lighting": "dramatic chiaroscuro side lighting", "shot_type": "cowboy shot from mid-thigh up",
"mood": "intense",
"variants": {
@@ -1744,6 +1751,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
},
"Egyptian Pharaoh": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories",
"ethnicity": "Egyptian", "body_type": "lean", "skin_tone": "caramel",
"hair_color": ["jet black", "raven black", "near black"], "hair_style": "blunt bangs", "makeup_style": "bold glam",
@@ -1761,6 +1771,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"shot_type": "medium close-up from chest up", "mood": "tranquil",
},
"Greek Goddess": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories",
"gender": "Female", "ethnicity": "Greek", "body_type": "hourglass", "height": "tall",
"hair_color": ["dark brown", "medium brown", "near black"], "hair_length": "very long", "hair_texture": "softly curled",
@@ -1769,6 +1782,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"lighting": "golden hour sunlight", "shot_type": "full body shot", "mood": "dreamy",
},
"Roman Centurion": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories",
"gender": "Male", "ethnicity": "Italian", "body_type": "athletic", "height": "tall",
"fitness_level": "very fit", "facial_hair": "stubble",
@@ -1826,7 +1842,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"fitness_level": "muscular",
"hair_color": ["jet black", "raven black", "near black"], "hair_length": "shoulder length", "hair_texture": "wavy",
"skin_tone": "warm tan", "outfit_style": "athletic",
"expression": "intense gaze", "location": "high school gymnasium",
"expression": "intense gaze", "location": "wrestling ring under arena lights",
"lighting": "dramatic single overhead spotlight", "shot_type": "cowboy shot from mid-thigh up",
"mood": "intense",
"variants": {
@@ -1851,7 +1867,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"gender": "Any", "ethnicity": "Mexican", "body_type": "athletic", "height": "average height",
"fitness_level": "very fit",
"hair_color": ["jet black", "raven black", "near black"], "skin_tone": "tan", "outfit_style": "athletic", "expression": "confident",
"location": "high school gymnasium", "lighting": "dramatic single overhead spotlight",
"location": "wrestling ring under arena lights", "lighting": "dramatic single overhead spotlight",
"shot_type": "full body shot", "mood": "self-assured",
# 1.5.1 (maintainer): a gender-neutral role coin-flips; the Male look
# is the old lean, unchanged.
@@ -1877,7 +1893,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"accessories": "no accessories",
"gender": "Any", "ethnicity": "Brazilian", "body_type": "fit", "height": "average height",
"hair_color": ["dark brown", "medium brown", "near black"], "skin_tone": "tan", "outfit_style": "athletic", "expression": "confident",
"location": "parking garage", "lighting": "harsh fluorescent lighting",
"location": "racetrack pit lane", "lighting": "harsh overhead midday sun",
"shot_type": "medium shot from waist up", "mood": "self-assured",
# 1.5.1 (maintainer): a gender-neutral role coin-flips; the Male look
# is the old lean, unchanged.
@@ -2130,6 +2146,8 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
"Female": {
"hair_length": "short pixie",
# 2.4.0: an 80s look, not a random 1950s pin-up face.
"makeup_style": ["bold glam", "editorial makeup"],
"outfit_description": [
"an oversized {jewel_tone} blazer with sharply padded shoulders and pushed-up sleeves over a graphic tee, slim trousers, and pointed boots",
"a boxy {jewel_tone} cropped jacket with padded shoulders over a black mesh-panel top, a high-waisted pencil skirt, and pointed ankle boots",
@@ -2138,6 +2156,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
},
"Victorian Lady": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories",
"gender": "Female", "ethnicity": "English", "body_type": "hourglass", "height": "average height",
"hair_color": ["chestnut", "light chestnut", "warm brown"], "hair_length": "very long", "hair_texture": "softly curled",
@@ -2147,12 +2168,31 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"shot_type": "full body shot", "mood": "nostalgic",
},
"Ancient Roman Patrician": {
# 2.2.0: a Female variant (stola and palla); the toga look moved into Male verbatim.
"accessories": "no accessories",
"gender": "Male", "ethnicity": "Italian", "body_type": "average", "height": "average height",
"hair_color": ["dark brown", "medium brown", "near black"], "hair_length": "very short", "hair_texture": "loosely curled",
"hair_style": "natural and unstyled", "skin_tone": "olive", "outfit_style": "evening formal",
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bracelet": "none",
"rings": "none",
"gender": "Male", "ethnicity": "Italian", "height": "average height",
"hair_color": ["dark brown", "medium brown", "near black"],
"skin_tone": "olive", "outfit_style": "evening formal",
"expression": "stern", "location": "outdoor amphitheater",
"lighting": "harsh overhead midday sun", "shot_type": "full body shot", "mood": "commanding",
"variants": {
"Male": {
"body_type": "average", "hair_length": "very short",
"hair_texture": "loosely curled", "hair_style": "natural and unstyled",
"outfit_description": "a draped white toga over a tunic with a {color} border, leather sandals, and a {metal} laurel wreath",
},
"Female": {
"body_type": ["slim", "average"], "hair_length": "long",
"hair_texture": "softly curled", "hair_style": "updo",
"makeup_style": "soft natural makeup",
"necklace": "no necklace", "earrings": "no earrings",
"outfit_description": "a long ivory stola belted high under the bust, a {jewel_tone} palla draped over the shoulders and one arm, a gold fibula brooch at the shoulder, a fine gold hairnet over the curled updo, and leather sandals",
},
},
},
"Prehistoric Hunter": {
"accessories": "no accessories",
@@ -2176,7 +2216,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"fitness_level": "very fit",
"hair_color": ["dark brown", "medium brown", "near black"], "hair_length": "shoulder length", "hair_style": "high ponytail",
"skin_tone": "warm tan", "outfit_style": "athletic", "accessories": "no accessories",
"expression": "determined", "location": "sunny city park",
"expression": "determined", "location": "outdoor tennis court with a net",
"lighting": "harsh overhead midday sun", "shot_type": "full body shot", "mood": "self-assured",
},
"Gymnast": {
@@ -2200,7 +2240,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"hair_color": ["chestnut", "light chestnut", "warm brown"], "hair_length": "shoulder length", "hair_texture": "wavy",
"hair_style": "half up half down", "skin_tone": "fair", "outfit_style": "casual",
"accessories": "no accessories", "expression": "warm smile",
"location": "farmers market indoor stall", "lighting": "soft window light from the side",
"location": "flower shop interior", "lighting": "soft window light from the side",
"shot_type": "medium shot from waist up", "mood": "cheerful",
},
"Plumber": {
@@ -2311,12 +2351,12 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
"Potter": {
"outfit_style": "casual", "expression": "at ease",
"location": "artist's painting studio", "lighting": "soft window light from the side",
"location": "ceramics studio with pottery wheels", "lighting": "soft window light from the side",
"shot_type": "medium shot from waist up", "mood": "peaceful",
},
"Tailor": {
"outfit_style": "smart casual", "expression": "subtle soft smile",
"location": "luxury retail boutique", "lighting": "soft window light from the side",
"location": "tailor's workroom with dress forms", "lighting": "soft window light from the side",
"shot_type": "medium shot from waist up", "mood": "tranquil",
},
"Calligrapher": {
@@ -2596,7 +2636,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"a heavyweight white cotton martial-arts gi with a wrapped black belt knotted at the waist, worn barefoot",
"a sleeveless {dark_color} training top with loose black kung-fu trousers, wrapped hand wraps, and bare feet",
],
"expression": "determined", "location": "yoga studio with wood floors",
"expression": "determined", "location": "martial arts dojo",
"lighting": "soft window light from the side", "shot_type": "full body shot", "mood": "intense",
},
"Kendo Practitioner": {
@@ -2616,7 +2656,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"a dark navy kendogi jacket under a white do chest plate with red accents, a tare waist guard with a name tag, thick padded kote gauntlets, a men grille mask with a padded fukin head covering, and a dark hakama with suneate shin guards",
"a white keikogi under a dark blue do with white trim, padded kote gloves, a men face grille with a tenugui head cloth, a tare waist protector, and dark blue hakama trousers with shin guards",
],
"expression": "focused", "location": "yoga studio with wood floors",
"expression": "focused", "location": "martial arts dojo",
"lighting": "soft window light from the side",
"shot_type": "full body shot", "mood": "intense",
"held_item": "a bamboo shinai",
@@ -2662,11 +2702,30 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"Indie Sleaze": {
"body_type": "lean", "hair_color": ["near black", "jet black", "dark brown"], "hair_length": "shoulder length",
"hair_texture": "slightly wavy", "hair_style": "natural and unstyled", "skin_tone": "pale",
"eye_makeup": "smoky black", "eyeliner": "smudged kohl", "outfit_style": "edgy alternative",
"eyeliner": "smudged kohl", "outfit_style": "edgy alternative",
"accessories": "no accessories",
"outfit_description": "a rumpled vintage graphic tee under a worn leather jacket, tight shiny disco pants, and scuffed ankle boots, styled with a careless thrifted look",
"expression": "smirking", "location": "neon-lit nightclub", "lighting": "club strobe lighting",
"shot_type": "medium shot from waist up", "mood": "moody",
# 2.4.0: a man drew the disco bodysuit with tights and smoky shadow and read as
# drag; the scene's men wore skinny jeans and just the smudged liner.
"variants": {
"Male": {
"outfit_description": [
"a rumpled vintage graphic tee under a worn leather jacket, skinny black jeans, and scuffed ankle boots, styled with a careless thrifted look",
"a rumpled vintage graphic tee under a {dark_color} moto jacket with skinny jeans and battered canvas sneakers, styled with a careless thrifted look",
"an oversized thrifted blazer over a slogan tee with tight {color} jeans and scuffed loafers, layered with a haphazard second-hand look",
],
},
"Female": {
"eye_makeup": "smoky black",
"outfit_description": [
"a rumpled vintage graphic tee under a worn leather jacket, tight shiny disco pants, and scuffed ankle boots, styled with a careless thrifted look",
"a rumpled vintage graphic tee under a {dark_color} moto jacket with skinny jeans and battered canvas sneakers, styled with a careless thrifted look",
"an oversized thrifted blazer over a slogan tee with tight {color} jeans and scuffed loafers, layered with a haphazard second-hand look",
"a metallic {color} disco bodysuit under a cropped denim jacket with opaque tights and beat-up ankle boots",
],
},
},
},
"Y2K Mall Casual": {
"gender": "Any",
@@ -3015,6 +3074,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"mood": "cheerful",
},
"Victorian Dandy": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"gender": "Male", "ethnicity": "English", "body_type": "slim", "height": "tall",
"facial_hair": ["mustache", "van dyke", "clean shaven"],
"hair_color": ["dark brown", "medium brown", "near black"], "hair_length": "ear length",
@@ -3043,6 +3105,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"lighting": "stage spotlight from above", "shot_type": "full body shot", "mood": "radiant",
},
"Gibson Girl": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"gender": "Female", "ethnicity": "English", "body_type": "hourglass", "height": "average height",
"hair_color": ["chestnut", "warm brown", "dark brown"], "hair_length": "very long",
"hair_texture": "softly curled", "hair_style": "updo", "skin_tone": "porcelain",
@@ -3250,6 +3315,10 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
"Figure Skater": {
"gender": "Any",
# 2.4.0: on blades a skater stands and strikes a pose; never walks or kneels.
# A pose lock is Setting & Shot, so it holds in Essentials too.
"pose": ["standing tall with shoulders back", "in a confident power pose",
"standing with weight on one leg", "stretching both arms overhead"],
"variants": {
"Female": {
"body_type": ["athletic", "petite and slim", "toned"], "fitness_level": "very fit",
@@ -3263,7 +3332,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"a {pastel} competition skating dress with cascading rhinestones, sheer mesh sleeves, and white figure skates",
],
"expression": ["determined", "bright smile"],
"location": ["roller skating rink", "dance studio with mirrors"],
"location": "indoor ice rink",
"lighting": ["high key bright even lighting", "stage spotlight from above"],
"shot_type": "full body shot", "mood": ["triumphant", "radiant"],
},
@@ -3277,7 +3346,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"a sleek {jewel_tone} competition skating shirt with an asymmetric beaded seam, black stretch trousers, and black figure skates",
],
"expression": ["determined", "bright smile"],
"location": ["roller skating rink", "dance studio with mirrors"],
"location": "indoor ice rink",
"lighting": ["high key bright even lighting", "stage spotlight from above"],
"shot_type": "full body shot", "mood": ["triumphant", "radiant"],
},
@@ -3426,6 +3495,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
# Lean unisex historical / sport / performer.
"Musketeer": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories", "bag": "no bag",
"hair_length": ["long", "shoulder length"], "hair_texture": ["loosely curled", "wavy"],
"outfit_style": "vintage retro", "expression": ["confident", "smirking"],
@@ -3434,6 +3506,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"shot_type": "full body shot", "mood": "self-assured",
},
"Medieval Peasant": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"accessories": "no accessories", "bag": "no bag", "outfit_style": "casual",
"expression": ["neutral", "warm smile"],
"location": ["castle courtyard", "country dirt road"],
@@ -3610,6 +3685,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
},
"Regency Aristocrat": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bag": "no bag",
"gender": "Any",
"variants": {
@@ -3843,14 +3921,18 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"height": "average height",
"fitness_level": "athletic",
"outfit_style": "athletic",
"outfit_description": "bulky {color} goaltender pads strapped over the legs, a heavily "
"padded chest protector under a loose team jersey, an oversized "
# 2.4.0: team colours on pads and jersey; a charcoal draw on white ice rendered
# the whole frame black and white.
"outfit_description": "bulky {team_color} goaltender pads strapped over the legs, a heavily "
"padded chest protector under a loose {team_color} team jersey, an oversized "
"blocker on one hand and a deep catching glove on the other, and "
"a painted cage-fronted goalie mask",
"accessories": "no accessories",
"bag": "no bag",
"expression": "determined",
"location": "indoor ice rink",
# 2.4.0: on blades, a set stance rather than a walk.
"pose": ["standing with feet planted wide", "standing tall with shoulders back"],
"lighting": "cool LED overhead lighting",
"shot_type": "full body shot",
"mood": "intense",
@@ -4962,7 +5044,7 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"necklace": "no necklace",
"earrings": "no earrings",
"expression": "determined",
"location": ["open meadow", "country dirt road"],
"location": "racecourse paddock with a white rail",
"lighting": ["golden hour sunlight", "overcast diffused daylight"],
"shot_type": "full body shot",
"mood": "intense",
@@ -5404,6 +5486,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
},
# The name is gendered (the Mardi Gras Reveler sets the domino-mask precedent).
"Highwayman": {
# 2.2.0: a period look draws no modern tattoo or nose stud.
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"gender": "Male",
"outfit_style": "vintage retro",
"accessories": "no accessories",
@@ -5455,6 +5540,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"expression": "confident",
"location": ["wide sandy beach", "working harbor dock", "harbor with moored boats",
"lakeside pier"],
# 2.4.0: fins on the feet: a diver stands, never strides.
"pose": ["standing with feet planted wide", "standing tall with shoulders back",
"standing with arms relaxed at the sides", "posing with a hand on one hip"],
"lighting": "golden hour sunlight",
"shot_type": "full body shot",
"mood": "self-assured",
@@ -5548,6 +5636,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"expression": "bright smile",
# Skating the order out to the cars is the job.
"location": "the parking lot of a retro drive-in diner with classic cars",
# 2.4.0: rolling or posing on skates; never sat or kneeling on the tarmac.
"pose": ["posing with a hand on one hip", "standing with weight on one leg",
"pausing mid-step", "turning toward the viewer mid-stride"],
"lighting": ["golden hour sunlight", "neon sign glow in multiple colors"],
"shot_type": "full body shot",
"mood": "cheerful",
@@ -5639,6 +5730,9 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"earrings": "no earrings",
"expression": "defiant",
"location": "roller skating rink",
# 2.4.0: on wheels, a set stance rather than a walk.
"pose": ["standing with feet planted wide", "in a confident power pose",
"standing with arms crossed"],
"lighting": "cool LED overhead lighting",
"shot_type": "full body shot",
"mood": "fierce",
@@ -5822,6 +5916,174 @@ ARCHETYPES: dict[str, dict[str, Any]] = {
"facial_hair": ["clean shaven", "stubble", "mustache"]},
},
},
# --- 2.2.0: historical court dress -------------------------------------
# Courts nothing else covers: Renaissance Noble, Regency Aristocrat and the
# Victorian pair already hold their eras. No palace location exists, so these
# borrow the nearest grand interiors rather than move random seeds with a new one.
"Rococo Courtier": {
"gender": "Any",
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bracelet": "none",
"rings": "none",
"age": ["20", "22", "25", "28", "30", "33", "35"],
"ethnicity": ["French", "English"],
"outfit_style": "evening formal",
"accessories": "no accessories",
"bag": "no bag",
"necklace": "no necklace",
"earrings": "no earrings",
"hair_color": "white",
"expression": ["sly", "quiet amusement"],
"location": "gilded palace throne room",
"lighting": "warm candlelight",
"shot_type": "full body shot",
"mood": "self-assured",
"variants": {
"Female": {
"hair_length": "long", "hair_style": "updo", "makeup_style": "soft glam",
"outfit_description": "a {pastel} silk robe a la francaise spread over wide side panniers, a fitted stomacher laced with ribbon bows, tiered lace ruffles at the elbows, a floral brocade petticoat, a pearl choker, and a towering powdered pouf hairstyle trimmed with feathers and ribbons",
"held_item": "a painted silk folding fan",
},
"Male": {
"hair_length": "shoulder length", "hair_style": "low ponytail",
"makeup_style": "no makeup", "facial_hair": "clean shaven",
"outfit_description": "a {jewel_tone} silk brocade frock coat embroidered in gold and silver thread, a long matching waistcoat, knee breeches, white silk stockings, buckled heeled shoes, a lace jabot at the throat with lace cuffs, and a powdered white wig tied back with a black silk ribbon",
"held_item": "a black tricorn hat",
},
},
},
"Medieval Monarch": {
"gender": "Any",
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bracelet": "none",
"rings": "none",
"age": ["28", "30", "33", "35", "40", "45", "50", "55"],
"outfit_style": "evening formal",
"accessories": "no accessories",
"bag": "no bag",
"necklace": "no necklace",
"earrings": "no earrings",
"expression": "stern",
"location": "grand cathedral interior",
"lighting": "light through stained glass casting colors",
"shot_type": "full body shot",
"mood": "commanding",
"held_item": "a jeweled golden scepter",
"variants": {
"Female": {
"hair_length": "long", "hair_style": "worn down",
"makeup_style": "soft natural makeup",
"outfit_description": "a {jewel_tone} brocade surcoat over a silk gown with long trailing hanging sleeves, a heavy ermine-trimmed velvet mantle fastened at the chest with a gold clasp, a jeweled girdle at the hips, a sheer white veil, and a jeweled gold crown",
},
"Male": {
"hair_length": "shoulder length", "hair_style": "worn down",
"makeup_style": "no makeup", "facial_hair": ["short beard", "full beard"],
"outfit_description": "a {jewel_tone} velvet tunic embroidered with gold thread over a long white undertunic, a heavy ermine-trimmed royal mantle fastened at the chest with a gold clasp, a jeweled sword belt, tall leather boots, and a jeweled gold crown",
},
},
},
"Ottoman Court": {
"gender": "Any",
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bracelet": "none",
"rings": "none",
"ethnicity": "Turkish",
"outfit_style": "evening formal",
"accessories": "no accessories",
"bag": "no bag",
"necklace": "no necklace",
"earrings": "no earrings",
"expression": "confident",
"location": "gilded palace throne room",
"lighting": "warm candlelight",
"shot_type": "full body shot",
"mood": "commanding",
"variants": {
"Female": {
"hair_length": "long", "hair_style": "worn down",
"makeup_style": "soft glam",
"outfit_description": "a {jewel_tone} silk kaftan embroidered with gold thread and fastened down the front with jeweled buttons, worn over a long inner robe and full silk salvar trousers, a jeweled belt at the waist, a small embroidered cap draped with a sheer veil and pinned with a jeweled plume, and pointed embroidered slippers",
},
"Male": {
"hair_length": "very short", "makeup_style": "no makeup",
"facial_hair": ["full beard", "mustache"],
"outfit_description": "a full-length {jewel_tone} brocade kaftan with long ornamental hanging sleeves over a silk robe and a wide sash, a towering white turban set with a jeweled plume, and soft yellow leather boots",
},
},
},
"Heian Court": {
"gender": "Any",
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bracelet": "none",
"rings": "none",
"ethnicity": "Japanese",
"outfit_style": "evening formal",
"accessories": "no accessories",
"bag": "no bag",
"necklace": "no necklace",
"earrings": "no earrings",
"hair_color": "jet black",
"expression": "serene",
"location": "Shinto shrine interior",
"lighting": "warm lantern light",
"shot_type": "full body shot",
"mood": "tranquil",
"variants": {
"Female": {
"hair_length": "hip length", "hair_texture": "sleek straight",
"hair_style": "worn down", "makeup_style": "soft natural makeup",
"outfit_description": "a junihitoe of many layered silk robes whose {jewel_tone}, {pastel} and white edges show in bands at the collar and wide sleeves, a stiff brocade jacket on top, a long pleated white train trailing behind, and wide crimson hakama trousers",
"held_item": "a painted wooden folding fan",
},
"Male": {
"hair_length": "long", "hair_style": "top knot",
"makeup_style": "no makeup", "facial_hair": "clean shaven",
"outfit_description": "a black sokutai court robe with wide sleeves over layered white and crimson under-robes, a long trailing train, wide white hakama trousers, and a stiff black lacquered court cap with a tall upright tail",
"held_item": "a flat wooden shaku baton",
},
},
},
# 2.3.0: Mexica (Aztec) nobility, after the Codex Mendoza and Florentine Codex: the
# knotted tilmatli cloak and maxtlatl for men, the huipil and cueitl for women, jade
# ear spools for both (not matched as earrings, so the random pair is locked off).
"Aztec Noble": {
"gender": "Any",
"tattoos": "no tattoos",
"piercings": "no piercings beyond ears",
"bracelet": "none",
"rings": "none",
"ethnicity": "Mexican",
"outfit_style": "evening formal",
"accessories": "no accessories",
"bag": "no bag",
"necklace": "no necklace",
"earrings": "no earrings",
"hair_color": "jet black",
"hair_highlights": "none",
"nails": "natural short nails",
"expression": "confident",
"location": "crumbling stone ruin",
"lighting": "late afternoon warm sunlight",
"shot_type": "full body shot",
"mood": "commanding",
"variants": {
"Female": {
"hair_length": "waist length", "hair_texture": "sleek straight",
"hair_style": ["worn down", "loose braids"], "makeup_style": "no makeup",
"outfit_description": "a white cotton huipil tunic woven with bands of {jewel_tone} and gold geometric pattern at the neck and hem, worn over a long wrapped cueitl skirt with an embroidered border, a collar of polished jade beads, jade ear spools, gold arm cuffs, and simple leather sandals",
},
"Male": {
"hair_length": "shoulder length", "hair_style": "worn down",
"makeup_style": "no makeup", "facial_hair": "clean shaven",
"outfit_description": "a white cotton tilmatli cloak edged with a woven {jewel_tone} and gold geometric border and knotted at one shoulder, a maxtlatl loincloth with long embroidered hanging ends, a tall headdress of long green quetzal feathers rising from a gold band, jade ear spools, gold arm cuffs, and leather sandals with high heel guards",
},
},
},
}
@@ -5974,7 +6236,6 @@ _COSTUMES: dict[str, str | list[str]] = {
"1990s Goth": "layered black {fabric} clothing with torn fishnet sleeves, a studded leather choker, silver rings, and heavy buckled boots",
"1980s Preppy": "a pastel polo shirt with a {color} sweater tied over the shoulders, pleated chinos, and leather boat shoes",
"Victorian Lady": "a high-collared {jewel_tone} bustle gown of {fabric} with lace trim, puffed sleeves, buttoned boots, and a cameo brooch",
"Ancient Roman Patrician": "a draped white toga over a tunic with a {color} border, leather sandals, and a {metal} laurel wreath",
"Prehistoric Hunter": "rugged {fur} hide garments with bone-and-tooth jewelry, leather wraps, and a stone-tipped spear",
"Tennis Player": "a {color} athletic tennis polo with matching shorts, a sweatband, wristbands, and court shoes",
"Gymnast": "a sleek {jewel_tone} long-sleeved competition leotard with metallic trim and grip wristbands",
@@ -6092,10 +6353,7 @@ _COSTUMES: dict[str, str | list[str]] = {
"a black band tee under an unzipped {dark_color} hoodie with tight black skinny jeans, a studded belt, fingerless gloves, and worn high-tops",
"a black-and-{jewel_tone} striped long-sleeve under a graphic band tee, black skinny jeans with a chain wallet, and scuffed skate shoes",
"a snug {dark_color} zip hoodie over a studded belt and drainpipe jeans, with checkerboard slip-ons and rubber wristbands stacked up one forearm"],
"Indie Sleaze": ["a rumpled vintage graphic tee under a worn leather jacket, tight shiny disco pants, and scuffed ankle boots, styled with a careless thrifted look",
"a rumpled vintage graphic tee under a {dark_color} moto jacket with skinny jeans and battered canvas sneakers, styled with a careless thrifted look",
"an oversized thrifted blazer over a slogan tee with tight {color} jeans and scuffed loafers, layered with a haphazard second-hand look",
"a metallic {color} disco bodysuit under a cropped denim jacket with opaque tights and beat-up ankle boots"],
# Indie Sleaze: costume moved into its variants (2.4.0).
# --- 0.67.0 additions (lean unisex archetypes) ---
"Butler": "a formal black tailcoat over a white wing-collar shirt with a {dark_color} waistcoat, a black bow tie, pressed trousers, and white cotton gloves",
"Coal Miner": "grimy {earth_tone} coveralls streaked with coal dust, a battered hard hat with a headlamp, heavy canvas gloves, and steel-toe boots, the face smudged with soot",
+69
View File
@@ -146,6 +146,9 @@ RELEASES: tuple[str, ...] = (
"1.8.0",
"1.9.0",
"1.11.0",
"2.1.0",
"2.2.0",
"2.3.0",
)
#: Entry name -> the release it first shipped in.
@@ -165,6 +168,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Abomination': "0.22.0",
'Acheron': "1.5.0",
'Ada Wong': "0.6.0",
'Adam Smasher': "2.2.0",
'Admiral Ackbar': "0.20.0",
'Aeon Flux': "1.0.0",
'Aerith Gainsborough': "0.6.0",
@@ -244,6 +248,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Arbiter': "1.3.0",
'Arcanine': "0.95.0",
'Archon': "1.3.0",
'Arcueid Brunestud': "2.1.0",
'Ariel': "0.6.0",
'Arishem': "1.5.1",
'Arisia Rrab': "0.18.0",
@@ -302,6 +307,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Barbarella': "1.1.0",
'Barbie': "1.8.0",
'Barley Lightfoot': "1.4.0",
'Barnaby Brooks Jr.': "2.1.0",
'Barney Rubble': "0.19.0",
'Baron Humbert von Gikkingen': "0.60.0",
'Baron Zemo': "0.22.0",
@@ -357,11 +363,13 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Black Noir': "0.62.0",
'Black Orchid': "1.3.0",
'Black Panther': "0.7.0",
'Black Rock Shooter': "2.1.0",
'Black Widow': "0.6.0",
'Blackfire': "0.18.0",
'Blackheart': "0.18.0",
'Blade': "0.7.0",
'Blaidd the Half-Wolf': "0.76.0",
'Blake Belladonna': "2.1.0",
'Blanka': "0.7.0",
'Blink': "0.18.0",
'Bloodshot': "1.9.0",
@@ -413,6 +421,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Buttercup': "0.76.0",
'Buzz Lightyear': "0.19.0",
'Byakuya Kuchiki': "0.16.0",
'Byleth': "2.1.0",
'C-3PO': "0.19.0",
'C.C.': "0.76.0",
'Cable': "0.17.0",
@@ -456,6 +465,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Cassie Cage': "0.58.0",
'Cat Noir': "0.82.0",
'Catbus': "0.95.0",
'Catra': "2.1.0",
'Catwoman': "0.6.0",
'Cecil Harvey': "0.60.0",
'Celes Chere': "0.60.0",
@@ -483,6 +493,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Chester Cheetah': "0.51.0",
'Chewbacca': "0.7.0",
'Chi-Chi': "0.16.0",
'Chiaki Nanami': "2.1.0",
'Chiana': "0.79.0",
'Chief Chirpa': "0.20.0",
'Chizuru Mizuhara': "0.77.0",
@@ -500,10 +511,13 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Circe': "0.18.0",
'Ciri': "0.6.0",
'Claire Redfield': "0.6.0",
'Claptrap': "2.1.0",
'Cloud Strife': "0.7.0",
'Coach Brunt': "0.69.0",
'Cobra Commander': "0.17.0",
'Codsworth': "2.1.0",
'Cody Travers': "1.4.0",
'Cogsworth': "2.1.0",
'Colonel Sanders': "0.51.0",
'Colossus': "0.17.0",
'Columbia': "0.77.0",
@@ -545,6 +559,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Daisy': "0.18.0",
'Daisy Duck': "0.77.0",
'Daki': "0.76.0",
'Dalek': "2.1.0",
'Danny Phantom': "0.76.0",
'Dante': "0.79.0",
'Daphne Blake': "0.6.0",
@@ -610,6 +625,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Doctor Octopus': "0.16.0",
'Doctor Strange': "0.7.0",
'Domino': "0.7.0",
'Domo-kun': "2.1.0",
'Donald Duck': "0.19.0",
'Donatello': "0.17.0",
'Donkey Kong': "0.19.0",
@@ -619,6 +635,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Doom Slayer': "0.16.0",
'Doomfist': "0.77.0",
'Dora the Explorer': "0.74.0",
'Doraemon': "2.1.0",
'Dorothy Gale': "0.18.0",
'Dove': "0.18.0",
'Dowager Empress Marie': "0.69.0",
@@ -648,6 +665,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'E. Honda': "0.58.0",
'EVE (Stellar Blade)': "1.4.0",
'Eda Clawthorne': "1.0.0",
'Edelgard': "2.1.0",
'Edna Mode': "0.77.0",
'Edward Elric': "0.7.0",
'Edward Scissorhands': "0.53.0",
@@ -710,9 +728,11 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Fairy Godmother': "0.77.0",
'Faith Connors': "0.69.0",
'Falcon': "0.17.0",
'Falin Touden': "2.1.0",
'Falkor': "0.95.0",
'Fantastic Mr Fox': "0.53.0",
'Fatality': "0.18.0",
'Fate Testarossa': "2.1.0",
'Fawkes': "0.95.0",
'Faye Valentine': "0.16.0",
'Felicia': "0.59.0",
@@ -769,6 +789,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Gandalf': "0.7.0",
'Ganondorf': "0.7.0",
'Ganyu': "0.16.0",
'Gardevoir': "2.1.0",
'Gargamel': "0.55.0",
'Gargos': "1.3.0",
'Garnet': "0.43.0",
@@ -805,6 +826,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Giyu Tomioka': "0.16.0",
'Glacius': "1.3.0",
'Glinda': "0.77.0",
'Gloria (Pokemon)': "2.1.0",
'Glory': "0.57.0",
'Go Go Tomago': "0.77.0",
'Godzilla': "0.19.0",
@@ -882,9 +904,11 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Helga Pataki': "0.76.0",
'Hellboy': "0.16.0",
'Hellcat': "0.69.0",
'Hello Kitty': "2.1.0",
'Hera Syndulla': "0.6.0",
'Hercules': "0.16.0",
'Hermione Granger': "0.6.0",
'Hilda (Pokemon)': "2.1.0",
'Himeno': "1.0.0",
'Himiko Toga': "0.74.0",
'Himmel': "1.11.0",
@@ -942,6 +966,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Inuyasha': "0.88.0",
'Invincible': "0.16.0",
'Invisible Woman': "0.6.0",
'Iono': "2.1.0",
'Iori Yagami': "0.61.0",
'Irelia': "0.81.0",
'Iris': "0.69.0",
@@ -1013,6 +1038,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Joel Miller': "1.0.0",
'John Constantine': "0.16.0",
'John Stewart': "0.22.0",
'Johnny 5': "2.1.0",
'Johnny Bravo': "0.53.0",
'Johnny Cage': "0.7.0",
'Johnny Silverhand': "0.87.0",
@@ -1022,6 +1048,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Jolyne Cujoh': "0.76.0",
'Jon Snow': "0.90.0",
'Jon Talbain': "0.59.0",
'Jonathan Joestar': "2.1.0",
'Joseph Joestar': "0.16.0",
'Josie McCoy': "0.69.0",
'Josuke Higashikata': "0.77.0",
@@ -1072,6 +1099,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Karin Kanzuki': "1.4.0",
'Karlach': "0.77.0",
'Karnak': "1.5.1",
'Kasane Teto': "2.1.0",
'Kassandra': "1.0.0",
'Kasumi': "0.69.0",
'Katana': "0.74.0",
@@ -1104,6 +1132,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'King': "0.61.0",
'King Arthur': "0.19.0",
'King Bradley': "0.77.0",
'King Dedede': "2.1.0",
'King Ghidorah': "0.95.0",
'King Kong': "0.63.0",
'King Monkey': "0.82.0",
@@ -1115,6 +1144,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Kiss-Shot Acerola-Orion Heart-Under-Blade': "0.77.0",
'Kitana': "0.6.0",
'Kitty Pryde': "0.17.0",
'Kiwi': "2.2.0",
'Klingon': "0.57.0",
'Klytus': "1.1.0",
'Kokoro': "0.69.0",
@@ -1134,6 +1164,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Kuiil': "0.21.0",
'Kung Lao': "0.7.0",
'Kurapika': "0.87.0",
'Kuromi': "2.1.0",
'Kurumi Tokisaki': "0.69.0",
'Kwame': "0.69.0",
'Ky Kiske': "0.88.0",
@@ -1143,6 +1174,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Kyo Kusanagi': "0.61.0",
'Kyojuro Rengoku': "0.74.0",
'Kyoko Sakura': "0.77.0",
'Kyubey': "2.1.0",
'L Lawliet': "0.16.0",
'La Lunatica': "0.72.1",
'Lady (Devil May Cry)': "0.79.0",
@@ -1274,6 +1306,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Mai Sakurajima': "0.76.0",
'Mai Shiranui': "0.6.0",
'Maid Marian': "0.85.0",
'Maine': "2.2.0",
'Majin Buu': "0.43.0",
'Maka Albarn': "1.0.0",
'Maki Genryusai': "0.58.0",
@@ -1304,6 +1337,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Marin Kitagawa': "0.69.0",
'Mario': "0.7.0",
'Marisa': "0.58.0",
'Marisa Kirisame': "2.1.0",
'Marnie': "0.69.0",
'Maron': "0.74.0",
'Martian Manhunter': "0.7.0",
@@ -1313,6 +1347,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Mary Jane Watson': "0.18.0",
'Mary Marvel': "0.18.0",
'Mary Poppins': "0.18.0",
'Mash Kyrielight': "2.1.0",
'Master Chief': "0.7.0",
'Master Roshi': "0.77.0",
'Maui': "0.16.0",
@@ -1356,6 +1391,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Merlin': "0.19.0",
'Mervyn Pumpkinhead': "1.9.0",
'Messmer the Impaler': "1.11.0",
'Meta Knight': "2.1.0",
'Mewtwo': "0.21.0",
'Mia Wallace': "0.76.0",
'Michael Myers': "0.16.0",
@@ -1414,6 +1450,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Mona': "1.4.0",
'Monkey D. Luffy': "0.7.0",
'Monkey Fist': "0.69.0",
'Monokuma': "2.1.0",
'Moogle': "0.60.0",
'Moon Knight': "0.19.0",
'Moondragon': "0.69.0",
@@ -1440,6 +1477,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Mr. Peanut': "0.51.0",
'Mr. Spacely': "0.77.0",
'Mr. Spock': "0.7.0",
'Mrs. Potts': "2.1.0",
'Ms. Marvel (Kamala Khan)': "0.45.0",
'Ms. Marvel (Sharon Ventura)': "0.45.0",
'Mt. Lady': "0.57.0",
@@ -1452,6 +1490,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Mynock': "0.21.0",
'Mysterio': "0.16.0",
'Mystique': "0.6.0",
'Nagito Komaeda': "2.1.0",
'Nakoruru': "1.0.0",
'Nami': "0.6.0",
'Namor': "0.19.0",
@@ -1462,6 +1501,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Nancy Downs': "1.0.0",
'Nancy Drew': "0.74.0",
'Nani Pelekai': "0.74.0",
'Nanoha Takamachi': "2.1.0",
'Naoto Shirogane': "0.88.0",
'Naruto Uzumaki': "0.7.0",
'Natalia Kassle': "0.69.0",
@@ -1501,7 +1541,9 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Nobara Kugisaki': "0.16.0",
'Noctis': "0.16.0",
'Nocturne': "0.18.0",
'Noel Vermillion': "2.1.0",
'Noelle Silva': "1.0.0",
'Noriaki Kakyoin': "2.1.0",
'Nosferatu': "1.0.0",
'Nova (Frankie Raye)': "0.18.0",
'Nova (Richard Rider)': "0.19.0",
@@ -1532,6 +1574,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Orchid': "1.3.0",
'Origami Tobiichi': "0.69.0",
'Orihime Inoue': "0.16.0",
'Orion': "2.1.0",
'Orko': "0.17.0",
'Orochimaru': "0.16.0",
'Other Mother': "0.77.0",
@@ -1643,6 +1686,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Rachel Summers': "0.69.0",
'Rage (Marvel)': "0.69.0",
'Ragged Robin': "1.8.0",
'Ragna the Bloodedge': "2.1.0",
'Ragyo Kiryuin': "0.77.0",
'Raiden': "0.7.0",
'Raiden Shogun': "0.16.0",
@@ -1674,6 +1718,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Red Skull': "0.16.0",
'Red Sonja': "0.69.0",
'Rei Ayanami': "0.6.0",
'Reimu Hakurei': "2.1.0",
'Reinhardt': "0.16.0",
'Rem': "0.77.0",
'Rena Rouge': "0.82.0",
@@ -1732,6 +1777,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Roy Mustang': "0.16.0",
'Rubeus Hagrid': "0.63.0",
'Ruby Rhod': "0.69.0",
'Ruby Rose': "2.1.0",
'Rukia Kuchiki': "0.16.0",
'Rumi': "0.60.0",
'Rydia': "0.60.0",
@@ -1764,6 +1810,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Saitama': "0.7.0",
'Sakura Haruno': "0.6.0",
'Sakura Kasugano': "0.16.0",
'Sakuya Izayoi': "2.1.0",
'Salaak': "0.22.0",
'Salacious Crumb': "0.21.0",
'Salama': "0.79.0",
@@ -1813,6 +1860,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Selene (Underworld)': "0.76.0",
'Selene Gallio (Black Queen)': "0.69.0",
'Selvaria Bles': "1.0.0",
'Senshi': "2.1.0",
'Senua': "0.16.0",
'Seong Gi-hun': "0.87.0",
'Seong Mi-na': "0.58.0",
@@ -1820,6 +1868,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Seraphine': "0.77.0",
'Serena': "0.69.0",
'Sersi': "0.69.0",
'Serval (Kemono Friends)': "2.1.0",
'Sesshomaru': "1.8.0",
'Sett': "0.81.0",
'Seven of Nine': "0.57.0",
@@ -1831,6 +1880,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Shang Tsung': "0.16.0",
'Shanks': "0.77.0",
'Shanna the She-Devil': "0.69.0",
'Shantae': "2.1.0",
'Shao Kahn': "0.7.0",
'Sharon Carter': "0.69.0",
'Shazam': "0.7.0",
@@ -1882,6 +1932,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Snake Eyes': "0.17.0",
'Snake Plissken': "0.16.0",
'Sniper (Team Fortress 2)': "0.88.0",
'Snoopy': "2.1.0",
'Snorlax': "0.21.0",
'Snow White': "0.6.0",
'Snowbird': "0.18.0",
@@ -1895,6 +1946,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Soma Yukihira': "0.79.0",
'Sombra': "0.16.0",
'Sona': "0.81.0",
'Song So Mi': "2.2.0",
'Songbird': "0.69.0",
'Sonic the Hedgehog': "0.19.0",
'Sonya Blade': "0.16.0",
@@ -1958,6 +2010,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Subaru Natsuki': "0.77.0",
'Suki': "0.16.0",
'Sukuna': "0.16.0",
'Suletta Mercury': "2.1.0",
'Sumire Yoshizawa': "0.88.0",
'Summer Smith': "0.77.0",
'Sunfire (Exiles)': "0.18.0",
@@ -1978,7 +2031,9 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Taki': "0.58.0",
'Tala': "0.18.0",
"Tali'Zorah": "0.60.0",
'Talia Yang': "2.2.0",
'Talia al Ghul': "0.18.0",
'Tamamo no Mae': "2.1.0",
'Tanjiro Kamado': "0.16.0",
'Tank Girl': "1.0.0",
'Tanya': "0.58.0",
@@ -2068,11 +2123,13 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Tomar-Re': "0.22.0",
'Tomura Shigaraki': "0.16.0",
'Tony Stark': "0.7.0",
'Tony Tony Chopper': "2.1.0",
'Tony the Tiger': "0.51.0",
'Toothless': "0.95.0",
'Topaz': "0.74.0",
'Toph Beifong': "0.6.0",
'Torbjorn': "1.4.0",
'Toriel': "2.1.0",
'Toshiro Hitsugaya': "0.74.0",
'Totoro': "0.18.0",
'Touka Kirishima': "0.76.0",
@@ -2103,6 +2160,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Ultron': "0.17.0",
'Ultros': "0.60.0",
'Uncle Fester': "0.59.0",
'Undyne': "2.1.0",
'Unkar Plutt': "0.21.0",
'Urbosa': "0.16.0",
'Urd': "1.0.1",
@@ -2142,10 +2200,12 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Vivi Ornitier': "0.60.0",
'Vixen': "0.69.0",
'Vogue': "0.57.0",
'Volcana': "2.2.0",
'Voldo': "0.58.0",
'Von Lycaon': "1.4.0",
'Vulcan': "0.57.0",
'Vulture': "0.19.0",
'WALL-E': "2.1.0",
'Waluigi': "0.74.0",
'Wampa': "0.20.0",
'Wanderer (Genshin Impact)': "1.4.0",
@@ -2157,6 +2217,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Wedge Antilles': "0.19.0",
'Wednesday Addams': "0.6.0",
'Weeping Angel': "0.87.0",
'Weiss Schnee': "2.1.0",
'Wendy': "0.43.0",
'Wendy Darling': "0.18.0",
'Wheeler': "0.69.0",
@@ -2167,6 +2228,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Wicked Witch of the West': "0.59.0",
'Wicket the Ewok': "0.20.0",
'Widowmaker': "0.6.0",
'Wild Tiger': "2.1.0",
'Wildcat': "0.45.0",
'Wile E. Coyote': "0.98.0",
'Will Turner': "0.77.0",
@@ -2194,6 +2256,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Yamada Asaemon Sagiri': "0.73.0",
'Yamato (One Piece)': "1.5.0",
'Yami Yugi': "0.87.0",
'Yang Xiao Long': "2.1.0",
'Yasuo': "0.77.0",
'Yelena Belova': "0.76.0",
'Yennefer of Vengerberg': "0.6.0",
@@ -2209,6 +2272,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Yoshino': "0.69.0",
'Yuffie Kisaragi': "0.6.0",
'Yuji Itadori': "0.16.0",
'Yukari Yakumo': "2.1.0",
'Yumeko Jabami': "0.76.0",
'Yuna': "0.6.0",
'Yunara': "0.81.0",
@@ -2289,6 +2353,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Astronaut': "0.5.0",
'Astronomer': "0.29.0",
'Athlete': "0.5.0",
'Aztec Noble': "2.3.0",
'B-Boy / B-Girl': "0.42.0",
'Babushka': "0.42.0",
'Backyard Country Casual': "0.35.0",
@@ -2382,6 +2447,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Halfling Rogue': "0.5.0",
'Hanfu': "1.6.0",
'Hazmat Technician': "0.87.0",
'Heian Court': "2.2.0",
'Highland Scot': "0.42.0",
'Highwayman': "1.6.0",
'Hockey Goalie': "0.90.0",
@@ -2418,6 +2484,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Matador': "0.90.0",
'McBling Socialite': "0.34.0",
'Mechanic': "0.5.0",
'Medieval Monarch': "2.2.0",
'Medieval Peasant': "0.67.0",
'Metalhead': "1.6.0",
'Metrosexual': "0.34.0",
@@ -2436,6 +2503,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Oktoberfest': "0.50.0",
'Opera Singer': "0.50.0",
'Orchestra Conductor': "0.5.0",
'Ottoman Court': "2.2.0",
'Outback Bushman': "0.42.0",
'Paramedic': "0.29.0",
'Parisian Chic': "0.42.0",
@@ -2465,6 +2533,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
'Roaring Flapper': "0.5.0",
'Roaring Twenties Gent': "0.24.0",
'Rock Climber': "0.17.0",
'Rococo Courtier': "2.2.0",
'Rodeo Rider': "1.11.0",
'Roller Derby': "1.11.0",
'Roman Centurion': "0.17.0",
+130
View File
@@ -289,6 +289,40 @@ Two engine-facing traps this rewrite hit, both silent, both now pinned by tests:
by the "Auto (preset)" sentinel on the two widgets (see "Vault recall and the control
sentinels"); the Turnaround did not wait, because it has no widget to add one to.
### Sheets that change the person: release, don't override (2.3.0)
The Turnaround and Expression Sheet override a few fields and replay the rest unchanged. The
Outfit Sheet and Age Progression nodes change things other fields depend on (an outfit style
gates makeup, jewellery and hair styling; an age gates hair colour, skin detail and some
outfits), so overriding alone would replay a value a live rule now excludes, and the engine
would log a "keeping lock" conflict. They use **release** instead. The shared helpers live in
`nodes/identity_forge_turnaround.py`: `replay_base()` builds the common replay kwargs,
`document_fields()` flattens a document, and `release_fields()` drops named fields from the
document (and from `_meta.omitted`), so the engine redraws them under the new pin from its
fixed replay seed.
- **What to release is asked, not hard-coded.** For each pin (`outfit_style`, `age`, a framing,
a grey hair colour) the node asks `lock_clash(field, value, context)` which kept fields the
pin refuses, and releases those. Face and body never clash, so the person stays.
- **Outfit Sheet:** releases the whole Clothing group, and with a studio backdrop the scene
fields (location, lighting, composition, season; a locked season otherwise clashes with a
studio). Makeup, jewellery and hair styling are released per style when that style refuses
them (`_RESTYLED`). A style that would refuse anything else is skipped and logged; with the
default backdrop that never happened over the test sweep, while "Keep the character's scene"
usually keeps 3 to 4 of 6 styles because many places refuse formal or athletic wear.
- **Released fields need a per-character seed.** The fixed `_REPLAY_SEED` is right when a
replay redraws nothing, but a released field redrawn from a fixed seed lands on the same
value for every character: the first draft's per-style seeds gave 40 characters four casual
outfits, most of them grey. `character_seed()` hashes the document (plus a salt: the style
and the user's `outfit_seed`, or "age"), so a redraw differs between characters and repeats
for the same one. Age Progression uses it for the fields an age refuses. A cosplay, a full-body suit or a suppressed
Clothing group gives one view, unchanged.
- **Age Progression:** only `age` is pinned, so face shape, eye colour, build and the rest stay.
Hair greys only for a natural-scope, non-cosplay, uncovered head: a stage past 55 and older
than the character turns dark hair salt and pepper (silver from 70), any other colour silver;
a grey-haired character shown younger gets a natural colour drawn once at age 20 with hair
colour released. A face-covering character, or one with no numeric age, gives one view.
### Vault recall and the control sentinels (1.0.0)
`wardrobe` and `hair_color_scope` are control fields — they live only in `_meta`, never in
@@ -876,6 +910,18 @@ underneath to randomize; that also closes the costume-asserts-a-body-trait probl
`eyes` and `costumes` alternates are rejected by `validate_data.py`: a beast has no
hand for a prop, its colour is its integument, and a body plan is not a look.
**Non-humanoid machines take this path too (2.1.0).** `R2-D2`, `BB-8` and `Gonk Droid`
shipped as suit entries and the gallery drew a man posing *beside* the droid: a famous
name makes the model draw the machine as an object, and "a short man ... wears a ...
droid body" then adds a person next to it. As feral entries all three rendered as the
droid alone on the first try. The test is the body plan, not "beast or machine": no
human limbs in the right places (a ball, a three-legged can, a box on legs) means feral;
a humanoid robot (C-3PO, Bender, Megatron) stays a suit entry with `covers_body`. They
use `creature_class: "Machines"`, a cosplay-only class `validate_data.py` accepts beside
`CREATURE_CLASSES` (it only decides the "monstrous" adjective, and a generic creature
never needs it). The look level does not switch a machine back to a person in costume:
that reading is the render that failed.
**Prose framing.** A feral subject does **not** take the `Cosplaying as X:` prefix —
that framing tells a t2i model to render a human in a suit, which is precisely the
failure the path exists to fix. The label is apposed instead: *"Appa (Avatar: The Last
@@ -947,6 +993,22 @@ free-form prose (own render path — not validated against human fields). Rules:
- **Suppression:** a creature `head` hides human Face/Hair/Makeup; `integument` hides skin
fields; `form` (Anthropomorphic/Feral/Subtle) sets group-level suppression. Generalizes the
cosplayer `covers_face` mechanism via `_meta.suppress_groups` / `suppress_fields`.
- **Anthropomorphic is a clothed hybrid, Feral is the creature itself.** Anthro keeps the
outfit and body build, and drops only `fitness_level` (a lifestyle word: "a sedentary
nautilus"). For classes in `_BODY_DEFINED_CLASSES` (Monsters, Aliens), whose anatomy
slots already describe a whole person-shaped body, Anthro also drops the human
proportions (bust, waist, hips, shoulders, neck) and the lead noun is "humanoid
skeleton", not "anthropomorphic skeleton hybrid": "hybrid" read as a human with
skeleton traits and rendered a person in a windbreaker (2.4.0). Suppression pops fields
after the draw, so no seed moves; only prose changes.
- **A creature's `anthro` block rewrites it for the Anthropomorphic form.** Some animals
render whole beside a person in Anthro form (a stegosaurus with forelegs and hind legs,
a nautilus shell, a gas cloud). An optional `anthro` dict in the entry gives
replacement slot text for that form only (`""` drops a slot), plus an optional
`subject` lead noun ("scaly reptilian humanoid"), carried in `_meta.anthro_subject` so
recall keeps it. Feral and Subtle use the normal slots. The text swap happens where a
slot is read, so it adds no draw. Prefer naming body parts on a person-shaped body over
naming the whole animal; the Krea2T Enhancer in the gallery pipeline does the rest.
## Extending at runtime — user_options.json
@@ -1093,6 +1155,12 @@ never a guessed default, and **never a substring match on a model name**: the si
merge, plausible enough that nobody noticed until it was published. Preflight checks every
model, `sampler_name` and `scheduler` against live `/object_info` before the first queue.
An optional `enhancer_text_scale` in `render_config.json` (0 = off) puts the
`Krea2T-Enhancer-Advanced` node (ComfyUI-Krea2T-Enhancer) between the LoRA and the sampler;
preflight checks the node is installed. At 1.5 it stopped the turbo model drawing a
skeleton, golem or mole as a plain person (2.4.0); the setting is recorded in each
manifest entry's `render` record.
**Render settings are excluded from the entry hash, on purpose.** Stylebook folds its render
settings into each tile's hash, which is right there because every tile was produced under
recorded settings. Here, ~2,150 images predate this pipeline and were rendered by hand under
@@ -3517,6 +3585,33 @@ caught and fixed during this task's review rounds. `<img>` tags lazy-load via
lazy-load pattern, so opening the dialog with previews on does not eagerly fetch hundreds of
images at once.
**Superseded in 2.3.0: previews go through a server-side cache.** ComfyUI's `--offline` flag adds
a Content-Security-Policy (`img-src 'self' data: blob:; connect-src 'self' ...`) that blocks the
browser from reaching github.io at all, so the direct fetch above showed nothing for those users.
The picker now asks its own ComfyUI origin (`/identity_forge/gallery/<folder>/manifest.json` and
`/identity_forge/gallery/<folder>/images/...`, via `api.apiURL`), and `nodes/gallery_cache.py`
fetches from `gh-pages` server-side and keeps the files under ComfyUI's user directory
(`identity_forge/gallery_cache/`). The CSP binds only the browser, so the server fetch is allowed.
Rules that keep it safe and small:
- **Only what is viewed is stored.** Images are fetched one at a time as the picker lazy-loads
them; nothing is prefetched. The whole gallery is a few hundred MiB, a typical session a few MiB.
- **Only manifest-listed paths are fetched,** always from the one fixed gh-pages root, and the
resolved cache path must stay inside the cache folder. The kind is an allowlist. So a request
can never make the server fetch an arbitrary URL or write outside its folder.
- **Freshness:** the manifest is reused for 10 minutes, an image for 7 days, then revalidated
with the stored ETag (a 304 just renews the file's mtime). Filenames are stable across
re-renders, so a re-rendered image arrives on its next revalidation.
- **Offline fallback:** any network failure serves the cached copy; with nothing cached the
route returns 404 and the picker falls back to text-only, as before.
- **Size caps and type checks:** a manifest must parse as JSON with an `entries` list, an image
must come back as `image/*`, and each has a byte limit. Writes are atomic.
- **Clear cached previews** in the picker POSTs `/identity_forge/gallery/cache/clear` (a JSON
body is required, the same CSRF guard as the other POST routes) and reports the size freed.
The server-side fetch does mean the pack contacts github.io even under `--offline` once a user
ticks "Show preview images"; the picker's notice says so, and the checkbox stays off by default.
**Two Critical bugs surfaced only by live testing**, not by the automated jsdom suite (documented
at length in the task's own reports; named here because they shaped what shipped): the trigger
button was fully clickable while its node was still an unplaced LiteGraph "ghost" (Escape then
@@ -3593,6 +3688,41 @@ opt-in per entry rather than parsed from the front text, which is the regex-over
trap. validate_data.py requires a non-empty string on a non-feral entry that has a
`costume`.
### The lead noun: `subject` (2.1.0)
The first sentence names what the image is of: "a short man with a stocky build". A
non-human face voiced only in a later sentence (the mask, or `eyes`) loses to that noun.
Every Tellarite render drew a bearded man in a tunic with no snout, and many mascots drew
a person holding a plush of the character. An optional `subject` string replaces
"man"/"woman" in that lead phrase: "a short pig-headed humanoid alien with a stocky
build", "a life-size Pikachu mascot".
* It is a bare noun phrase: no article, no trailing punctuation. The engine supplies the
article and the height and build words around it.
* It travels as `_SUBJECT_NOUN_KEY` beside the mask and is written to the JSON `_meta`, so
a vault reload keeps it. It is in `_COSTUME_META_KEYS`, so a downstream costume drops
it, like the mask.
* The cosplayer node leaves it out on unmask, because the person underneath then shows.
It is rejected on a feral entry, which already leads with `creature_of`.
* Use it when the face is the identity and is not human (aliens, skull heads, animal
heads that rendered as a person) and for a mascot that rendered as a person beside a
plush ("life-size X mascot"). Give it only after a before/after render shows a gain.
* A face that still loses with the noun often wins as a **"full-head latex ... mask"** in
the mask text (Tellarite, Red Skull): the model knows that object, while a bare "skull-
like face" rendered a plain man.
* Known limit: a single eye. The model draws one eye only in a short prompt about nothing
else; the character name or a full-length prompt brings back two (Allen the Alien, Leela).
See docs/history.md -> "2.1.0" for the trials.
### Weighted alternate looks: `costume_weights` (2.1.0)
`_pick_look` picks among the canonical `costume` and its `costumes` alternates with a
plain `rng.choice`. An optional `costume_weights` list (one positive number per look,
canonical first) switches that entry to `rng.choices` with those weights, so the
best-known look can lead (Orion: the TOS dancer 2, Gaila's cadet uniform 1). An entry
without the key keeps the one `rng.choice` call it always made, so no existing seed
moves. validate_data.py checks the length against the look count.
## Release history
Per-release investigation notes (measured numbers, what was tried, what was declined)
+5 -1
View File
@@ -29,7 +29,11 @@ visible face like Hulk).
The node's **`mask`** widget controls this per render: **Default** keeps the mask
on, while **Unmask (show face)** drops the mask *and* clears `covers_face`,
so the randomized head/hair shows under the suit — a helmet-off look (Tony Stark in
the Iron Man armor). It is a no-op for face-visible characters. Keeping the head
the Iron Man armor). It is a no-op for face-visible characters, and for feral
entries (beasts and non-humanoid droids such as R2-D2): there is no person inside,
and a human head on a droid body is the render the feral route exists to prevent. A
humanoid robot on the suit route (C-3PO, Lumiere) does unmask, as a cosplayer with the
helmet off. Keeping the head
covering in its own field is what lets it be removed cleanly, with no stray
"faceplate" reference stranded in the costume prose.
+5 -1
View File
@@ -101,7 +101,11 @@ cosplayer + an integument creature drop both the face and the skin).
3. **Render quality varies by model.** Anthropomorphic and hybrid forms are harder for
some checkpoints than realistic humans. Lean on a checkpoint that knows the
creature, and use `form`/`palette` to steer.
creature, and use `form`/`palette` to steer. On Krea2 with a turbo LoRA, the
Krea2T Enhancer node (text_scale around 1.5) between the LoRA and the sampler made
the model draw the creature instead of a person in clothes. A few non-humanoid
animals carry their own Anthropomorphic wording so they render as one figure
rather than a person beside the whole animal.
4. **Feral form vs a wired costume.** Feral drops Clothing, so a costume wired in front
of a feral creature is intentionally discarded (a feral dragon is not wearing a
+421
View File
@@ -1281,3 +1281,424 @@ around it plus a gaze clause, the same incidental drift 0.90.0 and 0.97.0 accept
samples were rendered and published (Superman, Carhop, owlbear); every other record was
accepted as-is with the new `render_gallery.py --rehash`, which moves only the recorded
hash. From here the prose hash flags any entry whose text changes.
## 2.1.0 - droids render as droids, a lead noun for non-human faces, Orion, a picker gender filter
**Random characters are unchanged.** Every change is a roster entry's own text, a new
roster entry, or the picker UI. Two knock-ons for the Cosplayer node's random picks: the
three droids and Pac-Man leave the `Masked` scope and the "People only" `random_pool` for `Beast /
non-humanoid`, and the new entries grow the candidate list, so a fixed seed under any
`Random - ...` choice can now pick a different character (as at every roster release).
**R2-D2, BB-8 and Gonk Droid moved to `body_plan: "feral"`.** The maintainer saw a man
posing beside R2-D2 in the gallery. The published BB-8 tile showed the same thing, and Gonk
showed a man's head out of a grey box. All three were suit entries whose prompt led "a short
man with a stocky build ... He wears a ... droid body": a famous name makes the model draw the
machine as an object, and the sentence then adds a person next to it. As feral entries
("R2-D2 (Star Wars), a three-legged astromech droid, ...") all three rendered as the droid
alone on the first seed. Chopper and Lumiere stay suit entries: both rendered correctly
because their long descriptions win, and neither tile is wrong. The feral route was written
for animals, so this opens it to non-humanoid machines with a cosplay-only
`creature_class: "Machines"`; see architecture.md -> "Writing a feral entry". The Claptrap
and Wrecking Ball declines rested on the old "a machine is not a beast" reading, and are
marked lapsed in suggested-additions.md.
The look level was considered as the switch ("Costume only" = a person in an R2-D2 costume,
"Full character" = R2-D2 itself) and not built: the person-in-costume reading is exactly the
render that failed.
**Blue Beetle (Ted Kord) rewritten.** The entry said black cowl, black gloves and boots and
"large round black goggles", and rendered a black hood with black swim goggles. Canon
(Wikipedia plus figure references) is a light-blue suit with dark navy gloves, trunks, boots and
cowl, a dark beetle shape across the chest and shoulders, and yellow goggles. A maintainer-
supplied description added white lenses and antenna lines on the cowl; no source backed either,
so neither was used. The first render drew the right suit on a heavy 55-year-old; one
`--reroll` gave the published tile.
**More machines and enchanted objects.** Claptrap, WALL-E, Dalek, Johnny 5, Codsworth and
Mrs. Potts ship on the feral route, and Cogsworth on the suit route beside Lumiere (arms and
legs where a person's are). Every one rendered as the machine or object alone on its first
seed, with no person in frame. Wrecking Ball, BD-1, the Mouse Droid and K-9 were declined;
see suggested-additions.md.
**The sd-character-finder survey.** The catalogue (Danbooru, e621 and AnimaDex tags with a
popularity rank) was ranked against the roster. Its unmatched top is mostly large uniform or
gacha casts the backlog already closes, so the survivors ship: the first Touhou entries (Reimu
Hakurei, Marisa Kirisame, Sakuya Izayoi, Yukari Yakumo), Black Rock Shooter, Noriaki Kakyoin,
Mash Kyrielight, Edelgard (her Part II emperor look), Shantae, Catra (the 2018 reboot, its own
franchise beside the 1985 She-Ra) and Kasane Teto as worn looks; Toriel, Undyne, Doraemon,
Hello Kitty, Kuromi, Meta Knight, King Dedede, Monokuma and Tony Tony Chopper on the mascot
route (the last two with the Pikachu scale pin); Snoopy and Kyubey on the feral route. The
Hololive VTubers were left out at the maintainer's call; Domo-kun, the maintainer's own pick, joins on the mascot route. Two authoring notes: a body-colour
clause needs a material noun ("a coat of blue fur"), or the colour capture runs on to the
next comma and voices "a red skin"; Doraemon uses the `skin` key instead. A feral pose
sentence follows "He is", so it cannot say "its back".
**Unmask on a droid.** The question was whether "Unmask (show face)" should put a person
inside a droid. It already does for a suit entry (C-3PO, Lumiere, Cogsworth): a cosplayer
with the helmet off. It stays a no-op on a feral entry, because a human head on R2-D2's body
is the Gonk render this release removed. The mask tooltip now says so.
**Roster picker gender filter.** A Female / Male select beside the trait facet. Entries with no
single gender (creatures, "Any" archetypes) stay visible under both choices. Like the facet,
it survives closing the picker and resets on reload.
**The lead noun (`subject`).** The Tellarite repair from 1.11.0 stayed open because the
snout never rendered: the prompt led "a short man with a stocky build" and the mask
sentence that followed lost to it every time. A new optional `subject` key replaces
"man"/"woman" in that lead (architecture.md -> "The lead noun: `subject`"). With
"pig-headed humanoid alien" the Tellarite drew the snout and beard on the first seed. The
same test ran on every masked or mascot entry whose published tile showed a person, each
trial at the gallery seed beside the published tile:
- *Kept:* Kuiil, Unkar Plutt, Ithorian, Nien Nunb, Bothan, Kilowog, Larfleeze, Ponda Baba
(with a walrus-led mask rewrite), Mynock, Krampus, Ainz, Spinal, Witch-King, Orko, Vivi,
and the mascots that had drawn a person holding a plush: Pikachu, Jigglypuff, Gengar,
SpongeBob, Mr. Krabs, Eeyore, Piglet, Sackboy, Kool-Aid Man, Mr. Peanut, Rosie the
Robot, White Rabbit, Ultros and Voldo. Gardevoir ships with one from the start.
- *Moved to the feral route instead:* Pac-Man. With the noun it was still a person in a
yellow suit; as the character itself ("a round yellow arcade character") it rendered as
the arcade Pac-Man alone on both seeds. A cartoon version with arms, gloves and red shoes
rendered as well; the arcade disc is the better-known look, and a feral entry has no
alternates. A person-in-a-Pac-Man-suit option was not kept: that is the render that failed.
- *Kept, with a new mask:* the noun alone still drew a plain man for Red Skull and a
human face for Moon Knight. Rewritten as "a full-head red latex Red Skull mask" and "a
full-head white cloth mask wrapping his whole face", both rendered right on both seeds.
Porco Rosso, as "a pig's head instead of a human head", gets the ears and snout on one
seed of two; nothing tried did better.
- *Obscure aliens:* several Star Wars species are close to unknown to the model. They keep
the noun and the most specific description sources support; that is where they land.
**One eye is a model limit.** Allen the Alien and Leela are cyclopes, and every render drew
two eyes. Tried, two seeds each: the noun ("one-eyed cyclops alien", "cyclops woman"); an
eye phrase saying "no other eyes"; a latex cyclops mask; a cyclops face prosthetic on Leela
(which also dropped her purple hair); a close-up framing. All failed. A bare prompt ("a
photo of a big orange cyclops alien with one huge eye in the middle of his face") drew one
eye on both seeds, so the model can do it, but the same prompt prefixed with "Cosplaying as
Allen the Alien (Invincible):", or lengthened to the gallery's detail, drew two again. Both
entries keep the cyclops noun and their best text; Leela's costume no longer lists "a single
large central eye" as something she wears.
**Two-colour eyes.** An `eyes` override is voiced as "She has <eyes>", so "one blue and one
yellow" read "one blue and one yellow eyes". Catra, Frankie Stein and Ragna now say "one
blue eye and one yellow eye" in full.
**Orion.** The TOS dancer (jewelled two-piece, veils, bangles, green skin) is the canonical
look; Gaila's red Starfleet cadet dress (Kelvin films) is the alternate. The new
`costume_weights` key leans the pick 2:1 toward the dancer (measured: about a third of seeds
draw the cadet), without moving any other entry's seeds (architecture.md -> "Weighted
alternate looks").
**The survey's second tier.** Hilda, Gloria, Iono, Gardevoir (mascot), Byleth, Nagito
Komaeda, Chiaki Nanami, Jonathan Joestar, Tamamo no Mae, Falin Touden, Senshi, Suletta
Mercury, the four RWBY leads, Wild Tiger and Barnaby, Nanoha and Fate, Ragna and Noel,
Arcueid Brunestud and Serval. Kiana Kaslana and Caesar Zeppeli were declined (no one stable
outfit, colours not verifiable); see suggested-additions.md.
## 2.2.0 - Cyberpunk roster, Volcana, period court dress, a picker franchise filter
**Random characters move through the outfit corpus and one new location** (below). Four new phrases (three in
`edgy alternative`, one in `vintage retro`) change which outfit a fixed seed draws in those
two styles; field marginals still match the committed baseline (`sweep_marginals.py
--check`). Nine creature gallery tiles whose outfit draw moved were re-rendered.
**Cyberpunk entries checked against Danbooru tag counts and the wiki, not the brief.**
- David Martinez wore a red bomber; canon is the yellow EMT jacket with the glowing blue
collar. Panam Palmer and Rebecca were rebuilt the same way (Rebecca's tagged skin is
chalk-white with seam lines, her eyes green on red sclera; the huge cyberarms are a
weighted alternate).
- New: Maine, Kiwi, Talia Yang (Edgerunners 2), Adam Smasher (a full-body suit entry, the
C-3PO precedent), Song So Mi (green gown primary, netrunner alternate at weight 1 of 3).
- The brief's Maine (buzzcut, yellow optics) and Pilar (white pompadour, pink skin) did not
match the sources; Maine follows the tags (flattop, red shades), Pilar was declined.
**Volcana (DC)** ships with fair skin and red-orange hair; the brief's olive skin is not in
the sources.
**A costume that names earrings or a necklace now suppresses the random one**
(`_COSTUME_JEWELRY_RES` in the Cosplayer node), so Volcana's gold hoops no longer sit beside
a second pair in Costume-only mode. Full character already dropped random jewellery, so no
gallery tile moved.
**An eyes override must not end in an eye part.** Kiwi's "feline red, yellow-sclera" dropped
the noun "eyes" (`_EYE_PART_RE`); the adjectives were reordered.
**Period court dress.** Rococo Courtier, Medieval Monarch, Ottoman Court and Heian Court were
added from a 15-prompt historical-costume list; the rest were existing looks under other
names (see suggested-additions.md -> "Archetypes - declined"). Ancient Roman Patrician gained
a Female variant (stola and palla). The new looks lock "no tattoos", and `_is_essential` now
keeps a `tattoos` lock in Essentials: before this a Heian court lady drew a modern script
tattoo. No older archetype locks tattoos, so nothing else moved.
**Picker franchise filter.** The roster picker gains a franchise select beside the gender
filter, grouped by category, kept for the session like the other filters.
**The outfit wildcards were mostly not usable.** The punk and pinup packs are lingerie worn
as outerwear, with footwear and fabric jargon built into each line; they break the corpus
contract and would tilt women's outfits toward sexualized looks. Four phrases were taken,
with pattern words (tartan, leopard, gingham) removed because the `pattern` field owns them.
**Render-review fixes.** Adam Smasher drew a human face over the armor ("a very tall man"
led the prompt); a `subject` of "towering armored cyborg" fixed it. Talia Yang's mandible
mask, last in a long costume list, was dropped; it now leads the costume. The leprechaun's
integument repeated its palette ("ruddy freckled ruddy freckled skin", the only creature
that did) and its gallery seed drew a woman with the folklore beard; the integument is now
plain "skin" and the gallery tile is pinned Male (`_GALLERY_GENDER`). The node itself still
gives a female leprechaun the beard: creature slots have no gender gate.
**A `gilded palace throne room` location.** Rococo Courtier and Ottoman Court were using a
grand hotel suite and a European castle courtyard as stand-ins. The value joins the
`civic_institutional` family (frozen family weight, so the family's share is unchanged; the
new value draws about 0.5% of random characters) and the formal-room rules: dressy outfit
styles, no athletic wear, no casual headwear, candlelight allowed. Medieval Monarch stays in
the cathedral, where coronations happen. Every seed that draws the civic family re-picks
within a longer list, so 94 gallery samples whose prompt moved were re-rendered, and the
marginals baseline was rewritten.
**Period looks lock tattoos and piercings.** Renaissance Noble, Victorian Lady, Victorian
Dandy, Gibson Girl, Regency Aristocrat, Greek Goddess, Egyptian Pharaoh, Roman Centurion,
Medieval Peasant, Musketeer and Highwayman now lock "no tattoos" and "no piercings beyond
ears", as the four new court looks do. Bracelets and rings are left free: pharaohs and
nobles wore them. Warrior and living-tradition looks (Gladiator, Viking Shieldmaiden,
Samurai, the cultural-dress archetypes) are unchanged.
**Maintainer render review of the re-rendered tiles.** Each fix names what the render
lacked, because the model only draws what the prose says:
- Darth Vader drew bare hands: the costume never named the suit, gloves or boots. They are
named now, and `covers_body` drops the wearer's skin and build.
- Reverse-Flash had no mask (none was written); a yellow cowl with red ear bolts now mirrors
The Flash entry, with `covers_face` and a `costume_back`.
- The Maxx and the Tusken Raider showed a human face inside the mask: the prose led with "a
... man with ... skin". Both take `covers_body` and a `subject` lead noun, and the Tusken
mask says the head is fully wrapped with no skin showing ("a bandage-wrapped face" drew a
face). "Unmask (show face)" still shows the face.
- Tatsumaki's "faint" aura, last in the list, did not render; the glow now leads. Her dress
is canon (long sleeves, high collar, leg slits, not a sleeveless cocktail dress), and her
age (28) and pale skin are pinned.
- The horseshoe crab drew a plain man ("drawn low over the face"), then a man wearing the
shell as a hat ("a shell in place of a head"). A negated "no human head at all" was
ignored on most seeds, so the head now leads positively ("a faceless horseshoe crab
head"), like the other arthropods. Body parts with no place on a biped ("two smooth
shields", "a plated abdomen", "the rear shield") rendered as a second whole crab held at
the side; each is now anchored (carapace over back and chest, tail from the lower back,
gills under the torso). Chitin arms and pincers for hands; the tile is rerolled once.
- Three creature tiles were rerolled without a data change (`--reroll`, recorded in the
manifest): the biomechanical alien ("biomechanical" is a Giger style token and restyled
a gilded palace around it), the ocean sunfish (drew a woman holding a fish) and the
crystalline alien (a hoodie hid the translucent body).
## 2.3.0 - offline picker previews, Outfit Sheet, Age Progression, Aztec Noble, more back views
**Picker previews survive `--offline`.** ComfyUI's `--offline` adds a CSP that blocks the
browser from fetching github.io, so the picker's thumbnails silently showed nothing. Checked in
ComfyUI's `server.py`: the policy is a response header, so it binds the browser only. The pack's
server now fetches the manifest and images and serves them from ComfyUI's own origin, caching
them under the user directory. Measured before choosing the design: the published galleries
total a few hundred MiB (about 100 KiB an image), so the cache is lazy, never a full mirror;
GitHub Pages returns ETags and honours `If-None-Match`, and image filenames are stable across
re-renders, so revalidation is cheap. Verified on an isolated ComfyUI started with `--offline`:
a direct github.io fetch was blocked, the cached routes served the manifest and a JPEG, and
unlisted, traversal and unknown-kind paths returned 404. Design and safety rules:
architecture.md -> "Superseded in 2.3.0: previews go through a server-side cache".
**Outfit Sheet and Age Progression.** Both replay a resolved `prompt_json` like the Turnaround,
but they change fields other fields depend on. The first Outfit Sheet draft overrode only the
Clothing group and skipped nearly every style: makeup, jewellery and hair accessories are
style-gated, so a casual look's ponytail or a formal look's earrings refused the next style.
Overriding is the wrong tool; the nodes now ask `lock_clash` what each pin refuses and release
those fields for a redraw (architecture.md -> "Sheets that change the person"). Three more
conflict sources turned up in seed sweeps and are covered the same way: a locked season under
a studio backdrop, a close-up framing against a locked composition or pose, and pinned grey hair
against locked highlights. A 20-year-old also briefly gained laugh lines, because the natural
hair colour was drawn from a replay that kept the old skin detail; both paths now share one
helper. Final sweep: every studio-backdrop sheet and every age sheet kept all its views with no
engine conflicts; keep-scene sheets usually keep 3 to 4 of 6 styles, by design. The first
example render looked grey in four of six outfits: each style replayed with one fixed seed, so
every character drew the same few outfits per style (40 characters, four casual looks). The
seed now hashes the character, and an `outfit_seed` input re-dresses the same person; measured
after, 36 to 40 distinct outfits per style over 40 characters and a grey share matching plain
random characters.
**Period archetypes.** Edo, Victorian and Regency were proposed and dropped: Samurai, Geisha,
Victorian Lady, Victorian Dandy and Regency Aristocrat already ship. Silk Road was declined as a
blend of Mongolian Deel, Ottoman Court and Hanfu. Aztec Noble is new (Codex Mendoza and
Florentine Codex dress: huipil and cueitl, or tilmatli and maxtlatl with a quetzal headdress).
**Gallery samples.** The first Aztec Noble tile, rendered at the gallery's default
`Essentials` lock level, drew a random ethnicity; the look needs `Full preset`, now a per-entry
gallery pin (`_GALLERY_LOCK_LEVEL` in `scripts/render_gallery.py`). The Ancient Roman Patrician
sample is pinned Male (the toga is the expected look; the node still offers both). Example
workflows for the two new nodes ship in `example_workflows/`, built in the real frontend on an
isolated instance and reloaded to confirm what they execute. `--publish-pending` ignored
`--dry-run` and pushed; it now only lists what it would publish.
**More `costume_back` entries,** starting with caped and back-emblem heroes (Survey Corps
wings, Gotei 13 captains' haori, capes for Thor, Doctor Strange, Shazam, Supergirl, Robin,
Saitama and Vision, plus suit backs for Captain Marvel and Green Lantern). Each is checked by
rendering the Turnaround's back view text, never by parsing the front costume. Test renders of
six back views (Thor, Doctor Strange, Saitama, Levi, Byakuya, Superman) showed the cape or back
emblem and no chest emblem; Byakuya's kanji is not the right glyph (a model text limit).
Random characters are unchanged: no field pool, weight or draw order moved (verified by hashing
the prose of several hundred seeds before and after, and the Turnaround and Expression Sheet
output over the shared-helper refactor). The Archetype node's `Random` pick moves on some seeds,
as with every archetype addition, because it chooses from a longer list.
## 2.4.0 - archetype scene coherence, creatures as one hybrid, gallery render fixes
**Figure Skater was set off the ice.** It locked "roller skating rink" or "dance studio with
mirrors", so a skater in blades stood among mirrors and barres, sometimes on a wood floor. It
now locks "indoor ice rink". Its pose was never locked, so the random pool drew "walking
mid-stride" on blades; it now locks four standing poses. Hockey Goalie and Roller Derby (also
on blades or wheels) got the same treatment. A pose lock is Setting & Shot, so it holds in
Essentials as well as Full preset. Both rinks already ban floor poses (kneel, crouch, sit), so
"crouching low" could never draw there and is not in the lists.
**The goalie rendered in black and white.** Its pads drew from `{color}` and its jersey named
no colour; a charcoal draw on white ice under cool LED light left nothing colourful in the
prompt, and the model went monochrome. Pads and jersey now share one `{team_color}` draw.
**More pose locks.** Carhop skates the order out, so motion stays, but the drive-in lot does
not ban floor poses: it now locks two posed and two mid-step poses. Scuba Diver wears fins, so
standing poses only. Samurai drew lounging, wall-leaning and hair-touching poses in armour and
a horned helm; it now locks warrior stances and seiza, and moved from a photo studio (with
three-point lighting) to the Mount Fuji foothills in overcast daylight.
**Nothing to lean on in an open landscape.** A new rule drops the whole `leaning` and
`seated_perch` pose families at a curated list of open places (beach, dunes, meadow, moor,
fields, salt flats, savanna, frozen lake, the Fuji foothills and similar). Places with rails,
rocks or benches (piers, canyons, parks, the lighthouse) are left out. Whole families only, so
the marginals baseline holds; random seeds that land in one of those places draw a new pose
(the pool shrinks before the draw), everything else is unchanged.
**A man keeps a locked eyeliner.** Emo, Indie Sleaze and 1980s New Wave lock eyeliner, but a
man's "no makeup" default hid it. The engine now voices a LOCKED `eye_makeup` or `eyeliner`
on a bare face (`_BARE_FACE_KEEPS`); lips, blush and contour stay hidden, and random men lock
nothing, so their prose is unchanged. Done in the engine, not the data: a Male-variant
`makeup_style` lock clashed with the archetype's own presentation gate.
**1980s New Wave women drew a 1950s face.** The Female variant locked no `makeup_style`, so a
random "pin-up" could draw beside the 80s hair and eyeliner. It now picks bold glam or
editorial makeup.
**Four new venues.** "wrestling ring under arena lights" (leisure_fitness; stage, studio-lit
and venue-light allowlists so Pro Wrestler's locked spotlight holds), "outdoor tennis court
with a net" and "racetrack pit lane" (urban_outdoor, no floor poses) and "racecourse paddock
with a white rail" (nature_outdoor, race-day dress allowed). Pro Wrestler and Luchador left
the school gym, Tennis Player the city park, Race Car Driver the parking garage (lighting to
midday sun), Jockey the meadow. A family-weighted add only re-splits its family, so overall
location shares hold; seeds inside those three families can land on a different place.
**A furnished interior is not a backdrop.** "the subject small against open negative space"
is the seamless-sweep look, and indoors the model dropped the room for it: 1980s New Wave and
Indie Sleaze both rendered a nightclub as a blank wall. It is now excluded at every interior
except the photography studio; it falls from about 11% to under 3% of random characters and
stays at outdoor places and backdrops. The engine filters the pool before drawing, so every
indoor composition draw re-indexes, not only the excluded one.
**Indie Sleaze men read as drag.** Its four costumes were unisex (`_COSTUMES`), so a man drew
the metallic disco bodysuit with opaque tights, plus the locked smoky eyeshadow. The costumes
moved into variants (men get the three jeans-and-jacket looks) and the eyeshadow is hers only;
he keeps the smudged liner.
**Gallery samples.** Maasai, Tuareg and Sami Gakti render at Full preset, like Aztec Noble:
at Essentials their sample drew a German woman, a Chinese man and so on. The node is
unchanged (ethnicity locks only at Full preset, 1.8.0). Silver Surfer's sample is pinned
standing; seated, the board fused into his shoulder. Ahsoka Tano's is pinned standing too;
seated with two sabers, she drew a third hand. Sabrina Spellman's costume now names
colours; with none, a midday render came back black and white (the goalie cause).
**Location vs `outfit_style` clashes: audited, left alone.** Many archetypes lock a
location whose style rule refuses their own locked style (Bridal Portrait in a chapel, Opera
Singer at an amphitheater). Both locks are kept, so the prompt and image are unaffected; the
only symptom is an INFO log line. Most pairings are true to life and the style rule is aimed
at random people, so neither side was changed.
**Gallery cost.** Of the tiles these changes touched, those that lost the blank-backdrop
composition or changed location were re-rendered; tiles whose only change was one harmless
composition swapping for another were accepted with `--rehash`.
**Yoda drew a man under the robe.** The entry had no `covers_face`, so at Full character
the node filled a random human face, hair and beard, and human hands. He now takes Grogu's
treatment: `covers_face` + `covers_body`, a `mask` for the head (worded "a smooth wrinkled
chin", since "no beard" summons one), the all-over green skin marker, and a `subject` so
the lead reads "a wizened green alien Jedi Master" instead of "a man". A scan of unmasked
entries whose costume names an alien head found two more drawing random hair: Ahsoka Tano
(over her montrals) and Piccolo (hair and stubble). Both now set `bald: True`, which clears
scalp and facial hair. The rest of that scan already suppress hair or are human-faced.
**A prop in each hand leaves no free hand.** A held prop already dropped the two-handed
poses, on the reading that the free hand holds it, but a dual prop ("one in each hand",
"in the other") left one-handed poses in: Star-Lord "adjusting one cuff" with a blaster in
each hand drew a third hand. `ONE_HAND_POSES` now drops too when the prop text says both
hands are full. Only cosplay renders with the prop switched on move.
**Render fixes from the gallery review.** Bayonetta's prop was "four handguns, one in each
hand" (two of the four are on her heels in canon) and drew a fan of guns and half-arms; it
is a pair now. Bane's "tactical vest" drew a modern plate carrier on an average man: he is
hulking, in a white-trimmed luchador mask, with the Venom tubes routed down the arm, since
"into the back of the head" never rendered. The Imperial Royal Guard drew bare human hands
and a random man's skin: it gains crimson gloves and `covers_body`. The Praetorian Guard
showed skin between plates and an open-faced helmet: a full undersuit and an enclosed
helmet. Bayonetta and the Praetorian are pinned standing in the gallery, like Ahsoka.
An "empty scabbard" in a `prop_costume` renders as a sheathed sword beside the drawn one
(Yamada Asaemon Sagiri held two), so Sagiri's and Kirito's prop looks drop the scabbard
rather than describe it as empty. Roronoa Zoro's three swords are canon (Santoryu), but his
text named only the sash, bandana and earrings, so he rendered shirtless: it now names the
white T-shirt, black trousers and boots. Kirito's twin swords drew in one hand: they are
"one in each hand" now, and he and Zoro are pinned standing (seated, the drawn sword went to
the floor). Blue Beetle (Jaime Reyes) drew a random muscular man's bare arms and mouth under
foam armor: he gains `covers_body`, an enclosed helmet, the scarab pack with its legs over
the shoulders, and a lean build. Three more drew a random man under the costume: The
Spectre (bare-chested in trunks; his white is a bodysuit, and his face is now a chalk-white
mask under the hood), Bib Fortuna (now `covers_face` with a Twi'lek head and a `subject`),
and the TIE Pilot (open helmet and bare hands; now an enclosed helmet, gloves and
`covers_body`). Zoro holding his sword reads as three swords with two more at the hip, so
his prop look drops the sheathed pair.
A second review round: X-23 is recoloured to canon (jet black hair, pale skin) and her
claws lead the costume, two per fist, since a trailing clause never rendered. Baraka drew
a human face and hand-held swords: he is `covers_face` with a Tarkatan head, a `subject`,
and blades that grow out of the forearms. Maz Kanata unmasked drew a random woman: her
alien face is a mask now, with a `subject`. Black Panther's "panther mask" drew a bare
face: an enclosed helmet, gloves and `covers_body`. King Dedede's mallet is held in both
hands (one hand drew a third arm). Krusty's red nose and The Spectre's neck are named
where they render. Rosie's "single caster in place of legs" drew legs: her base is
described as the cone skirt on wheels it is. The Praetorian and Imperial Royal Guard
helmets still drew an open face: the Praetorian's names a solid faceplate, and the Royal
Guard needed a `subject` ("faceless crimson-helmeted guard") before the helmet closed.
A third round: the TIE Pilot's face still showed between lenses and mask, fixed the same
way; the Praetorian drew bare hands under its gauntlets and gains `covers_body`; Baraka's
blades, named last, drew short knives behind the arms, so they lead the costume now.
Bayonetta drew a curly bob in a sleeveless leotard: rebuilt from her first-game look
(beehive, butterfly-wing glasses, full catsuit, white gloves, Umbra Watch). Her hair in
the costume's opening words went grey and read as something she "wears"; named last as
"a beehive of hair", the way Marge Simpson's is, it came out black.
**Creatures rendered as people in clothes.** On the turbo Krea2 setup the anthro creature
tiles drew a person with a skeleton print, a mole nose, or a whole animal standing beside
them. Anthropomorphic is meant to stay a clothed hybrid, so nothing is stripped;
three things changed instead. Monsters and Aliens lead with "humanoid skeleton", not
"anthropomorphic skeleton hybrid", and drop the human proportions their slots already
replace; every Anthro creature drops `fitness_level` ("a sedentary nautilus"). The gallery
renderer gained the optional Krea2T Enhancer (text_scale 1.5), which fixed the skeleton,
flesh golem and mole outright. Prompt rewording, the LoRA at half strength, more steps and
a higher cfg made no difference. A few animals still rendered whole beside a person, so a
creature entry may carry an `anthro` block: replacement slot text for that form, plus a
lead noun. Nautilus (a shell-shaped head), gaseous alien ("humanoid figure made entirely
of glowing gas") and stegosaurus ("scaly reptilian humanoid") now render as one figure;
the cicada is one figure with its wings behind, though its head and legs still dominate.
Jiangshi, the ghost (two arms, not three) and the gaseous alien's arms were reworded too.
**Locations written before a better one existed.** Audited every archetype's locked location
against the current pool. Moved where a matching place now exists and the engine reports no new
conflict: Swashbuckling Pirate (cocktail lounge to a harbour, lighting candlelight to golden
hour), Gladiator (museum gallery to the Colosseum exterior, lighting to midday sun), Chef
(home kitchen to commercial kitchen), Veterinarian (doctor's room to a veterinary exam room),
Boxer (weight room to a boxing gym), Glassblower and Dwarven Blacksmith (factory floor to their
own studio and forge), Florist, Potter, Tailor, Martial Artist and Kendo Practitioner (to a
flower shop, ceramics studio, tailor's workroom and dojo). Egyptian Pharaoh stays in the museum
hall: the Giza plateau adds clashes with its locked spotlight and evening-formal style.
Random characters move through the open-landscape pose rule, the indoor composition rule and
the new venues; the marginals baseline was rewritten for those three.
+6 -1
View File
@@ -3,7 +3,7 @@
# Archetype reference
**287 archetypes.** Each is a curated look wired through the Archetype node. `gender` shows a locked gender (blank = either); `outfit` is the archetype's outfit style.
**292 archetypes.** Each is a curated look wired through the Archetype node. `gender` shows a locked gender (blank = either); `outfit` is the archetype's outfit style.
- **1940s Factory Worker** [Female] -- vintage retro
- **1940s Swing Dancer** [Any]
@@ -42,6 +42,7 @@
- **Astronaut** -- athletic
- **Astronomer** -- smart casual
- **Athlete** [Any] -- athletic
- **Aztec Noble** [Any] -- evening formal
- **B-Boy / B-Girl**
- **Babushka** [Female] -- vintage retro
- **Backyard Country Casual** [Any]
@@ -135,6 +136,7 @@
- **Halfling Rogue** -- casual
- **Hanfu** [Any] -- vintage retro
- **Hazmat Technician** -- athletic
- **Heian Court** [Any] -- evening formal
- **Highland Scot** [Any]
- **Highwayman** [Male] -- vintage retro
- **Hockey Goalie** -- athletic
@@ -171,6 +173,7 @@
- **Matador** [Any] -- evening formal
- **McBling Socialite** [Female] -- streetwear
- **Mechanic** [Any] -- edgy alternative
- **Medieval Monarch** [Any] -- evening formal
- **Medieval Peasant** -- casual
- **Metalhead** [Any] -- edgy alternative
- **Metrosexual** [Male] -- smart casual
@@ -189,6 +192,7 @@
- **Oktoberfest** [Any]
- **Opera Singer** [Any]
- **Orchestra Conductor** -- evening formal
- **Ottoman Court** [Any] -- evening formal
- **Outback Bushman** [Male] -- casual
- **Paramedic** -- athletic
- **Parisian Chic** [Any]
@@ -218,6 +222,7 @@
- **Roaring Flapper** [Female] -- vintage retro
- **Roaring Twenties Gent** [Male] -- vintage retro
- **Rock Climber** [Any] -- athletic
- **Rococo Courtier** [Any] -- evening formal
- **Rodeo Rider** [Any] -- vintage retro
- **Roller Derby** [Any] -- athletic
- **Roman Centurion** [Male] -- athletic
+127 -18
View File
@@ -3,9 +3,9 @@
# Cosplayer reference
**2099 characters.** Flags: `F`/`M` = source gender, `giant`/`tiny` = size scale, `masked` = full-face covering, `beast` = rendered as the animal itself (`body_plan: feral`), `+N alt` = extra costumes, `prop` = signature held item.
**2160 characters.** Flags: `F`/`M` = source gender, `giant`/`tiny` = size scale, `masked` = full-face covering, `beast` = rendered as the animal itself (`body_plan: feral`), `+N alt` = extra costumes, `prop` = signature held item.
## Anime & Manga (387)
## Anime & Manga (416)
### Akame ga Kill
@@ -60,6 +60,10 @@
- **Balalaika** (F)
- **Revy** (F, prop)
### Black Rock Shooter
- **Black Rock Shooter** (F, prop)
### Bleach
- **Byakuya Kuchiki** (M)
@@ -104,7 +108,10 @@
### Danganronpa
- **Chiaki Nanami** (F, prop)
- **Junko Enoshima** (F)
- **Monokuma** (M, tiny, masked)
- **Nagito Komaeda** (M)
### Darling in the Franxx
@@ -134,8 +141,10 @@
### Delicious in Dungeon
- **Falin Touden** (F, prop)
- **Laios Touden** (M, prop)
- **Marcille Donato** (F, prop)
- **Senshi** (M, prop)
### Demon Slayer
@@ -151,6 +160,10 @@
- **Tanjiro Kamado** (M, prop)
- **Zenitsu Agatsuma** (M)
### Doraemon
- **Doraemon** (M, masked)
### Dorohedoro
- **Nikaido** (F, masked)
@@ -207,7 +220,9 @@
### Fate/Grand Order
- **Jeanne d'Arc (Fate)** (F, prop)
- **Mash Kyrielight** (F, prop)
- **Scathach** (F, prop)
- **Tamamo no Mae** (F, prop)
### Fate/stay night
@@ -308,10 +323,12 @@
- **Dio Brando** (M)
- **Giorno Giovanna** (M)
- **Jolyne Cujoh** (F)
- **Jonathan Joestar** (M)
- **Joseph Joestar** (M)
- **Josuke Higashikata** (M)
- **Jotaro Kujo** (M)
- **Lisa Lisa** (F)
- **Noriaki Kakyoin** (M)
### Jujutsu Kaisen
@@ -327,6 +344,10 @@
- **Yumeko Jabami** (F)
### Kemono Friends
- **Serval (Kemono Friends)** (F)
### Kill la Kill
- **Mako Mankanshoku** (F)
@@ -351,6 +372,7 @@
- **Homura Akemi (Devil)** (F)
- **Kyoko Sakura** (F, prop)
- **Kyubey** (M, tiny, beast)
- **Madoka Kaname (Ultimate)** (F, prop)
- **Mami Tomoe** (F, prop)
- **Sayaka Miki** (F, prop)
@@ -359,6 +381,11 @@
- **Morgiana** (F)
### Magical Girl Lyrical Nanoha
- **Fate Testarossa** (F, prop)
- **Nanoha Takamachi** (F, prop)
### Medaka Box
- **Medaka Kurokami** (F)
@@ -370,6 +397,7 @@
### Mobile Suit Gundam
- **Char Aznable** (M)
- **Suletta Mercury** (F)
### Monogatari
@@ -458,6 +486,7 @@
- **Sanji** (M)
- **Shanks** (M)
- **Shirahoshi** (F, giant)
- **Tony Tony Chopper** (M, tiny, masked)
- **Trafalgar Law** (M, prop)
- **Usopp** (M, prop)
- **Yamato (One Piece)** (F, prop)
@@ -499,9 +528,13 @@
- **Dawn** (F)
- **Eevee** (M, tiny, beast)
- **Elesa** (F)
- **Gardevoir** (F, masked)
- **Gary Oak** (M)
- **Gengar** (M, masked)
- **Gloria (Pokemon)** (F)
- **Gyarados** (M, giant, beast)
- **Hilda (Pokemon)** (F, prop)
- **Iono** (F)
- **Iris** (F)
- **James (Team Rocket)** (M)
- **Jessie (Team Rocket)** (F)
@@ -532,6 +565,13 @@
- **Mari Kurihara** (F)
- **Meiko Shiraki** (F, +1 alt)
### RWBY
- **Blake Belladonna** (F, prop)
- **Ruby Rose** (F, prop)
- **Weiss Schnee** (F, prop)
- **Yang Xiao Long** (F)
### Ranma 1/2
- **Ranma Saotome** (M)
@@ -641,6 +681,11 @@
- **Elizabeth Liones** (F)
- **Meliodas** (M)
### Tiger & Bunny
- **Barnaby Brooks Jr.** (M)
- **Wild Tiger** (M)
### Tokyo Ghoul
- **Ken Kaneki** (M)
@@ -651,6 +696,14 @@
- **Vash the Stampede** (M)
### Tsukihime
- **Arcueid Brunestud** (F)
### UTAU
- **Kasane Teto** (F)
### Urusei Yatsura
- **Lum Invader** (F)
@@ -679,7 +732,7 @@
- **Dark Magician Girl** (F, prop)
- **Yami Yugi** (M)
## Comics & Cartoons (278)
## Comics & Cartoons (282)
### Adventure Time
@@ -992,6 +1045,7 @@
### Peanuts
- **Charlie Brown** (M)
- **Snoopy** (M, tiny, beast)
### Peepoodo
@@ -1029,6 +1083,11 @@
- **Samurai Jack** (M, prop)
### Sanrio
- **Hello Kitty** (F, masked)
- **Kuromi** (F, masked)
### Savage Dragon
- **Savage Dragon** (M, masked)
@@ -1037,6 +1096,10 @@
- **Ramona Flowers** (F, prop)
### She-Ra and the Princesses of Power
- **Catra** (F)
### Sheena, Queen of the Jungle
- **Sheena** (F, prop)
@@ -1220,7 +1283,7 @@
- **Suprema** (F)
- **Vogue** (F)
## DC (178)
## DC (179)
### DC
@@ -1342,7 +1405,7 @@
- **Ratcatcher 2** (F, prop)
- **Red Claw** (F)
- **Red Hood** (M, masked)
- **Reverse-Flash** (M)
- **Reverse-Flash** (M, masked)
- **Rick Flag** (M, prop)
- **Robin** (M)
- **Rose Wilson** (F, prop)
@@ -1369,12 +1432,13 @@
- **The Flash** (M, masked)
- **The Penguin** (M, prop)
- **The Riddler** (M, prop)
- **The Spectre** (M)
- **The Spectre** (M, masked)
- **Thorn** (F)
- **Thunder (Anissa Pierce)** (F)
- **Tomar-Re** (M)
- **Two-Face** (M, prop)
- **Vixen** (F)
- **Volcana** (F)
- **Waverider** (M)
- **Wildcat** (M, masked)
- **Wonder Girl (Cassie Sandsmark)** (F)
@@ -1421,7 +1485,7 @@
- **Silk Spectre** (F)
- **The Comedian** (M)
## Disney (112)
## Disney (115)
### 101 Dalmatians
@@ -1452,8 +1516,10 @@
- **Babette** (F, +1 alt, prop)
- **Beast (Beauty and the Beast)** (M, masked)
- **Belle** (F, prop)
- **Cogsworth** (M, masked)
- **Gaston** (M)
- **Lumiere** (M, masked)
- **Mrs. Potts** (F, beast)
### Big Hero 6
@@ -1654,6 +1720,10 @@
- **Carl Fredricksen** (M, prop)
### WALL-E
- **WALL-E** (M, beast)
### Wreck-It Ralph
- **Vanellope von Schweetz** (F)
@@ -2034,7 +2104,7 @@
- **Yondu** (M, prop)
- **Zuras** (M)
## Movies & TV (239)
## Movies & TV (243)
### A Nightmare on Elm Street
@@ -2144,10 +2214,15 @@
### Doctor Who
- **Cyberman** (M, masked)
- **Dalek** (M, beast)
- **The Fourth Doctor** (M)
- **The Tenth Doctor** (M, prop)
- **Weeping Angel** (F, masked)
### Domo
- **Domo-kun** (M, masked)
### Duolingo
- **Duolingo Owl** (M, masked)
@@ -2410,6 +2485,10 @@
- **Ghostface** (M, masked, prop)
### Short Circuit
- **Johnny 5** (M, beast)
### Shrek
- **Lord Farquaad** (M, tiny)
@@ -2446,6 +2525,7 @@
- **Ilia** (F)
- **Klingon** (M, prop)
- **Mr. Spock** (M)
- **Orion** (F, +1 alt)
- **Seven of Nine** (F, +3 alt)
- **Tellarite** (M, masked)
- **Uhura** (F)
@@ -2632,11 +2712,11 @@
- **Anakin Skywalker** (M, prop)
- **Asajj Ventress** (F, prop)
- **Aurra Sing** (F, prop)
- **BB-8** (M, masked)
- **BB-8** (M, beast)
- **Bantha** (M, giant, beast)
- **Barriss Offee** (F, prop)
- **Battle Droid** (M, masked)
- **Bib Fortuna** (M)
- **Bib Fortuna** (M, masked)
- **Bo-Katan Kryze** (F, masked)
- **Boba Fett** (M, masked)
- **Bossk** (M, masked, prop)
@@ -2668,7 +2748,7 @@
- **Figrin D'an** (M, masked, prop)
- **Finn** (M)
- **General Grievous** (M, masked, prop)
- **Gonk Droid** (M, masked)
- **Gonk Droid** (M, beast)
- **Gran** (M, masked)
- **Grand Admiral Thrawn** (M)
- **Grand Inquisitor** (M, prop)
@@ -2700,7 +2780,7 @@
- **Mace Windu** (M, prop)
- **Mara Jade** (F, prop)
- **Max Rebo** (M, masked)
- **Maz Kanata** (F, tiny)
- **Maz Kanata** (F, tiny, masked)
- **Mon Mothma** (F)
- **Mynock** (M, masked)
- **Nien Nunb** (M, masked)
@@ -2716,7 +2796,7 @@
- **Praetorian Guard** (M, masked, prop)
- **Princess Leia Organa** (F, +5 alt)
- **Qui-Gon Jinn** (M, prop)
- **R2-D2** (M, masked)
- **R2-D2** (M, beast)
- **Rancor** (M, giant, masked)
- **Rey** (F, prop)
- **Sabine Wren** (F)
@@ -2737,12 +2817,12 @@
- **Watto** (M)
- **Wedge Antilles** (M)
- **Wicket the Ewok** (M, masked, prop)
- **Yoda** (M, tiny, prop)
- **Yoda** (M, tiny, masked, prop)
- **Zeb Orrelios** (M, giant, masked)
- **Zorii Bliss** (F, masked, prop)
- **Zuckuss** (M, masked)
## Video Games (500)
## Video Games (520)
### A Certain Scientific Railgun
@@ -2793,6 +2873,11 @@
- **Destined One (Black Myth: Wukong)** (M, masked)
### BlazBlue
- **Noel Vermillion** (F, prop)
- **Ragna the Bloodedge** (M, prop)
### BloodRayne
- **Rayne** (F)
@@ -2804,6 +2889,7 @@
### Borderlands
- **Amara** (F)
- **Claptrap** (M, beast)
- **Handsome Jack** (M)
- **Lilith (Borderlands)** (F)
- **Mad Moxxi** (F)
@@ -2845,15 +2931,20 @@
### Cyberpunk 2077
- **Adam Smasher** (M, masked)
- **Johnny Silverhand** (M)
- **Judy Alvarez** (F)
- **Panam Palmer** (F, prop)
- **Song So Mi** (F, +1 alt)
### Cyberpunk: Edgerunners
- **David Martinez** (M)
- **Kiwi** (F)
- **Lucy** (F)
- **Rebecca (Cyberpunk)** (F, prop)
- **Maine** (M)
- **Rebecca (Cyberpunk)** (F, +1 alt, prop)
- **Talia Yang** (F)
### Dark Souls
@@ -2962,6 +3053,7 @@
### Fallout
- **Brotherhood of Steel Knight** (M, masked)
- **Codsworth** (M, beast)
- **Nick Valentine** (M)
- **The Ghoul** (M, masked, prop)
- **Vault Dweller** (M)
@@ -3002,6 +3094,8 @@
### Fire Emblem
- **Azura** (F)
- **Byleth** (M, prop)
- **Edelgard** (F, prop)
- **Lucina** (F, prop)
### Gears of War
@@ -3117,7 +3211,9 @@
### Kirby
- **King Dedede** (M, masked, prop)
- **Kirby** (M, masked)
- **Meta Knight** (M, masked, prop)
### League of Legends
@@ -3211,7 +3307,7 @@
### Mortal Kombat
- **Baraka** (M)
- **Baraka** (M, masked)
- **Cassie Cage** (F)
- **Cetrion** (F, giant)
- **D'Vorah** (F)
@@ -3282,7 +3378,7 @@
### Pac-Man
- **Pac-Man** (M, masked)
- **Pac-Man** (M, beast)
### Persona
@@ -3337,6 +3433,10 @@
- **Nakoruru** (F, prop)
### Shantae
- **Shantae** (F)
### Silent Hill
- **Nurse (Silent Hill)** (F, masked)
@@ -3519,10 +3619,19 @@
- **Lara Croft** (F, prop)
### Touhou Project
- **Marisa Kirisame** (F, prop)
- **Reimu Hakurei** (F, prop)
- **Sakuya Izayoi** (F, prop)
- **Yukari Yakumo** (F, prop)
### Undertale
- **Papyrus** (M, masked, prop)
- **Sans** (M, masked, prop)
- **Toriel** (F, masked)
- **Undyne** (F, masked, prop)
### Valkyria Chronicles
+1 -1
View File
@@ -200,7 +200,7 @@
- **ghost** (pale spectral white)
- **goblin** (sickly green)
- **hag** (sallow grey-green)
- **jiangshi** (greyed corpse-blue)
- **jiangshi** (pale greenish-white)
- **lich** (bone-white and sickly green)
- **mummy** (dusty bandage-beige)
- **ogre** (mottled green-grey)
+16 -6
View File
@@ -23,9 +23,7 @@ that is what the Creature node is for.
## Under consideration
| Candidate | Case and remaining gate |
|---|---|
| Tellarite repair (Star Trek) | The 1.9.0 entry rendered a plain stocky man: no snout, no tusks, and "a shaggy coat of thick facial and body hair" drew an overcoat. 1.10.0 tried four wordings and each failed at the gallery's full-body framing: an authored head in `mask`; that plus `covers_body` (drops the demographics); the canonical porcine description (upturned pig snout, ruddy pink wrinkled leathery skin, tusks over the lip, bushy beard) drew a bearded human; a beardless "boar-faced" head drew a generic ridged alien. 1.11.0 tried the full latex prosthetic head in `mask`, alone and with `covers_body`: the first drew a bearded man, the second a ridged forehead over a beard. 1.11.0 ships the second anyway (the maintainer's call): it is the accurate canon text and drops the overcoat misread, and it renders no worse than the 1.9.0 text. The snout is still open; the one untried idea is a gallery framing override (`_GALLERY_SHOT`) on a close framing so the face is large. |
Nothing is open; the last row (the Tellarite snout) closed in 2.1.0 with the `subject` lead noun.
**Engine and UX backlog** (found in the 1.6.0 review; its five fixes shipped in 1.7.0, and the
tight-shot legwear, free-text `held_item` and expression-sheet rows in 1.10.0, see
@@ -79,6 +77,7 @@ Closed with a reason. Reopen only with a **new** argument, not a repeat of the r
|---|---|
| A negative and/or tags output | Maintainer: not needed. (The subject/scene half of the same row shipped at 1.8.0 as `subject_text`.) |
| An on-node readout of the resolved prompt | Maintainer: not needed. |
| A pair / group node (two or more resolved characters in one prompt) (2.3.0 plan) | Maintainer: deferred, not refused. Most current t2i models blend or swap traits between two described people in one prompt, so the output would not match the characters. Reopen if models hold separate subjects reliably. |
### Individual characters
@@ -87,6 +86,8 @@ Closed with a reason. Reopen only with a **new** argument, not a repeat of the r
| Anxiety (Inside Out) | **Declined at 1.8.0 on the render bar.** The look is a teal turtleneck, high trousers and boots over bright orange skin, and the model could not hold it: two renders kept pale human skin (the orange only reached the hair) and spread the teal from the sweater onto the trousers and boots, so the tile read as a pale redhead in a teal outfit. Body-paint wording that works for a single-colour figure (Megamind's blue) fails when a second saturated costume colour is present. Reopen with a costume that is not a second saturated colour, or if the model's skin-colour handling changes. |
| Kliff (Crimson Desert) | **Revisited and DECLINED at 1.4.0.** The original reason was wrong: Kliff is a *fixed* protagonist (set face, body and voice, the Geralt model), not a vendor-built one -- only his hair, facial hair, tattoos and outfit *colours* are customizable. The decline stands on the other half: his equipment and clothing are explicitly "highly customizable", so there is still no single canonical outfit to describe, and what is left -- a bearded man in fantasy leathers -- is the silhouette `Geralt` and `Conan the Barbarian` already carry. Reopen only if a marketing-canonical outfit becomes the settled default look. |
| M3GAN (1.5.0 maintainer shortlist) | **Adults-only bar.** Canonically a child-sized android doll modelled on a young girl: rendering her as a child breaks the bar, and rendering her as an adult is not canon. Approved on the shortlist, declined at research. |
| Alt Cunningham, Goro Takemura, Rogue, Hanako Arasaka, Kerry Eurodyne, Dorio, Faraday (Cyberpunk 2077 / Edgerunners) | **Considered and declined by the maintainer at 2.2.0.** Proposed as the rest of the Cyberpunk cast after the 2.2.0 batch; not wanted. Do not re-propose without a new reason. |
| Pilar (Cyberpunk: Edgerunners) | **Declined at 2.2.0 on sources.** The brief (white pompadour, pink skin, pointed ears) contradicts the wiki (black mohawk, golden robotic hands, goggle cyberware to the chin) and tag counts were too thin to settle it. Reopen with a reference image. |
| Marinette Dupain-Cheng, Adrien Agreste (civilian) | Ordinary modern teen dress. Their transformed looks (Ladybug, Cat Noir) carry them. |
| Jessica Jones, Marion Ravenwood, Baby Houseman, Frankie Foster, Peggy Hill, Luanne Platter | Everyday modern dress. Fails the "iconic *and* specific outfit" bar that admitted Trinity, Mia Wallace and Sandy Olsson. |
| Anya Forger, Beatrice (Re:Zero) | Human children in ordinary clothes. Distinct from the accepted child *cosplays* (Dora, the Powerpuff Girls, Tina Belcher, Charlie Brown), whose looks are ordinary clothing on an adult wearer. See the mascot-suit distinction in architecture.md — it does **not** rescue these two. |
@@ -112,7 +113,6 @@ Closed with a reason. Reopen only with a **new** argument, not a repeat of the r
| Krieg (Borderlands) | Near-duplicate of the shipped `Psycho (Borderlands)`, which already carries the bandage mask, the strap harness and the buzz axe. `Zer0` and `Sir Hammerlock` shipped from the same request because neither overlaps anything on the roster. |
| Maya (Borderlands) | `Lilith (Borderlands)` already carries the glowing blue Siren tattoos down one arm, which is the whole visual identity of the class - and unlike `Amara` (shipped 0.98.0 on the strength of her six arms), Maya has no feature Lilith lacks. |
| Claptrap (Borderlands) | A one-wheeled box with a single lens. Fails **both** halves of the animal/mascot split: nobody can be inside it (so it is not the mascot-suit case) and it is a machine, not a beast (so `body_plan: "feral"` does not apply either). |
| Faith Lehane, Willow Rosenberg, Cordelia Chase, Anya Jenkins (Buffy the Vampire Slayer) | All four wear similar modern clothing to the shipped `Buffy Summers` (tank tops, jackets, jeans). The only differentiators are hair color and minor style variations, which is not enough visual distinction to earn a separate entry. The roster enforces a uniqueness bar, and these fail it — they would render as "a woman in a leather jacket" without the name doing the work. |
| Kaguya Shinomiya, Chika Fujiwara, Miko Iino, Ai Hayasaka (Kaguya-sama: Love Is War) | All four wear the same school uniform; only hair color and style differ. This is the exact pattern the uniqueness bar closes against — same costume with cosmetic variations would render as identical silhouettes without the name doing the work. |
@@ -160,7 +160,11 @@ Closed with a reason. Reopen only with a **new** argument, not a repeat of the r
| Dan Hibiki, Evil Ryu, Violent Ken, Shin Akuma (Street Fighter) | Recolours or powered-up states of the shipped `Ryu` / `Ken Masters` / `Akuma` gi silhouettes -- the Shadow Jago call. **Evil Ryu ships as a `costumes` alternate on `Ryu`** (torn black gi, red aura, glowing red eyes), which is the shape rule 2 asks for. |
| Seth, Dee Jay, Necro, Hakan (Street Fighter) | Bare-chested fighters whose remaining garment is trousers; the body alone does not separate them from shipped fighters. |
| Q, Twelve, JP, Rashid, Sodom (Street Fighter) | Q's trench coat, fedora and featureless mask duplicate the shipped `Rorschach`; Twelve has no worn look at all; JP is an older man in a long coat who needs the name; Rashid and Sodom are narrower cuts whose shapes the roster already carries. |
| Bastion, Orisa, Echo, Wrecking Ball (Overwatch) | Machines with no worn garments -- the Fulgore and Claptrap calls. Nobody can be inside Wrecking Ball's ball mech. |
| Bastion, Orisa, Echo (Overwatch) | Humanoid machines with no worn garments -- the Fulgore call. |
| Wrecking Ball (Overwatch) | Re-decided at 2.1.0 on the feral route and still declined: a hamster pilot inside a ball mech is two subjects in one frame, and Overwatch is already one of the roster's largest game franchises. |
| BD-1, Mouse Droid (Star Wars), K-9 (Doctor Who) | Considered with the 2.1.0 machine batch. BD-1 is a game-only deep cut; the MSE-6 is a plain black box on wheels; K-9 would render as a generic boxy robot dog. Star Wars and Doctor Who keep their droids in R2-D2, BB-8, Gonk, Chopper and the Dalek. |
| Hololive VTubers (Gawr Gura and others), Touhou's Remilia, Flandre and Cirno | From the 2.1.0 sd-character-finder survey, whose other survivors shipped. The VTubers are avatars of real performers (maintainer's call). The three Touhou characters fail the child-bodied rule. |
| Kiana Kaslana (Honkai Impact 3rd), Caesar Zeppeli (JoJo) | From the 2.1.0 survey second tier. Kiana has no one stable outfit (each battlesuit is a different look) and Caesar's outfit colours could not be verified across the manga and anime; the defining items alone (a headband, fingerless gloves) render as a generic man. |
| The rest of the Overwatch cast (Sigma, Baptiste, Sojourn, Ramattra, Mauga, Lifeweaver, Illari, Venture, Juno, Hazard, Freja, Wuyang) | Real looks, but each repeats a silhouette the curated set already carries (armoured soldier, robed omnic, tattooed brawler, sci-fi ranger). Overwatch stops where new entries stop adding visual ground. |
| Aether (Genshin Impact) | The same kit and silhouette as the shipped `Lumine` in the other gender; the node's own gender control already crossplays. |
| Keqing, Nilou, Eula, Xiao, Diluc (Genshin Impact) | Each is a well-drawn anime fantasy look, but the differentiator against a shipped neighbour is hair colour and elemental trim. `Mona`, `Wanderer` and `Arlecchino` shipped because a hat, a hat-and-veil and a pair of X-shaped pupils survive at silhouette scale. |
@@ -341,6 +345,10 @@ From the third-party wildcard packs mined at 1.6.0. What shipped is in docs/hist
| Techwear / Gorpcore | **Cyberpunk Netrunner already is a techwear look** — its costume is literally "a {dark_color} techwear jacket with {color} LED trim, utility straps, and a sleek visor". Stripping the sci-fi trim to leave shell-jacket-and-cargo-trousers is not a second silhouette, it is the same one with less to draw. |
| A dark/gothic counterpart to Kawaii Street Fashion | Declined on two counts. The pastel silhouette is already `Kawaii Street Fashion` (ruffled blouse, tiered skirt, platform Mary-Janes) and the dark one is already `1990s Goth`, so the candidate sits between two shipped entries rather than beside them. The maintainer also rejected the subculture's usual name outright. **Do not re-propose it under a synonym.** |
| Zoot Suit women's (pachuca) variant (1.11.0 plan) | **Declined at 1.11.0 on the render bar; `Zoot Suit` ships men's only.** The long drape jacket and the watch chain are the whole look. Both wordings failed: the first (a long-line jacket over a short pleated skirt) did not read as a zoot suit, and the retry (fingertip-length drape jacket, pegged trousers) drew a sleeveless cropped vest with no chain. |
| Renaissance noblewoman, Victorian lady, Edwardian lady, Greek noblewoman, Steampunk aristocrat (2.2.0 historical list) | **Already ship** as `Renaissance Noble`, `Victorian Lady`, `Gibson Girl`, `Greek Goddess` and `Steampunk Inventor`. Baroque gentleman, Rococo marquise and Georgian gentleman were folded into the new `Rococo Courtier`. |
| Edo, Victorian and Regency period looks (2.3.0 plan) | **Already ship** as `Samurai`, `Geisha`, `Stealth Ninja`, `Victorian Lady`, `Victorian Dandy` and `Regency Aristocrat`. `Aztec Noble` shipped from the same list. |
| Silk Road merchant (2.3.0 plan) | A blend of `Mongolian Deel`, `Ottoman Court` and `Hanfu` with no silhouette of its own; the name would be doing the work. |
| Mughal noblewoman, Belle Epoque gown, "cinematic period costume" (2.2.0 historical list) | Mughal court dress overlaps `Lehenga & Sherwani`; a Belle Epoque gown sits between `Victorian Lady` and `Gibson Girl`; "cinematic period costume" is a style, not a look. |
| Rockabilly (1.11.0 plan) | Sits between two shipped entries: `1950s Greaser` carries the cuffed jeans, leather jacket and pompadour, and `Pin-up Model` the halter dress, victory rolls and red lip. A third entry would be a blend of the two, not a new look. |
---
@@ -352,9 +360,11 @@ Open. No decision has been made either way.
| # | Question | Where it stands |
|---|---|---|
| 2 | **Costume text that asserts a body trait against an unpinned random field.** A costume reading "on a hulking frame" can render beside "a very slim build" in the same sentence, because `physique` applies only in Full-character mode while `costume` renders in both. | Measured at 0.90.0, **33 entries** (`Colossus`, `Gollum`, `Jabba the Hutt`, `Space Marine`, `Brook`, …). Not swept, for two reasons. First, the `signature` / `physique` split is *deliberate* — the schema says physique is Full-mode-only, so a randomly-built person wearing the costume is the intended behaviour, and most of the 33 are mascot suits where the suit supplies the bulk regardless of the wearer. Second, a naive regex reported **171** and was wrong: "tiny" on `Trinity` and `Neo` is their *sunglasses*, "enormous" on `Edna Mode` is her *lashes*. Requiring the adjective to modify a body noun cut it to 33. **If this is ever taken up, measure it again from scratch — do not trust the 171.** The four entries fixed at 0.90.0 (`Dexter Jettster`, `Figrin D'an`, `Ithorian`, plus the new Fallout/GoT entries) pin the trait in `signature`, which applies in both modes; that is the pattern to follow. |
| 10 | **Some archetype `outfit_style` proxies disagree with the location gate** (e.g. `Opera Singer` evening formal at an outdoor amphitheater). | Harmless in Full lock level (both locked, the rule only logs); in Essentials the location is steered to a fitting venue. Only worth touching if a real render looks wrong. |
| 16 | **Outfits that name no colour.** A costume or archetype outfit with no colour word leaves the prompt colourless when the place and light are muted too, and the model can render black and white (Hockey Goalie and Sabrina Spellman, both fixed in 2.4.0). | Many cosplay costumes and a few archetype outfits still name none; most say "dark" or rely on hair and skin. Fix per entry with canon colours when a render comes back grey; do not bulk-insert colours. |
| 13 | **Two values stay reachable only through a lock or a narrow style.** No men's garment bares the back, so a man's shoulder-blade tattoo never shows by default; `dark dress socks` shows only under a cuffed or ankle-length hem (smart casual, vintage retro). | Both are true to life; both used to be reached only through false positives (`dress` matching "dress shirt"). Revisit only if a render asks for them. |
**Closed at 2.4.0 - rows 10 and 15.** The location vs `outfit_style` clashes were audited and left alone (both locks are kept, nothing renders differently; most pairs are true to life), and four venues shipped for the archetypes that had none (wrestling ring, tennis court, pit lane, racecourse paddock). See docs/history.md -> "2.4.0".
**Closed at 2.0.0 - rows 11, 12 and 14, the gaze field and the noun-expression article.** Ages 75 and 80 joined `age` (60+ held near 16%), the three shortest women's lengths were weighted down (about 10% of women), a portrait rig no longer lights an everyday interior, the `looking` poses became the `gaze` field, and a noun expression takes an article. See docs/history.md -> "2.0.0".
**Closed at 1.11.0 - Birdie the Early Bird (was row 5).** Shipped on the mascot-suit route. The aviator cap with goggles, the orange pigtails and the pink flight suit are the silhouette detail the roster's other bird mascots lack, and the render held all three.
+47
View File
@@ -227,6 +227,53 @@ Each view sets a fixed, curated expression/mood/smile combination, so a sheet is
deterministic and no two views land on the same face. A face-covering character (a mascot
head, a full helmet) has no visible expression, so the sheet emits one view, `1-masked`.
## Outfit sheets
The **Identity Forge Outfit Sheet** node is wired like the Turnaround and keeps the person while
it redresses them once per outfit style.
- **`sheet`** - `Range (6)` (casual, smart casual, business formal, evening formal, athletic,
resort vacation), `Everyday (4)`, `Work to evening (4)` or `Every style`.
- **`backdrop`** - a grey (default), white or black studio backdrop, or `Keep the character's
scene`. A studio backdrop also redraws lighting and composition to suit the studio, so every
style fits.
Keeping the scene skips styles the place does not allow (no evening gown on a hiking trail),
so that sheet is often shorter.
- **`framing`** - `Full body` by default, so the whole outfit shows. **`pose`** - a standing
pose by default; `Keep the character's pose` keeps theirs.
- **`outfit_seed`** - every outfit is drawn at random within its style, and differs from one
character to the next. Change this number to re-dress the same person; set its control to
`randomize` for new outfits every queue.
The face, body and hair colour stay; makeup, jewellery and hair styling follow each outfit when
the old ones would clash with it. Labels read `1-casual`, `2-smart-casual` and so on. A cosplay
character or a full-body suit has its costume, so the sheet emits one view as resolved.
A ready-made workflow is `example_workflows/Identity Forge - Outfit Sheet.json` (also in
ComfyUI's template browser).
## Age progression
The **Identity Forge Age Progression** node shows the same person at several ages.
- **`stages`** - `Life stages (4)` (20, 35, 50, 70), `Decades (6)` (20 to 70) or `Young and old
(2)` (25, 70).
- **`framing`** - `Head and shoulders` by default; `Unspecified` keeps the character's own.
Only the age and what depends on it change (skin detail, and an outfit or hair style the new
age does not allow). With a natural hair colour scope, hair greys past 55: dark hair goes salt
and pepper, then silver from 70. A grey-haired character shown younger gets a natural colour.
Dyed or vivid scopes, cosplay hair and covered hair are left alone. A face-covering character
emits one view as resolved. Labels read `1-age-20` and so on. A ready-made workflow is
`example_workflows/Identity Forge - Age Progression.json`.
## Preview images in the picker
"Show preview images" in the roster picker is off by default. When it is on, your ComfyUI
server downloads each sample image the first time you scroll to it and keeps it in
`<ComfyUI user folder>/identity_forge/gallery_cache/`, so previews also show when ComfyUI runs
with `--offline` (once the server has fetched them). Only images you view are stored. "Clear
cached previews" in the picker deletes the folder and shows how much it freed.
## Holding something specific
The Modifier node's optional **`held_item`** box takes a free-text noun phrase - `a red
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2264 -1432
View File
File diff suppressed because it is too large Load Diff
+104 -11
View File
@@ -211,8 +211,10 @@ const COSPLAYER_FRANCHISES = {
"Babette",
"Beast (Beauty and the Beast)",
"Belle",
"Cogsworth",
"Gaston",
"Lumiere"
"Lumiere",
"Mrs. Potts"
],
"Beetlejuice": [
"Beetlejuice",
@@ -258,12 +260,19 @@ const COSPLAYER_FRANCHISES = {
"Black Myth: Wukong": [
"Destined One (Black Myth: Wukong)"
],
"Black Rock Shooter": [
"Black Rock Shooter"
],
"Blade Runner": [
"Pris",
"Rachael",
"Rick Deckard",
"Roy Batty"
],
"BlazBlue": [
"Noel Vermillion",
"Ragna the Bloodedge"
],
"Bleach": [
"Byakuya Kuchiki",
"Grimmjow",
@@ -297,6 +306,7 @@ const COSPLAYER_FRANCHISES = {
],
"Borderlands": [
"Amara",
"Claptrap",
"Handsome Jack",
"Lilith (Borderlands)",
"Mad Moxxi",
@@ -433,14 +443,19 @@ const COSPLAYER_FRANCHISES = {
"Cuphead"
],
"Cyberpunk 2077": [
"Adam Smasher",
"Johnny Silverhand",
"Judy Alvarez",
"Panam Palmer"
"Panam Palmer",
"Song So Mi"
],
"Cyberpunk: Edgerunners": [
"David Martinez",
"Kiwi",
"Lucy",
"Rebecca (Cyberpunk)"
"Maine",
"Rebecca (Cyberpunk)",
"Talia Yang"
],
"DC": [
"Alan Scott",
@@ -594,6 +609,7 @@ const COSPLAYER_FRANCHISES = {
"Tomar-Re",
"Two-Face",
"Vixen",
"Volcana",
"Waverider",
"Wildcat",
"Wonder Girl (Cassie Sandsmark)",
@@ -610,7 +626,10 @@ const COSPLAYER_FRANCHISES = {
"Momo Ayase"
],
"Danganronpa": [
"Junko Enoshima"
"Chiaki Nanami",
"Junko Enoshima",
"Monokuma",
"Nagito Komaeda"
],
"Danger Girl": [
"Abbey Chase",
@@ -698,8 +717,10 @@ const COSPLAYER_FRANCHISES = {
"Ryuk"
],
"Delicious in Dungeon": [
"Falin Touden",
"Laios Touden",
"Marcille Donato"
"Marcille Donato",
"Senshi"
],
"Demon Slayer": [
"Akaza",
@@ -733,10 +754,14 @@ const COSPLAYER_FRANCHISES = {
],
"Doctor Who": [
"Cyberman",
"Dalek",
"The Fourth Doctor",
"The Tenth Doctor",
"Weeping Angel"
],
"Domo": [
"Domo-kun"
],
"Donkey Kong": [
"Donkey Kong"
],
@@ -746,6 +771,9 @@ const COSPLAYER_FRANCHISES = {
"Dora the Explorer": [
"Dora the Explorer"
],
"Doraemon": [
"Doraemon"
],
"Dorohedoro": [
"Nikaido"
],
@@ -870,6 +898,7 @@ const COSPLAYER_FRANCHISES = {
],
"Fallout": [
"Brotherhood of Steel Knight",
"Codsworth",
"Nick Valentine",
"The Ghoul",
"Vault Dweller"
@@ -893,7 +922,9 @@ const COSPLAYER_FRANCHISES = {
],
"Fate/Grand Order": [
"Jeanne d'Arc (Fate)",
"Scathach"
"Mash Kyrielight",
"Scathach",
"Tamamo no Mae"
],
"Fate/stay night": [
"Gilgamesh",
@@ -943,6 +974,8 @@ const COSPLAYER_FRANCHISES = {
],
"Fire Emblem": [
"Azura",
"Byleth",
"Edelgard",
"Lucina"
],
"Firefly": [
@@ -1284,10 +1317,12 @@ const COSPLAYER_FRANCHISES = {
"Dio Brando",
"Giorno Giovanna",
"Jolyne Cujoh",
"Jonathan Joestar",
"Joseph Joestar",
"Josuke Higashikata",
"Jotaro Kujo",
"Lisa Lisa"
"Lisa Lisa",
"Noriaki Kakyoin"
],
"Johnny Bravo": [
"Johnny Bravo"
@@ -1329,6 +1364,9 @@ const COSPLAYER_FRANCHISES = {
"Kellogg's": [
"Tony the Tiger"
],
"Kemono Friends": [
"Serval (Kemono Friends)"
],
"Kick-Ass": [
"Hit-Girl"
],
@@ -1383,7 +1421,9 @@ const COSPLAYER_FRANCHISES = {
"Sora"
],
"Kirby": [
"Kirby"
"King Dedede",
"Kirby",
"Meta Knight"
],
"KonoSuba": [
"Aqua (KonoSuba)",
@@ -1498,6 +1538,7 @@ const COSPLAYER_FRANCHISES = {
"Madoka Magica": [
"Homura Akemi (Devil)",
"Kyoko Sakura",
"Kyubey",
"Madoka Kaname (Ultimate)",
"Mami Tomoe",
"Sayaka Miki"
@@ -1508,6 +1549,10 @@ const COSPLAYER_FRANCHISES = {
"Magic: The Gathering": [
"Liliana Vess"
],
"Magical Girl Lyrical Nanoha": [
"Fate Testarossa",
"Nanoha Takamachi"
],
"Mars Attacks!": [
"The Martian Ambassador"
],
@@ -1799,7 +1844,8 @@ const COSPLAYER_FRANCHISES = {
"Moana"
],
"Mobile Suit Gundam": [
"Char Aznable"
"Char Aznable",
"Suletta Mercury"
],
"Monogatari": [
"Hitagi Senjougahara",
@@ -1943,6 +1989,7 @@ const COSPLAYER_FRANCHISES = {
"Sanji",
"Shanks",
"Shirahoshi",
"Tony Tony Chopper",
"Trafalgar Law",
"Usopp",
"Yamato (One Piece)"
@@ -2005,7 +2052,8 @@ const COSPLAYER_FRANCHISES = {
"Stocking Anarchy"
],
"Peanuts": [
"Charlie Brown"
"Charlie Brown",
"Snoopy"
],
"Peepoodo": [
"Dr. Monique Pussycat"
@@ -2068,9 +2116,13 @@ const COSPLAYER_FRANCHISES = {
"Dawn",
"Eevee",
"Elesa",
"Gardevoir",
"Gary Oak",
"Gengar",
"Gloria (Pokemon)",
"Gyarados",
"Hilda (Pokemon)",
"Iono",
"Iris",
"James (Team Rocket)",
"Jessie (Team Rocket)",
@@ -2115,6 +2167,12 @@ const COSPLAYER_FRANCHISES = {
"Pulp Fiction": [
"Mia Wallace"
],
"RWBY": [
"Blake Belladonna",
"Ruby Rose",
"Weiss Schnee",
"Yang Xiao Long"
],
"Rainbow Brite": [
"Rainbow Brite"
],
@@ -2219,6 +2277,10 @@ const COSPLAYER_FRANCHISES = {
"Samurai Shodown": [
"Nakoruru"
],
"Sanrio": [
"Hello Kitty",
"Kuromi"
],
"Savage Dragon": [
"Savage Dragon"
],
@@ -2234,12 +2296,21 @@ const COSPLAYER_FRANCHISES = {
"Scream": [
"Ghostface"
],
"Shantae": [
"Shantae"
],
"She-Ra and the Princesses of Power": [
"Catra"
],
"Sheena, Queen of the Jungle": [
"Sheena"
],
"Sherlock Holmes": [
"Sherlock Holmes"
],
"Short Circuit": [
"Johnny 5"
],
"Shrek": [
"Lord Farquaad",
"Princess Fiona",
@@ -2345,6 +2416,7 @@ const COSPLAYER_FRANCHISES = {
"Ilia",
"Klingon",
"Mr. Spock",
"Orion",
"Seven of Nine",
"Tellarite",
"Uhura",
@@ -2927,6 +2999,10 @@ const COSPLAYER_FRANCHISES = {
"Panthro",
"Tygra"
],
"Tiger & Bunny": [
"Barnaby Brooks Jr.",
"Wild Tiger"
],
"Tokyo Ghoul": [
"Ken Kaneki",
"Rize Kamishiro",
@@ -2941,6 +3017,12 @@ const COSPLAYER_FRANCHISES = {
"The Darkness (Jackie Estacado)",
"Velocity"
],
"Touhou Project": [
"Marisa Kirisame",
"Reimu Hakurei",
"Sakuya Izayoi",
"Yukari Yakumo"
],
"Toy Story": [
"Bo Peep",
"Buzz Lightyear",
@@ -2960,15 +3042,23 @@ const COSPLAYER_FRANCHISES = {
"Tron": [
"Quorra"
],
"Tsukihime": [
"Arcueid Brunestud"
],
"Twenty Thousand Leagues Under the Sea": [
"Captain Nemo"
],
"UTAU": [
"Kasane Teto"
],
"Ultraman": [
"Ultraman"
],
"Undertale": [
"Papyrus",
"Sans"
"Sans",
"Toriel",
"Undyne"
],
"Underworld": [
"Selene (Underworld)"
@@ -3010,6 +3100,9 @@ const COSPLAYER_FRANCHISES = {
"Voltron": [
"Princess Allura"
],
"WALL-E": [
"WALL-E"
],
"Warhammer 40,000": [
"Commissar",
"Sister of Battle",
+137 -10
View File
@@ -1,4 +1,5 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
/*
* Identity Forge roster picker — Phase 4b (1.1.0).
@@ -166,6 +167,31 @@ function hasTrait(entry, ...traits) {
return traits.some((t) => have.includes(t));
}
// Gender filter (2.1.0). An entry with no single gender (creatures, "Any"
// archetypes) suits either choice, so it stays visible under both.
const GENDER_ANY = "Any gender";
const GENDERS = [GENDER_ANY, "Female", "Male"];
function matchesGender(entry, gender) {
return gender === GENDER_ANY || !entry.gender || entry.gender === "Any" || entry.gender === gender;
}
// Franchise filter (2.2.0). Only cosplayers carry a franchise, so picking one
// narrows to cosplayers. Options come from the loaded roster, grouped by category.
const FRANCHISE_ALL = "All franchises";
function franchiseGroups(entries) {
const groups = new Map();
for (const e of entries) {
if (!e.franchise) continue;
const category = e.category || "Other";
if (!groups.has(category)) groups.set(category, new Set());
groups.get(category).add(e.franchise);
}
const byText = (a, b) => a.localeCompare(b, undefined, { sensitivity: "base" });
return [...groups.keys()].sort(byText).map((c) => [c, [...groups.get(c)].sort(byText)]);
}
const FACET_PREDICATES = {
[FACET_ALL]: () => true,
[FACET_GIANT]: (e) => hasTrait(e, "giant"),
@@ -192,19 +218,30 @@ function traitChips(entry) {
// --- opt-in thumbnails --------------------------------------------------------
//
// Text-first, zero image payload by default. Enabling "Show preview images"
// fetches the LIVE gh-pages gallery manifest for a kind with a plain, absolute
// `fetch` -- explicitly not `api.fetchApi`, which targets the ComfyUI server,
// not GitHub Pages -- and lazy-loads <img> tags via IntersectionObserver.
// Gallery manifests are deployment output on gh-pages, not source artifacts
// on main; only the published file is ever fetched here.
// fetches the gallery manifest for a kind and lazy-loads <img> tags via
// IntersectionObserver. 2.3.0: both go through the pack's own server routes
// (nodes/gallery_cache.py), which fetch the gh-pages gallery and keep it on
// disk -- ComfyUI's --offline CSP allows only the page's own origin, and the
// cache also keeps previews showing after the network goes away. Gallery
// manifests are deployment output on gh-pages, not source artifacts on main.
const GH_PAGES_GALLERY_ROOT = "https://enragedantelope.github.io/comfyui-identity-forge/gallery/";
const PREVIEW_PREF_KEY = "identity_forge.picker.show_previews";
/** The public gallery page (the "Open the full gallery" links). */
function galleryFolderURL(kind) {
return GH_PAGES_GALLERY_ROOT + KIND_GALLERY_FOLDER[kind] + "/";
}
/** The same folder through the server's cache, on ComfyUI's own origin. */
function galleryCacheURL(kind) {
return api.apiURL("/identity_forge/gallery/" + KIND_GALLERY_FOLDER[kind] + "/");
}
function formatMegabytes(bytes) {
return (bytes / (1024 * 1024)).toFixed(1) + " MB";
}
function loadPreviewPref() {
try {
return window.localStorage.getItem(PREVIEW_PREF_KEY) === "1";
@@ -253,7 +290,7 @@ const manifestFetches = new Map();
function loadManifest(kind) {
if (manifestFetches.has(kind)) return manifestFetches.get(kind);
const promise = fetch(galleryFolderURL(kind) + "manifest.json")
const promise = fetch(galleryCacheURL(kind) + "manifest.json")
.then((response) => {
if (!response.ok) throw new Error("HTTP " + response.status);
return response.json();
@@ -320,6 +357,8 @@ class IdentityForgePicker {
this.query = "";
this.activeTab = config.kind;
this.facet = FACET_ALL;
this.gender = GENDER_ANY;
this.franchise = FRANCHISE_ALL;
this.showPreviews = loadPreviewPref();
this.focusIndex = 0;
this.visible = [];
@@ -481,6 +520,34 @@ class IdentityForgePicker {
});
this.facetSelect = facet;
const genderSelect = document.createElement("select");
genderSelect.className = "if-picker-facet";
genderSelect.setAttribute("aria-label", "Filter by gender");
for (const value of GENDERS) {
const option = document.createElement("option");
option.value = value;
option.textContent = value;
genderSelect.appendChild(option);
}
genderSelect.value = this.gender;
genderSelect.addEventListener("change", () => {
this.gender = genderSelect.value;
this.focusIndex = 0;
this.renderGrid();
});
this.genderSelect = genderSelect;
const franchiseSelect = document.createElement("select");
franchiseSelect.className = "if-picker-facet";
franchiseSelect.setAttribute("aria-label", "Filter by franchise");
franchiseSelect.addEventListener("change", () => {
this.franchise = franchiseSelect.value;
this.focusIndex = 0;
this.renderGrid();
});
this.franchiseSelect = franchiseSelect;
this.fillFranchiseOptions();
const previewLabel = document.createElement("label");
previewLabel.className = "if-picker-preview-toggle";
const previewCheckbox = document.createElement("input");
@@ -501,12 +568,40 @@ class IdentityForgePicker {
close.setAttribute("aria-label", "Close (" + this.config.title + ")");
close.addEventListener("click", () => this.close());
header.append(search, facet, count, previewLabel, close);
header.append(search, facet, genderSelect, franchiseSelect, count, previewLabel, close);
const notice = document.createElement("div");
notice.className = "if-picker-notice";
notice.textContent =
"Enabling previews fetches images from this project's GitHub Pages site (enragedantelope.github.io) — nothing else phones home.";
"Enabling previews has the ComfyUI server fetch images from this project's GitHub Pages site " +
"(enragedantelope.github.io) and keep them on disk, so they still show offline. Nothing else phones home. ";
const clearCache = document.createElement("button");
clearCache.type = "button";
clearCache.className = "if-picker-btn if-picker-clear-cache";
clearCache.textContent = "Clear cached previews";
clearCache.addEventListener("click", async () => {
try {
const resp = await api.fetchApi("/identity_forge/gallery/cache/clear", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: "{}",
});
clearCache.textContent = resp.ok ? "Cached previews cleared" : "Could not clear the cache";
} catch (_) {
clearCache.textContent = "Could not clear the cache";
}
});
// Best-effort size readout; the button works without it.
api
.fetchApi("/identity_forge/gallery/cache")
.then((resp) => (resp.ok ? resp.json() : null))
.then((data) => {
if (data && typeof data.bytes === "number" && data.bytes > 0) {
clearCache.textContent = "Clear cached previews (" + formatMegabytes(data.bytes) + ")";
}
})
.catch(() => {});
notice.append(clearCache);
const links = document.createElement("div");
links.className = "if-picker-links";
@@ -698,9 +793,35 @@ class IdentityForgePicker {
const predicate = FACET_PREDICATES[this.facet] || FACET_PREDICATES[FACET_ALL];
list = list.filter(predicate);
}
if (this.gender !== GENDER_ANY) {
list = list.filter((entry) => matchesGender(entry, this.gender));
}
if (this.franchise !== FRANCHISE_ALL) {
list = list.filter((entry) => entry.franchise === this.franchise);
}
return list;
}
/** (Re)build the franchise dropdown; a no-op until the roster has loaded. */
fillFranchiseOptions() {
const select = this.franchiseSelect;
if (!select || (roster && select.options.length > 1)) return;
const all = document.createElement("option");
all.value = all.textContent = FRANCHISE_ALL;
select.replaceChildren(all);
for (const [category, names] of franchiseGroups(roster || [])) {
const group = document.createElement("optgroup");
group.label = category;
for (const name of names) {
const option = document.createElement("option");
option.value = option.textContent = name;
group.appendChild(option);
}
select.appendChild(group);
}
select.value = this.franchise;
}
/** The grid's contents: the query/facet matches, narrowed to the active tab. */
visibleEntries(matching) {
const list = matching || this.matchingEntries();
@@ -719,12 +840,14 @@ class IdentityForgePicker {
/** True while anything is narrowing the roster -- when the counts are worth showing. */
isFiltering() {
return Boolean(tokenize(this.query).length) || this.facet !== FACET_ALL;
return Boolean(tokenize(this.query).length) || this.facet !== FACET_ALL
|| this.gender !== GENDER_ANY || this.franchise !== FRANCHISE_ALL;
}
renderGrid() {
if (!this.grid) return;
if (!roster) return; // ensureData() is showing the placeholder
this.fillFranchiseOptions();
this.grid.replaceChildren();
this._focused = null;
@@ -826,7 +949,10 @@ class IdentityForgePicker {
if (!relative || el.querySelector("img")) continue;
const img = document.createElement("img");
img.alt = "";
img.setAttribute("data-src", galleryFolderURL(kind) + relative);
img.setAttribute(
"data-src",
galleryCacheURL(kind) + relative.split("/").map(encodeURIComponent).join("/"),
);
img.loading = "lazy";
el.replaceChildren(img);
if (this.imageObserver) this.imageObserver.observe(img);
@@ -1137,6 +1263,7 @@ export const __testing = {
matchesQuery,
FACET_PREDICATES,
FACETS,
FRANCHISE_ALL,
traitChips,
loadRoster,
loadManifest,
File diff suppressed because one or more lines are too long
+171
View File
@@ -0,0 +1,171 @@
"""Server-side cache of the gh-pages gallery, for the roster picker's preview images (2.3.0).
The picker used to fetch the manifest and every thumbnail straight from GitHub Pages in
the browser. ComfyUI's ``--offline`` flag sends a Content-Security-Policy of
``img-src 'self'; connect-src 'self'``, which blocks exactly that, so previews never
loaded there. Routing them through the pack's own routes puts them on ComfyUI's origin,
and the server keeps what it fetched:
* **Lazy.** An image is downloaded the first time a card scrolls into view, never in
bulk; the cache holds what this install has looked at (about 100 KiB an image).
* **Revalidated, not trusted forever.** Re-renders keep their filename, so a cached
file is checked again with its ETag after :data:`MANIFEST_MAX_AGE` (manifest) or
:data:`IMAGE_MAX_AGE` (image); an unchanged file costs one 304.
* **Offline-tolerant.** Any network failure serves the cached copy if there is one.
Only one host is ever contacted, and an image path is served only if the current
manifest lists it, so a request cannot name an arbitrary URL or escape the cache
directory. Nothing here runs until the user enables previews in the picker.
"""
from __future__ import annotations
import json
import os
import shutil
import tempfile
import time
import urllib.error
import urllib.parse
import urllib.request
from pathlib import Path
from typing import Callable
GALLERY_ROOT = "https://enragedantelope.github.io/comfyui-identity-forge/gallery/"
#: Gallery folders on gh-pages (js KIND_GALLERY_FOLDER's values).
KINDS: "frozenset[str]" = frozenset({"cosplay", "archetypes", "creatures"})
#: GitHub Pages serves both with ``max-age=600``; an image is re-checked weekly.
MANIFEST_MAX_AGE = 600
IMAGE_MAX_AGE = 7 * 24 * 3600
#: Gallery images are optimized JPEGs of ~100 KiB; refuse anything absurd.
MAX_IMAGE_BYTES = 5 * 1024 * 1024
MAX_MANIFEST_BYTES = 8 * 1024 * 1024
TIMEOUT = 15
_ETAG = ".etag"
class GalleryError(Exception):
"""A request that cannot be served: unknown kind/path, or nothing cached offline."""
def default_root() -> Path:
import folder_paths # type: ignore[import-not-found]
return Path(folder_paths.get_user_directory()) / "identity_forge" / "gallery_cache"
def _urlopen(request: urllib.request.Request): # pragma: no cover - patched in tests
return urllib.request.urlopen(request, timeout=TIMEOUT)
def _write_atomic(path: Path, data: bytes) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
fd, tmp = tempfile.mkstemp(dir=path.parent, prefix=".tmp-")
try:
with os.fdopen(fd, "wb") as handle:
handle.write(data)
os.replace(tmp, path)
except BaseException:
Path(tmp).unlink(missing_ok=True)
raise
def _fetch(url: str, path: Path, max_age: float, limit: int,
check: "Callable[[bytes, str], bool]", opener=None) -> Path:
"""``path``, refreshed from ``url`` when older than ``max_age`` seconds.
A failed or rejected download keeps the cached copy; with none, GalleryError.
"""
opener = opener or _urlopen
etag_path = path.with_name(path.name + _ETAG)
if path.is_file() and time.time() - path.stat().st_mtime < max_age:
return path
request = urllib.request.Request(url, headers={"User-Agent": "comfyui-identity-forge"})
if path.is_file() and etag_path.is_file():
request.add_header("If-None-Match", etag_path.read_text(encoding="utf-8").strip())
try:
with opener(request) as response:
data = response.read(limit + 1)
content_type = response.headers.get("Content-Type", "")
etag = response.headers.get("ETag", "")
if len(data) > limit or not check(data, content_type):
raise GalleryError(f"rejected response from {url}")
_write_atomic(path, data)
if etag:
_write_atomic(etag_path, etag.encode("utf-8"))
return path
except urllib.error.HTTPError as exc:
if exc.code == 304 and path.is_file():
os.utime(path) # validated: fresh for another max_age
return path
failure: Exception = exc
except (OSError, GalleryError, ValueError) as exc: # URLError is an OSError
failure = exc
if path.is_file():
return path # offline or failing: what we had before
raise GalleryError(f"{url} unavailable and not cached: {failure}")
def _is_manifest(data: bytes, _content_type: str) -> bool:
try:
return isinstance(json.loads(data.decode("utf-8")).get("entries"), list)
except (ValueError, AttributeError, UnicodeDecodeError):
return False
def _is_image(data: bytes, content_type: str) -> bool:
return content_type.startswith("image/") and bool(data)
def _check_kind(kind: str) -> None:
if kind not in KINDS:
raise GalleryError(f"unknown gallery {kind!r}")
def manifest_path(kind: str, root: Path, opener=None) -> Path:
_check_kind(kind)
return _fetch(GALLERY_ROOT + kind + "/manifest.json", root / kind / "manifest.json",
MANIFEST_MAX_AGE, MAX_MANIFEST_BYTES, _is_manifest, opener)
#: kind -> (manifest mtime, image paths it lists); the manifest is ~400 KiB of JSON,
#: too much to re-parse for every thumbnail request.
_LISTED: "dict[tuple[Path, str], tuple[float, frozenset[str]]]" = {}
def _listed_images(kind: str, root: Path, opener=None) -> "frozenset[str]":
path = manifest_path(kind, root, opener)
mtime = path.stat().st_mtime
cached = _LISTED.get((root, kind))
if cached and cached[0] == mtime:
return cached[1]
entries = json.loads(path.read_text(encoding="utf-8")).get("entries") or []
images = frozenset(e["image"] for e in entries
if isinstance(e, dict) and isinstance(e.get("image"), str))
_LISTED[(root, kind)] = (mtime, images)
return images
def image_path(kind: str, relative: str, root: Path, opener=None) -> Path:
"""The cached file for one manifest-listed image, downloading it if needed."""
_check_kind(kind)
if relative not in _listed_images(kind, root, opener):
raise GalleryError(f"{relative!r} is not in the {kind} manifest")
target = (root / kind / relative).resolve()
if not target.is_relative_to((root / kind).resolve()): # defence in depth
raise GalleryError(f"{relative!r} escapes the cache")
url = GALLERY_ROOT + kind + "/" + urllib.parse.quote(relative)
return _fetch(url, target, IMAGE_MAX_AGE, MAX_IMAGE_BYTES, _is_image, opener)
def cache_bytes(root: Path) -> int:
if not root.is_dir():
return 0
return sum(p.stat().st_size for p in root.rglob("*") if p.is_file())
def clear(root: Path) -> None:
_LISTED.clear()
if root.is_dir():
shutil.rmtree(root)
+67 -12
View File
@@ -40,7 +40,7 @@ try:
FIELD_DEFINITIONS, FIELD_FAMILIES, FIELD_HELP, OUTFIT_DESCRIPTIONS,
SKIN_TONE_BANDS, ETHNICITY_REGION, OUTDOOR_LOCATIONS, STUDIO_BACKDROPS,
HAIR_DEPENDENT_POSES, GARMENT_DEPENDENT_POSES, HAND_OCCUPIED_POSES,
QUADRUPED_UNPERFORMABLE_POSES,
QUADRUPED_UNPERFORMABLE_POSES, ONE_HAND_POSES,
FURNITURE_DEPENDENT_POSES,
PALETTE_ADJECTIVES, PATTERN_TAILS, WORN_ITEM_RES,
SHOE_RE, COLOUR_WORD_RE, PATTERN_WORD_RE, LEADING_ARTICLE_RE,
@@ -60,7 +60,7 @@ except ImportError: # pragma: no cover — standalone/test context
FIELD_DEFINITIONS, FIELD_FAMILIES, FIELD_HELP, OUTFIT_DESCRIPTIONS,
SKIN_TONE_BANDS, ETHNICITY_REGION, OUTDOOR_LOCATIONS, STUDIO_BACKDROPS,
HAIR_DEPENDENT_POSES, GARMENT_DEPENDENT_POSES, HAND_OCCUPIED_POSES,
QUADRUPED_UNPERFORMABLE_POSES,
QUADRUPED_UNPERFORMABLE_POSES, ONE_HAND_POSES,
FURNITURE_DEPENDENT_POSES,
PALETTE_ADJECTIVES, PATTERN_TAILS, WORN_ITEM_RES,
SHOE_RE, COLOUR_WORD_RE, PATTERN_WORD_RE, LEADING_ARTICLE_RE,
@@ -152,6 +152,11 @@ _SELFIE_SHOT_TYPE: str = "selfie framing at arm's length"
#: makeup_style) are affected; identical-pool fields already pass the gate.
_GENDER_FLEXIBLE_GROUPS: frozenset[str] = frozenset({"Makeup"})
#: 2.4.0: eye cosmetics a LOCK keeps voiced on a bare face. A man's "no makeup"
#: default hid an Emo's or a New Wave look's locked eyeliner; random men lock nothing,
#: so their prose is unchanged. Lips, blush and contour stay hidden on purpose.
_BARE_FACE_KEEPS: tuple[str, ...] = ("eye_makeup", "eyeliner")
#: ``set_all_fields`` control values. "All to None" omits every field still on
#: "Random" (a blank-slate baseline) so only locked fields appear; a wired
#: character's signature look is exempt (see :func:`resolve_locked_fields`).
@@ -265,6 +270,13 @@ _MASK_KEY = "__mask__"
#: body twice.
_ANATOMY_NOTE_KEY = "__anatomy_note__"
#: Reserved key carrying a cosplayer's ``subject`` noun (2.1.0): the lead phrase
#: uses it in place of "man" / "woman" ("a short pig-headed humanoid alien", "a
#: one-eyed cyclops woman"). A non-human face named only in a later sentence lost to
#: "a short man" on render (the Tellarite; Leela drew two eyes). The cosplayer node
#: omits it on unmask, where the person underneath shows.
_SUBJECT_NOUN_KEY = "__subject_noun__"
#: Reserved key carrying a cosplayer's ``covers_body`` flag through the parsed dict
#: (a full hard suit / armour / robot shell / exoskeleton — no skin for worn
#: jewellery to sit on).
@@ -290,7 +302,7 @@ _SCALE_TIER_KEY = "__scale_tier__"
#: scale on Hermione, a masked cosplayer suppressing an archetype's whole face).
_COSTUME_META_KEYS: tuple[str, ...] = (
"covers_face", "covers_body", "covers_hair", "mask", "size_scale",
"anatomy_note",
"anatomy_note", "subject",
)
#: Top-level section name a Modifier node adds to the chained preset document,
@@ -323,6 +335,10 @@ _VARIANTS_KEY = "__variants__"
_FORM_ANTHRO = "Anthropomorphic"
_FORM_FERAL = "Feral"
_FORM_SUBTLE = "Subtle"
#: Creature classes whose anatomy slots describe the whole body (undead, golems,
#: aliens): the Anthropomorphic form calls them "humanoid", not a human "hybrid",
#: and drops the human body proportions (2.4.0).
_BODY_DEFINED_CLASSES = frozenset({"Monsters", "Aliens"})
#: Order anatomy slots are voiced / serialized in.
_SPECIES_SLOT_ORDER: tuple[str, ...] = (
@@ -1601,6 +1617,11 @@ _HAND_PROP_RE = re.compile(
r"(?<=, )(?:holding|carrying|swirling|presenting|raising))\b",
re.IGNORECASE)
#: 2.4.0: a held prop that fills both hands (twin pistols, a book in both hands).
_BOTH_HANDS_PROP_RE = re.compile(
r"\b(?:in each hand|in either hand|in the other(?: hand)?|in both hands|"
r"with both hands|in two hands)\b", re.IGNORECASE)
def _performable_poses(
pool: list[str],
@@ -1681,6 +1702,9 @@ def _performable_poses(
if ((held and not _is_absent(held)) or resolved.get("shot_type") == _SELFIE_SHOT_TYPE
or _HAND_PROP_RE.search(outfit)):
excluded |= HAND_OCCUPIED_POSES
# 2.4.0: a prop in each hand leaves none free ("adjusting one cuff" drew a third hand).
if held and _BOTH_HANDS_PROP_RE.search(held):
excluded |= ONE_HAND_POSES
# 1.5.0 round 4: "adjusting one cuff" in a poncho, "touching the collar" in a harness
# top. Only once a garment exists (inside the fill loop it does not yet).
if outfit and not _CUFFED_RE.search(outfit):
@@ -3141,7 +3165,15 @@ def _species_subject(species: dict, gender: str) -> str:
"""
base = species.get("creature_of") or "creature"
form = species.get("form", "")
if form == _FORM_ANTHRO:
if form == _FORM_ANTHRO and species.get("anthro_subject"):
# 2.4.0: a creature's own anthro lead noun, for bodies the model otherwise
# draws whole beside a person (see data/creatures.py "anthro").
noun = species["anthro_subject"]
elif form == _FORM_ANTHRO and species.get("creature_class") in _BODY_DEFINED_CLASSES:
# 2.4.0: "anthropomorphic skeleton hybrid" read as a human with skeleton
# traits; a skeleton, ghost or golem is already person-shaped.
noun = f"humanoid {base}"
elif form == _FORM_ANTHRO:
noun = f"anthropomorphic {base} hybrid"
elif form == _FORM_FERAL:
creature_class = species.get("creature_class", "")
@@ -3181,6 +3213,8 @@ def _format_prose(
presentation: str | None = None, # APPENDED (1.5.0 round 4)
feet_visible: bool = True, # APPENDED (1.7.0): see _FEET_OUT_OF_FRAME_SHOTS
subject_only: bool = False, # APPENDED (1.8.0): person + outfit, no pose/scene
subject_override: str | None = None, # APPENDED (2.1.0): see _SUBJECT_NOUN_KEY
kept_cosmetics: "tuple[str, ...]" = (), # APPENDED (2.4.0): see _BARE_FACE_KEEPS
) -> str:
"""Build a natural-language description from resolved field values.
@@ -3213,7 +3247,7 @@ def _format_prose(
form = species.get("form", "")
species_lead = bool(slots) and form in (_FORM_ANTHRO, _FORM_FERAL)
subject_noun = _species_subject(species, gender) if species_lead \
else _GENDER_NOUN.get(gender, "person")
else (subject_override or _GENDER_NOUN.get(gender, "person"))
# Anatomy phrases in reading order, plus any extras keyed outside the canon.
anatomy = [slots[s] for s in _SPECIES_SLOT_ORDER if slots.get(s)]
anatomy += [v for k, v in slots.items() if k not in _SPECIES_SLOT_ORDER and v]
@@ -3451,8 +3485,12 @@ def _format_prose(
# (field, noun, stem) — append " noun" only when the value doesn't already
# carry the category (stem), avoiding "ombre lip lip colour" / "… liner
# eyeliner" style doubling.
if g("makeup_style"):
makeup = [g("makeup_style")]
# 2.4.0: with no style (a man's bare-faced default), only the locked eye fields in
# ``kept_cosmetics`` are voiced; the random rest stays hidden as before.
style = g("makeup_style")
kept = () if style else tuple(f for f in kept_cosmetics if g(f))
if style or kept:
makeup = [style] if style else []
for field, noun, stem in (
("eye_makeup", "eyeshadow", "shadow"), ("eyeliner", "eyeliner", "liner"),
("lashes", "lashes", "lash"), ("lips_makeup", "lip colour", "lip"),
@@ -3461,7 +3499,7 @@ def _format_prose(
("skin_finish", "finish", "finish"),
):
val = g(field)
if val:
if val and (style or field in kept):
makeup.append(_OBJECT_TOKEN_CLAUSES.get((field, val))
or (val if stem in val else f"{val} {noun}"))
sentences.append(f"{subj} {wears} " + _join(makeup))
@@ -3789,6 +3827,7 @@ def _format_json(
covers_face: bool = False, covers_body: bool = False, covers_hair: bool = False,
mask_text: str | None = None, anatomy_note: str | None = None, size_scale: str = "",
omitted: "list[str] | None" = None,
subject_noun: str | None = None,
) -> str:
"""Build a JSON document: ``_meta`` plus fields nested by group.
@@ -3828,7 +3867,7 @@ def _format_json(
if slots:
# ``size`` belongs with them: it prefixes the subject noun ("A towering lion"),
# so leaving it out recalled a towering creature as a plain one.
for key in ("creature_of", "creature_class", "form", "size"):
for key in ("creature_of", "creature_class", "form", "size", "anthro_subject"):
if species.get(key):
meta[key] = species[key]
# The suppression lists travel with the form, for the same reason the five
@@ -3859,6 +3898,8 @@ def _format_json(
meta["mask"] = mask_text
if anatomy_note:
meta["anatomy_note"] = anatomy_note
if subject_noun:
meta["subject"] = subject_noun
if size_scale:
meta["size_scale"] = size_scale
if omitted:
@@ -3964,6 +4005,7 @@ def generate_character(
widget_locked: frozenset[str] | None = None,
mask_text: str | None = None,
anatomy_note: str | None = None,
subject_noun: str | None = None,
with_subject: Literal[False] = False,
) -> tuple[str, str]: ...
@@ -3990,6 +4032,7 @@ def generate_character(
widget_locked: frozenset[str] | None = None,
mask_text: str | None = None,
anatomy_note: str | None = None,
subject_noun: str | None = None,
with_subject: Literal[True],
) -> tuple[str, str, str]: ...
@@ -4016,6 +4059,7 @@ def generate_character(
widget_locked: frozenset[str] | None = None,
mask_text: str | None = None,
anatomy_note: str | None = None,
subject_noun: str | None = None,
with_subject: bool,
) -> tuple[str, str] | tuple[str, str, str]: ...
@@ -4045,6 +4089,7 @@ def generate_character(
widget_locked: frozenset[str] | None = None,
mask_text: str | None = None,
anatomy_note: str | None = None,
subject_noun: str | None = None,
with_subject: bool = False, # APPENDED (1.8.0): also return the subject-only prose
) -> tuple[str, str] | tuple[str, str, str]:
"""Engine entry point. Returns ``(prose, json_output)``, or
@@ -4546,10 +4591,12 @@ def generate_character(
# 2.0.0: a skirt length the frame cannot show is dropped from the prose too.
trimmed = _LENGTH_WORD_RE.sub("", prose_fields.get("outfit_description") or "")
prose_fields = {**prose_fields, "outfit_description": trimmed}
kept_cosmetics = tuple(f for f in _BARE_FACE_KEEPS if f in locked_clean)
prose = _format_prose(prose_fields, gender, cosplay_label, species,
hands_visible=not hands_covered, mask_text=mask_text,
anatomy_note=anatomy_note, presentation=presentation,
feet_visible=feet_visible)
subject_override=subject_noun,
feet_visible=feet_visible, kept_cosmetics=kept_cosmetics)
# Fields a preset or a widget deliberately locked ABSENT. They are stripped from
# the group output (``group_fields`` drops "None"), so without recording them the
# document cannot round-trip through the vault -- a recalled She-Hulk grew a
@@ -4561,6 +4608,7 @@ def generate_character(
covers_face=covers_face, covers_body=covers_body, covers_hair=covers_hair,
mask_text=mask_text,
anatomy_note=anatomy_note,
subject_noun=subject_noun,
# The tier actually in force: the widget overrides a wired character's own,
# which is the precedence _scale_class applies a few lines above.
size_scale=(size_scale if size_scale != _SIZE_SCALE_AUTO else character_scale),
@@ -4572,7 +4620,9 @@ def generate_character(
subject = _format_prose(resolved, gender, cosplay_label, species,
hands_visible=not hands_covered, mask_text=mask_text,
anatomy_note=anatomy_note, presentation=presentation,
feet_visible=True, subject_only=True)
subject_override=subject_noun,
feet_visible=True, subject_only=True,
kept_cosmetics=kept_cosmetics)
return prose, json_output, subject
return prose, json_output
@@ -4699,6 +4749,9 @@ def _parse_archetype_json(raw: str) -> dict[str, Any]:
head = meta.get("mask")
if meta.get("covers_face") and isinstance(head, str) and head:
flat[_MASK_KEY] = head
noun = meta.get("subject")
if isinstance(noun, str) and noun:
flat[_SUBJECT_NOUN_KEY] = noun
# NOT gated on covers_face: an anatomy note describes the body, not the
# head, and every entry it exists for is face-visible. See
# :data:`_ANATOMY_NOTE_KEY`.
@@ -4728,7 +4781,7 @@ def _parse_archetype_json(raw: str) -> dict[str, Any]:
if isinstance(form, str) and form:
species = flat.setdefault(_SPECIES_KEY, {})
species["form"] = form
for str_key in ("creature_of", "creature_class", "size"):
for str_key in ("creature_of", "creature_class", "size", "anthro_subject"):
if isinstance(meta.get(str_key), str):
species[str_key] = meta[str_key]
for list_key in ("suppress_groups", "suppress_fields"):
@@ -4778,6 +4831,7 @@ def run_identity_forge(kwargs: dict[str, Any]) -> tuple[str, str, str]:
covers_face = bool(archetype.pop(_COVERS_FACE_KEY, None))
mask_text = archetype.pop(_MASK_KEY, None)
anatomy_note = archetype.pop(_ANATOMY_NOTE_KEY, None)
subject_noun = archetype.pop(_SUBJECT_NOUN_KEY, None)
covers_body = bool(archetype.pop(_COVERS_BODY_KEY, None))
covers_hair = bool(archetype.pop(_COVERS_HAIR_KEY, None))
character_scale = archetype.pop(_SCALE_TIER_KEY, "") or ""
@@ -4861,6 +4915,7 @@ def run_identity_forge(kwargs: dict[str, Any]) -> tuple[str, str, str]:
widget_locked=widget_locked,
mask_text=mask_text,
anatomy_note=anatomy_note,
subject_noun=subject_noun,
with_subject=True,
)
return prose, json_output, subject
+225
View File
@@ -0,0 +1,225 @@
"""IdentityForgeAgeProgression node - one resolved character at several ages.
A sibling of :mod:`nodes.identity_forge_turnaround` (read its docstring first): it
takes a **resolved** character (Identity Forge's ``prompt_json``), re-runs the engine
over it once per life stage and emits the prompts as a **list**.
**Ownership line.** This node owns ``age``, and only what age forces:
* **Fields a live rule refuses at that age** are released and redrawn by the engine
(``lock_clash``): laugh lines at 20, "porcelain smooth" skin at 70, pigtails from
45, an undercut from 55. When the refused field is ``outfit_style`` the whole
outfit goes with it, because the outfit text was written for that style.
* **Hair greys forward, never back.** Under "Natural only" hair, a stage at 55 or
older than the character turns natural colour grey (salt and pepper for dark hair,
silver otherwise, silver for everyone from 70); a stage younger than a grey-haired
character, and under 55, gets one natural colour drawn once for the whole sheet, so
the person does not change hair colour between their twenties and forties. Dye
(Full spectrum), a cosplayer's canon hair and covered hair are left alone.
Everything else (face, build, outfit, scene) is the document's, unchanged.
Every stage is an exact ``age`` pool value, so the youngest is 18 by construction.
A face-covering character, or a form with no age, emits one view.
Text-only, zero new dependencies, no RNG of its own.
"""
from __future__ import annotations
import json
import logging
from typing import Any
try:
from comfy_api.latest import io # type: ignore[import-not-found]
_COMFY_AVAILABLE: bool = True
except ImportError: # pragma: no cover - exercised only outside ComfyUI
_COMFY_AVAILABLE = False
try:
from ..data.constraints import FIELD_FAMILIES, lock_clash
from .identity_forge import FIELD_DEFINITIONS
from .identity_forge_turnaround import (
_FRAMINGS, _forge_class, _unwrap, document_fields, document_meta,
character_seed, parse_document, release_fields, replay_base,
)
except ImportError: # pragma: no cover - standalone/test context
from data.constraints import FIELD_FAMILIES, lock_clash
from nodes.identity_forge import FIELD_DEFINITIONS
from nodes.identity_forge_turnaround import (
_FRAMINGS, _forge_class, _unwrap, document_fields, document_meta,
character_seed, parse_document, release_fields, replay_base,
)
_LOG = logging.getLogger(__name__)
#: The selectable progressions, in display order. Exact ``age`` pool values.
_STAGES: "dict[str, tuple[str, ...]]" = {
"Life stages (4)": ("20", "35", "50", "70"),
"Decades (6)": ("20", "30", "40", "50", "60", "70"),
"Young and old (2)": ("25", "70"),
}
_CLOTHING: "frozenset[str]" = frozenset(
name for name, field in FIELD_DEFINITIONS.items() if field.get("group") == "Clothing")
_GREY: "frozenset[str]" = frozenset(FIELD_FAMILIES["hair_color"]["gray_white"]["variants"])
_DARK: "frozenset[str]" = frozenset(
FIELD_FAMILIES["hair_color"]["black"]["variants"]
+ FIELD_FAMILIES["hair_color"]["brunette"]["variants"])
#: From this age natural hair is grey more often than not (the engine's own
#: ``_GREY_BY_AGE`` crosses one half at 55), so a progression shows it grey.
_GREYS_AT = 55
_SILVER_AT = 70
def _stage_hair(original: str, character_age: int, stage: int, natural: str) -> str:
"""The hair colour at ``stage``: greying forward from the character, never back."""
if original in _GREY:
return original if stage >= min(character_age, _GREYS_AT) else natural
if stage > character_age and stage >= _GREYS_AT:
return "salt and pepper" if original in _DARK and stage < _SILVER_AT else "silver"
return original
def _aged_view(
document: "dict[str, Any]", base: "dict[str, Any]", pins: "dict[str, str]",
also: "frozenset[str]" = frozenset(),
) -> "dict[str, Any]":
"""Replay kwargs with ``pins`` locked, and everything they refuse (laugh lines at
20, highlights in grey hair) released, plus ``also``, for the engine to redraw."""
fields = document_fields(document)
refused = set(also) | {
name for name, value in fields.items() if name not in pins
and any(lock_clash(pin, pinned, {name: value}) for pin, pinned in pins.items())}
if "outfit_style" in refused:
refused |= _CLOTHING
view_document = json.loads(json.dumps(document))
release_fields(view_document, refused)
return {**base, **pins, "archetype_json": json.dumps(view_document)}
def _natural_colour(document: "dict[str, Any]", base: "dict[str, Any]") -> str:
"""The colour a grey-haired character had young: one engine draw at age 20."""
kwargs = _aged_view(document, base, {"age": "20"}, frozenset({"hair_color"}))
resolved = parse_document(str(_unwrap(_forge_class().execute(**kwargs))[1]))
return document_fields(resolved).get("hair_color", "")
def resolve_age_progression(
character_json: str, stages_name: str, framing_name: str,
) -> "tuple[list[str], list[str]]":
"""Render one resolved character once per age. Returns ``(prompts, labels)``."""
forge = _forge_class()
document = parse_document(character_json)
meta = document_meta(document)
fields = document_fields(document)
base = replay_base(character_json)
# Released fields (skin detail at 70, say) redraw per character, not one shared draw.
base["seed"] = character_seed(character_json, "age")
framing = _FRAMINGS.get(framing_name, "")
if framing:
base["shot_type"] = framing
# A close-up refuses a horizon-line composition and a full-standing pose.
release_fields(document, {name for name, value in fields.items()
if lock_clash("shot_type", framing, {name: value})})
character_age = fields.get("age", "")
if meta.get("covers_face") or not character_age.isdigit():
_LOG.warning("This character shows no age (a covered face, or a form without "
"one); emitting one view.")
return [str(_unwrap(forge.execute(**base))[0])], ["1-as-resolved"]
hair = fields.get("hair_color", "")
greys = bool(hair and base.get("hair_color_scope") == "Natural only"
and not meta.get("cosplay_of") and not meta.get("covers_hair"))
natural = ""
if greys and hair in _GREY:
natural = _natural_colour(document, base) or hair
prompts: "list[str]" = []
labels: "list[str]" = []
for position, stage in enumerate(_STAGES.get(stages_name, _STAGES["Life stages (4)"]),
start=1):
pins = {"age": stage}
if greys:
pins["hair_color"] = _stage_hair(hair, int(character_age), int(stage), natural)
view = _aged_view(document, base, pins)
prompts.append(str(_unwrap(forge.execute(**view))[0]))
labels.append(f"{position}-age-{stage}")
return prompts, labels
if _COMFY_AVAILABLE:
class IdentityForgeAgeProgression(io.ComfyNode): # type: ignore[misc, valid-type]
"""Emit one resolved character at several ages, as a list."""
@classmethod
def define_schema(cls) -> "io.Schema":
return io.Schema(
node_id="IdentityForgeAgeProgression",
display_name="Identity Forge Age Progression",
category="conditioning/character",
description=(
"One character at several ages, from a single queue. Wire Identity "
"Forge's 'prompt_json' in; the 'prompt' output is a LIST, so "
"everything downstream runs once per age. The face, build, outfit "
"and scene stay as resolved; hair greys with age, and anything "
"that reads wrong at an age (laugh lines at 20, pigtails at 70) is "
"redrawn."
),
inputs=[
io.String.Input(
"character_json",
default="",
force_input=True,
tooltip="Connect Identity Forge's 'prompt_json' output. Every "
"view is the same person at a different age. A "
"face-covering character (mascot head, full helmet) "
"emits one view.",
),
io.Combo.Input(
"stages",
options=list(_STAGES),
default="Life stages (4)",
tooltip="Which ages to emit, and so how many images one queue "
"makes. Life stages (4) = 20, 35, 50, 70; Decades (6) = "
"20 to 70 in tens; Young and old (2) = 25 and 70.",
),
io.Combo.Input(
"framing",
options=list(_FRAMINGS),
default="Head and shoulders",
tooltip="How much of the subject each view frames. 'Head and "
"shoulders' keeps the face, where age shows, large. "
"'Unspecified' keeps the character's own framing.",
),
],
outputs=[
io.String.Output(
display_name="prompt",
is_output_list=True,
tooltip="One prompt per age, as a list. Wire into "
"CLIPTextEncode.",
),
io.String.Output(
display_name="view_label",
is_output_list=True,
tooltip="Matching list of sortable names ('1-age-20', "
"'2-age-35', ...). Wire into Save Image's "
"filename_prefix.",
),
],
)
# No fingerprint_inputs: no RNG and no auto-advancing widget (see Turnaround).
@classmethod
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
prompts, labels = resolve_age_progression(
kwargs.get("character_json", ""),
kwargs.get("stages", "Life stages (4)"),
kwargs.get("framing", "Head and shoulders"),
)
return io.NodeOutput(prompts, labels)
+3 -1
View File
@@ -76,7 +76,9 @@ def _is_essential(field: str) -> bool:
# 1.5.1: an `age` lock is part of the look too. Authors lock it only where the look
# implies a life stage (K-Pop Idol young, Babushka old), and dropping it drew a
# 70-year-old cheerleader in the gallery.
if field in ("gender", "age"):
# 2.2.0: so is a `tattoos` lock -- period looks lock "no tattoos" or a Heian court
# lady drew a modern script tattoo.
if field in ("gender", "age", "tattoos"):
return True
return FIELD_DEFINITIONS.get(field, {}).get("group") in _ESSENTIAL_GROUPS
+24 -2
View File
@@ -462,6 +462,14 @@ _MUSCLE_RE = re.compile(r"\bmuscul(?:ar|ed)\b", re.IGNORECASE)
_CLEAN_SHAVEN_RE = re.compile(r"clean[ -]?shaven", re.IGNORECASE)
_CLEAN_SHAVEN_SUPPRESS: dict[str, str] = {"facial_hair": "clean shaven"}
#: 2.2.0: a costume that names its own earrings or necklace must not also get a random
#: one in Costume only mode (Volcana's gold hoops came back beside random silver hoops).
_COSTUME_JEWELRY_RES: dict[str, re.Pattern] = {
"earrings": re.compile(r"\bearrings?\b|\bhoops\b|\bear studs?\b", re.IGNORECASE),
"necklace": re.compile(r"\bnecklaces?\b|\bchokers?\b|\bpendant\b|\blocket\b|\bdog tags\b",
re.IGNORECASE),
}
# Size-scale entries ("giant"/"tiny") pair with a hand-authored ``scale_prose``
# phrase that REPLACES the human ``height`` value (applied in build_cosplayer_json).
# ``height``'s gender pools are identical, so the engine's gender gate passes any
@@ -500,7 +508,11 @@ def _pick_look(entry: dict, rng: random.Random) -> dict:
return entry
pool: list[dict] = [{"costume": entry["costume"]}]
pool += [alt if isinstance(alt, dict) else {"costume": alt} for alt in alternates]
chosen = rng.choice(pool)
# Optional ``costume_weights`` (2.1.0), one per look in pool order, leans the
# roll toward the best-known look. Unweighted entries keep rng.choice, so their
# seeds do not move.
weights = entry.get("costume_weights")
chosen = rng.choices(pool, weights=weights)[0] if weights else rng.choice(pool)
merged = dict(entry)
merged.pop("costumes", None)
# Overlay only the keys the chosen look actually sets; absent keys fall back to the
@@ -800,6 +812,11 @@ def build_cosplayer_json(
# NOT clear it -- it is not part of the head.
if not feral and entry.get("anatomy_note"):
document["_meta"]["anatomy_note"] = entry["anatomy_note"]
# The lead noun for a non-human head ("pig-headed humanoid alien", "one-eyed
# cyclops woman"), only while that head is shown - dropped when unmasking reveals
# the person underneath. See ``_SUBJECT_NOUN_KEY`` in identity_forge.py.
if not feral and not unmask and entry.get("subject"):
document["_meta"]["subject"] = entry["subject"]
size_scale = entry.get("size_scale", "")
if size_scale:
document["_meta"]["size_scale"] = size_scale
@@ -868,6 +885,10 @@ def build_cosplayer_json(
_apply_suppress(document, _CLEAN_SHAVEN_SUPPRESS, override=False)
if not feral and _CLEAN_SHAVEN_RE.search(costume):
_apply_suppress(document, _CLEAN_SHAVEN_SUPPRESS, override=False)
if not feral:
for field, pattern in _COSTUME_JEWELRY_RES.items():
if pattern.search(costume):
_apply_suppress(document, {field: "None"}, override=False)
if not feral and _MUSCLE_RE.search(costume):
_apply_suppress(document, {"fitness_level": "muscular"}, override=False)
if not feral and (look_level == _FULL or (covers and not unmask)):
@@ -963,7 +984,8 @@ if _COMFY_AVAILABLE:
"randomized face/hair. 'Unmask (show face)' drops the "
"mask so the randomized head/hair shows under the suit "
"(a helmet-off look). No effect on face-visible "
"characters.",
"characters, or on beasts and non-humanoid droids "
"(R2-D2, a Dalek), which have no person inside.",
),
io.Combo.Input(
"props",
+30 -10
View File
@@ -52,7 +52,7 @@ try:
)
from .identity_forge import (
merge_preset_documents, _prepend_descriptor, _SPECIES_GROUP,
_FORM_ANTHRO, _FORM_FERAL, _FORM_SUBTLE,
_FORM_ANTHRO, _FORM_FERAL, _FORM_SUBTLE, _BODY_DEFINED_CLASSES,
)
except ImportError: # pragma: no cover — standalone/test context
from data.creatures import (
@@ -61,7 +61,7 @@ except ImportError: # pragma: no cover — standalone/test context
)
from nodes.identity_forge import (
merge_preset_documents, _prepend_descriptor, _SPECIES_GROUP,
_FORM_ANTHRO, _FORM_FERAL, _FORM_SUBTLE,
_FORM_ANTHRO, _FORM_FERAL, _FORM_SUBTLE, _BODY_DEFINED_CLASSES,
)
try:
@@ -124,8 +124,13 @@ _FORM_SUPPRESS_GROUPS: dict[str, set[str]] = {
#: but ``fitness_level``'s low values state a human *lifestyle* — a fire elemental
#: described as "sedentary" or "lightly active" is asserting gym habits for a being that
#: has none. Shape stays, lifestyle goes.
#:
#: 2.4.0: Anthro drops ``fitness_level`` for the same reason ("a nautilus hybrid with a
#: sedentary physique"). An Anthro Monster or Alien also drops the human proportions
#: (see _BODY_DEFINED_CLASSES): its anatomy slots already ARE the body.
_HUMAN_PROPORTION_FIELDS = {"bust", "waist", "hips", "shoulder_width", "neck_length"}
_FORM_SUPPRESS_FIELDS: dict[str, set[str]] = {
_FORM_ANTHRO: set(),
_FORM_ANTHRO: {"fitness_level"},
_FORM_FERAL: {"bust", "waist", "hips", "shoulder_width", "neck_length", "posture",
"fitness_level"},
_FORM_SUBTLE: set(),
@@ -179,14 +184,22 @@ def _resolve_creature(creature: str, rng: random.Random) -> str | None:
return creature
def _slot_text(entry: dict, slot: str, anthro: bool):
"""The entry's text for ``slot``; in Anthro form its ``anthro`` text wins ("" drops it)."""
rewrites = entry.get("anthro") or {}
return rewrites[slot] if anthro and slot in rewrites else entry.get(slot)
def _resolve_slot(
slot: str, base_name: str | None, selection: str, rng: random.Random
slot: str, base_name: str | None, selection: str, rng: random.Random,
anthro: bool = False,
) -> tuple[str | None, str | None]:
"""Resolve one slot to ``(value, source_creature)``.
``Follow base`` uses the base creature; ``Random`` picks any creature for that
slot; a name uses that creature. Returns ``(None, None)`` when nothing applies
(e.g. the source creature does not fill that slot).
(e.g. the source creature does not fill that slot). ``anthro`` prefers the
source's ``anthro`` text for the slot (2.4.0; no extra draw, so seed-safe).
"""
if selection == _FOLLOW:
source = base_name
@@ -199,7 +212,7 @@ def _resolve_slot(
source = None
if not source:
return None, None
value = get_creature(source).get(slot)
value = _slot_text(get_creature(source), slot, anthro)
return (value if isinstance(value, str) and value else None), source
@@ -229,10 +242,13 @@ def _parse_more_features(text: str, slots: "OrderedDict[str, str]") -> list[str]
return extras
def _suppression(form_token: str, slots: "OrderedDict[str, str]") -> tuple[list[str], list[str]]:
def _suppression(form_token: str, slots: "OrderedDict[str, str]",
creature_class: str = "") -> tuple[list[str], list[str]]:
"""Return ``(suppress_groups, suppress_fields)`` for the form and filled slots."""
groups = set(_FORM_SUPPRESS_GROUPS.get(form_token, set()))
fields = set(_FORM_SUPPRESS_FIELDS.get(form_token, set()))
if form_token == _FORM_ANTHRO and creature_class in _BODY_DEFINED_CLASSES:
fields |= _HUMAN_PROPORTION_FIELDS
if form_token != _FORM_SUBTLE: # Subtle keeps the human; its creature bits are accents
for slot in slots:
groups |= _SLOT_CONCEAL_GROUPS.get(slot, set())
@@ -284,11 +300,12 @@ def build_creature_json(
integument_source = base_name
for slot in CREATURE_SLOTS:
if slot in _OVERRIDE_SLOTS:
value, source = _resolve_slot(slot, base_name, overrides[slot], rng)
value, source = _resolve_slot(slot, base_name, overrides[slot], rng,
anthro=form_token == _FORM_ANTHRO)
if slot == "integument" and source:
integument_source = source
elif base_name: # base-only slots (extras)
raw = get_creature(base_name).get(slot)
raw = _slot_text(get_creature(base_name), slot, form_token == _FORM_ANTHRO)
value = raw if isinstance(raw, str) and raw else None
else:
value = None
@@ -338,7 +355,10 @@ def build_creature_json(
meta["form"] = form_token
if size:
meta["size"] = size
suppress_groups, suppress_fields = _suppression(form_token, slots)
anthro_subject = (get_creature(base_name).get("anthro") or {}).get("subject") if base_name else None
if form_token == _FORM_ANTHRO and anthro_subject:
meta["anthro_subject"] = anthro_subject
suppress_groups, suppress_fields = _suppression(form_token, slots, meta["creature_class"])
meta["suppress_groups"] = suppress_groups
meta["suppress_fields"] = suppress_fields
+4 -12
View File
@@ -34,12 +34,10 @@ except ImportError: # pragma: no cover - exercised only outside ComfyUI
_COMFY_AVAILABLE = False
try:
from .identity_forge_turnaround import (
_FRAMINGS, _REPLAY_SEED, _forge_class, _unwrap, replay_steering,
)
from .identity_forge_turnaround import _FRAMINGS, _forge_class, _unwrap, replay_base
except ImportError: # pragma: no cover - standalone/test context
from nodes.identity_forge_turnaround import (
_FRAMINGS, _REPLAY_SEED, _forge_class, _unwrap, replay_steering,
_FRAMINGS, _forge_class, _unwrap, replay_base,
)
_LOG = logging.getLogger(__name__)
@@ -90,14 +88,8 @@ def resolve_expression_sheet(
) -> "tuple[list[str], list[str]]":
"""Render one resolved character once per expression. Returns ``(prompts, labels)``."""
forge = _forge_class()
# Schema defaults for every input, then the document: the Turnaround's recipe, and
# its long note on why defaults (not "Random" everywhere) are load-bearing.
base: "dict[str, Any]" = {
spec.id: getattr(spec, "default", None) for spec in forge.define_schema().inputs
}
base["seed"] = _REPLAY_SEED
base["archetype_json"] = character_json or ""
base.update(replay_steering(character_json))
# The Turnaround's replay recipe (schema defaults, then the document).
base = replay_base(character_json)
framing = _FRAMINGS.get(framing_name, "")
if framing:
base["shot_type"] = framing
+275
View File
@@ -0,0 +1,275 @@
"""IdentityForgeOutfitSheet node - one resolved character, a row of outfits.
The wardrobe-side sibling of :mod:`nodes.identity_forge_turnaround` and
:mod:`nodes.identity_forge_expression_sheet`, built the same way (read the Turnaround's
docstring first): it takes a **resolved** character (Identity Forge's ``prompt_json``),
re-runs the engine over it once per view and emits the prompts as a **list**.
**Ownership line.** This node owns only the clothes. Each view pins one
``outfit_style`` and *releases* every Clothing field from the document, so the engine
dresses the same person again under its own rules (season, place, age, body). The
other sheets pin fixed values instead; that cannot work here, because an outfit is a
dozen fields that have to agree with each other, and only the engine can draw them.
Each view replays on its own seed, derived from the style (not the position), so a
style dresses the person the same way in every sheet that contains it, and two views
do not share one colour draw.
A style a live rule refuses (``lock_clash``) is handled by what refuses it. Styling
that changes with the occasion (makeup, jewellery, hair styling, see
:data:`_RESTYLED`) is released and redrawn for that view. Anything else (edgy
alternative at 60+, resort wear in winter, a style the kept scene excludes) skips the
style rather than voicing a contradiction, and logs it. A cosplayer wears their costume, so
a cosplay or a body-covering character emits one view, as does one with no clothing.
Text-only, zero new dependencies.
"""
from __future__ import annotations
import json
import logging
from typing import Any
try:
from comfy_api.latest import io # type: ignore[import-not-found]
_COMFY_AVAILABLE: bool = True
except ImportError: # pragma: no cover - exercised only outside ComfyUI
_COMFY_AVAILABLE = False
try:
from ..data.constraints import lock_clash
from .identity_forge import FIELD_DEFINITIONS
from .identity_forge_turnaround import (
_FRAMINGS, _KEEP_POSE, _NEUTRAL_POSES, _forge_class, _unwrap, document_fields,
character_seed, document_meta, parse_document, release_fields, replay_base,
)
except ImportError: # pragma: no cover - standalone/test context
from data.constraints import lock_clash
from nodes.identity_forge import FIELD_DEFINITIONS
from nodes.identity_forge_turnaround import (
_FRAMINGS, _KEEP_POSE, _NEUTRAL_POSES, _forge_class, _unwrap, document_fields,
character_seed, document_meta, parse_document, release_fields, replay_base,
)
_LOG = logging.getLogger(__name__)
#: Every Clothing field, derived so a field added later is released too.
_CLOTHING: "frozenset[str]" = frozenset(
name for name, field in FIELD_DEFINITIONS.items() if field.get("group") == "Clothing")
_STYLES: "list[str]" = list(FIELD_DEFINITIONS["outfit_style"]["female_options"])
#: The selectable sheets, in display order. Exact ``outfit_style`` pool values.
_SHEETS: "dict[str, tuple[str, ...]]" = {
"Range (6)": ("casual", "smart casual", "business formal", "evening formal",
"athletic", "resort vacation"),
"Everyday (4)": ("casual", "smart casual", "streetwear", "athletic"),
"Work to evening (4)": ("business casual", "business formal", "cocktail semi-formal",
"evening formal"),
"Every style (15)": tuple(_STYLES),
}
_KEEP_SCENE = "Keep the character's scene"
#: Backdrop label -> exact ``location`` pool value ("" keeps the scene). A plain
#: backdrop is the reference-sheet default: no place for a style to clash with.
_BACKDROPS: "dict[str, str]" = {
"Grey studio backdrop": "seamless grey studio backdrop",
"White studio backdrop": "solid white studio backdrop",
"Black studio backdrop": "solid black studio backdrop",
_KEEP_SCENE: "",
}
#: Scene fields drawn against the place; released with it when a backdrop replaces it
#: (studio light at a backdrop, not the park's afternoon sun; a backdrop has no season,
#: by the engine's own location -> season rule).
_SCENE: "frozenset[str]" = frozenset({"location", "lighting", "composition", "season"})
#: Styling a person changes with the occasion. The engine gates most of it on
#: ``outfit_style`` (mismatched earrings with business dress, a pearl necklace with
#: athletic wear, a scrunchie with evening dress); measured over 60 seeds, skipping
#: on these instead left most backdrop sheets with one or two views. So a style that
#: refuses one of them restyles it; a style refused by anything else (age, season,
#: the kept place) is skipped.
_RESTYLED: "frozenset[str]" = frozenset(
name for name, field in FIELD_DEFINITIONS.items()
if field.get("group") in ("Makeup", "Jewelry & Nails")
) | {"hair_accessory", "hair_style"}
def _single_view(meta: "dict[str, Any]") -> bool:
"""A character whose outfit is not the engine's to redraw."""
suppressed_groups = meta.get("suppress_groups") or ()
suppressed_fields = meta.get("suppress_fields") or ()
return bool(meta.get("cosplay_of") or meta.get("covers_body")
or "Clothing" in suppressed_groups or "outfit_description" in suppressed_fields)
def resolve_outfit_sheet(
character_json: str, sheet_name: str, backdrop_name: str, framing_name: str,
pose_name: str, outfit_seed: int = 0,
) -> "tuple[list[str], list[str]]":
"""Render one resolved character once per outfit style. Returns ``(prompts, labels)``."""
forge = _forge_class()
document = parse_document(character_json)
meta = document_meta(document)
base = replay_base(character_json)
framing = _FRAMINGS.get(framing_name, "")
if framing:
base["shot_type"] = framing
if pose_name != _KEEP_POSE:
base["pose"] = pose_name
if not document or _single_view(meta):
_LOG.warning("This character's outfit is a costume or a body form, not a "
"wardrobe; emitting one view.")
return [str(_unwrap(forge.execute(**base))[0])], ["1-as-resolved"]
released = set(_CLOTHING)
backdrop = _BACKDROPS.get(backdrop_name, "")
if backdrop:
released |= _SCENE
base["location"] = backdrop
if framing:
released |= {name for name, value in document_fields(document).items()
if lock_clash("shot_type", framing, {name: value})}
release_fields(document, released)
base["archetype_json"] = json.dumps(document)
# What the outfit must agree with: everything the replay keeps, plus the pins.
context = document_fields(document)
context.update({k: base[k] for k in ("location", "pose") if k in base
and base[k] not in ("Random", None)})
names = _SHEETS.get(sheet_name, _SHEETS["Range (6)"])
prompts: "list[str]" = []
labels: "list[str]" = []
for style in names:
refused = {name for name, value in context.items()
if lock_clash("outfit_style", style, {name: value})}
if refused - _RESTYLED:
_LOG.info("Outfit sheet: skipping '%s', which this character's %s refuses.",
style, ", ".join(sorted(refused - _RESTYLED)))
continue
view = {**base, "outfit_style": style,
"seed": character_seed(character_json, f"{outfit_seed}|{style}")}
if refused:
restyled = json.loads(json.dumps(document))
release_fields(restyled, refused)
view["archetype_json"] = json.dumps(restyled)
prompts.append(str(_unwrap(forge.execute(**view))[0]))
labels.append(f"{len(prompts)}-{style.replace(' ', '-')}")
if not prompts:
_LOG.warning("Every style in this sheet clashes with the character; "
"emitting one view as resolved.")
return [str(_unwrap(forge.execute(**replay_base(character_json)))[0])], \
["1-as-resolved"]
return prompts, labels
if _COMFY_AVAILABLE:
class IdentityForgeOutfitSheet(io.ComfyNode): # type: ignore[misc, valid-type]
"""Emit one resolved character in several outfits, as a list."""
@classmethod
def define_schema(cls) -> "io.Schema":
return io.Schema(
node_id="IdentityForgeOutfitSheet",
display_name="Identity Forge Outfit Sheet",
category="conditioning/character",
description=(
"One character, several outfits, from a single queue: a wardrobe "
"sheet. Wire Identity Forge's 'prompt_json' in; the 'prompt' "
"output is a LIST, so everything downstream runs once per outfit. "
"Only the clothes change - the person stays exactly as resolved."
),
inputs=[
io.String.Input(
"character_json",
default="",
force_input=True,
tooltip="Connect Identity Forge's 'prompt_json' output. Every "
"view is the same person; each one is dressed again "
"in one outfit style. A cosplayer wears their costume, "
"so a cosplay character emits one view.",
),
io.Combo.Input(
"sheet",
options=list(_SHEETS),
default="Range (6)",
tooltip="Which outfit styles to emit, and so how many images one "
"queue makes. Range (6) = casual, smart casual, business "
"formal, evening formal, athletic, resort vacation. A "
"style that clashes with the character (edgy "
"alternative at 60+, for example) is skipped.",
),
io.Combo.Input(
"backdrop",
options=list(_BACKDROPS),
default="Grey studio backdrop",
tooltip="Where each outfit is shown. A plain studio backdrop "
"suits every style; 'Keep the character's scene' keeps "
"the place, lighting and composition, and skips any "
"style that place refuses (no evening gown on a hiking "
"trail).",
),
io.Combo.Input(
"framing",
options=list(_FRAMINGS),
default="Full body",
tooltip="How much of the subject each view frames. 'Full body' "
"shows the whole outfit, shoes included. 'Unspecified' "
"keeps the character's own framing.",
),
io.Combo.Input(
"pose",
options=list(_NEUTRAL_POSES) + [_KEEP_POSE],
default=_NEUTRAL_POSES[0],
tooltip="Pins a standing stance so every outfit is shown the "
"same way. Choose 'Keep the character's pose' to keep "
"it (a seated pose hides much of an outfit).",
),
io.Int.Input(
"outfit_seed",
default=0,
min=0,
max=0xFFFFFFFFFFFFFFFF,
control_after_generate=True,
tooltip="Rolls a different outfit in every style for the same "
"character. Outfits already differ from one character "
"to the next; change this to re-dress the same person. "
"Set the control to 'randomize' for new outfits every "
"queue.",
),
],
outputs=[
io.String.Output(
display_name="prompt",
is_output_list=True,
tooltip="One prompt per outfit, as a list. Wire into "
"CLIPTextEncode.",
),
io.String.Output(
display_name="view_label",
is_output_list=True,
tooltip="Matching list of sortable names ('1-casual', "
"'2-smart-casual', ...). Wire into Save Image's "
"filename_prefix.",
),
],
)
# No fingerprint_inputs: every seed is derived, nothing auto-advances (see
# Turnaround), so the node is a pure function of its inputs.
@classmethod
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
prompts, labels = resolve_outfit_sheet(
kwargs.get("character_json", ""),
kwargs.get("sheet", "Range (6)"),
kwargs.get("backdrop", "Grey studio backdrop"),
kwargs.get("framing", "Full body"),
kwargs.get("pose", _NEUTRAL_POSES[0]),
int(kwargs.get("outfit_seed", 0) or 0),
)
return io.NodeOutput(prompts, labels)
+67 -6
View File
@@ -47,6 +47,7 @@ Text-only, zero new dependencies, no IMAGE anywhere.
from __future__ import annotations
import json
import zlib
from typing import Any
try:
@@ -230,6 +231,71 @@ def replay_steering(character_json: str) -> "dict[str, str]":
}
def replay_base(character_json: str) -> "dict[str, Any]":
"""Main-node kwargs that replay ``character_json`` unchanged: every input on its
schema default, the replay seed, the document, and its recorded steering. See
:func:`resolve_turnaround` for why the defaults (not "Random") are load-bearing."""
forge = _forge_class()
base: "dict[str, Any]" = {
spec.id: getattr(spec, "default", None) for spec in forge.define_schema().inputs
}
base["seed"] = _REPLAY_SEED
base["archetype_json"] = character_json or ""
base.update(replay_steering(character_json))
return base
def character_seed(character_json: str, salt: str = "") -> int:
"""A replay seed for sheets that RELEASE fields (Outfit Sheet, Age Progression).
The fixed :data:`_REPLAY_SEED` is right for a replay that redraws nothing, but a
released field redrawn from it lands on the same value for every character (2.3.0:
40 characters' casual views shared four outfits). Hashing the document makes the
redraw differ between characters and repeat for the same one.
"""
return zlib.crc32(f"{salt}|{character_json or ''}".encode("utf-8"))
def parse_document(character_json: str) -> "dict[str, Any]":
"""The resolved document as a dict, or ``{}`` for anything malformed."""
try:
document = json.loads(character_json or "{}")
except (ValueError, TypeError):
return {}
return document if isinstance(document, dict) else {}
def document_meta(document: "dict[str, Any]") -> "dict[str, Any]":
meta = document.get("_meta")
return meta if isinstance(meta, dict) else {}
def document_fields(document: "dict[str, Any]") -> "dict[str, str]":
"""Every concrete field value in the document, flattened out of its groups."""
return {
name: value
for key, group in document.items() if key != "_meta" and isinstance(group, dict)
for name, value in group.items()
if name in FIELD_DEFINITIONS and isinstance(value, str)
}
def release_fields(document: "dict[str, Any]", names: "set[str]") -> None:
"""Unlock ``names`` in place, so a replay draws them again under the engine's rules.
A field is locked twice over in a resolved document: by its value in a group, and,
when it was deliberately absent, by ``_meta.omitted`` (re-injected as a "None"
lock). Both have to go or the field stays pinned.
"""
for key, group in document.items():
if key != "_meta" and isinstance(group, dict):
for name in names:
group.pop(name, None)
meta = document_meta(document)
if isinstance(meta.get("omitted"), list):
meta["omitted"] = [n for n in meta["omitted"] if n not in names]
#: Rotations that show the costume's back, where a roster entry's ``costume_back``
#: replaces its front-facing costume text (2.0.0).
_BACK_OF_COSTUME: "frozenset[str]" = frozenset({_BACK, _REAR_THREE_QUARTER})
@@ -293,12 +359,7 @@ def resolve_turnaround(
# engine re-rolled it, turning a woman into a man between the main node and the
# turnaround. Defaults also mean a control added to the main node later is
# deferred to correctly here without this node knowing it exists.
base: "dict[str, Any]" = {
spec.id: getattr(spec, "default", None) for spec in forge.define_schema().inputs
}
base["seed"] = _REPLAY_SEED
base["archetype_json"] = character_json or ""
base.update(replay_steering(character_json))
base = replay_base(character_json)
if pose_name != _KEEP_POSE:
base["pose"] = pose_name
# A neutral stance faces the way the camera says; a gaze ("looking over one
+2 -2
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-identity-forge"
version = "2.0.0"
description = "Create believable, coherent people, cosplayers and creatures from dropdowns - no prompt engineering required. A constraint engine keeps every trait sensible and a seed makes any result reproducible. Cosplay characters carry a hand-written, canon-checked costume description - garments, colours, masks, markings, signature props - that renders on any checkpoint, and are searchable from an in-node picker with trait facets and thumbnail previews. A Turnaround node builds a one-queue reference sheet: front, three-quarter, profile and back views of the same resolved character. Public galleries showcase every entry with a sample render and its exact workflow. Optional preset layers add themed archetypes, creature/monster/alien hybridization, per-element style modifiers, and a save/load character vault."
version = "2.4.0"
description = "Create believable, coherent people, cosplayers and creatures from dropdowns - no prompt engineering required. A constraint engine keeps every trait sensible and a seed makes any result reproducible. Cosplay characters carry a hand-written, canon-checked costume description - garments, colours, masks, markings, signature props - that renders on any checkpoint, and are searchable from an in-node picker with trait facets, gender and franchise filters, and thumbnail previews that are cached on disk so they also show offline. Sheet nodes build one-queue reference sets of the same resolved character: Turnaround (camera views), Expression Sheet, Outfit Sheet (one look per outfit style) and Age Progression (the character across ages). Public galleries showcase every entry with a sample render and its exact workflow. Optional preset layers add themed archetypes, creature/monster/alien hybridization, per-element style modifiers, and a save/load character vault."
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.10"
+4
View File
@@ -47,6 +47,8 @@ from nodes.identity_forge_creature import IdentityForgeCreature # noqa: E402
from nodes.identity_forge_modifier import IdentityForgeModifier # noqa: E402
from nodes.identity_forge_turnaround import IdentityForgeTurnaround # noqa: E402
from nodes.identity_forge_expression_sheet import IdentityForgeExpressionSheet # noqa: E402
from nodes.identity_forge_outfit_sheet import IdentityForgeOutfitSheet # noqa: E402
from nodes.identity_forge_age_progression import IdentityForgeAgeProgression # noqa: E402
from nodes.identity_forge_vault_load import ( # noqa: E402
IdentityForgeVaultLoad, _NO_CHARACTERS,
)
@@ -63,6 +65,8 @@ _NODE_CLASSES = {
"IdentityForgeModifier": IdentityForgeModifier,
"IdentityForgeTurnaround": IdentityForgeTurnaround,
"IdentityForgeExpressionSheet": IdentityForgeExpressionSheet,
"IdentityForgeOutfitSheet": IdentityForgeOutfitSheet,
"IdentityForgeAgeProgression": IdentityForgeAgeProgression,
"IdentityForgeVaultLoad": IdentityForgeVaultLoad,
"IdentityForgeVaultSave": IdentityForgeVaultSave,
}
+64 -4
View File
@@ -165,14 +165,40 @@ def _gallery_shot(seed: int) -> str | None:
#: not in the manifest hash.
_GALLERY_GENDER: dict[str, dict[str, str]] = {
"archetypes": {"Carhop": "Female", "Cheerleader": "Female",
"Irish Step Dancer": "Female"},
"Irish Step Dancer": "Female",
# 2.3.0: the toga is the look people expect; the stola variant stays.
"Ancient Roman Patrician": "Male"},
"creatures": {"leprechaun": "Male"}, # 2.2.0: the folklore leprechaun is a bearded man
}
#: Gallery-only Archetype lock level, same terms as _GALLERY_GENDER: a period look whose
#: ethnicity is part of the look renders at "Full preset" so the sample shows it as
#: intended (2.3.0: at "Essentials" the Aztec Noble sample drew a random ethnicity).
_GALLERY_LOCK_LEVEL: dict[str, str] = {
"Aztec Noble": "Full preset",
# 2.4.0: looks named for a people (the Maasai sample drew a German woman).
"Maasai": "Full preset", "Tuareg": "Full preset", "Sami Gakti": "Full preset",
}
#: Gallery-only pose pins, same terms as _GALLERY_GENDER: a sample whose defining
#: feature only shows in one pose (Black Bolt's underarm wings spread only with the arms
#: raised; at his sides they rendered as a cape).
_GALLERY_POSE: dict[str, dict[str, str]] = {
"cosplay": {"Black Bolt": "stretching both arms overhead"},
"cosplay": {"Black Bolt": "stretching both arms overhead",
# 2.4.0: seated, the board fused into his shoulder; standing keeps it apart.
"Silver Surfer": "standing with feet planted wide",
# 2.4.0: seated with two sabers, she drew a third hand.
"Ahsoka Tano": "standing with feet planted wide",
"Bayonetta": "standing with feet planted wide",
# Reclining, the plate pulled apart and bared the body under it.
"Praetorian Guard": "standing with feet planted wide",
# Seated or kneeling, the drawn swords went to the floor or into one hand.
"Kirito": "standing with feet planted wide",
# Seated, her hands relaxed and the knuckle claws never drew.
"X-23": "standing with feet planted wide",
"Roronoa Zoro": "standing with feet planted wide"},
# 2.4.0: a hands-in-pockets pose fought her rigid outstretched arms.
"creatures": {"jiangshi": "standing with feet planted wide"},
}
#: Gallery-only framing pins, same terms: a sample whose defining feature is below
@@ -268,6 +294,10 @@ def read_render_settings(overrides: dict[str, Any] | None = None) -> dict[str, A
"denoise": _one(groups, "KSampler", 6, "denoise"),
"style_prefix": _style_prefix(groups),
"style_delimiter": _style_delimiter(groups),
# Optional Krea2T Enhancer (custom node) between the LoRA and the sampler.
# 0 = off. At 1.5 creatures stopped rendering as a person in a costume (2.4.0).
"enhancer_text_scale": 0,
"enhancer_strength": 1.0,
}
if LOCAL_CONFIG.is_file():
@@ -545,7 +575,8 @@ def resolve_prose(kind: str, name: str, reroll: int = 0) -> str:
elif kind == "archetypes":
_check_options(IdentityForgeArchetype, ARCHETYPE_WIDGETS)
preset = IdentityForgeArchetype.execute(
archetype=name, seed=seed, upstream="", **ARCHETYPE_WIDGETS
archetype=name, seed=seed, upstream="",
**{**ARCHETYPE_WIDGETS, "lock_level": _GALLERY_LOCK_LEVEL.get(name, "Essentials")},
)
elif kind == "creatures":
_check_options(IdentityForgeCreature, CREATURE_WIDGETS)
@@ -580,6 +611,9 @@ def positive_prompt(prose: str, settings: dict[str, Any]) -> str:
# The API graph - no Identity Forge nodes, the text is already resolved
# ---------------------------------------------------------------------------
ENHANCER_NODE = "Krea2T-Enhancer-Advanced"
def build_graph(positive: str, seed: int, settings: dict[str, Any],
save_originals: bool, filename_stem: str) -> dict:
graph = {
@@ -617,6 +651,13 @@ def build_graph(positive: str, seed: int, settings: dict[str, Any],
"9": {"class_type": "VAEDecode",
"inputs": {"samples": ["8", 0], "vae": ["3", 0]}},
}
if settings.get("enhancer_text_scale"):
graph["11"] = {"class_type": ENHANCER_NODE,
"inputs": {"model": ["4", 0], "enabled": True,
"strength": settings["enhancer_strength"],
"text_scale": settings["enhancer_text_scale"],
"debug": False}}
graph["8"]["inputs"]["model"] = ["11", 0]
if save_originals:
# SaveImage numbers from the highest existing counter, so it adds files
# and never replaces one already in the output folder.
@@ -737,6 +778,14 @@ def preflight(client: ComfyClient, settings: dict[str, Any]) -> bool:
print(f" available: {available[:12]}"
f"{' ...' if len(available) > 12 else ''}")
ok = False
if settings.get("enhancer_text_scale"):
try:
found = bool(client._get_json(f"/object_info/{ENHANCER_NODE}"))
except (OSError, ValueError):
found = False
if not found:
print(f" {ENHANCER_NODE} is not installed there (enhancer_text_scale is set).")
ok = False
return ok
@@ -983,6 +1032,10 @@ def main(argv: list[str] | None = None) -> int:
if not pending:
print("Nothing unpublished.")
return 0
if args.dry_run:
for kind, names in sorted(pending.items()):
print(f" {kind}: would publish {', '.join(names)}")
return 0
for kind, names in sorted(pending.items()):
if not publish_kind(kind, names):
return 1
@@ -1071,6 +1124,8 @@ def main(argv: list[str] | None = None) -> int:
print(f" {settings['unet_name']} + {settings['lora_name']}, "
f"{settings['steps']} steps, {settings['sampler_name']}/"
f"{settings['scheduler']}, {settings['width']}x{settings['height']}")
if settings.get("enhancer_text_scale"):
print(f" {ENHANCER_NODE}, text_scale {settings['enhancer_text_scale']}")
if args.save_originals:
print(f" originals kept on the instance under {ORIGINALS_PREFIX}/")
@@ -1081,7 +1136,7 @@ def main(argv: list[str] | None = None) -> int:
manifest["render"] = {
key: settings[key] for key in
("unet_name", "lora_name", "steps", "cfg", "sampler_name",
"scheduler", "width", "height")
"scheduler", "width", "height", "enhancer_text_scale")
}
today = _datetime.date.today().isoformat()
done = failed = 0
@@ -1095,6 +1150,11 @@ def main(argv: list[str] | None = None) -> int:
"published": False}
if args.reroll:
record["seed"] = entry_seed(name, args.reroll)
# Reload first: another run may have saved since this one started, and
# writing back a stale copy would drop its records (2.4.0).
fresh = load_manifest()
fresh["render"] = manifest["render"]
manifest = fresh
manifest["entries"].setdefault(kind, {})[name] = record
touched.setdefault(kind, []).append(name)
done += 1
+1740 -1726
View File
File diff suppressed because it is too large Load Diff
+162
View File
@@ -1502,6 +1502,7 @@
"university chemistry laboratory",
"veterinary clinic exam room",
"city hall rotunda",
"gilded palace throne room",
"community theatre auditorium",
"auto repair shop service bay",
"print shop with running presses",
@@ -1609,6 +1610,10 @@
"the Great Wall of China ramparts",
"the Machu Picchu terraces",
"the Victoria Falls gorge rim",
"wrestling ring under arena lights",
"outdoor tennis court with a net",
"racetrack pit lane",
"racecourse paddock with a white rail",
"None"
]
},
@@ -2208,6 +2213,7 @@
"Astronaut",
"Astronomer",
"Athlete",
"Aztec Noble",
"B-Boy / B-Girl",
"Babushka",
"Backyard Country Casual",
@@ -2301,6 +2307,7 @@
"Halfling Rogue",
"Hanfu",
"Hazmat Technician",
"Heian Court",
"Highland Scot",
"Highwayman",
"Hockey Goalie",
@@ -2337,6 +2344,7 @@
"Matador",
"McBling Socialite",
"Mechanic",
"Medieval Monarch",
"Medieval Peasant",
"Metalhead",
"Metrosexual",
@@ -2355,6 +2363,7 @@
"Oktoberfest",
"Opera Singer",
"Orchestra Conductor",
"Ottoman Court",
"Outback Bushman",
"Paramedic",
"Parisian Chic",
@@ -2384,6 +2393,7 @@
"Roaring Flapper",
"Roaring Twenties Gent",
"Rock Climber",
"Rococo Courtier",
"Rodeo Rider",
"Roller Derby",
"Roman Centurion",
@@ -2510,6 +2520,7 @@
"Abomination",
"Acheron",
"Ada Wong",
"Adam Smasher",
"Admiral Ackbar",
"Aeon Flux",
"Aerith Gainsborough",
@@ -2589,6 +2600,7 @@
"Arbiter",
"Arcanine",
"Archon",
"Arcueid Brunestud",
"Ariel",
"Arishem",
"Arisia Rrab",
@@ -2647,6 +2659,7 @@
"Barbarella",
"Barbie",
"Barley Lightfoot",
"Barnaby Brooks Jr.",
"Barney Rubble",
"Baron Humbert von Gikkingen",
"Baron Zemo",
@@ -2702,11 +2715,13 @@
"Black Noir",
"Black Orchid",
"Black Panther",
"Black Rock Shooter",
"Black Widow",
"Blackfire",
"Blackheart",
"Blade",
"Blaidd the Half-Wolf",
"Blake Belladonna",
"Blanka",
"Blink",
"Bloodshot",
@@ -2758,6 +2773,7 @@
"Buttercup",
"Buzz Lightyear",
"Byakuya Kuchiki",
"Byleth",
"C-3PO",
"C.C.",
"Cable",
@@ -2801,6 +2817,7 @@
"Cassie Cage",
"Cat Noir",
"Catbus",
"Catra",
"Catwoman",
"Cecil Harvey",
"Celes Chere",
@@ -2828,6 +2845,7 @@
"Chester Cheetah",
"Chewbacca",
"Chi-Chi",
"Chiaki Nanami",
"Chiana",
"Chief Chirpa",
"Chizuru Mizuhara",
@@ -2845,10 +2863,13 @@
"Circe",
"Ciri",
"Claire Redfield",
"Claptrap",
"Cloud Strife",
"Coach Brunt",
"Cobra Commander",
"Codsworth",
"Cody Travers",
"Cogsworth",
"Colonel Sanders",
"Colossus",
"Columbia",
@@ -2890,6 +2911,7 @@
"Daisy",
"Daisy Duck",
"Daki",
"Dalek",
"Danny Phantom",
"Dante",
"Daphne Blake",
@@ -2955,6 +2977,7 @@
"Doctor Octopus",
"Doctor Strange",
"Domino",
"Domo-kun",
"Donald Duck",
"Donatello",
"Donkey Kong",
@@ -2964,6 +2987,7 @@
"Doom Slayer",
"Doomfist",
"Dora the Explorer",
"Doraemon",
"Dorothy Gale",
"Dove",
"Dowager Empress Marie",
@@ -2993,6 +3017,7 @@
"E. Honda",
"EVE (Stellar Blade)",
"Eda Clawthorne",
"Edelgard",
"Edna Mode",
"Edward Elric",
"Edward Scissorhands",
@@ -3055,9 +3080,11 @@
"Fairy Godmother",
"Faith Connors",
"Falcon",
"Falin Touden",
"Falkor",
"Fantastic Mr Fox",
"Fatality",
"Fate Testarossa",
"Fawkes",
"Faye Valentine",
"Felicia",
@@ -3114,6 +3141,7 @@
"Gandalf",
"Ganondorf",
"Ganyu",
"Gardevoir",
"Gargamel",
"Gargos",
"Garnet",
@@ -3150,6 +3178,7 @@
"Giyu Tomioka",
"Glacius",
"Glinda",
"Gloria (Pokemon)",
"Glory",
"Go Go Tomago",
"Godzilla",
@@ -3227,9 +3256,11 @@
"Helga Pataki",
"Hellboy",
"Hellcat",
"Hello Kitty",
"Hera Syndulla",
"Hercules",
"Hermione Granger",
"Hilda (Pokemon)",
"Himeno",
"Himiko Toga",
"Himmel",
@@ -3287,6 +3318,7 @@
"Inuyasha",
"Invincible",
"Invisible Woman",
"Iono",
"Iori Yagami",
"Irelia",
"Iris",
@@ -3358,6 +3390,7 @@
"Joel Miller",
"John Constantine",
"John Stewart",
"Johnny 5",
"Johnny Bravo",
"Johnny Cage",
"Johnny Silverhand",
@@ -3367,6 +3400,7 @@
"Jolyne Cujoh",
"Jon Snow",
"Jon Talbain",
"Jonathan Joestar",
"Joseph Joestar",
"Josie McCoy",
"Josuke Higashikata",
@@ -3417,6 +3451,7 @@
"Karin Kanzuki",
"Karlach",
"Karnak",
"Kasane Teto",
"Kassandra",
"Kasumi",
"Katana",
@@ -3449,6 +3484,7 @@
"King",
"King Arthur",
"King Bradley",
"King Dedede",
"King Ghidorah",
"King Kong",
"King Monkey",
@@ -3460,6 +3496,7 @@
"Kiss-Shot Acerola-Orion Heart-Under-Blade",
"Kitana",
"Kitty Pryde",
"Kiwi",
"Klingon",
"Klytus",
"Kokoro",
@@ -3479,6 +3516,7 @@
"Kuiil",
"Kung Lao",
"Kurapika",
"Kuromi",
"Kurumi Tokisaki",
"Kwame",
"Ky Kiske",
@@ -3488,6 +3526,7 @@
"Kyo Kusanagi",
"Kyojuro Rengoku",
"Kyoko Sakura",
"Kyubey",
"L Lawliet",
"La Lunatica",
"Lady (Devil May Cry)",
@@ -3619,6 +3658,7 @@
"Mai Sakurajima",
"Mai Shiranui",
"Maid Marian",
"Maine",
"Majin Buu",
"Maka Albarn",
"Maki Genryusai",
@@ -3649,6 +3689,7 @@
"Marin Kitagawa",
"Mario",
"Marisa",
"Marisa Kirisame",
"Marnie",
"Maron",
"Martian Manhunter",
@@ -3658,6 +3699,7 @@
"Mary Jane Watson",
"Mary Marvel",
"Mary Poppins",
"Mash Kyrielight",
"Master Chief",
"Master Roshi",
"Maui",
@@ -3701,6 +3743,7 @@
"Merlin",
"Mervyn Pumpkinhead",
"Messmer the Impaler",
"Meta Knight",
"Mewtwo",
"Mia Wallace",
"Michael Myers",
@@ -3759,6 +3802,7 @@
"Mona",
"Monkey D. Luffy",
"Monkey Fist",
"Monokuma",
"Moogle",
"Moon Knight",
"Moondragon",
@@ -3785,6 +3829,7 @@
"Mr. Peanut",
"Mr. Spacely",
"Mr. Spock",
"Mrs. Potts",
"Ms. Marvel (Kamala Khan)",
"Ms. Marvel (Sharon Ventura)",
"Mt. Lady",
@@ -3797,6 +3842,7 @@
"Mynock",
"Mysterio",
"Mystique",
"Nagito Komaeda",
"Nakoruru",
"Nami",
"Namor",
@@ -3807,6 +3853,7 @@
"Nancy Downs",
"Nancy Drew",
"Nani Pelekai",
"Nanoha Takamachi",
"Naoto Shirogane",
"Naruto Uzumaki",
"Natalia Kassle",
@@ -3846,7 +3893,9 @@
"Nobara Kugisaki",
"Noctis",
"Nocturne",
"Noel Vermillion",
"Noelle Silva",
"Noriaki Kakyoin",
"Nosferatu",
"Nova (Frankie Raye)",
"Nova (Richard Rider)",
@@ -3877,6 +3926,7 @@
"Orchid",
"Origami Tobiichi",
"Orihime Inoue",
"Orion",
"Orko",
"Orochimaru",
"Other Mother",
@@ -3988,6 +4038,7 @@
"Rachel Summers",
"Rage (Marvel)",
"Ragged Robin",
"Ragna the Bloodedge",
"Ragyo Kiryuin",
"Raiden",
"Raiden Shogun",
@@ -4019,6 +4070,7 @@
"Red Skull",
"Red Sonja",
"Rei Ayanami",
"Reimu Hakurei",
"Reinhardt",
"Rem",
"Rena Rouge",
@@ -4077,6 +4129,7 @@
"Roy Mustang",
"Rubeus Hagrid",
"Ruby Rhod",
"Ruby Rose",
"Rukia Kuchiki",
"Rumi",
"Rydia",
@@ -4109,6 +4162,7 @@
"Saitama",
"Sakura Haruno",
"Sakura Kasugano",
"Sakuya Izayoi",
"Salaak",
"Salacious Crumb",
"Salama",
@@ -4158,6 +4212,7 @@
"Selene (Underworld)",
"Selene Gallio (Black Queen)",
"Selvaria Bles",
"Senshi",
"Senua",
"Seong Gi-hun",
"Seong Mi-na",
@@ -4165,6 +4220,7 @@
"Seraphine",
"Serena",
"Sersi",
"Serval (Kemono Friends)",
"Sesshomaru",
"Sett",
"Seven of Nine",
@@ -4176,6 +4232,7 @@
"Shang Tsung",
"Shanks",
"Shanna the She-Devil",
"Shantae",
"Shao Kahn",
"Sharon Carter",
"Shazam",
@@ -4227,6 +4284,7 @@
"Snake Eyes",
"Snake Plissken",
"Sniper (Team Fortress 2)",
"Snoopy",
"Snorlax",
"Snow White",
"Snowbird",
@@ -4240,6 +4298,7 @@
"Soma Yukihira",
"Sombra",
"Sona",
"Song So Mi",
"Songbird",
"Sonic the Hedgehog",
"Sonya Blade",
@@ -4303,6 +4362,7 @@
"Subaru Natsuki",
"Suki",
"Sukuna",
"Suletta Mercury",
"Sumire Yoshizawa",
"Summer Smith",
"Sunfire (Exiles)",
@@ -4323,7 +4383,9 @@
"Taki",
"Tala",
"Tali'Zorah",
"Talia Yang",
"Talia al Ghul",
"Tamamo no Mae",
"Tanjiro Kamado",
"Tank Girl",
"Tanya",
@@ -4413,11 +4475,13 @@
"Tomar-Re",
"Tomura Shigaraki",
"Tony Stark",
"Tony Tony Chopper",
"Tony the Tiger",
"Toothless",
"Topaz",
"Toph Beifong",
"Torbjorn",
"Toriel",
"Toshiro Hitsugaya",
"Totoro",
"Touka Kirishima",
@@ -4448,6 +4512,7 @@
"Ultron",
"Ultros",
"Uncle Fester",
"Undyne",
"Unkar Plutt",
"Urbosa",
"Urd",
@@ -4487,10 +4552,12 @@
"Vivi Ornitier",
"Vixen",
"Vogue",
"Volcana",
"Voldo",
"Von Lycaon",
"Vulcan",
"Vulture",
"WALL-E",
"Waluigi",
"Wampa",
"Wanderer (Genshin Impact)",
@@ -4502,6 +4569,7 @@
"Wedge Antilles",
"Wednesday Addams",
"Weeping Angel",
"Weiss Schnee",
"Wendy",
"Wendy Darling",
"Wheeler",
@@ -4512,6 +4580,7 @@
"Wicked Witch of the West",
"Wicket the Ewok",
"Widowmaker",
"Wild Tiger",
"Wildcat",
"Wile E. Coyote",
"Will Turner",
@@ -4539,6 +4608,7 @@
"Yamada Asaemon Sagiri",
"Yamato (One Piece)",
"Yami Yugi",
"Yang Xiao Long",
"Yasuo",
"Yelena Belova",
"Yennefer of Vengerberg",
@@ -4554,6 +4624,7 @@
"Yoshino",
"Yuffie Kisaragi",
"Yuji Itadori",
"Yukari Yakumo",
"Yumeko Jabami",
"Yuna",
"Yunara",
@@ -4637,6 +4708,7 @@
"Franchise: Guilty Gear",
"Franchise: Harry Potter",
"Franchise: Invincible",
"Franchise: JoJo's Bizarre Adventure",
"Franchise: Killer Instinct",
"Franchise: League of Legends",
"Franchise: Looney Tunes",
@@ -7405,6 +7477,96 @@
]
}
],
"IdentityForgeOutfitSheet": [
{
"name": "sheet",
"default": "Range (6)",
"type": "combo",
"options": [
"Range (6)",
"Everyday (4)",
"Work to evening (4)",
"Every style (15)"
]
},
{
"name": "backdrop",
"default": "Grey studio backdrop",
"type": "combo",
"options": [
"Grey studio backdrop",
"White studio backdrop",
"Black studio backdrop",
"Keep the character's scene"
]
},
{
"name": "framing",
"default": "Full body",
"type": "combo",
"options": [
"Full body",
"Cowboy (mid-thigh up)",
"Waist up",
"Chest up",
"Head and shoulders",
"Unspecified"
]
},
{
"name": "pose",
"default": "standing with arms relaxed at the sides",
"type": "combo",
"options": [
"standing with arms relaxed at the sides",
"standing naturally",
"standing tall with shoulders back",
"standing with feet planted wide",
"Keep the character's pose"
]
},
{
"name": "outfit_seed",
"default": 0,
"type": "INT"
},
{
"name": "control_after_generate",
"type": "combo",
"default": "randomize",
"options": [
"fixed",
"increment",
"decrement",
"randomize"
]
}
],
"IdentityForgeAgeProgression": [
{
"name": "stages",
"default": "Life stages (4)",
"type": "combo",
"options": [
"Life stages (4)",
"Decades (6)",
"Young and old (2)"
]
},
{
"name": "framing",
"default": "Head and shoulders",
"type": "combo",
"options": [
"Full body",
"Cowboy (mid-thigh up)",
"Waist up",
"Chest up",
"Head and shoulders",
"Unspecified"
]
}
],
"IdentityForgeVaultLoad": [
{
"name": "character",
+83 -4
View File
@@ -48,7 +48,7 @@ function rosterOkHandler(url) {
if (url.endsWith("identity_forge_roster.json")) {
return { ok: true, json: async () => REAL_ROSTER };
}
if (url.includes("github.io")) {
if (url.includes("/identity_forge/gallery/")) {
return { ok: true, json: async () => ({ entries: [] }) };
}
return { ok: false, status: 404 };
@@ -260,6 +260,51 @@ test("the trait facet composes with both the tab and the query", async () => {
}
});
test("the gender filter keeps that gender plus entries that suit either", async () => {
resetDom();
__testing.__resetForTests();
const stub = installFetchStub(rosterOkHandler);
try {
const picker = await openPicker();
picker.activeTab = "__all__";
picker.renderGrid();
const all = picker.visible.length;
picker.gender = "Male";
picker.renderGrid();
assert.ok(picker.visible.length > 0 && picker.visible.length < all);
assert.ok(picker.visible.every((e) => !e.gender || e.gender === "Any" || e.gender === "Male"),
"no Female-only entry under Male");
assert.ok(picker.visible.some((e) => e.kind === "creature"), "genderless creatures stay");
picker.close();
} finally {
stub.restore();
}
});
test("the franchise filter lists roster franchises by category and keeps only that franchise", async () => {
resetDom();
__testing.__resetForTests();
const stub = installFetchStub(rosterOkHandler);
try {
const picker = await openPicker();
const select = picker.franchiseSelect;
assert.ok(select.querySelectorAll("optgroup").length > 1, "options are grouped by category");
const franchise = REAL_ROSTER.find((e) => e.franchise).franchise;
assert.ok([...select.options].some((o) => o.value === franchise));
select.value = franchise;
select.dispatchEvent(new window.Event("change"));
assert.ok(picker.visible.length > 0);
assert.ok(picker.visible.every((e) => e.franchise === franchise));
picker.close();
picker.open();
await new Promise((r) => setTimeout(r, 0));
assert.equal(picker.franchiseSelect.value, franchise, "the choice survives a reopen");
picker.close();
} finally {
stub.restore();
}
});
test("while filtering, every tab shows its own match count so other kinds stay discoverable", async () => {
resetDom();
__testing.__resetForTests();
@@ -470,7 +515,7 @@ test("thumbnails stay off (no gallery fetch) until the preview toggle is enabled
picker.open();
await flush();
assert.ok(
!stub.calls.some((u) => u.includes("github.io")),
!stub.calls.some((u) => u.includes("/identity_forge/gallery/") || u.includes("github.io")),
"no gallery manifest request must happen before the toggle is enabled",
);
@@ -478,8 +523,42 @@ test("thumbnails stay off (no gallery fetch) until the preview toggle is enabled
picker.previewCheckbox.dispatchEvent(new window.Event("change"));
await flush();
assert.ok(
stub.calls.some((u) => u.includes("github.io") && u.includes("manifest.json")),
"enabling the toggle must fetch the live gh-pages manifest for the visible kind(s)",
stub.calls.some((u) => u.startsWith("/identity_forge/gallery/") && u.includes("manifest.json")),
"enabling the toggle must fetch the manifest for the visible kind(s) through the server's cache",
);
// 2.3.0: --offline's CSP allows only ComfyUI's own origin, so nothing may go to GitHub.
assert.ok(
!stub.calls.some((u) => u.includes("github.io")),
"the browser must never fetch the gallery from GitHub directly",
);
picker.close();
} finally {
stub.restore();
}
});
test("preview images load from the server's cache route, path segments encoded", async () => {
resetDom();
__testing.__resetForTests();
const stub = installFetchStub(rosterOkHandler);
try {
const node = makeFakeNode("IdentityForgeCosplayer");
const picker = new __testing.IdentityForgePicker({
kind: "cosplayer",
targetWidgetName: "character",
title: "test",
node,
});
picker.open();
await flush();
const art = picker.grid.querySelector('[data-if-kind="cosplayer"] .if-picker-art');
assert.ok(art, "a cosplayer card must be on screen");
const name = art.getAttribute("data-if-name");
picker.applyManifest("cosplayer", new Map([[name, "images/" + name + " #1.jpeg"]]));
const src = art.querySelector("img").getAttribute("data-src");
assert.equal(
src,
"/identity_forge/gallery/cosplay/images/" + encodeURIComponent(name + " #1.jpeg"),
);
picker.close();
} finally {
+3 -2
View File
@@ -27,7 +27,7 @@ from data.cosplayers import get_cosplayer_names
from nodes.identity_forge import (
generate_character, _parse_archetype_json, _COSPLAY_LABEL_KEY, _COVERS_FACE_KEY,
_COVERS_BODY_KEY, _COVERS_HAIR_KEY, _MASK_KEY, _SCALE_TIER_KEY, _CONTROL_FIELDS,
_SPECIES_KEY, _ANATOMY_NOTE_KEY,
_SPECIES_KEY, _ANATOMY_NOTE_KEY, _SUBJECT_NOUN_KEY,
)
from nodes.identity_forge_cosplayer import (
build_cosplayer_json, _MASK_DEFAULT, _MASK_OFF,
@@ -55,6 +55,7 @@ def render(
# entry needs (0.97.0). A preview that skips a forwarded key misreports the very
# thing you opened it to check.
anatomy_note = flat.pop(_ANATOMY_NOTE_KEY, None)
subject_noun = flat.pop(_SUBJECT_NOUN_KEY, None) # same trap again (2.1.0)
covers_body = bool(flat.pop(_COVERS_BODY_KEY, None))
covers_hair = bool(flat.pop(_COVERS_HAIR_KEY, None))
# The entry's own size_scale tier. The node pops and forwards this; the preview
@@ -76,7 +77,7 @@ def render(
seed, resolved_gender, locked, cosplay_label=label, covers_face=covers_face,
covers_body=covers_body, covers_hair=covers_hair, species=species,
character_scale=character_scale, mask_text=mask_text,
anatomy_note=anatomy_note,
anatomy_note=anatomy_note, subject_noun=subject_noun,
)
+101
View File
@@ -0,0 +1,101 @@
"""Tests for the IdentityForgeAgeProgression node (2.3.0).
Contract: one resolved character at several adult ages; hair greys forward, never back;
nothing an age refuses is voiced.
"""
from __future__ import annotations
import json
import logging
import unittest
from data.fields import FIELD_DEFINITIONS
from nodes.identity_forge_age_progression import (
_STAGES, IdentityForgeAgeProgression, _stage_hair, resolve_age_progression,
)
from nodes.identity_forge_cosplayer import IdentityForgeCosplayer
from tests.test_outfit_sheet import _Conflicts, _forge
class VocabularyTests(unittest.TestCase):
def test_every_stage_is_an_adult_pool_age(self):
for name, stages in _STAGES.items():
self.assertEqual(list(stages), sorted(stages, key=int), name)
for stage in stages:
self.assertIn(stage, FIELD_DEFINITIONS["age"]["female_options"])
self.assertIn(stage, FIELD_DEFINITIONS["age"]["male_options"])
self.assertGreaterEqual(int(stage), 18)
class HairTests(unittest.TestCase):
def test_greys_forward(self):
self.assertEqual(_stage_hair("jet black", 30, 50, ""), "jet black")
self.assertEqual(_stage_hair("jet black", 30, 60, ""), "salt and pepper")
self.assertEqual(_stage_hair("jet black", 30, 70, ""), "silver")
self.assertEqual(_stage_hair("golden blonde", 30, 60, ""), "silver")
# Younger than the character: the colour they have now.
self.assertEqual(_stage_hair("jet black", 50, 20, ""), "jet black")
def test_never_back(self):
# Grey at 45 stays grey at 50 even though most 50-year-olds are not.
self.assertEqual(_stage_hair("silver", 45, 50, "dark brown"), "silver")
self.assertEqual(_stage_hair("silver", 45, 40, "dark brown"), "dark brown")
self.assertEqual(_stage_hair("salt and pepper", 70, 60, "dark brown"),
"salt and pepper")
self.assertEqual(_stage_hair("salt and pepper", 70, 20, "dark brown"), "dark brown")
def test_stage_colours_are_live_options(self):
for colour in ("salt and pepper", "silver"):
self.assertIn(colour, FIELD_DEFINITIONS["hair_color"]["female_options"])
self.assertIn(colour, FIELD_DEFINITIONS["hair_color"]["male_options"])
class ProgressionTests(unittest.TestCase):
def test_same_person_at_each_age(self):
document = _forge(23)
prompts, labels = resolve_age_progression(document, "Decades (6)", "Unspecified")
self.assertEqual(labels, [f"{i}-age-{a}" for i, a in
enumerate(_STAGES["Decades (6)"], start=1)])
for prompt, stage in zip(prompts, _STAGES["Decades (6)"]):
self.assertIn(f"{stage}-year-old", prompt)
# Only the age moves in the identity sentence.
heads = {p.split(". ")[0].replace(f"{a}-year-old", "AGE")
for p, a in zip(prompts, _STAGES["Decades (6)"])}
self.assertEqual(len(heads), 1, heads)
def test_no_stage_voices_a_contradiction(self):
handler = _Conflicts()
root = logging.getLogger()
old_level = root.level
root.addHandler(handler)
root.setLevel(logging.INFO)
try:
for seed in range(30):
document = _forge(seed)
handler.messages.clear()
resolve_age_progression(document, "Decades (6)", "Head and shoulders")
self.assertEqual(handler.messages, [], f"seed {seed}")
finally:
root.removeHandler(handler)
root.setLevel(old_level)
def test_a_masked_character_emits_one_view(self):
kwargs = {spec.id: getattr(spec, "default", None)
for spec in IdentityForgeCosplayer.define_schema().inputs}
kwargs.update(character="Grimace", seed=7, upstream="")
document = _forge(7, IdentityForgeCosplayer.execute(**kwargs).args[0])
self.assertTrue(json.loads(document)["_meta"].get("covers_face"))
prompts, labels = resolve_age_progression(document, "Decades (6)", "Unspecified")
self.assertEqual((len(prompts), labels), (1, ["1-as-resolved"]))
class SchemaTests(unittest.TestCase):
def test_outputs_are_lists(self):
schema = IdentityForgeAgeProgression.define_schema()
self.assertEqual(schema.node_id, "IdentityForgeAgeProgression")
self.assertEqual(schema.category, "conditioning/character")
self.assertTrue(all(output.is_output_list for output in schema.outputs))
if __name__ == "__main__":
unittest.main()
+2 -2
View File
@@ -3,7 +3,7 @@
Scans README.md and docs/*.md (excluding docs/worklog/, which is gitignored
and so would make this test behave differently locally than on a fresh
clone) for `[text](path)` links, and checks that every relative path
resolves to a real file. External links (http(s)://, mailto:) and same-file
resolves to a real file or folder. External links (http(s)://, mailto:) and same-file
anchor links (`#section`) are skipped; an anchor fragment on a cross-file
link (`architecture.md#some-heading`) is stripped before checking, since
verifying the fragment itself actually exists in the target file is not
@@ -39,7 +39,7 @@ class RelativeDocLinksTests(unittest.TestCase):
broken = []
for doc_path, path_part in _iter_relative_links():
resolved = (doc_path.parent / path_part).resolve()
if not resolved.is_file():
if not resolved.exists(): # a folder link (example_workflows/) is valid too
broken.append(f"{doc_path.relative_to(ROOT)} -> {path_part}")
self.assertFalse(
broken,
+136 -25
View File
@@ -60,6 +60,7 @@ from nodes.identity_forge import (
_COSPLAY_LABEL_KEY, _COVERS_FACE_KEY, _COVERS_BODY_KEY, _COVERS_HAIR_KEY,
_MASK_KEY,
_ANATOMY_NOTE_KEY,
_SUBJECT_NOUN_KEY,
_PRENOMINAL_HEIGHTS,
_COMPOSITIONS_TOO_TIGHT_FOR_GIANT,
_COMPOSITIONS_TOO_WIDE_FOR_TINY,
@@ -264,6 +265,27 @@ class GenderTests(unittest.TestCase):
self.assertEqual(flat.get(field), value, field)
class LockedEyeMakeupOnBareFaceTests(unittest.TestCase):
"""2.4.0: a man's "no makeup" default hid an archetype's locked eyeliner (Emo,
Indie Sleaze, 1980s New Wave). Locked eye fields are voiced; random cosmetics and
lips stay hidden."""
def test_emo_man_keeps_his_eyeliner_only(self):
for seed in range(10):
flat = _parse_archetype_json(build_archetype_json("Emo", seed, "Essentials"))
gv = flat.pop(_VARIANTS_KEY, None)
prose, _ = generate_character(seed, "Male", flat, gender_variants=gv)
self.assertIn("He wears smoky black eyeshadow and smudged kohl eyeliner.",
prose, f"seed {seed}")
for word in ("lip colour", "blush", "mascara", "highlighter", "finish"):
self.assertNotIn(word, prose, f"'{word}' on seed {seed}")
def test_random_man_stays_bare_faced(self):
for seed in range(30):
prose, _ = generate_character(seed, "Male", {})
self.assertNotIn("eyeliner", prose, f"seed {seed}")
class ERNurseGenderMakeupTests(unittest.TestCase):
"""0.67.0: ER Nurse is a unisex archetype whose only per-gender difference is
makeup. It carries a costume-less ``variants`` block (Female -> soft natural
@@ -4157,6 +4179,17 @@ class PerformablePoseTests(unittest.TestCase):
"running one hand through the hair", "adjusting one cuff"):
self.assertIn(pose, got)
def test_prop_in_each_hand_drops_one_handed_poses(self):
# 2.4.0: Star-Lord drew "adjusting one cuff" with a blaster in each hand.
resolved = {"hair_length": "long", "outfit_description": "a wool overcoat",
"held_item": "a pair of blasters, one in each hand"}
got = _performable_poses(self._pool(), resolved, False, False, False)
for pose in ("posing with a hand on one hip", "adjusting one cuff",
"running one hand through the hair", "waving at the camera"):
self.assertNotIn(pose, got)
self.assertFalse(HAND_OCCUPIED_POSES & set(got))
self.assertTrue(got)
def test_absent_held_item_changes_nothing(self):
# `held_item` is optional and preset-only; an absent value must not narrow.
base = {"hair_length": "long", "outfit_description": "a wool overcoat"}
@@ -5060,8 +5093,8 @@ class FeralFitnessTests(unittest.TestCase):
feral = _FORM_SUPPRESS_FIELDS[_FORM_FERAL]
self.assertNotIn("body_type", feral, "a shape reads fine on a beast")
self.assertNotIn("height", feral, "a towering creature reads fine")
self.assertEqual(_FORM_SUPPRESS_FIELDS[_FORM_ANTHRO], set(),
"anthro is humanoid and keeps everything")
# 2.4.0: anthro keeps its shape and drops only the lifestyle word.
self.assertEqual(_FORM_SUPPRESS_FIELDS[_FORM_ANTHRO], {"fitness_level"})
class WornItemDeduplicationTests(unittest.TestCase):
@@ -6066,24 +6099,24 @@ class RandomPoolTests(unittest.TestCase):
# at 1.1.0 (Task 5 roster pass, 1977 -> 1994 cosplayers) and again at
# 1.2.0 (1994 -> 1999), again at 1.3.0 (1999 -> 2023) and again at
# 1.4.0 (2023 -> 2052), at 1.5.0 (2052 -> 2057) and at 1.5.1 (2057 -> 2073) and at 1.8.0 (new
# cosplayers, one folded duplicate), at 1.9.0 and at 1.11.0 to the new ground
# truth. It is expected to need refreshing every time the roster grows.
# cosplayers, one folded duplicate), at 1.9.0, at 1.11.0, at 2.1.0 and at 2.2.0 to
# the new ground truth. It is expected to need refreshing every time the roster grows.
expected = {
(_RANDOM_ANY, 0): 'Roy Batty',
(_RANDOM_ANY, 1): 'Eureka',
(_RANDOM_ANY, 2): 'Bowser',
(_RANDOM_ANY, 3): 'Kraven the Hunter',
(_RANDOM_ANY, 4): 'Kokoro',
(_RANDOM_FEMALE, 0): 'Snow White',
(_RANDOM_FEMALE, 1): 'Captain Carter',
(_RANDOM_FEMALE, 2): 'Widowmaker',
(_RANDOM_FEMALE, 3): 'Elvira',
(_RANDOM_FEMALE, 4): 'Elphelt Valentine',
(_RANDOM_MALE, 0): 'Roger Rabbit',
(_RANDOM_MALE, 1): 'Eevee',
(_RANDOM_MALE, 2): 'Brainiac 5',
(_RANDOM_MALE, 3): 'Jolly Green Giant',
(_RANDOM_MALE, 4): 'Johnny Cage',
(_RANDOM_ANY, 0): 'Rhino',
(_RANDOM_ANY, 1): 'Enid Sinclair',
(_RANDOM_ANY, 2): 'Booster Gold',
(_RANDOM_ANY, 3): 'Kimberly Jackson',
(_RANDOM_ANY, 4): 'Kikyo',
(_RANDOM_FEMALE, 0): 'Rikku',
(_RANDOM_FEMALE, 1): 'Fire',
(_RANDOM_FEMALE, 2): 'Bloody Mary',
(_RANDOM_FEMALE, 3): 'Leone',
(_RANDOM_FEMALE, 4): 'Leeloo',
(_RANDOM_MALE, 0): 'Reverse-Flash',
(_RANDOM_MALE, 1): 'Duff Killigan',
(_RANDOM_MALE, 2): 'Bowser',
(_RANDOM_MALE, 3): 'Jiraiya',
(_RANDOM_MALE, 4): 'Jiminy Cricket',
}
for (character, seed), name in expected.items():
doc = json.loads(build_cosplayer_json(character, seed))
@@ -6909,10 +6942,8 @@ class NewRosterEntryTests(unittest.TestCase):
"Yamada Asaemon Sagiri", 2, include_prop=True))
self.assertIn("a katana in a black lacquered scabbard",
worn["Clothing"]["outfit_description"])
self.assertIn("an empty black lacquered scabbard",
held["Clothing"]["outfit_description"])
self.assertNotIn("a katana in a black lacquered scabbard",
held["Clothing"]["outfit_description"])
# 2.4.0: an "empty scabbard" rendered as a second sheathed sword, so none is named.
self.assertNotIn("scabbard", held["Clothing"]["outfit_description"])
def test_alternate_looks_actually_roll(self):
for name, expected in (("Yuzuriha", 3), ("Gabimaru", 2), ("Fern", 2)):
@@ -7889,6 +7920,34 @@ class SpeciesRoundTripTests(unittest.TestCase):
self.assertIn("Demographics", meta.get("suppress_groups", []))
self.assertIn("waist", meta.get("suppress_fields", []))
def test_anthro_monster_is_humanoid_not_a_human_hybrid(self):
# 2.4.0: "anthropomorphic skeleton hybrid ... a full waist, wide hips" drew a
# person; an animal hybrid keeps its proportions and clothes.
for seed in range(6):
prose, _ = self._save("skeleton", "Anthropomorphic", seed=seed)
self.assertIn("humanoid skeleton", prose)
self.assertNotIn("hybrid", prose)
self.assertNotRegex(prose, r"\b(?:hips|waist|physique)\b")
self.assertIn(" wears ", prose)
lion, _ = self._save("lion", "Anthropomorphic", seed=seed)
self.assertIn("anthropomorphic lion hybrid", lion)
self.assertNotIn("physique", lion)
def test_anthro_rewrites_apply_only_in_anthro_form(self):
# 2.4.0: a creature's "anthro" text replaces its whole-animal slots, so the
# model draws one hybrid, not a person beside a stegosaurus. Feral keeps
# the animal, and recall at a new seed keeps the lead noun.
prose, saved = self._save("stegosaurus", "Anthropomorphic")
self.assertIn("scaly reptilian humanoid", prose)
self.assertIn("sturdy scaly legs", prose)
self.assertNotIn("forelegs", prose)
self.assertIn("scaly reptilian humanoid", self._recall(saved, 41)[0])
feral, _ = self._save("stegosaurus", "Feral / full creature")
self.assertIn("forelegs", feral)
self.assertNotIn("humanoid", feral)
nautilus, _ = self._save("nautilus", "Anthropomorphic")
self.assertNotIn("siphon", nautilus) # "" drops the slot
def test_a_feral_creature_survives_recall_at_a_new_seed(self):
for creature in ("lion", "dragon", "bison", "octopus"):
saved_prose, saved = self._save(creature, "Feral / full creature")
@@ -7945,6 +8004,7 @@ def _render_cosplayer(character, seed, look_level="Costume only",
covers_hair = bool(flat.pop(_COVERS_HAIR_KEY, None))
mask_text = flat.pop(_MASK_KEY, None)
anatomy_note = flat.pop(_ANATOMY_NOTE_KEY, None)
subject_noun = flat.pop(_SUBJECT_NOUN_KEY, None)
scale = flat.pop(_SCALE_TIER_KEY, "") or ""
locked = {k: v for k, v in flat.items()
if k not in _CONTROL_FIELDS and not k.startswith("__")}
@@ -7952,7 +8012,7 @@ def _render_cosplayer(character, seed, look_level="Costume only",
seed, gender, locked, cosplay_label=label, species=species,
covers_face=covers_face, covers_body=covers_body, covers_hair=covers_hair,
character_scale=scale, mask_text=mask_text,
anatomy_note=anatomy_note)
anatomy_note=anatomy_note, subject_noun=subject_noun)
class FeralBodyPlanTests(unittest.TestCase):
@@ -8021,7 +8081,7 @@ class FeralBodyPlanTests(unittest.TestCase):
pose, r"^(standing|sitting|lying|moving|at rest|sprawled|propped|"
r"perched|coiled|hovering|gliding|flying|swimming|walking|"
r"crouched|curled|settled|rearing|padding|prowling|floating|"
r"drifting|resting)\b",
r"drifting|resting|rolling|plodding)\b",
f"{pose!r} does not complete 'He is ...'")
def test_the_species_group_is_built_from_mask_and_costume(self):
@@ -8409,6 +8469,57 @@ class AnatomyNoteTests(unittest.TestCase):
if isinstance(entry, dict) and entry.get("body_plan") == "feral":
self.assertIsNone(entry.get("anatomy_note"), name)
class SubjectNounTests(unittest.TestCase):
"""``subject`` replaces "man"/"woman" in the lead phrase (2.1.0).
A non-human face voiced only in a later sentence lost to "a short man" on every
Tellarite render; leading with "a short pig-headed humanoid alien" kept the snout.
"""
def test_it_leads_in_place_of_the_gender_noun(self):
prose, _ = _render_cosplayer("Tellarite", 5)
noun = COSPLAYERS["Tellarite"]["subject"]
self.assertIn(noun, prose.split(".")[0])
self.assertNotRegex(prose.split(".")[0], r"\bman\b")
def test_it_also_reaches_a_maskless_face(self):
prose, _ = _render_cosplayer("Leela", 5, gender="Female")
self.assertIn(COSPLAYERS["Leela"]["subject"], prose.split(".")[0])
def test_unmasking_restores_the_gender_noun(self):
# The person underneath shows, so the alien noun must not lead.
prose, _ = _render_cosplayer("Tellarite", 5, mask_mode=_MASK_OFF)
self.assertNotIn(COSPLAYERS["Tellarite"]["subject"], prose)
def test_it_survives_the_json_round_trip(self):
# The vault reloads a saved character from its JSON output.
_, json_output = _render_cosplayer("Tellarite", 5)
flat = _parse_archetype_json(json_output)
self.assertEqual(flat.get(_SUBJECT_NOUN_KEY), COSPLAYERS["Tellarite"]["subject"])
def test_a_downstream_costume_drops_it(self):
upstream = build_cosplayer_json("Tellarite", 0)
downstream = build_cosplayer_json("Hermione Granger", 0)
merged = json.loads(merge_preset_documents(upstream, downstream))
self.assertNotIn("subject", merged.get("_meta", {}))
def test_costume_weights_lean_the_look_roll(self):
# Orion: TOS dancer 2, Gaila's cadet uniform 1.
cadet = sum("cadet" in build_cosplayer_json("Orion", seed) for seed in range(300))
self.assertTrue(60 <= cadet <= 140, cadet)
def test_an_unweighted_entry_keeps_its_uniform_pick(self):
# costume_weights must not move any existing entry's seeds: without the key
# _pick_look still makes exactly the one rng.choice call it always made.
import random
from nodes.identity_forge_cosplayer import _pick_look
entry = {"costume": "a", "costumes": ["b", "c"]}
for seed in range(50):
expected = random.Random(seed).choice(["a", "b", "c"])
self.assertEqual(_pick_look(entry, random.Random(seed))["costume"], expected)
class MaleAccessoryTrimTests(unittest.TestCase):
"""``accessories`` and ``brooch`` get masculine trims (1.4.0).
+134
View File
@@ -0,0 +1,134 @@
"""Tests for the server-side gallery cache behind the picker's previews (2.3.0)."""
from __future__ import annotations
import json
import os
import tempfile
import time
import unittest
import urllib.error
from email.message import Message
from pathlib import Path
from nodes import gallery_cache as gc
_MANIFEST = json.dumps({"entries": [
{"name": "AKI", "image": "images/AKI.jpeg"},
{"name": "2-1B Droid", "image": "images/2-1B Droid.jpeg"},
{"name": "No image", "has_image": False},
]}).encode("utf-8")
class _Response:
def __init__(self, body: bytes, content_type: str, etag: str = '"v1"') -> None:
self._body = body
self.headers = Message()
self.headers["Content-Type"] = content_type
self.headers["ETag"] = etag
def read(self, limit: int = -1) -> bytes:
return self._body if limit < 0 else self._body[:limit]
def __enter__(self):
return self
def __exit__(self, *_):
return False
class _Opener:
"""Answers like GitHub Pages; ``offline`` makes every call fail."""
def __init__(self) -> None:
self.calls: "list[tuple[str, str | None]]" = []
self.offline = False
self.not_modified = False
self.image_type = "image/jpeg"
self.image_body = b"\xff\xd8jpeg"
def __call__(self, request):
url = request.full_url
self.calls.append((url, request.get_header("If-none-match")))
if self.offline:
raise urllib.error.URLError("no network")
if self.not_modified and request.get_header("If-none-match"):
raise urllib.error.HTTPError(url, 304, "Not Modified", Message(), None)
if url.endswith("manifest.json"):
return _Response(_MANIFEST, "application/json")
return _Response(self.image_body, self.image_type)
class GalleryCacheTests(unittest.TestCase):
def setUp(self) -> None:
self._dir = tempfile.TemporaryDirectory()
self.root = Path(self._dir.name) / "cache"
self.opener = _Opener()
gc._LISTED.clear()
def tearDown(self) -> None:
gc._LISTED.clear()
self._dir.cleanup()
def _age(self, path: Path, seconds: float) -> None:
then = time.time() - seconds
os.utime(path, (then, then))
def test_fetches_once_then_serves_from_disk(self):
path = gc.manifest_path("cosplay", self.root, self.opener)
self.assertEqual(path.read_bytes(), _MANIFEST)
self.assertEqual(self.opener.calls[0][0], gc.GALLERY_ROOT + "cosplay/manifest.json")
gc.manifest_path("cosplay", self.root, self.opener)
self.assertEqual(len(self.opener.calls), 1, "a fresh copy must not refetch")
def test_stale_copy_revalidates_with_its_etag(self):
path = gc.manifest_path("cosplay", self.root, self.opener)
self._age(path, gc.MANIFEST_MAX_AGE + 5)
self.opener.not_modified = True
gc.manifest_path("cosplay", self.root, self.opener)
self.assertEqual(self.opener.calls[-1][1], '"v1"')
self.assertLess(time.time() - path.stat().st_mtime, 60, "a 304 renews freshness")
def test_offline_serves_what_was_cached(self):
image = gc.image_path("cosplay", "images/AKI.jpeg", self.root, self.opener)
self._age(image, gc.IMAGE_MAX_AGE + 5)
self._age(self.root / "cosplay" / "manifest.json", gc.MANIFEST_MAX_AGE + 5)
self.opener.offline = True
self.assertEqual(
gc.image_path("cosplay", "images/AKI.jpeg", self.root, self.opener), image)
def test_offline_with_nothing_cached_is_an_error(self):
self.opener.offline = True
with self.assertRaises(gc.GalleryError):
gc.manifest_path("cosplay", self.root, self.opener)
def test_only_listed_images_on_the_one_host(self):
path = gc.image_path("cosplay", "images/2-1B Droid.jpeg", self.root, self.opener)
self.assertEqual(path.name, "2-1B Droid.jpeg")
self.assertEqual(self.opener.calls[-1][0],
gc.GALLERY_ROOT + "cosplay/images/2-1B%20Droid.jpeg")
for bad in ("images/Unknown.jpeg", "images/../../../secret.txt", "manifest.json"):
with self.subTest(bad=bad), self.assertRaises(gc.GalleryError):
gc.image_path("cosplay", bad, self.root, self.opener)
with self.assertRaises(gc.GalleryError):
gc.manifest_path("../etc", self.root, self.opener)
def test_rejected_responses_are_not_cached(self):
self.opener.image_type = "text/html"
with self.assertRaises(gc.GalleryError):
gc.image_path("cosplay", "images/AKI.jpeg", self.root, self.opener)
self.assertFalse((self.root / "cosplay" / "images" / "AKI.jpeg").exists())
self.opener.image_type = "image/jpeg"
self.opener.image_body = b"x" * (gc.MAX_IMAGE_BYTES + 1)
with self.assertRaises(gc.GalleryError):
gc.image_path("cosplay", "images/AKI.jpeg", self.root, self.opener)
def test_size_and_clear(self):
self.assertEqual(gc.cache_bytes(self.root), 0)
gc.image_path("cosplay", "images/AKI.jpeg", self.root, self.opener)
self.assertGreater(gc.cache_bytes(self.root), len(_MANIFEST))
gc.clear(self.root)
self.assertEqual(gc.cache_bytes(self.root), 0)
if __name__ == "__main__":
unittest.main()
+156
View File
@@ -0,0 +1,156 @@
"""Tests for the IdentityForgeOutfitSheet node (2.3.0).
Contract: one resolved character, several outfits, and nothing but the clothes (and the
styling that goes with them) moving between them.
"""
from __future__ import annotations
import json
import logging
import unittest
from data.fields import FIELD_DEFINITIONS
from nodes.identity_forge import IdentityForge
from nodes.identity_forge_cosplayer import IdentityForgeCosplayer
from nodes.identity_forge_outfit_sheet import (
_BACKDROPS, _CLOTHING, _RESTYLED, _SHEETS, IdentityForgeOutfitSheet,
resolve_outfit_sheet,
)
_POSE = "standing naturally"
def _forge(seed: int, archetype_json: str = "") -> str:
kwargs: dict = {spec.id: "Random" for spec in IdentityForge.define_schema().inputs}
kwargs.update(
seed=seed, archetype_json=archetype_json, set_all_fields="Off", gender="Any",
wardrobe="Match gender", size_scale="Auto", hair_color_scope="Natural only",
accessory_density="Balanced", location_setting="Any indoor/outdoor",
)
return IdentityForge.execute(**kwargs).args[1]
class _Conflicts(logging.Handler):
"""Collects the engine's lock-vs-lock reports: a lock it had to keep against a rule."""
def __init__(self) -> None:
super().__init__(logging.INFO)
self.messages: "list[str]" = []
def emit(self, record: logging.LogRecord) -> None:
if "keeping lock" in record.getMessage():
self.messages.append(record.getMessage())
class VocabularyTests(unittest.TestCase):
def test_every_sheet_style_is_a_live_option(self):
for sheet, styles in _SHEETS.items():
self.assertEqual(len(styles), len(set(styles)), sheet)
for style in styles:
self.assertIn(style, FIELD_DEFINITIONS["outfit_style"]["female_options"])
self.assertIn(style, FIELD_DEFINITIONS["outfit_style"]["male_options"])
def test_every_backdrop_is_a_live_location(self):
for label, location in _BACKDROPS.items():
if location:
self.assertIn(location, FIELD_DEFINITIONS["location"]["female_options"], label)
self.assertIn(location, FIELD_DEFINITIONS["location"]["male_options"], label)
def test_restyling_never_touches_the_person(self):
groups = {FIELD_DEFINITIONS[name]["group"] for name in _RESTYLED}
self.assertNotIn("Face", groups)
self.assertNotIn("Body", groups)
self.assertNotIn("Demographics", groups)
self.assertFalse({"hair_color", "hair_length", "hair_texture"} & _RESTYLED)
self.assertIn("outfit_description", _CLOTHING)
class SheetTests(unittest.TestCase):
def test_same_person_each_view_in_its_style(self):
document = _forge(11)
prompts, labels = resolve_outfit_sheet(
document, "Range (6)", "Grey studio backdrop", "Full body", _POSE)
self.assertEqual(len(prompts), 6)
self.assertEqual(labels[2], "3-business-formal")
self.assertEqual(len(set(prompts)), 6, "every view must differ")
heads = {prompt.split(". ")[0] for prompt in prompts}
self.assertEqual(len(heads), 1, heads)
for prompt in prompts:
self.assertIn("seamless grey studio backdrop", prompt)
def test_deterministic_and_stable_across_sheets(self):
document = _forge(4)
first = resolve_outfit_sheet(document, "Range (6)", "Grey studio backdrop",
"Full body", _POSE)
again = resolve_outfit_sheet(document, "Range (6)", "Grey studio backdrop",
"Full body", _POSE)
self.assertEqual(first, again)
everyday, _ = resolve_outfit_sheet(document, "Everyday (4)", "Grey studio backdrop",
"Full body", _POSE)
# The seed follows the style, not the position: casual dresses the same way.
self.assertEqual(first[0][0], everyday[0])
def test_outfits_differ_between_characters_and_by_outfit_seed(self):
# 2.3.0: a fixed per-style seed gave 40 characters four casual outfits.
def outfit(prompt: str) -> str:
return prompt.split(" wears ", 2)[-1].split(". ")[0]
casual = {outfit(resolve_outfit_sheet(_forge(seed), "Everyday (4)",
"Grey studio backdrop", "Full body",
_POSE)[0][0])
for seed in range(12)}
self.assertGreaterEqual(len(casual), 10, casual)
document = _forge(4)
rolls = {tuple(outfit(p) for p in resolve_outfit_sheet(
document, "Everyday (4)", "Grey studio backdrop", "Full body", _POSE,
outfit_seed=n)[0])
for n in range(4)}
self.assertEqual(len(rolls), 4, "each outfit_seed must re-dress the person")
def test_no_view_voices_a_contradiction(self):
# Every lock this node adds must agree with what it keeps: the engine reports
# a lock it had to keep against a rule, and no view may produce one.
handler = _Conflicts()
root = logging.getLogger()
old_level = root.level
root.addHandler(handler)
root.setLevel(logging.INFO)
try:
for seed in range(25):
document = _forge(seed)
handler.messages.clear()
for backdrop in ("Grey studio backdrop", "Keep the character's scene"):
resolve_outfit_sheet(document, "Every style (15)", backdrop,
"Full body", _POSE)
self.assertEqual(handler.messages, [], f"seed {seed}")
finally:
root.removeHandler(handler)
root.setLevel(old_level)
def test_a_cosplayer_wears_their_costume(self):
kwargs = {spec.id: getattr(spec, "default", None)
for spec in IdentityForgeCosplayer.define_schema().inputs}
kwargs.update(character="Grimace", seed=7, upstream="")
document = _forge(7, IdentityForgeCosplayer.execute(**kwargs).args[0])
prompts, labels = resolve_outfit_sheet(
document, "Range (6)", "Grey studio backdrop", "Full body", _POSE)
self.assertEqual(labels, ["1-as-resolved"])
self.assertEqual(len(prompts), 1)
def test_malformed_input_degrades_to_one_view(self):
prompts, labels = resolve_outfit_sheet(
"not json", "Range (6)", "Grey studio backdrop", "Full body", _POSE)
self.assertEqual((len(prompts), labels), (1, ["1-as-resolved"]))
self.assertTrue(json.dumps(prompts))
class SchemaTests(unittest.TestCase):
def test_outputs_are_lists(self):
schema = IdentityForgeOutfitSheet.define_schema()
self.assertEqual(schema.node_id, "IdentityForgeOutfitSheet")
self.assertEqual(schema.category, "conditioning/character")
self.assertTrue(all(output.is_output_list for output in schema.outputs))
if __name__ == "__main__":
unittest.main()
+31 -3
View File
@@ -105,13 +105,31 @@ class RehashTests(unittest.TestCase):
self.assertEqual(render_gallery.main(["--rehash", "--kind", kind]), 0)
result = render_gallery.survey((kind,))[kind]
self.assertEqual(result["stale"], [])
self.assertEqual(result["unpublished"], [names[1]])
# Other tiles may be legitimately unpublished on a release branch.
self.assertIn(names[1], result["unpublished"])
self.assertNotIn(names[0], result["unpublished"])
self.assertIs(saved["m"], manifest)
finally:
render_gallery.load_manifest = original_load
render_gallery.save_manifest = original_save
class PublishPendingDryRunTests(unittest.TestCase):
def test_dry_run_publishes_nothing(self) -> None:
# 2.3.0: --publish-pending ignored --dry-run and pushed to gh-pages.
original_survey, original_publish = render_gallery.survey, render_gallery.publish_kind
render_gallery.survey = lambda kinds: {k: {"unpublished": ["X"]} for k in kinds}
render_gallery.publish_kind = lambda *a: self.fail("dry run must not publish")
try:
buffer = io.StringIO()
with redirect_stdout(buffer):
code = render_gallery.main(["--publish-pending", "--dry-run"])
self.assertEqual(code, 0)
self.assertIn("would publish X", buffer.getvalue())
finally:
render_gallery.survey, render_gallery.publish_kind = original_survey, original_publish
class EntryHashTests(unittest.TestCase):
def test_hash_is_stable_across_calls(self) -> None:
first = render_gallery.entry_hash("cosplay", "2B")
@@ -196,14 +214,24 @@ class GalleryShotPoolTests(unittest.TestCase):
def test_pose_pins_name_real_poses_and_entries(self) -> None:
from data.cosplayers import COSPLAYERS
from data.creatures import CREATURES
from data.fields import POSE_FAMILIES
poses = {v for fam in POSE_FAMILIES.values() for v in fam["variants"]}
roster = {"cosplay": COSPLAYERS, "creatures": CREATURES}
for kind, pins in render_gallery._GALLERY_POSE.items():
self.assertEqual(kind, "cosplay")
self.assertIn(kind, roster)
for name, pose in pins.items():
self.assertIn(name, COSPLAYERS)
self.assertIn(name, roster[kind])
self.assertIn(pose, poses, name)
def test_lock_level_pins_name_real_archetypes_and_levels(self) -> None:
from data.templates import ARCHETYPES
from nodes.identity_forge_archetype import IdentityForgeArchetype
spec = {i.id: i for i in IdentityForgeArchetype.define_schema().inputs}
for name, level in render_gallery._GALLERY_LOCK_LEVEL.items():
self.assertIn(name, ARCHETYPES)
self.assertIn(level, spec["lock_level"].options, name)
def test_shot_pins_name_real_entries_and_gallery_shots(self) -> None:
from data.templates import ARCHETYPES
for kind, pins in render_gallery._GALLERY_SHOT.items():
+42 -2
View File
@@ -841,6 +841,33 @@ def validate() -> list[str]:
elif not entry.get("costume") or body_plan == "feral":
errors.append(f"cosplayer '{name}': 'costume_back' needs a worn "
f"'costume' to replace")
# --- subject (2.1.0) ------------------------------------------
# The lead noun for a non-human head ("pig-headed humanoid alien"), voiced
# as "a short <subject> with a stocky build". A feral entry already leads
# with its own ``creature_of``.
noun = entry.get("subject")
if noun is not None:
if not isinstance(noun, str) or not noun.strip():
errors.append(f"cosplayer '{name}': 'subject' must be a non-empty string")
elif body_plan == "feral":
errors.append(f"cosplayer '{name}': 'subject' is not valid on a feral "
f"entry (it leads with 'creature_of')")
elif (noun != noun.strip() or noun.endswith((".", ","))
or noun.split()[0].lower() in ("a", "an", "the")):
errors.append(f"cosplayer '{name}': 'subject' is a bare noun phrase (no "
f"article, no trailing punctuation): {noun!r}")
# --- costume_weights (2.1.0) ------------------------------------
# One positive weight per look, canonical first, so the best-known look can
# lead (Orion: the TOS dancer over Gaila's cadet uniform).
weights = entry.get("costume_weights")
if weights is not None:
looks = 1 + len(entry.get("costumes") or [])
if (not isinstance(weights, list) or len(weights) != looks
or not all(isinstance(w, (int, float)) and not isinstance(w, bool)
and w > 0 for w in weights)):
errors.append(f"cosplayer '{name}': 'costume_weights' needs one positive "
f"number per look ({looks}: the canonical costume, then "
f"each 'costumes' alternate)")
anatomy = entry.get("anatomy")
if anatomy is not None:
if not isinstance(anatomy, dict) or not anatomy:
@@ -863,7 +890,9 @@ def validate() -> list[str]:
errors.append(f"cosplayer '{name}': 'poses' must be a non-empty list of "
f"non-empty strings")
creature_class = entry.get("creature_class")
if creature_class is not None and creature_class not in CREATURE_CLASSES:
# "Machines" is cosplay-only (2.1.0): a named droid has no generic creature to
# share a class with, and the class only decides the "monstrous" adjective.
if creature_class is not None and creature_class not in (*CREATURE_CLASSES, "Machines"):
errors.append(f"cosplayer '{name}': creature_class {creature_class!r} is not "
f"one of {list(CREATURE_CLASSES)}")
# Required on a feral entry, for the same reason ``creature_of`` is: the node
@@ -918,7 +947,7 @@ def validate() -> list[str]:
# field engine), so only structure is checked here, not value membership.
if len(CREATURES) < 40:
errors.append(f"CREATURES has {len(CREATURES)}; need >= 40")
allowed_keys = {"class", "palette", "palette_pool"} | set(CREATURE_SLOTS)
allowed_keys = {"class", "palette", "palette_pool", "anthro"} | set(CREATURE_SLOTS)
class_counts = {cls: 0 for cls in CREATURE_CLASSES}
for name, entry in CREATURES.items():
if not isinstance(entry, dict):
@@ -940,6 +969,17 @@ def validate() -> list[str]:
isinstance(v, str) and v for v in value
):
errors.append(f"creature '{name}': 'palette_pool' must be a non-empty list of strings")
elif key == "anthro":
# Anthropomorphic-form rewrites: slot -> text ("" drops it), plus an
# optional lead noun.
if not isinstance(value, dict) or not value:
errors.append(f"creature '{name}': 'anthro' must be a non-empty dict")
continue
for sub, text in value.items():
if sub not in set(CREATURE_SLOTS) | {"subject"}:
errors.append(f"creature '{name}': anthro key {sub!r} is not a slot")
elif not isinstance(text, str) or (sub == "subject" and not text):
errors.append(f"creature '{name}': anthro {sub!r} must be a string")
elif value is not None and (not isinstance(value, str) or not value):
errors.append(f"creature '{name}': slot {key!r} must be a non-empty string")
thin = [cls for cls, count in class_counts.items() if count < 3]