Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26c5416fc5 | ||
|
|
fbf5bad67e | ||
|
|
70d7e5374a | ||
|
|
c68467f49a |
@@ -44,7 +44,7 @@ jobs:
|
||||
# Pinned to an immutable commit SHA (v7.0.0), matching the publish
|
||||
# workflow's SHA-pinning convention. Re-verify and bump when updating:
|
||||
# git ls-remote https://github.com/actions/setup-python refs/tags/v7
|
||||
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Validate data integrity
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install ruff
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
- name: Set up Node
|
||||
# Pinned to an immutable commit SHA (v7.0.0). Re-verify and bump when
|
||||
# updating: git ls-remote https://github.com/actions/setup-node refs/tags/v7
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
|
||||
with:
|
||||
# registerHooks (tests/frontend/hooks.mjs) needs >=22.15.0 / >=23.5.0.
|
||||
node-version: "24"
|
||||
|
||||
@@ -8,12 +8,14 @@ investigation notes, 1.5.0+ — the reasoning for every item in the release list
|
||||
|
||||
## Current state
|
||||
|
||||
_Last verified: 2026-11-14_
|
||||
_Last verified: 2026-11-19_
|
||||
|
||||
- **Status:** in active development; main is v2.6.1 (`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`. Since 2.6.0: the **Scene Sheet** node (one person in several places, dressed for each), `pin_framing()` for every sheet's framing pin, picker stars, a seeded random pick on Vault Load, example workflows for every sheet, and one `gallery/shared/` copy of the gallery page assets.
|
||||
- **Status:** in active development; main is v2.7.1 (`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`. Since 2.6.0: the **Scene Sheet** node (one person in several places, dressed for each), `pin_framing()` for every sheet's framing pin, picker stars, a seeded random pick on Vault Load, example workflows for every sheet, and one `gallery/shared/` copy of the gallery page assets. Since 2.7.0: a fourth gallery, **`gallery/people/`** - fixed seeds on the plain node at its defaults (`PEOPLE` in `scripts/render_gallery.py`, same prose-hash gate), each card showing its seed and full prompt with a copy button (gallery/README.md -> "The people gallery").
|
||||
- **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.7.1** - No more NaN `fingerprint_inputs` (PR #20): it re-ran every downstream node, sampler included, on every queue. Vault Load's random pick fingerprints the entry it lands on. Random characters unchanged. See docs/history.md -> "2.7.1".
|
||||
- **2.7.0** - Roster batch (Sheena Fujibayashi with her three looks, Tales, Hellsing, Final Fantasy, Metal Gear, KOS-MOS, Skullgirls, Kula, Beatrix and others), Pyra/Mythra corrected to canon, a nose prose fix (existing tiles rehashed), and the people gallery (`gallery/people/`). Random characters unchanged (the Cosplayer node's Random pick moves, as with any roster addition). See docs/history.md -> "2.7.0".
|
||||
- **2.6.1** - Trims the `pyproject.toml` description under the Registry's 1000-character limit (2.6.0's publish failed on it) and tests the limit. See docs/history.md -> "2.6.1".
|
||||
- **2.6.0** - Audit fixes: framing pins release what they refuse (`pin_framing`), the Outfit Sheet busts the cache, user archetypes keep lists and variants and user cosplayers keep alternates, back views and `subject`, gallery cache offline back-off and raster-only, roll route ignores non-text values, case-only vault rename, shared gallery page assets, ruff pinned, example workflows and node contracts tested. Adds the Scene Sheet node, picker stars, a random saved character on Vault Load, and Turnaround / Expression / Scene Sheet example workflows. Random characters unchanged. See docs/history.md -> "2.6.0".
|
||||
- **2.5.0** - Picker search: word-start, accent-insensitive matching with quoted phrases and a one-way `SEARCH_ALSO` synonym/compound list, every description field indexed (eyes, alternate costumes, back view, anatomy), a type-to-filter franchise box, cosplayer-only filters hidden on Archetype/Creature, reopening on the current pick, and a Queue each button for a filtered set. Frontend and roster index only; random characters unchanged. See docs/history.md -> "2.5.0".
|
||||
@@ -22,8 +24,6 @@ _Last verified: 2026-11-14_
|
||||
- **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".
|
||||
- **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).
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ Browse the galleries: [cosplay](https://enragedantelope.github.io/comfyui-identi
|
||||
[archetypes](https://enragedantelope.github.io/comfyui-identity-forge/gallery/archetypes/) ·
|
||||
[creatures](https://enragedantelope.github.io/comfyui-identity-forge/gallery/creatures/) — every roster
|
||||
entry with a sample render, searchable by name and franchise, each linked to the exact workflow it was made with.
|
||||
The [people](https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/) gallery shows random people
|
||||
from the plain node, each card with its seed and the full prompt.
|
||||
|
||||
## Why Identity Forge?
|
||||
|
||||
@@ -85,15 +87,15 @@ randomized identities, so your own results will vary:
|
||||
|
||||
### Sample outputs
|
||||
|
||||
**Identity Forge** — random people:
|
||||
**Identity Forge** - random people ([more, with seeds and prompts](https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/)):
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img width="200" src="https://github.com/user-attachments/assets/5c6d404d-8cb8-4466-9575-21783c6f2287" /></td>
|
||||
<td><img width="200" src="https://github.com/user-attachments/assets/82d0bb40-d3c6-47c9-83f1-6f33aa7e9260" /></td>
|
||||
<td><img width="200" src="https://github.com/user-attachments/assets/9755ef20-0429-4d64-949f-2826a83cc2e7" /></td>
|
||||
<td><img width="200" src="https://github.com/user-attachments/assets/15d61d28-d79a-4ad0-b17f-7346b83ab56c" /></td>
|
||||
<td><img width="200" src="https://github.com/user-attachments/assets/00172e67-12f7-4518-b08f-663afce2a363" /></td>
|
||||
<td><img width="200" src="https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/images/Sample%2003.jpeg" /></td>
|
||||
<td><img width="200" src="https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/images/Sample%2010.jpeg" /></td>
|
||||
<td><img width="200" src="https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/images/Sample%2015.jpeg" /></td>
|
||||
<td><img width="200" src="https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/images/Sample%2018.jpeg" /></td>
|
||||
<td><img width="200" src="https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/images/Sample%2023.jpeg" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
+422
-14
@@ -11344,7 +11344,7 @@ COSPLAYERS: dict[str, dict] = {
|
||||
"signature": {"hair_color": "dirty blonde", "hair_length": "very short",
|
||||
"facial_hair": "stubble", "eye_color": "blue-gray"},
|
||||
"physique": {"body_type": "stocky", "height": "short", "skin_tone": "tan"},
|
||||
"prop": "a corncob pipe",
|
||||
"prop": "an open can of spinach",
|
||||
},
|
||||
"Olive Oyl": {
|
||||
"franchise": "Popeye",
|
||||
@@ -23720,7 +23720,7 @@ COSPLAYERS: dict[str, dict] = {
|
||||
"Inverness cape worn over a tweed three-piece suit with a "
|
||||
"waistcoat and watch chain, a high starched collar, and polished "
|
||||
"leather ankle boots",
|
||||
"prop": "a curved calabash pipe held in one hand",
|
||||
"prop": "a brass magnifying glass held in one hand",
|
||||
"signature": {
|
||||
"hair_color": "dark brown",
|
||||
"hair_length": "very short",
|
||||
@@ -24089,23 +24089,30 @@ COSPLAYERS: dict[str, dict] = {
|
||||
"Pyra": {
|
||||
"franchise": "Xenoblade Chronicles",
|
||||
"gender": "Female",
|
||||
"costume": "a crimson armored bodysuit with gold filigree across the chest "
|
||||
"and a glowing green crystal set into the sternum, segmented "
|
||||
"red-and-gold pauldrons, a pleated dark skirt over armored hip "
|
||||
"plates, and thigh-high red boots",
|
||||
"signature": {"hair_color": "deep red", "hair_length": "shoulder length",
|
||||
"hair_style": "side ponytail", "eye_color": "amber"},
|
||||
# Re-sourced at 2.7.0 (Danbooru tag co-occurrence): both looks had the wrong hair
|
||||
# (side ponytail / braided ponytail), Pyra a skirt for her red shorts and Mythra a
|
||||
# yellow crystal. Canon: a short bob (Pyra) or very long loose hair (Mythra) with
|
||||
# swept bangs, a slim tiara, gem earrings and the green cross-shaped Core Crystal.
|
||||
"costume": "a glowing green cross-shaped crystal set into the sternum, a fitted "
|
||||
"black-and-red bodysuit top with gold trim, short red shorts, red "
|
||||
"thigh-high stockings, black fingerless gloves, a slim gold tiara and "
|
||||
"gem drop earrings",
|
||||
"eyes": "crimson",
|
||||
"signature": {"hair_color": "bright red", "hair_length": "chin length bob",
|
||||
"hair_style": "side-swept bangs"},
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair"},
|
||||
"costumes": [
|
||||
{ # Mythra -- alternate Aegis form
|
||||
"costume": "a white-and-gold armored bodysuit with a glowing yellow crystal "
|
||||
"set into the sternum, blue-and-silver accents along the limbs, "
|
||||
"a short pleated skirt over gilded hip plates, and thigh-high "
|
||||
"white boots",
|
||||
"signature": {"hair_color": "golden blonde", "hair_length": "long",
|
||||
"hair_style": "braided ponytail", "eye_color": "golden brown"},
|
||||
"costume": "a glowing green cross-shaped crystal set into the chest through "
|
||||
"a diamond-shaped cutout, a short white sleeveless dress with gold "
|
||||
"trim, white elbow-length gloves, a strap around one thigh, white "
|
||||
"thigh-high boots, a slim gold tiara and gem drop earrings",
|
||||
"eyes": "golden",
|
||||
"signature": {"hair_color": "golden blonde", "hair_length": "hip length",
|
||||
"hair_style": "side-swept bangs"},
|
||||
},
|
||||
],
|
||||
"aliases": ["Mythra"],
|
||||
},
|
||||
"Adam Smasher": {
|
||||
"franchise": "Cyberpunk 2077",
|
||||
@@ -27524,6 +27531,405 @@ COSPLAYERS: dict[str, dict] = {
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair",
|
||||
"age": "18"},
|
||||
},
|
||||
# --- 2.7.0: roster batch (iconic, adult, distinct-silhouette names; canon checked
|
||||
# against Danbooru tag co-occurrence and the series wikis). --------------------
|
||||
"Sheena Fujibayashi": {
|
||||
# Her three looks (Default, "Queen of the Beach", "You Look Great"). Danbooru has
|
||||
# 21 purple_kimono posts to 0 blue, so the kimono is purple.
|
||||
"franchise": "Tales series",
|
||||
"gender": "Female",
|
||||
"costume": "a short purple kimono-style ninja top over a white bustier and a black "
|
||||
"undershirt, detached purple sleeves, a wide pink obi sash tied in a "
|
||||
"large bow at the back, black fingerless gloves, close-fitting black "
|
||||
"pants and dark boots, with a pink ribbon tying the ponytail",
|
||||
"costumes": [
|
||||
# "Queen of the Beach" title costume.
|
||||
"a red one-piece swimsuit with criss-cross lacing down the front, a black "
|
||||
"choker, silver crescent-moon earrings, a single silver bracelet, an anklet "
|
||||
"and red sandals, with sunglasses pushed up on the head",
|
||||
{ # "You Look Great" title costume (hair up in a bun).
|
||||
"costume": "a purple harem-dancer outfit with a jewelled cropped top and a "
|
||||
"short skirt trailing long coattails, a gold neck ring, a single "
|
||||
"gold armlet, gold bangles and gold earrings, black thigh-high "
|
||||
"stockings and purple slippers, with a gold clip in the hair",
|
||||
"signature": {"hair_color": "jet black", "hair_length": "shoulder length",
|
||||
"hair_style": "braided bun", "eye_color": "medium brown"},
|
||||
},
|
||||
],
|
||||
"signature": {"hair_color": "jet black", "hair_length": "mid back",
|
||||
"hair_style": "high ponytail", "eye_color": "medium brown"},
|
||||
"physique": {"body_type": "hourglass", "height": "average height",
|
||||
"skin_tone": "fair", "age": "19"},
|
||||
"prop": "a fan of white paper ofuda charm cards inked with red seals",
|
||||
"aliases": ["Shihna Fujibayashi", "Tales of Symphonia"],
|
||||
},
|
||||
"Kula Diamond": {
|
||||
"franchise": "The King of Fighters",
|
||||
"gender": "Female",
|
||||
"costume": "a skintight purple zip-front bodysuit, a cropped red leather jacket, "
|
||||
"leather chaps over the legs, a belt with a gold buckle, red fingerless "
|
||||
"gloves and boots",
|
||||
"eyes": "crimson",
|
||||
"signature": {"hair_color": "electric blue", "hair_length": "waist length",
|
||||
"hair_texture": "sleek straight", "hair_style": "blunt bangs"},
|
||||
"physique": {"body_type": "petite and slim", "height": "short",
|
||||
"skin_tone": "very pale", "age": "18"},
|
||||
"prop": "a swirled lollipop",
|
||||
},
|
||||
"Parasoul": {
|
||||
"franchise": "Skullgirls",
|
||||
"gender": "Female",
|
||||
"costume": "a short black turtleneck sweater dress with long sleeves, a silver "
|
||||
"cross pendant necklace, white gloves, black thigh-high stockings and "
|
||||
"black heels",
|
||||
"eyes": "golden yellow",
|
||||
"signature": {"hair_color": "bright red", "hair_length": "hip length",
|
||||
"hair_texture": "sleek straight", "hair_style": "side-swept bangs"},
|
||||
"physique": {"body_type": "hourglass", "height": "tall", "skin_tone": "fair",
|
||||
"age": "22"},
|
||||
"prop": "a long closed black umbrella",
|
||||
"aliases": ["Krieg"],
|
||||
},
|
||||
"Cerebella": {
|
||||
"franchise": "Skullgirls",
|
||||
"gender": "Female",
|
||||
# Vice-Versa (the living hat) is the whole read; the arms are a render risk.
|
||||
"costume": "a huge living hat with a skull emblem on the front and two enormous "
|
||||
"muscular arms growing from its sides, a short strapless dress with "
|
||||
"detached sleeves, black-and-white argyle thigh-high stockings, pointed "
|
||||
"thigh-high boots and a small white mark under one eye",
|
||||
"signature": {"hair_color": "teal", "hair_length": "ear length",
|
||||
"eye_color": "emerald"},
|
||||
"physique": {"body_type": "voluptuous", "height": "tall", "skin_tone": "warm brown",
|
||||
"age": "22"},
|
||||
"aliases": ["Vice-Versa"],
|
||||
},
|
||||
"Miriam (Bloodstained)": {
|
||||
"franchise": "Bloodstained",
|
||||
"gender": "Female",
|
||||
"costume": "glowing stained-glass rose tattoos across the chest, one shoulder and "
|
||||
"one thigh, a short dark blue frilled dress with a low neckline and a "
|
||||
"black corset waist, a single long blue detached sleeve on one arm and "
|
||||
"a black armored gauntlet on the other, and black knee boots",
|
||||
"signature": {"hair_color": "jet black", "hair_length": "jaw length",
|
||||
"hair_style": "natural and unstyled", "eye_color": "bright blue"},
|
||||
"physique": {"body_type": "slim", "height": "average height",
|
||||
"skin_tone": "very pale", "age": "20"},
|
||||
"prop": "a slim longsword",
|
||||
"aliases": ["Miriam", "Bloodstained: Ritual of the Night"],
|
||||
},
|
||||
"Mina Ashido": {
|
||||
"franchise": "My Hero Academia",
|
||||
"gender": "Female",
|
||||
"costume": "smooth, flawless pink skin, two short curved yellow horns, a white "
|
||||
"domino mask, a skintight sleeveless bodysuit in a teal and purple "
|
||||
"camouflage pattern, an open tan vest trimmed with white fur, and "
|
||||
"purple and tan boots",
|
||||
"eyes": "bright yellow irises on black sclera",
|
||||
"signature": {"hair_color": "baby pink", "hair_length": "ear length",
|
||||
"hair_texture": "curly", "hair_style": "natural and unstyled"},
|
||||
"physique": {"body_type": "athletic", "height": "average height", "age": "18"},
|
||||
"aliases": ["Pinky", "Alien Queen"],
|
||||
},
|
||||
"Alisa Bosconovitch": {
|
||||
"franchise": "Tekken",
|
||||
"gender": "Female",
|
||||
"costume": "a fitted purple dress fading to violet with a high white collar and a "
|
||||
"blue rose brooch, an asymmetrical ruffled skirt, detached purple "
|
||||
"sleeves, white gloves, mismatched dark stockings, white heeled boots, "
|
||||
"a white flower hairpiece, and folded metallic mechanical wings at "
|
||||
"the back",
|
||||
"eyes": "bright green",
|
||||
"signature": {"hair_color": "baby pink", "hair_length": "chin length bob",
|
||||
"hair_texture": "sleek straight", "hair_style": "natural and unstyled"},
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair",
|
||||
"age": "19"},
|
||||
"aliases": ["Alisa Boskonovich"],
|
||||
},
|
||||
"Beatrix (Final Fantasy)": {
|
||||
"franchise": "Final Fantasy",
|
||||
"gender": "Female",
|
||||
"costume": "an eyepatch over the right eye, a long open red coat over a sleeveless "
|
||||
"white top, silver shoulder armor and plate gauntlets, grey fingerless "
|
||||
"gloves, a loose brown belt with a large gold buckle slung at the hips, "
|
||||
"tights and tall silver armored boots",
|
||||
"signature": {"hair_color": "chestnut", "hair_length": "mid back",
|
||||
"hair_texture": "thick and voluminous", "hair_style": "worn down",
|
||||
"eye_color": "medium brown"},
|
||||
"physique": {"body_type": "athletic", "height": "tall", "skin_tone": "fair",
|
||||
"age": "28"},
|
||||
"prop": "Save the Queen, a long ornate broadsword",
|
||||
"aliases": ["Beatrix", "General Beatrix"],
|
||||
},
|
||||
"Evie Frye": {
|
||||
"franchise": "Assassin's Creed",
|
||||
"gender": "Female",
|
||||
"costume": "a fitted charcoal-black Victorian frock coat with a deep hood and "
|
||||
"crimson-lined coat tails, a dark waistcoat over a white collared shirt, "
|
||||
"black trousers, knee-high laced leather boots and a leather bracer on "
|
||||
"the left forearm",
|
||||
"signature": {"hair_color": "chestnut", "hair_length": "mid back",
|
||||
"hair_style": "braided bun", "eye_color": "hazel",
|
||||
"freckles_density": "scattered"},
|
||||
"physique": {"body_type": "lean", "height": "average height", "skin_tone": "fair",
|
||||
"age": "20"},
|
||||
"aliases": ["Assassin's Creed Syndicate"],
|
||||
},
|
||||
"Velvet Crowe": {
|
||||
"franchise": "Tales series",
|
||||
"gender": "Female",
|
||||
# The bandaged daemon arm leads: it is the one thing the rest of the look
|
||||
# (black rags, shorts, torn stockings) cannot carry alone.
|
||||
"costume": "a left arm wrapped from shoulder to fingertips in grimy white "
|
||||
"bandages, a long tattered black coat with a high collar and a ragged "
|
||||
"torn hem, a scrap of red top bound across the chest with black belts "
|
||||
"and straps, a single armored gauntlet on the right forearm, black "
|
||||
"shorts, torn black thigh-high stockings, armored black boots and a "
|
||||
"black choker",
|
||||
"eyes": "golden",
|
||||
"signature": {"hair_color": "jet black", "hair_length": "waist length",
|
||||
"hair_style": "worn down"},
|
||||
"physique": {"body_type": "athletic", "height": "average height",
|
||||
"skin_tone": "fair", "age": "19"},
|
||||
"aliases": ["Tales of Berseria"],
|
||||
},
|
||||
"Judith (Tales)": {
|
||||
"franchise": "Tales series",
|
||||
"gender": "Female",
|
||||
"costume": "two long antenna-like feelers sweeping back from the head and pointed "
|
||||
"elf ears, a blue halter top trimmed in yellow with white detached "
|
||||
"sleeves and a high white collar, a bare midriff, a blue loincloth-style "
|
||||
"front panel over a short white waist cape, white gloves, a strap around "
|
||||
"one thigh and blue knee-high boots",
|
||||
"signature": {"hair_color": "navy blue", "hair_length": "waist length",
|
||||
"hair_style": "low ponytail"},
|
||||
"physique": {"body_type": "hourglass", "height": "tall", "skin_tone": "fair",
|
||||
"age": "19"},
|
||||
"prop": "a long spear with a slender curved blade",
|
||||
"aliases": ["Judith", "Tales of Vesperia"],
|
||||
},
|
||||
"Seras Victoria": {
|
||||
"franchise": "Hellsing",
|
||||
"gender": "Female",
|
||||
"costume": "a mustard-yellow Hellsing military uniform: a fitted short-sleeved "
|
||||
"jacket with breast pockets and a matching short pencil skirt, a black "
|
||||
"belt, brown gloves, white thigh-high stockings and brown fold-down "
|
||||
"ankle boots",
|
||||
"eyes": "crimson",
|
||||
"signature": {"hair_color": "golden blonde", "hair_length": "jaw length",
|
||||
"hair_style": "natural and unstyled"},
|
||||
"physique": {"body_type": "curvy", "height": "average height",
|
||||
"skin_tone": "fair", "age": "19"},
|
||||
"prop": "the Harkonnen, a massive 30mm anti-midian cannon with a long black "
|
||||
"barrel and a boxy receiver, braced on one shoulder",
|
||||
"aliases": ["Police Girl"],
|
||||
},
|
||||
"Integra Hellsing": {
|
||||
"franchise": "Hellsing",
|
||||
"gender": "Female",
|
||||
"costume": "a dark green tailored three-piece suit with a long jacket, a red ascot "
|
||||
"at the throat fastened with a small silver cross, white gloves, black "
|
||||
"dress shoes and round wire-rimmed glasses",
|
||||
"signature": {"hair_color": "platinum blonde", "hair_length": "hip length",
|
||||
"hair_style": "worn down", "eye_color": "bright blue"},
|
||||
"physique": {"body_type": "slender", "height": "tall", "skin_tone": "tan",
|
||||
"age": "22"},
|
||||
"aliases": ["Sir Integral Fairbrook Wingates Hellsing"],
|
||||
},
|
||||
"Rinoa Heartilly": {
|
||||
"franchise": "Final Fantasy",
|
||||
"gender": "Female",
|
||||
"costume": "a long sleeveless powder-blue knit duster with white angel-wing designs "
|
||||
"on the back, a black sleeveless top, blue arm warmers tied with black "
|
||||
"ribbons, a short navy blue skirt over black bike shorts, dark ankle boots "
|
||||
"and two silver rings worn on a chain necklace",
|
||||
"signature": {"hair_color": "near black", "hair_length": "slightly past shoulders",
|
||||
"hair_style": "worn down", "eye_color": "dark brown"},
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair",
|
||||
"age": "18"},
|
||||
},
|
||||
"Y'shtola Rhul": {
|
||||
"franchise": "Final Fantasy",
|
||||
"gender": "Female",
|
||||
"costume": "a pair of white cat ears atop the head and a long white cat tail, dark "
|
||||
"whisker-like markings striped across both cheeks, a long black "
|
||||
"sorceress's dress trimmed with white fur at the collar and cuffs, a "
|
||||
"black choker, a black feather ornament tucked into the hair and black "
|
||||
"boots",
|
||||
"eyes": "pale milky gray",
|
||||
"signature": {"hair_color": "white", "hair_length": "chin length bob",
|
||||
"hair_style": "blunt bangs"},
|
||||
"physique": {"body_type": "petite and slim", "height": "petite",
|
||||
"skin_tone": "warm tan", "age": "25"},
|
||||
"aliases": ["Yshtola", "Final Fantasy XIV"],
|
||||
},
|
||||
"Lunafreya Nox Fleuret": {
|
||||
"franchise": "Final Fantasy",
|
||||
"gender": "Female",
|
||||
"costume": "a long white sleeveless gown with a fitted lace bodice and a softly "
|
||||
"flared floor-length skirt, a delicate silver necklace and white heels, "
|
||||
"with a small blue sylleblossom flower pinned in the hair",
|
||||
"signature": {"hair_color": "golden blonde", "hair_length": "mid back",
|
||||
"hair_style": "crown braid", "eye_color": "bright blue"},
|
||||
"physique": {"body_type": "slender", "height": "average height",
|
||||
"skin_tone": "fair", "age": "25"},
|
||||
"prop": "the Trident of the Oracle, a slender silver trident with an ornate "
|
||||
"gilded head",
|
||||
"aliases": ["Luna", "Final Fantasy XV"],
|
||||
},
|
||||
"Cindy Aurum": {
|
||||
"franchise": "Final Fantasy",
|
||||
"gender": "Female",
|
||||
"costume": "a red baseball cap with mechanic's goggles slung around the neck, a "
|
||||
"cropped yellow mechanic's jacket worn open with the sleeves pushed up "
|
||||
"over a black bikini-style crop top, frayed denim short shorts with a "
|
||||
"leather tool belt, black work gloves, black thigh-high stockings, "
|
||||
"brown work boots and smudges of engine grease on the cheeks",
|
||||
"signature": {"hair_color": "light blonde", "hair_length": "jaw length",
|
||||
"hair_texture": "loosely wavy", "eye_color": "green"},
|
||||
"physique": {"body_type": "curvy", "height": "average height", "skin_tone": "fair",
|
||||
"age": "22"},
|
||||
"prop": "a large chrome adjustable wrench",
|
||||
"aliases": ["Final Fantasy XV"],
|
||||
},
|
||||
"The Boss": {
|
||||
"franchise": "Metal Gear",
|
||||
"gender": "Female",
|
||||
"costume": "an off-white skintight sneaking suit zipped up the front, a black "
|
||||
"tactical belt with pouches, black combat gloves and black boots",
|
||||
"signature": {"hair_color": "platinum blonde", "hair_length": "jaw length",
|
||||
"hair_texture": "loosely wavy", "eye_color": "pale blue"},
|
||||
"physique": {"body_type": "athletic", "height": "tall", "skin_tone": "fair",
|
||||
"age": "43"},
|
||||
"prop": "the Patriot, a compact short-barreled assault rifle with a drum "
|
||||
"magazine",
|
||||
"aliases": ["Metal Gear Solid 3"],
|
||||
},
|
||||
"EVA (Metal Gear)": {
|
||||
"franchise": "Metal Gear",
|
||||
"gender": "Female",
|
||||
"costume": "a black leather motorcycle jumpsuit unzipped to the sternum over a "
|
||||
"black bra, motorcycle goggles slung around the neck, black leather "
|
||||
"gloves and black boots",
|
||||
"signature": {"hair_color": "golden blonde", "hair_length": "shoulder length",
|
||||
"hair_style": "worn down", "eye_color": "bright blue"},
|
||||
"physique": {"body_type": "curvy", "height": "average height", "skin_tone": "fair",
|
||||
"age": "30"},
|
||||
"prop": "a Mauser C96 broomhandle pistol",
|
||||
"aliases": ["Eva", "Metal Gear Solid 3"],
|
||||
},
|
||||
"KOS-MOS": {
|
||||
"franchise": "Xenosaga",
|
||||
"gender": "Female",
|
||||
"costume": "a sleek white-and-blue android combat body with a high-cut white "
|
||||
"leotard-style chassis, segmented metallic joints at the shoulders and "
|
||||
"hips, white armored elbow-length gloves, white armored thigh-high boots "
|
||||
"with garter-strap fittings, and a slim metallic headband with a forehead "
|
||||
"plate and swept-back side fins",
|
||||
"eyes": "crimson",
|
||||
"signature": {"hair_color": "electric blue", "hair_length": "hip length",
|
||||
"hair_style": "worn down"},
|
||||
"physique": {"body_type": "slender", "height": "tall", "skin_tone": "porcelain",
|
||||
"age": "22"},
|
||||
},
|
||||
"Perona": {
|
||||
"franchise": "One Piece",
|
||||
"gender": "Female",
|
||||
"costume": "a strapless black gothic-lolita dress with a full frilled skirt and "
|
||||
"lace trim, a short red capelet over the shoulders, black-and-white "
|
||||
"striped stockings, black boots and a small black crown perched atop "
|
||||
"the head",
|
||||
"eyes": "nearly black",
|
||||
"signature": {"hair_color": "hot pink", "hair_length": "hip length",
|
||||
"hair_style": "curled pigtails"},
|
||||
"physique": {"body_type": "petite and slim", "height": "petite",
|
||||
"skin_tone": "fair", "age": "25"},
|
||||
"prop": "a pink frilled parasol",
|
||||
"aliases": ["Ghost Princess"],
|
||||
},
|
||||
"Celestia Ludenberg": {
|
||||
"franchise": "Danganronpa",
|
||||
"gender": "Female",
|
||||
"costume": "a black gothic-lolita outfit: a frilled black jacket over a white "
|
||||
"collared blouse, a red necktie, a layered frilled black skirt, black "
|
||||
"thigh-high stockings and black lace-up shoes, a black lace-trimmed "
|
||||
"bonnet headdress, and a silver claw ring on one index finger",
|
||||
"eyes": "crimson",
|
||||
"signature": {"hair_color": "jet black", "hair_length": "waist length",
|
||||
"hair_style": "curled pigtails"},
|
||||
"physique": {"body_type": "slim", "height": "average height",
|
||||
"skin_tone": "porcelain", "age": "18"},
|
||||
"prop": "a fanned hand of playing cards",
|
||||
"aliases": ["Celeste", "Taeko Yasuhiro"],
|
||||
},
|
||||
"Hitori Gotoh": {
|
||||
"franchise": "Bocchi the Rock!",
|
||||
"gender": "Female",
|
||||
"costume": "a baggy pink track jacket zipped up with the sleeves pulled over the "
|
||||
"hands, a short black pleated school skirt, and two cube-shaped hair "
|
||||
"clips, one yellow and one blue, on one side of the head",
|
||||
"signature": {"hair_color": "baby pink", "hair_length": "hip length",
|
||||
"hair_style": "worn down", "eye_color": "bright blue"},
|
||||
"physique": {"body_type": "slim", "height": "short", "skin_tone": "fair",
|
||||
"age": "18"},
|
||||
"prop": "a black Gibson Les Paul Custom electric guitar with gold hardware",
|
||||
"aliases": ["Bocchi"],
|
||||
},
|
||||
"Chisato Nishikigi": {
|
||||
"franchise": "Lycoris Recoil",
|
||||
"gender": "Female",
|
||||
"costume": "a red-and-grey Lycoris uniform: a long-sleeved red pleated dress with "
|
||||
"a pale grey bib panel over a white collared shirt, a red neck ribbon, a "
|
||||
"red belt, black socks and brown loafers, with a red ribbon tied in the "
|
||||
"hair on one side",
|
||||
"eyes": "crimson",
|
||||
"signature": {"hair_color": "light blonde", "hair_length": "chin length bob",
|
||||
"hair_style": "natural and unstyled"},
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair",
|
||||
"age": "18"},
|
||||
},
|
||||
"Tira": {
|
||||
"franchise": "Soul Calibur",
|
||||
"gender": "Female",
|
||||
"costume": "a tattered green-and-black outfit of torn rags with feathered fringes "
|
||||
"at the shoulders and hips, a ragged cropped top, black elbow gloves "
|
||||
"under armored gauntlets, crossed belts and suspenders, black thigh-high "
|
||||
"boots, green lipstick and a beauty mark under one eye",
|
||||
"eyes": "violet",
|
||||
"signature": {"hair_color": "teal", "hair_length": "jaw length",
|
||||
"hair_style": "high pigtails"},
|
||||
"physique": {"body_type": "slender", "height": "petite", "skin_tone": "pale",
|
||||
"age": "19"},
|
||||
"prop": "Eiserne Drossel, a large circular ring blade with a bladed outer edge "
|
||||
"and a grip across its center",
|
||||
},
|
||||
"Gwenpool": {
|
||||
"franchise": "Marvel",
|
||||
"gender": "Female",
|
||||
"costume": "a pink-and-white superhero bodysuit styled after Deadpool's with a "
|
||||
"white hood, white gloves and pink shin guards, a brown utility belt "
|
||||
"hung with pouches, wrist straps and a thigh strap, with the tips of the "
|
||||
"hair dyed pink",
|
||||
"signature": {"hair_color": "light blonde", "hair_length": "chin length bob",
|
||||
"hair_style": "natural and unstyled", "eye_color": "bright blue"},
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair",
|
||||
"age": "19"},
|
||||
"prop": "a katana in each hand",
|
||||
"aliases": ["Gwen Poole"],
|
||||
},
|
||||
"Heather Mason": {
|
||||
"franchise": "Silent Hill",
|
||||
"gender": "Female",
|
||||
"costume": "a white padded sleeveless vest over an orange sleeveless turtleneck, "
|
||||
"a short olive-green pencil skirt, black wristbands and brown knee-high "
|
||||
"boots",
|
||||
"signature": {"hair_color": "light blonde", "hair_length": "jaw length",
|
||||
"hair_style": "natural and unstyled", "eye_color": "light brown"},
|
||||
"physique": {"body_type": "slim", "height": "average height", "skin_tone": "fair",
|
||||
"age": "18"},
|
||||
"prop": "a rusted steel lead pipe",
|
||||
"aliases": ["Silent Hill 3"],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -27557,6 +27963,7 @@ _CATEGORY_FRANCHISES: dict[str, tuple[str, ...]] = {
|
||||
"Hunter x Hunter", "Trigun", "Black Butler", "Yu-Gi-Oh!",
|
||||
"Mobile Suit Gundam", "Solo Leveling",
|
||||
"Inuyasha", "Yu Yu Hakusho", "Ranma 1/2", "Hellsing",
|
||||
"Bocchi the Rock!", "Lycoris Recoil", # 2.7.0
|
||||
"Akira", "Oshi no Ko", # 0.98.0
|
||||
"Urusei Yatsura", "Lupin III", "FLCL",
|
||||
"Durarara!!", "Panty & Stocking with Garterbelt", "Gintama",
|
||||
@@ -27615,6 +28022,7 @@ _CATEGORY_FRANCHISES: dict[str, tuple[str, ...]] = {
|
||||
"Ghost of Tsushima", # 1.11.0
|
||||
"Touhou Project", "Shantae", "BlazBlue", # 2.1.0
|
||||
"Xenoblade Chronicles", "Valkyria Chronicles", "Magic: The Gathering",
|
||||
"Tales series", "Xenosaga", "Skullgirls", "Bloodstained", # 2.7.0
|
||||
"Ace Attorney", "The Rising of the Shield Hero", "A Certain Scientific Railgun",
|
||||
"Destiny", # 1.2.0 -- Mara Sov
|
||||
"Ratchet & Clank", "Spyro",
|
||||
|
||||
@@ -149,6 +149,7 @@ RELEASES: tuple[str, ...] = (
|
||||
"2.1.0",
|
||||
"2.2.0",
|
||||
"2.3.0",
|
||||
"2.7.0",
|
||||
)
|
||||
|
||||
#: Entry name -> the release it first shipped in.
|
||||
@@ -198,6 +199,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Aleta Ogord': "0.69.0",
|
||||
'Alice': "0.6.0",
|
||||
'Alice Nakiri': "0.79.0",
|
||||
'Alisa Bosconovitch': "2.7.0",
|
||||
'Alita': "1.8.0",
|
||||
'All Might': "0.7.0",
|
||||
'Allen the Alien': "0.59.0",
|
||||
@@ -331,6 +333,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Beast (X-Men)': "0.71.1",
|
||||
'Beast Boy': "0.17.0",
|
||||
'Beast Man': "0.17.0",
|
||||
'Beatrix (Final Fantasy)': "2.7.0",
|
||||
'Beerus': "0.16.0",
|
||||
'Beetlejuice': "0.76.0",
|
||||
'Bellatrix Lestrange': "0.16.0",
|
||||
@@ -469,8 +472,10 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Catwoman': "0.6.0",
|
||||
'Cecil Harvey': "0.60.0",
|
||||
'Celes Chere': "0.60.0",
|
||||
'Celestia Ludenberg': "2.7.0",
|
||||
'Cell': "0.16.0",
|
||||
'Celty Sturluson': "1.0.0",
|
||||
'Cerebella': "2.7.0",
|
||||
'Cersei Lannister': "0.90.0",
|
||||
'Cervantes de Leon': "0.58.0",
|
||||
'Cetrion': "0.18.0",
|
||||
@@ -496,6 +501,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Chiaki Nanami': "2.1.0",
|
||||
'Chiana': "0.79.0",
|
||||
'Chief Chirpa': "0.20.0",
|
||||
'Chisato Nishikigi': "2.7.0",
|
||||
'Chizuru Mizuhara': "0.77.0",
|
||||
'Chocobo': "0.95.0",
|
||||
'Chopper': "0.21.0",
|
||||
@@ -508,6 +514,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Ciel Phantomhive': "0.87.0",
|
||||
'Cinder': "1.3.0",
|
||||
'Cinderella': "0.6.0",
|
||||
'Cindy Aurum': "2.7.0",
|
||||
'Circe': "0.18.0",
|
||||
'Ciri': "0.6.0",
|
||||
'Claire Redfield': "0.6.0",
|
||||
@@ -663,6 +670,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Dupli-Kate': "0.59.0",
|
||||
'Duros': "0.21.0",
|
||||
'E. Honda': "0.58.0",
|
||||
'EVA (Metal Gear)': "2.7.0",
|
||||
'EVE (Stellar Blade)': "1.4.0",
|
||||
'Eda Clawthorne': "1.0.0",
|
||||
'Edelgard': "2.1.0",
|
||||
@@ -721,6 +729,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Etrigan the Demon': "0.19.0",
|
||||
'Eureka': "1.0.0",
|
||||
'Evelynn': "0.18.0",
|
||||
'Evie Frye': "2.7.0",
|
||||
'Evil Queen': "0.77.0",
|
||||
'Evil-Lyn': "0.71.0",
|
||||
'Eyedol': "1.3.0",
|
||||
@@ -870,6 +879,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Guy Gardner': "0.22.0",
|
||||
'Gwen (League of Legends)': "0.81.0",
|
||||
'Gwen Tennyson': "0.73.1",
|
||||
'Gwenpool': "2.7.0",
|
||||
'Gyarados': "0.95.0",
|
||||
'Gypsy': "0.18.0",
|
||||
'Hades': "0.16.0",
|
||||
@@ -894,6 +904,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Hawks': "0.77.0",
|
||||
'Hayate': "0.69.0",
|
||||
'He-Man': "0.16.0",
|
||||
'Heather Mason': "2.7.0",
|
||||
'Heavy (Team Fortress 2)': "0.88.0",
|
||||
'Hector Barbossa': "0.77.0",
|
||||
'Hector Rivera': "0.87.0",
|
||||
@@ -921,6 +932,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Hit-Girl': "1.0.0",
|
||||
'Hitagi Senjougahara': "0.77.0",
|
||||
'Hitomi': "0.69.0",
|
||||
'Hitori Gotoh': "2.7.0",
|
||||
'Hoggish Greedly': "0.69.0",
|
||||
'Holli Would': "0.69.0",
|
||||
'Holo': "0.76.0",
|
||||
@@ -963,6 +975,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Ino Yamanaka': "0.74.0",
|
||||
'Inosuke Hashibira': "0.16.0",
|
||||
'Inspector Gadget': "0.76.0",
|
||||
'Integra Hellsing': "2.7.0",
|
||||
'Inuyasha': "0.88.0",
|
||||
'Invincible': "0.16.0",
|
||||
'Invisible Woman': "0.6.0",
|
||||
@@ -1057,6 +1070,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Jubilee': "0.7.0",
|
||||
'Judge Anderson': "0.74.0",
|
||||
'Judge Dredd': "0.16.0",
|
||||
'Judith (Tales)': "2.7.0",
|
||||
'Judy Alvarez': "0.88.0",
|
||||
'Judy Hopps': "0.18.0",
|
||||
'Judy Jetson': "0.18.0",
|
||||
@@ -1073,6 +1087,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Jyn Erso': "0.69.0",
|
||||
"K'": "0.61.0",
|
||||
'K-2SO': "0.21.0",
|
||||
'KOS-MOS': "2.7.0",
|
||||
"Ka D'Argo": "0.79.0",
|
||||
'Kabal': "0.74.0",
|
||||
'Kabuki': "1.0.0",
|
||||
@@ -1162,6 +1177,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Krusty the Clown': "0.77.0",
|
||||
'Krystalin': "0.18.0",
|
||||
'Kuiil': "0.21.0",
|
||||
'Kula Diamond': "2.7.0",
|
||||
'Kung Lao': "0.7.0",
|
||||
'Kurapika': "0.87.0",
|
||||
'Kuromi': "2.1.0",
|
||||
@@ -1278,6 +1294,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Lumine': "1.4.0",
|
||||
'Luna (Sailor Moon)': "0.95.0",
|
||||
'Luna Lovegood': "0.16.0",
|
||||
'Lunafreya Nox Fleuret': "2.7.0",
|
||||
'Lune': "1.0.0",
|
||||
'Lurch': "0.59.0",
|
||||
'Lust': "0.18.0",
|
||||
@@ -1412,6 +1429,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Miles Morales': "1.11.0",
|
||||
'Milim Nava': "0.74.0",
|
||||
'Millia Rage': "0.88.0",
|
||||
'Mina Ashido': "2.7.0",
|
||||
'Minato Namikaze': "0.77.0",
|
||||
'Minerva McGonagall': "0.74.0",
|
||||
'Ming the Merciless': "1.1.0",
|
||||
@@ -1423,6 +1441,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Mirabel Madrigal': "0.88.0",
|
||||
'Mirajane Strauss': "0.77.0",
|
||||
'Miranda Lawson': "0.18.0",
|
||||
'Miriam (Bloodstained)': "2.7.0",
|
||||
'Mirko': "1.0.0",
|
||||
'Misa Amane': "0.16.0",
|
||||
'Misaka Mikoto': "1.0.0",
|
||||
@@ -1591,6 +1610,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Panty Anarchy': "1.0.0",
|
||||
'Papa Smurf': "0.55.0",
|
||||
'Papyrus': "0.98.0",
|
||||
'Parasoul': "2.7.0",
|
||||
'Patrick Star': "0.19.0",
|
||||
'Paul Atreides': "0.87.0",
|
||||
'Paul Bunyan': "0.63.0",
|
||||
@@ -1603,6 +1623,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Peggy Carter': "0.76.0",
|
||||
'Pennywise': "0.16.0",
|
||||
'Peridot': "0.76.0",
|
||||
'Perona': "2.7.0",
|
||||
'Peter Griffin': "0.77.0",
|
||||
'Peter Pan': "0.19.0",
|
||||
'Phantom Lady (Dee Tyler)': "0.45.0",
|
||||
@@ -1742,6 +1763,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Rikuo': "0.59.0",
|
||||
'Rin Tohsaka': "0.16.0",
|
||||
'Rindou Kobayashi': "0.79.0",
|
||||
'Rinoa Heartilly': "2.7.0",
|
||||
'Riptide': "0.57.0",
|
||||
'River Tam': "1.0.0",
|
||||
'Rivet': "1.0.0",
|
||||
@@ -1866,6 +1888,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Seong Mi-na': "0.58.0",
|
||||
'Sephiroth': "0.7.0",
|
||||
'Seraphine': "0.77.0",
|
||||
'Seras Victoria': "2.7.0",
|
||||
'Serena': "0.69.0",
|
||||
'Sersi': "0.69.0",
|
||||
'Serval (Kemono Friends)': "2.1.0",
|
||||
@@ -1887,6 +1910,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'She-Hulk': "0.6.0",
|
||||
'She-Ra': "0.16.0",
|
||||
'Sheena': "0.71.0",
|
||||
'Sheena Fujibayashi': "2.7.0",
|
||||
'Sheeva': "0.18.0",
|
||||
'Shego': "0.69.0",
|
||||
'Sheik': "0.16.0",
|
||||
@@ -2059,6 +2083,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'The 50 Foot Woman': "0.18.0",
|
||||
'The Atom': "0.17.0",
|
||||
'The BFG': "0.53.0",
|
||||
'The Boss': "2.7.0",
|
||||
'The Bride (Beatrix Kiddo)': "0.76.0",
|
||||
'The Cat in the Hat': "0.77.0",
|
||||
'The Comedian': "0.43.0",
|
||||
@@ -2117,6 +2142,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Tina Belcher': "0.76.0",
|
||||
'Tinker Bell': "0.6.0",
|
||||
'Tiny Tina': "0.77.0",
|
||||
'Tira': "2.7.0",
|
||||
'Titania': "0.16.0",
|
||||
'Toad': "0.19.0",
|
||||
'Tohka Yatogami': "0.69.0",
|
||||
@@ -2181,6 +2207,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Vegeta': "0.7.0",
|
||||
'Velma Dinkley': "0.6.0",
|
||||
'Velocity': "0.69.0",
|
||||
'Velvet Crowe': "2.7.0",
|
||||
'Venom': "0.7.0",
|
||||
'Venti': "0.16.0",
|
||||
'Venus (Marvel)': "0.77.0",
|
||||
@@ -2252,6 +2279,7 @@ ADDED_IN: dict[str, dict[str, str]] = {
|
||||
'Xena': "0.6.0",
|
||||
'Xenomorph': "0.16.0",
|
||||
'Xianghua': "0.58.0",
|
||||
"Y'shtola Rhul": "2.7.0",
|
||||
'Yae Miko': "0.74.0",
|
||||
'Yamada Asaemon Sagiri': "0.73.0",
|
||||
'Yamato (One Piece)': "1.5.0",
|
||||
|
||||
+13
-34
@@ -70,7 +70,10 @@ committed docs are stale (suitable for CI / a pre-commit guard).
|
||||
### Sample galleries (`gallery/`)
|
||||
|
||||
Three sibling galleries — `cosplay/`, `archetypes/`, `creatures/` — each publishing a
|
||||
sample render per roster entry to GitHub Pages. Full detail in
|
||||
sample render per roster entry to GitHub Pages, plus `people/` (2.7.0): fixed seeds on the
|
||||
plain node at its defaults, each card showing its seed and prompt. The people samples take
|
||||
no gallery pins (not even the front-facing shot), because a card's seed and gender must
|
||||
reproduce its prompt on a fresh node; pick a seed that draws a usable shot instead. Full detail in
|
||||
[gallery/README.md](../gallery/README.md); the parts that constrain future work:
|
||||
|
||||
- **Images live only on `gh-pages`.** `gallery/.gitignore` blocks `images/` on `main`, so
|
||||
@@ -84,16 +87,16 @@ sample render per roster entry to GitHub Pages. Full detail in
|
||||
- **Publishing uses `git worktree`, not `stash` + `checkout`.** The current working tree
|
||||
is never touched. Deletion requires an explicit `--prune-orphans`, and even then only
|
||||
removes images matching no roster entry at all.
|
||||
- **The three copies are byte-identical outside their docstring and `GALLERY CONFIG`
|
||||
block.** This is copy-and-adapt by design (three independently-published sites, no
|
||||
shared package), so **an improvement to one script must be ported to the other two** —
|
||||
- **The four copies are byte-identical outside their docstring and `GALLERY CONFIG`
|
||||
block.** This is copy-and-adapt by design (independently-published sites, no
|
||||
shared package), so **an improvement to one script must be ported to the others** -
|
||||
`tests/test_gallery.py::CopiesStayInSyncTests` fails until it is. `BatchLauncherTests`
|
||||
guards the `.bat` launchers (every exit pauses, no parenthesised `if` blocks, ASCII
|
||||
only, CRLF via `.gitattributes`).
|
||||
- **The page assets are not copies (2.6.0).** `style.css` and `gallery.js` live once in
|
||||
`gallery/shared/`; each page links `../shared/` and every `publish.py` stages that folder
|
||||
to `gh-pages`. Details in gallery/README.md -> "Editing the page files".
|
||||
- Adding a fourth gallery is a folder copy plus one config block per file; the checklist
|
||||
- Adding another gallery is a folder copy plus one config block per file; the checklist
|
||||
is at the bottom of `gallery/README.md`.
|
||||
|
||||
Pack is **V3 API** (`comfy_api.latest`), category `conditioning/character`, **zero deps**,
|
||||
@@ -220,7 +223,6 @@ and only the first was visible:
|
||||
2. **The identity was not actually fixed.** `index` advances between queues, so a complete set
|
||||
took N queues — and any upstream preset left on `control_after_generate="randomize"`
|
||||
re-rolled the character between them. A "turnaround" of six different people.
|
||||
3. It needed the ComfyUI#11905 NaN signature purely to work around its own `index` widget.
|
||||
|
||||
The rewrite deletes the questions rather than documenting answers, on one line:
|
||||
**Identity Forge owns the character and the scene; the Turnaround owns only the camera.**
|
||||
@@ -236,9 +238,6 @@ The rewrite deletes the questions rather than documenting answers, on one line:
|
||||
negative prompt, model, latent — broadcast off their last element (`slice_dict`). One queue,
|
||||
the whole set, from a single upstream resolution. Which also means an upstream node left on
|
||||
`randomize` is now a *feature*: each queue is one new character × N coherent views.
|
||||
- **No `fingerprint_inputs`.** With no auto-advancing widget and no RNG the node is a pure
|
||||
function of its inputs, so ComfyUI's normal caching is correct — see the counter-example
|
||||
note under "Seeded nodes re-roll every queue".
|
||||
- **`shot_type` is composed, not picked.** That field mixes distance ("full body shot"),
|
||||
orientation ("side profile") and lens in one pool, so a turnaround cannot express both halves
|
||||
by choosing a value. `compose_shot()` emits `"<distance>, <rotation>"`. The free text survives
|
||||
@@ -373,15 +372,12 @@ each of these. The Turnaround shipped its first draft missing the last two.
|
||||
3. `scripts/dump_frontend_fixtures.py` — `_NODE_CLASSES`. The fixture is what the jsdom
|
||||
suite builds fake nodes from, so a node absent from that map has **no** frontend
|
||||
coverage and its `--check` gate silently passes forever.
|
||||
4. `fingerprint_inputs` returning NaN **if** any widget sets `control_after_generate` —
|
||||
see "Seeded nodes re-roll every queue" below. The trigger is the auto-advancing
|
||||
widget, not the presence of a seed.
|
||||
5. A tooltip on **every** input and output. There is no lint for this; the frontend fixture
|
||||
4. A tooltip on **every** input and output. There is no lint for this; the frontend fixture
|
||||
records widget names and defaults, not help text. Since 2.6.0
|
||||
`tests/test_node_contracts.py` walks every class in `nodes/` and checks both tooltips and
|
||||
item 4, so a new node is covered without being listed (the Outfit Sheet had shipped with
|
||||
an auto-advancing `outfit_seed` and no cache buster).
|
||||
6. An example workflow, if the node is meant to be wired by hand: build it in a real
|
||||
`tests/test_node_contracts.py` walks every class in `nodes/` and checks the tooltips, so a
|
||||
new node is covered without being listed. No node needs a cache buster: a seed widget's
|
||||
value is already part of ComfyUI's cache signature (2.7.1).
|
||||
5. An example workflow, if the node is meant to be wired by hand: build it in a real
|
||||
frontend, then `tests/test_example_workflows.py` checks every pack node's
|
||||
`widgets_values` count and combo values against the fixture.
|
||||
|
||||
@@ -2633,16 +2629,6 @@ README gets a short "Using with Stylebook" section mirroring Stylebook's own, an
|
||||
Full preset comes out in tennis whites with a human tone, losing the green. To **layer** a tilt
|
||||
onto a cosplay instead of overwriting it, set the archetype (or cosplayer) to **Essentials** so it
|
||||
emits only the look groups and leaves the rest to flow through.
|
||||
- **Every node with an auto-advancing widget re-executes each queue via `fingerprint_inputs`.**
|
||||
`IdentityForge`, `Archetype`, `Cosplayer` and `Creature` return `float("nan")` from
|
||||
`fingerprint_inputs`, forcing ComfyUI to re-execute them -- otherwise a widget advanced by
|
||||
`control_after_generate` can be served from cache and the output "sticks" (ComfyUI#11905).
|
||||
The trigger is the auto-advancing widget, not the seed as such. Pure cache control (no RNG):
|
||||
a *fixed* seed still reproduces exactly, and identical output keeps expensive downstream nodes
|
||||
cached. **The Turnaround is the counter-example and stays one:** it carries no
|
||||
`control_after_generate` widget and no RNG, so it is a pure function of its inputs and
|
||||
ComfyUI's normal caching is correct for it. It had the NaN signature at 0.98.0 only because
|
||||
its `index` combo auto-advanced; 0.99.0 deleted the widget, so the workaround went with it.
|
||||
- Adding RNG draws in the creature node mid-sequence shifts seed→creature mapping — append draws
|
||||
at the end.
|
||||
- The roster is large (~1300 cosplayers across ~263 franchises, ~195 creatures): always grep
|
||||
@@ -3532,13 +3518,6 @@ that relaxation. This means `random_pool` **stacks** with `random_scope` — "Fr
|
||||
"Mascot suits and beasts only" is a real, correctly-intersected query, not two competing filters
|
||||
that only one of which can win.
|
||||
|
||||
**`fingerprint_inputs` needed no change.** This node's `fingerprint_inputs` already ignores every
|
||||
kwarg and unconditionally returns `float("nan")` — a pre-existing workaround for
|
||||
ComfyUI#11905 that forces a re-roll on every queue regardless of any single field's value. Since
|
||||
caching is already bypassed for every input, there is nothing to add for `random_pool`
|
||||
specifically; the code documents this in a comment rather than a no-op kwargs read that would
|
||||
otherwise look like an oversight to a future reader.
|
||||
|
||||
`_announce_scope` folds `pool` into its cache key and message text, but the default pool
|
||||
(`All characters`) omits the note entirely, so a pre-1.1.0 announcement string is unchanged
|
||||
byte-for-byte — the new widget is additive to the message surface, never a rewording of it.
|
||||
|
||||
@@ -1775,3 +1775,84 @@ the publish run failed with `400 description is too long` (CI on `main` was gree
|
||||
nothing earlier caught it). The description is trimmed, and
|
||||
`AdvertisedCharacterCountTests.test_registry_description_fits` now fails CI before a
|
||||
merge instead. 2.6.1 is the first Registry release carrying the 2.6.0 changes.
|
||||
|
||||
## 2.7.0 - a roster batch, Sheena's three looks, and a people gallery
|
||||
|
||||
**The batch.** A candidate list was compared against the
|
||||
roster by name and franchise. Most of it was gacha and deep-cut entries, or classes the
|
||||
backlog already closes; the shortlist that passed the iconic-and-specific bar shipped:
|
||||
Sheena Fujibayashi, Velvet Crowe, Judith (Tales series), Seras Victoria and Integra
|
||||
Hellsing, Rinoa Heartilly, Y'shtola Rhul, Lunafreya, Cindy Aurum, The Boss and EVA (Metal
|
||||
Gear), KOS-MOS, Perona, Celestia Ludenberg, Hitori Gotoh, Chisato Nishikigi, Tira,
|
||||
Gwenpool and Heather Mason. Visual canon came from Danbooru tag co-occurrence
|
||||
(`related_tag` / `counts`), not memory.
|
||||
|
||||
**Sheena's default kimono is purple, not blue.** The supplied outfit tags said "blue
|
||||
kimono"; Danbooru has the purple tag on her posts and the blue one on none, so the entry
|
||||
follows the posts. Her two alternates are her other title looks: the red beach swimsuit (a
|
||||
string alternate) and the purple harem outfit with the short braided-bun hair (a dict
|
||||
alternate that also moves the hair).
|
||||
|
||||
**Eight more after a canon check.** Kula Diamond, Parasoul, Cerebella, Miriam
|
||||
(Bloodstained), Mina Ashido (hero costume), Alisa Bosconovitch, Beatrix (Final Fantasy) and
|
||||
Evie Frye were held for the maintainer's descriptions, then cross-checked against Danbooru
|
||||
before shipping. The descriptions were wrong in places the tags settle: Parasoul wears a
|
||||
black turtleneck sweater dress and a cross necklace (not a military minidress) and her eyes
|
||||
are tagged yellow over red; Miriam has short dark hair (no braids); Cerebella has dark skin,
|
||||
teal hair and argyle stockings; Kula's bodysuit is purple under a red cropped jacket and
|
||||
chaps. Evie Frye has almost no tagged art, so her entry follows the description. Cerebella's
|
||||
aqua lipstick was dropped because no `lips_makeup` value carries it and a costume clause
|
||||
would contradict the random lip colour. Her living hat's arms did not render at the
|
||||
gallery's enhancer text_scale 1.5 or at 3.0; the 3.0 tile (dark skull hat, harlequin
|
||||
diamonds) is the one kept, and the arms are left as a model limit.
|
||||
|
||||
**No tobacco or drugs.** Integra Hellsing's first tile showed her canonical cigar, which
|
||||
breaks the maintainer's standing rule. Her prop is gone, Popeye's corncob pipe became an
|
||||
open can of spinach and Sherlock Holmes' calabash pipe a brass magnifying glass, and
|
||||
`tests/validate_data.py` now rejects tobacco and drug words in every cosplayer, archetype,
|
||||
creature, slot and field string ("cigarette trousers" stays legal as a garment cut).
|
||||
|
||||
**Nose prose.** A nose value with a trailing clause read "a wide with flared nostrils
|
||||
nose"; the noun now goes before the clause ("a wide nose with flared nostrils"). That is a
|
||||
prose-only change on 157 existing tiles, so they were accepted with
|
||||
`render_gallery.py --rehash` rather than re-rendered.
|
||||
|
||||
**Pyra and Mythra corrected.** Re-sourced while checking the Xenoblade entries: Pyra's
|
||||
costume now leads with the green cross-shaped core crystal and the red-and-black bodysuit,
|
||||
short shorts and thighhighs, with crimson eyes and a short red bob; the Mythra overlay
|
||||
carries the white dress, golden eyes and hip-length blonde hair. `Mythra` is an alias.
|
||||
|
||||
**Alicent Hightower declined.** Her look is a green Westerosi court gown; Cersei's gowns
|
||||
and the Medieval Monarch archetype already cover that silhouette, and the seven-pointed
|
||||
star pendant is too small to carry the character. Lucky Chloe, Kana Arima and Akko Kagari
|
||||
were skipped by the maintainer.
|
||||
|
||||
**The people gallery.** The pack began as a random-person generator, but the galleries only
|
||||
showed roster entries, because an image is filed under an entry name. `gallery/people/`
|
||||
files it under a fixed seed instead: each sample is the plain Identity Forge node at its
|
||||
schema defaults plus a gender, and its card shows the seed and the full prompt with a copy
|
||||
button. The samples ride the existing render gate (`PEOPLE` in `scripts/render_gallery.py`,
|
||||
hashed over the prose like every other tile), so an engine change that moves a seed is
|
||||
reported stale. They deliberately take no gallery pins: the front-facing shot pin would
|
||||
make the card's seed lie about the prompt, so the seeds were scouted to draw front-facing,
|
||||
body-showing framings instead.
|
||||
|
||||
A "same seed, one lock changed" row was considered and dropped: locking an early-drawn
|
||||
field (age) re-rolls nearly everything after it, so the pair would show two different
|
||||
people and teach the wrong thing. A late field (the location setting) does keep the
|
||||
person, which is worth a note in the usage docs if the row is ever wanted.
|
||||
|
||||
## 2.7.1 - downstream nodes cache again
|
||||
|
||||
Contributed by sobakasu in PR #20. The seeded nodes (Identity Forge, Archetype, Cosplayer,
|
||||
Creature), the Outfit Sheet and a random Vault Load pick returned `float("nan")` from
|
||||
`fingerprint_inputs` as a workaround for ComfyUI#11905. That was wrong: ComfyUI builds a
|
||||
node's cache key from every ancestor's fingerprint (`comfy_execution/caching.py`,
|
||||
`get_node_signature`), and NaN never equals itself, so the sampler, VAE decode and everything
|
||||
else downstream re-ran on every queue even with a fixed seed. The old comment claiming identical
|
||||
output kept downstream cached described a cache ComfyUI does not have. A seed value is already
|
||||
part of the key, so an auto-advanced seed re-runs the node without any override.
|
||||
|
||||
Vault Load keeps a fingerprint, now `(picked entry, its mtime+size)` for a random pick too, so a
|
||||
save or delete that moves the pick still re-runs. `tests/test_node_contracts.py` now fails any
|
||||
node that returns NaN. Random characters unchanged.
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# Cosplayer reference
|
||||
|
||||
**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.
|
||||
**2187 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 (416)
|
||||
## Anime & Manga (423)
|
||||
|
||||
### Akame ga Kill
|
||||
|
||||
@@ -80,6 +80,10 @@
|
||||
- **Toshiro Hitsugaya** (M, prop)
|
||||
- **Yoruichi** (F)
|
||||
|
||||
### Bocchi the Rock!
|
||||
|
||||
- **Hitori Gotoh** (F, prop)
|
||||
|
||||
### Chainsaw Man
|
||||
|
||||
- **Aki Hayakawa** (M)
|
||||
@@ -108,6 +112,7 @@
|
||||
|
||||
### Danganronpa
|
||||
|
||||
- **Celestia Ludenberg** (F, prop)
|
||||
- **Chiaki Nanami** (F, prop)
|
||||
- **Junko Enoshima** (F)
|
||||
- **Monokuma** (M, tiny, masked)
|
||||
@@ -291,6 +296,8 @@
|
||||
### Hellsing
|
||||
|
||||
- **Alucard (Hellsing)** (M, prop)
|
||||
- **Integra Hellsing** (F)
|
||||
- **Seras Victoria** (F, prop)
|
||||
|
||||
### High School DxD
|
||||
|
||||
@@ -368,6 +375,10 @@
|
||||
|
||||
- **Fujiko Mine** (F)
|
||||
|
||||
### Lycoris Recoil
|
||||
|
||||
- **Chisato Nishikigi** (F)
|
||||
|
||||
### Madoka Magica
|
||||
|
||||
- **Homura Akemi (Devil)** (F)
|
||||
@@ -419,6 +430,7 @@
|
||||
- **Hawks** (M)
|
||||
- **Himiko Toga** (F)
|
||||
- **Midnight (My Hero Academia)** (F, prop)
|
||||
- **Mina Ashido** (F)
|
||||
- **Mirko** (F)
|
||||
- **Momo Yaoyorozu** (F)
|
||||
- **Mt. Lady** (F, giant)
|
||||
@@ -481,6 +493,7 @@
|
||||
- **Monkey D. Luffy** (M)
|
||||
- **Nami** (F)
|
||||
- **Nico Robin** (F)
|
||||
- **Perona** (F, prop)
|
||||
- **Portgas D. Ace** (M)
|
||||
- **Roronoa Zoro** (M, prop)
|
||||
- **Sanji** (M)
|
||||
@@ -1903,7 +1916,7 @@
|
||||
|
||||
- **Zorro** (M, prop)
|
||||
|
||||
## Marvel (196)
|
||||
## Marvel (197)
|
||||
|
||||
### Marvel
|
||||
|
||||
@@ -1964,6 +1977,7 @@
|
||||
- **Gorgon** (M)
|
||||
- **Green Goblin** (M, masked, prop)
|
||||
- **Groot** (M, giant)
|
||||
- **Gwenpool** (F, prop)
|
||||
- **Hawkeye** (M, prop)
|
||||
- **Hela** (F)
|
||||
- **Hellcat** (F)
|
||||
@@ -2822,7 +2836,7 @@
|
||||
- **Zorii Bliss** (F, masked, prop)
|
||||
- **Zuckuss** (M, masked)
|
||||
|
||||
## Video Games (520)
|
||||
## Video Games (539)
|
||||
|
||||
### A Certain Scientific Railgun
|
||||
|
||||
@@ -2846,6 +2860,7 @@
|
||||
|
||||
### Assassin's Creed
|
||||
|
||||
- **Evie Frye** (F)
|
||||
- **Ezio Auditore** (M)
|
||||
- **Kassandra** (F)
|
||||
|
||||
@@ -2886,6 +2901,10 @@
|
||||
|
||||
- **Lady Maria** (F, prop)
|
||||
|
||||
### Bloodstained
|
||||
|
||||
- **Miriam (Bloodstained)** (F, prop)
|
||||
|
||||
### Borderlands
|
||||
|
||||
- **Amara** (F)
|
||||
@@ -3063,19 +3082,23 @@
|
||||
- **Aerith Gainsborough** (F, prop)
|
||||
- **Auron** (M, prop)
|
||||
- **Barret Wallace** (M)
|
||||
- **Beatrix (Final Fantasy)** (F, prop)
|
||||
- **Cactuar** (M, tiny, beast)
|
||||
- **Cecil Harvey** (M)
|
||||
- **Celes Chere** (F)
|
||||
- **Chocobo** (M, beast)
|
||||
- **Cindy Aurum** (F, prop)
|
||||
- **Cloud Strife** (M, prop)
|
||||
- **Fran** (F)
|
||||
- **Kain Highwind** (M, masked, prop)
|
||||
- **Kefka Palazzo** (M)
|
||||
- **Lightning** (F, prop)
|
||||
- **Lulu** (F, prop)
|
||||
- **Lunafreya Nox Fleuret** (F, prop)
|
||||
- **Moogle** (M, tiny, masked)
|
||||
- **Noctis** (M)
|
||||
- **Rikku** (F)
|
||||
- **Rinoa Heartilly** (F)
|
||||
- **Rosa Farrell** (F)
|
||||
- **Rydia** (F)
|
||||
- **Sephiroth** (M, prop)
|
||||
@@ -3087,6 +3110,7 @@
|
||||
- **Ultros** (M, masked)
|
||||
- **Vincent Valentine** (M)
|
||||
- **Vivi Ornitier** (M, masked)
|
||||
- **Y'shtola Rhul** (F)
|
||||
- **Yuffie Kisaragi** (F, prop)
|
||||
- **Yuna** (F, prop)
|
||||
- **Zidane** (M)
|
||||
@@ -3293,8 +3317,10 @@
|
||||
|
||||
### Metal Gear
|
||||
|
||||
- **EVA (Metal Gear)** (F, prop)
|
||||
- **Quiet** (F)
|
||||
- **Solid Snake** (M)
|
||||
- **The Boss** (F, prop)
|
||||
|
||||
### Metroid
|
||||
|
||||
@@ -3439,9 +3465,15 @@
|
||||
|
||||
### Silent Hill
|
||||
|
||||
- **Heather Mason** (F, prop)
|
||||
- **Nurse (Silent Hill)** (F, masked)
|
||||
- **Pyramid Head** (M, masked, prop)
|
||||
|
||||
### Skullgirls
|
||||
|
||||
- **Cerebella** (F)
|
||||
- **Parasoul** (F, prop)
|
||||
|
||||
### Sonic the Hedgehog
|
||||
|
||||
- **Amy Rose** (F, masked, prop)
|
||||
@@ -3464,6 +3496,7 @@
|
||||
- **Siegfried Schtauffen** (M, prop)
|
||||
- **Sophitia Alexandra** (F, prop)
|
||||
- **Taki** (F, prop)
|
||||
- **Tira** (F, prop)
|
||||
- **Voldo** (M, masked, prop)
|
||||
- **Xianghua** (F, prop)
|
||||
- **Yoshimitsu** (M, masked, prop)
|
||||
@@ -3546,6 +3579,12 @@
|
||||
|
||||
- **SHODAN** (F)
|
||||
|
||||
### Tales series
|
||||
|
||||
- **Judith (Tales)** (F, prop)
|
||||
- **Sheena Fujibayashi** (F, +2 alt, prop)
|
||||
- **Velvet Crowe** (F)
|
||||
|
||||
### Team Fortress 2
|
||||
|
||||
- **Demoman (Team Fortress 2)** (M)
|
||||
@@ -3558,6 +3597,7 @@
|
||||
|
||||
### Tekken
|
||||
|
||||
- **Alisa Bosconovitch** (F)
|
||||
- **Anna Williams** (F)
|
||||
- **Asuka Kazama** (F)
|
||||
- **Azucena Ortiz** (F)
|
||||
@@ -3583,6 +3623,7 @@
|
||||
- **Athena Asamiya** (F)
|
||||
- **Iori Yagami** (M)
|
||||
- **K'** (M)
|
||||
- **Kula Diamond** (F, prop)
|
||||
- **Kyo Kusanagi** (M)
|
||||
- **Leona Heidern** (F)
|
||||
- **Mai Shiranui** (F, prop)
|
||||
@@ -3672,6 +3713,10 @@
|
||||
|
||||
- **Pyra** (F, +1 alt)
|
||||
|
||||
### Xenosaga
|
||||
|
||||
- **KOS-MOS** (F)
|
||||
|
||||
### Zenless Zone Zero
|
||||
|
||||
- **Ellen Joe** (F, prop)
|
||||
|
||||
@@ -23,8 +23,6 @@ that is what the Creature node is for.
|
||||
|
||||
## Under consideration
|
||||
|
||||
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
|
||||
`docs/history.md`):
|
||||
@@ -92,6 +90,8 @@ Closed with a reason. Reopen only with a **new** argument, not a repeat of the r
|
||||
|
||||
| Candidate | Why |
|
||||
|---|---|
|
||||
| Alicent Hightower (House of the Dragon) | **Declined at 2.7.0.** A green Westerosi court gown: Cersei's gowns and the Medieval Monarch archetype already cover the silhouette, and the star pendant is too small to carry her. |
|
||||
| Lucky Chloe, Kana Arima, Akko Kagari | **Skipped by the maintainer at 2.7.0.** |
|
||||
| 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. |
|
||||
|
||||
+26
-6
@@ -1,12 +1,13 @@
|
||||
# Sample galleries
|
||||
|
||||
Three sibling galleries, one per preset node:
|
||||
Four sibling galleries, one per preset node plus one for the plain node:
|
||||
|
||||
| Folder | Entries from | Live page |
|
||||
| --- | --- | --- |
|
||||
| [`cosplay/`](cosplay/) | `data/cosplayers.py` | [cosplay gallery](https://enragedantelope.github.io/comfyui-identity-forge/gallery/cosplay/) |
|
||||
| [`archetypes/`](archetypes/) | `data/templates.py` (`ARCHETYPES`) | [archetype gallery](https://enragedantelope.github.io/comfyui-identity-forge/gallery/archetypes/) |
|
||||
| [`creatures/`](creatures/) | `data/creatures.py` (`CREATURES`) | [creature gallery](https://enragedantelope.github.io/comfyui-identity-forge/gallery/creatures/) |
|
||||
| [`people/`](people/) | `PEOPLE` in `scripts/render_gallery.py` | [people gallery](https://enragedantelope.github.io/comfyui-identity-forge/gallery/people/) |
|
||||
|
||||
**Images live only on the `gh-pages` branch.** `gallery/.gitignore` blocks `images/`
|
||||
on `main`, so cloning or pulling the repo never drags down hundreds of megabytes of
|
||||
@@ -24,6 +25,23 @@ python gallery/cosplay/build_manifest.py --images gallery/cosplay/images
|
||||
|
||||
---
|
||||
|
||||
## The people gallery (2.7.0)
|
||||
|
||||
The original point of the pack is random people, and the roster galleries cannot show
|
||||
them: a person has no name to file the image under. So each sample is a **fixed seed** on
|
||||
the plain Identity Forge node, with no preset node and every widget at its schema default
|
||||
except the gender. Its card shows the seed and gender, and the full prompt the node wrote
|
||||
with a copy button, so a viewer can reproduce the prompt exactly on a fresh node. The
|
||||
seeds were scouted so the set spans gender, age, outfit style and indoor/outdoor places.
|
||||
|
||||
The samples go through the same render gate as the roster: `render_gallery.py` resolves
|
||||
them in-process, hashes the prose, and `--check` reports a sample stale when an engine
|
||||
change moves what its seed draws. Re-render it, or pick a new seed if the spread suffers.
|
||||
The page needs no release stamps (a seed is not a roster entry; the sort controls stay
|
||||
hidden) and ships no cycle workflow (the card carries everything needed).
|
||||
|
||||
---
|
||||
|
||||
## Publishing
|
||||
|
||||
Double-click `update_gallery.bat` in the gallery you want, or drag a folder of images
|
||||
@@ -77,7 +95,7 @@ is the right failure mode — it has no image on `gh-pages` either.
|
||||
`gallery.js` and `style.css` exist once, in `gallery/shared/` (2.6.0; they used to be three
|
||||
copies). Each `index.html` links `../shared/`, and every `publish.py` stages that folder to
|
||||
`gallery/shared/` on `gh-pages` beside its own page, so a fix lands once and any gallery's
|
||||
publish ships it to all three. `SharedPageAssetsTests` in `tests/test_gallery.py` fails if a
|
||||
publish ships it to every gallery. `SharedPageAssetsTests` in `tests/test_gallery.py` fails if a
|
||||
per-gallery copy comes back. It also checks that every `$('#id')` the script reaches for exists
|
||||
in each gallery's `index.html` - a lookup returning `null` is how the "Clear search" button sat
|
||||
dead for several releases without anyone noticing.
|
||||
@@ -114,13 +132,13 @@ python gallery/cosplay/cross_reference.py # what still needs an image, what
|
||||
|
||||
---
|
||||
|
||||
## Three copies, deliberately
|
||||
## Four copies, deliberately
|
||||
|
||||
Each gallery owns its scripts rather than importing a shared package. The four Python
|
||||
files are **byte-identical outside their docstring and their `GALLERY CONFIG` block** —
|
||||
that block is where the data module, the roster accessor and the page file list live.
|
||||
|
||||
**If you fix a bug or make an improvement in one, port it to the other two.**
|
||||
**If you fix a bug or make an improvement in one, port it to the other three.**
|
||||
`tests/test_gallery.py::CopiesStayInSyncTests` enforces this: it strips the docstring
|
||||
and config block, neutralises the gallery name, and fails if the remaining code differs.
|
||||
You cannot land a one-gallery fix by accident.
|
||||
@@ -131,12 +149,14 @@ parenthesised `if` blocks, ASCII only, and CRLF enforced by `.gitattributes`.
|
||||
|
||||
---
|
||||
|
||||
## Adding a fourth gallery
|
||||
## Adding another gallery
|
||||
|
||||
1. Copy a gallery folder wholesale.
|
||||
2. Edit only the `GALLERY CONFIG` block in each of the four `.py` files: `GALLERY_KIND`,
|
||||
the data import, `entry_names()`, `entry_meta()`, and `PAGE_FILES`.
|
||||
3. Update the title, subtitle and search placeholder in `index.html`.
|
||||
4. Add the new kind to `KINDS` in `tests/test_gallery.py`.
|
||||
4. Add the new kind to `KINDS` in `tests/test_gallery.py` (and to `ROSTER_KINDS` if it
|
||||
is built from a stamped roster with a downloadable workflow), and to `KINDS` and
|
||||
`entries_for()` in `scripts/render_gallery.py`.
|
||||
5. Run `python gallery/<kind>/cross_reference.py` — it should list every entry as
|
||||
missing. That is the empty gallery, ready for its first publish.
|
||||
|
||||
@@ -9,10 +9,10 @@ the gh-pages checkout, so the normal workflow never needs this script directly.
|
||||
Use it when you want a local optimized copy without publishing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
gallery/archetypes/ - gallery/archetypes/ - gallery/creatures/
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -33,7 +33,7 @@ except ImportError: # pragma: no cover - exercised by the dependency-free CI ru
|
||||
|
||||
PILLOW_HINT = "Pillow is required to optimize images. Install it: pip install Pillow"
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "archetypes"
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
python gallery/archetypes/build_manifest.py --images <dir>
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/build_manifest.py - gallery/archetypes/build_manifest.py -
|
||||
gallery/creatures/build_manifest.py
|
||||
gallery/creatures/build_manifest.py - gallery/people/build_manifest.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
``publish.py`` calls this against the images that are actually on ``gh-pages``,
|
||||
@@ -28,7 +28,7 @@ from pathlib import Path
|
||||
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.insert(0, REPO_ROOT)
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "archetypes"
|
||||
#: This gallery's key in ``data/versions.py`` (written by
|
||||
#: ``scripts/stamp_versions.py``). Differs from GALLERY_KIND for cosplay,
|
||||
|
||||
@@ -7,10 +7,10 @@ Read-only. Writes ``missing.txt`` / ``orphans.txt`` beside this script (both
|
||||
git-ignored) and prints a summary. Deletes nothing, publishes nothing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
gallery/archetypes/ - gallery/archetypes/ - gallery/creatures/
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -23,7 +23,7 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "archetypes"
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
python gallery/archetypes/publish.py --source <dir> --dry-run # report, change nothing
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/publish.py - gallery/archetypes/publish.py -
|
||||
gallery/creatures/publish.py
|
||||
gallery/creatures/publish.py - gallery/people/publish.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
THE SAFETY MODEL, which is the whole point of this script:
|
||||
@@ -45,7 +45,7 @@ REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.insert(0, str(REPO_ROOT))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG — the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "archetypes"
|
||||
GALLERY_TITLE = "themed archetype"
|
||||
PAGE_FILES = ["index.html", "Krea2_IdentityForge_ArchetypeCycle.json"]
|
||||
@@ -55,7 +55,7 @@ from build_manifest import entry_names, generate_manifest, normalize_name # noq
|
||||
from build_gallery_images import optimize_image # noqa: E402
|
||||
|
||||
GALLERY_SRC_DIR = Path(__file__).resolve().parent
|
||||
#: 2.6.0: the page assets all three galleries share, published to gallery/shared/.
|
||||
#: 2.6.0: the page assets every gallery shares, published to gallery/shared/.
|
||||
SHARED_SRC_DIR = GALLERY_SRC_DIR.parent / "shared"
|
||||
SHARED_FILES = ["style.css", "gallery.js"]
|
||||
SHARED_REL_DIR = "gallery/shared"
|
||||
|
||||
@@ -8,8 +8,8 @@ REM
|
||||
REM Entries you do NOT supply an image for are left completely alone.
|
||||
REM Nothing is ever deleted by this script.
|
||||
REM
|
||||
REM ONE OF THREE NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures).
|
||||
REM Fix a bug here and apply it to the other two - see gallery\README.md.
|
||||
REM ONE OF FOUR NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures / people).
|
||||
REM Fix a bug here and apply it to the other three - see gallery\README.md.
|
||||
REM ==========================================================================
|
||||
setlocal
|
||||
set "GALLERY=archetypes"
|
||||
|
||||
@@ -9,10 +9,10 @@ the gh-pages checkout, so the normal workflow never needs this script directly.
|
||||
Use it when you want a local optimized copy without publishing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -33,7 +33,7 @@ except ImportError: # pragma: no cover - exercised by the dependency-free CI ru
|
||||
|
||||
PILLOW_HINT = "Pillow is required to optimize images. Install it: pip install Pillow"
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "cosplay"
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
python gallery/cosplay/build_manifest.py --images <dir>
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/build_manifest.py - gallery/archetypes/build_manifest.py -
|
||||
gallery/creatures/build_manifest.py
|
||||
gallery/creatures/build_manifest.py - gallery/people/build_manifest.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
``publish.py`` calls this against the images that are actually on ``gh-pages``,
|
||||
@@ -28,7 +28,7 @@ from pathlib import Path
|
||||
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.insert(0, REPO_ROOT)
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "cosplay"
|
||||
#: This gallery's key in ``data/versions.py`` (written by
|
||||
#: ``scripts/stamp_versions.py``). Differs from GALLERY_KIND for cosplay,
|
||||
|
||||
@@ -7,10 +7,10 @@ Read-only. Writes ``missing.txt`` / ``orphans.txt`` beside this script (both
|
||||
git-ignored) and prints a summary. Deletes nothing, publishes nothing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -23,7 +23,7 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "cosplay"
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
python gallery/cosplay/publish.py --source <dir> --dry-run # report, change nothing
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/publish.py - gallery/archetypes/publish.py -
|
||||
gallery/creatures/publish.py
|
||||
gallery/creatures/publish.py - gallery/people/publish.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
THE SAFETY MODEL, which is the whole point of this script:
|
||||
@@ -45,7 +45,7 @@ REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.insert(0, str(REPO_ROOT))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG — the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "cosplay"
|
||||
GALLERY_TITLE = "cosplay character"
|
||||
PAGE_FILES = ["index.html", "Krea2_IdentityForge_CharacterCycle.json"]
|
||||
@@ -55,7 +55,7 @@ from build_manifest import entry_names, generate_manifest, normalize_name # noq
|
||||
from build_gallery_images import optimize_image # noqa: E402
|
||||
|
||||
GALLERY_SRC_DIR = Path(__file__).resolve().parent
|
||||
#: 2.6.0: the page assets all three galleries share, published to gallery/shared/.
|
||||
#: 2.6.0: the page assets every gallery shares, published to gallery/shared/.
|
||||
SHARED_SRC_DIR = GALLERY_SRC_DIR.parent / "shared"
|
||||
SHARED_FILES = ["style.css", "gallery.js"]
|
||||
SHARED_REL_DIR = "gallery/shared"
|
||||
|
||||
@@ -8,8 +8,8 @@ REM
|
||||
REM Entries you do NOT supply an image for are left completely alone.
|
||||
REM Nothing is ever deleted by this script.
|
||||
REM
|
||||
REM ONE OF THREE NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures).
|
||||
REM Fix a bug here and apply it to the other two - see gallery\README.md.
|
||||
REM ONE OF FOUR NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures / people).
|
||||
REM Fix a bug here and apply it to the other three - see gallery\README.md.
|
||||
REM ==========================================================================
|
||||
setlocal
|
||||
set "GALLERY=cosplay"
|
||||
|
||||
@@ -9,10 +9,10 @@ the gh-pages checkout, so the normal workflow never needs this script directly.
|
||||
Use it when you want a local optimized copy without publishing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
gallery/creatures/ - gallery/archetypes/ - gallery/creatures/
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -33,7 +33,7 @@ except ImportError: # pragma: no cover - exercised by the dependency-free CI ru
|
||||
|
||||
PILLOW_HINT = "Pillow is required to optimize images. Install it: pip install Pillow"
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "creatures"
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
python gallery/creatures/build_manifest.py --images <dir>
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/build_manifest.py - gallery/archetypes/build_manifest.py -
|
||||
gallery/creatures/build_manifest.py
|
||||
gallery/creatures/build_manifest.py - gallery/people/build_manifest.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
``publish.py`` calls this against the images that are actually on ``gh-pages``,
|
||||
@@ -28,7 +28,7 @@ from pathlib import Path
|
||||
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.insert(0, REPO_ROOT)
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "creatures"
|
||||
#: This gallery's key in ``data/versions.py`` (written by
|
||||
#: ``scripts/stamp_versions.py``). Differs from GALLERY_KIND for cosplay,
|
||||
|
||||
@@ -7,10 +7,10 @@ Read-only. Writes ``missing.txt`` / ``orphans.txt`` beside this script (both
|
||||
git-ignored) and prints a summary. Deletes nothing, publishes nothing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
gallery/creatures/ - gallery/archetypes/ - gallery/creatures/
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -23,7 +23,7 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "creatures"
|
||||
# ============================================================================
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
python gallery/creatures/publish.py --source <dir> --dry-run # report, change nothing
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF THREE NEAR-IDENTICAL COPIES
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/publish.py - gallery/archetypes/publish.py -
|
||||
gallery/creatures/publish.py
|
||||
gallery/creatures/publish.py - gallery/people/publish.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other two (see gallery/README.md).
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
THE SAFETY MODEL, which is the whole point of this script:
|
||||
@@ -45,7 +45,7 @@ REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.insert(0, str(REPO_ROOT))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG — the only part that differs between the three copies ====
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "creatures"
|
||||
GALLERY_TITLE = "creature form"
|
||||
PAGE_FILES = ["index.html", "Krea2_IdentityForge_CreatureCycle.json"]
|
||||
@@ -55,7 +55,7 @@ from build_manifest import entry_names, generate_manifest, normalize_name # noq
|
||||
from build_gallery_images import optimize_image # noqa: E402
|
||||
|
||||
GALLERY_SRC_DIR = Path(__file__).resolve().parent
|
||||
#: 2.6.0: the page assets all three galleries share, published to gallery/shared/.
|
||||
#: 2.6.0: the page assets every gallery shares, published to gallery/shared/.
|
||||
SHARED_SRC_DIR = GALLERY_SRC_DIR.parent / "shared"
|
||||
SHARED_FILES = ["style.css", "gallery.js"]
|
||||
SHARED_REL_DIR = "gallery/shared"
|
||||
|
||||
@@ -8,8 +8,8 @@ REM
|
||||
REM Entries you do NOT supply an image for are left completely alone.
|
||||
REM Nothing is ever deleted by this script.
|
||||
REM
|
||||
REM ONE OF THREE NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures).
|
||||
REM Fix a bug here and apply it to the other two - see gallery\README.md.
|
||||
REM ONE OF FOUR NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures / people).
|
||||
REM Fix a bug here and apply it to the other three - see gallery\README.md.
|
||||
REM ==========================================================================
|
||||
setlocal
|
||||
set "GALLERY=creatures"
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
"""Optimize PEOPLE sample images for web display.
|
||||
|
||||
Standalone bulk tool: resize to 600px wide, JPEG quality 80, keep aspect ratio.
|
||||
|
||||
python gallery/people/build_gallery_images.py --source <dir> --output <dir>
|
||||
|
||||
``publish.py`` imports :func:`optimize_image` from here and writes straight into
|
||||
the gh-pages checkout, so the normal workflow never needs this script directly.
|
||||
Use it when you want a local optimized copy without publishing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
from PIL import Image
|
||||
except ImportError: # pragma: no cover - exercised by the dependency-free CI run
|
||||
# Pillow is OPTIONAL and only the encode path needs it. Importing this module
|
||||
# must never kill the process: `publish.py`, `cross_reference.py` and the test
|
||||
# suite all import it, and CI installs no third-party packages at all (the
|
||||
# pack itself is zero-dependency). A `sys.exit(1)` here took the whole test
|
||||
# run down with "ERROR: Pillow is required" the moment tests/test_gallery.py
|
||||
# started importing it.
|
||||
Image = None
|
||||
|
||||
PILLOW_HINT = "Pillow is required to optimize images. Install it: pip install Pillow"
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "people"
|
||||
# ============================================================================
|
||||
|
||||
#: 600px is the widest the gallery grid ever renders a card, so anything larger
|
||||
#: is bytes the visitor downloads and never sees.
|
||||
MAX_WIDTH = 600
|
||||
JPEG_QUALITY = 80
|
||||
|
||||
SOURCE_SUFFIXES = (".jpeg", ".jpg", ".png", ".webp")
|
||||
|
||||
|
||||
def optimize_image(source_path: Path, output_path: Path) -> dict:
|
||||
"""Resize and re-encode one image. Returns a stats dict, never raises."""
|
||||
if Image is None:
|
||||
return {"status": "error", "reason": PILLOW_HINT}
|
||||
source_path = Path(source_path)
|
||||
output_path = Path(output_path)
|
||||
if source_path.suffix.lower() not in SOURCE_SUFFIXES:
|
||||
return {"status": "skipped", "reason": f"not an image ({source_path.suffix})"}
|
||||
|
||||
try:
|
||||
img = Image.open(source_path)
|
||||
# JPEG has no alpha channel; converting first avoids a save error on
|
||||
# PNG/WebP sources with transparency.
|
||||
if img.mode in ("RGBA", "P", "LA"):
|
||||
img = img.convert("RGB")
|
||||
|
||||
original_size = img.size
|
||||
original_bytes = source_path.stat().st_size
|
||||
if img.width > MAX_WIDTH:
|
||||
new_height = int(img.height * (MAX_WIDTH / img.width))
|
||||
img = img.resize((MAX_WIDTH, new_height), Image.LANCZOS)
|
||||
|
||||
output_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
img.save(output_path, "JPEG", quality=JPEG_QUALITY, optimize=True)
|
||||
output_bytes = output_path.stat().st_size
|
||||
return {
|
||||
"status": "optimized",
|
||||
"original_size": f"{original_size[0]}x{original_size[1]}",
|
||||
"new_size": f"{img.size[0]}x{img.size[1]}",
|
||||
"original_bytes": original_bytes,
|
||||
"output_bytes": output_bytes,
|
||||
"reduction_pct": round((1 - output_bytes / original_bytes) * 100, 1),
|
||||
}
|
||||
except Exception as exc: # noqa: BLE001 - report and continue the batch
|
||||
return {"status": "error", "reason": str(exc)}
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(
|
||||
description=f"Optimize {GALLERY_KIND} gallery images for the web.")
|
||||
parser.add_argument("--source", required=True, help="Folder of full-size images.")
|
||||
parser.add_argument("--output", required=True, help="Folder for optimized JPEGs.")
|
||||
parser.add_argument("--dry-run", action="store_true")
|
||||
parser.add_argument("--skip-existing", action="store_true",
|
||||
help="Leave images already present in --output alone.")
|
||||
args = parser.parse_args()
|
||||
|
||||
if Image is None:
|
||||
print(f"ERROR: {PILLOW_HINT}")
|
||||
return 1
|
||||
|
||||
source_dir, output_dir = Path(args.source), Path(args.output)
|
||||
if not source_dir.is_dir():
|
||||
print(f"ERROR: source folder not found: {source_dir}")
|
||||
return 1
|
||||
|
||||
files = sorted((f for f in source_dir.iterdir()
|
||||
if f.suffix.lower() in SOURCE_SUFFIXES),
|
||||
key=lambda f: f.name.lower())
|
||||
print(f"Found {len(files)} image(s) in {source_dir}")
|
||||
print(f"Output: {output_dir} ({MAX_WIDTH}px wide, quality {JPEG_QUALITY})")
|
||||
if args.skip_existing:
|
||||
print("Mode: INCREMENTAL - existing outputs are left alone")
|
||||
if args.dry_run:
|
||||
print("Mode: DRY RUN - nothing will be written")
|
||||
print("-" * 62)
|
||||
|
||||
done = skipped = errors = 0
|
||||
src_mb = out_mb = 0.0
|
||||
for i, path in enumerate(files, 1):
|
||||
dest = output_dir / f"{path.stem}.jpeg"
|
||||
if args.skip_existing and dest.exists():
|
||||
skipped += 1
|
||||
continue
|
||||
if args.dry_run:
|
||||
done += 1
|
||||
continue
|
||||
result = optimize_image(path, dest)
|
||||
if result["status"] == "optimized":
|
||||
done += 1
|
||||
src_mb += result["original_bytes"] / (1024 * 1024)
|
||||
out_mb += result["output_bytes"] / (1024 * 1024)
|
||||
print(f" [{i:4d}/{len(files)}] {path.name[:46]:46s} "
|
||||
f"{result['original_size']} -> {result['new_size']} "
|
||||
f"({result['output_bytes'] // 1024} KB, -{result['reduction_pct']}%)")
|
||||
elif result["status"] == "error":
|
||||
errors += 1
|
||||
print(f" [{i:4d}/{len(files)}] {path.name[:46]:46s} "
|
||||
f"ERROR: {result['reason']}")
|
||||
else:
|
||||
skipped += 1
|
||||
|
||||
print("-" * 62)
|
||||
print(f" Processed: {done} Skipped: {skipped} Errors: {errors}")
|
||||
if not args.dry_run and src_mb:
|
||||
print(f" {src_mb:.1f} MB -> {out_mb:.1f} MB "
|
||||
f"({(1 - out_mb / src_mb) * 100:.1f}% smaller)")
|
||||
return 1 if errors else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,188 @@
|
||||
"""Generate manifest.json for the PEOPLE gallery.
|
||||
|
||||
python gallery/people/build_manifest.py --images <dir>
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/build_manifest.py - gallery/archetypes/build_manifest.py -
|
||||
gallery/creatures/build_manifest.py - gallery/people/build_manifest.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
``publish.py`` calls this against the images that are actually on ``gh-pages``,
|
||||
which is what makes "an entry you did not supply is left alone" true. Running it
|
||||
by hand against some *other* folder describes that folder instead -- fine for a
|
||||
local preview, dangerous if you then publish it. ``publish.py`` never does that.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import unicodedata
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.insert(0, REPO_ROOT)
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "people"
|
||||
#: A sample is a seed, not a roster entry, so ``data/versions.py`` has no stamps
|
||||
#: for it and the page hides its sort controls.
|
||||
VERSIONS_KIND = "people"
|
||||
|
||||
sys.path.insert(0, os.path.join(REPO_ROOT, "scripts"))
|
||||
from render_gallery import PEOPLE, people_card # noqa: E402
|
||||
|
||||
def entry_names() -> list[str]:
|
||||
"""Every fixed-seed sample (``PEOPLE`` in scripts/render_gallery.py)."""
|
||||
return list(PEOPLE)
|
||||
|
||||
|
||||
def entry_meta(name: str) -> dict:
|
||||
"""The card's seed and settings line, and the full prompt (searchable on the page)."""
|
||||
return people_card(name)
|
||||
# ============================================================================
|
||||
|
||||
DEFAULT_OUTPUT = os.path.join(os.path.dirname(__file__), "manifest.json")
|
||||
|
||||
|
||||
def pack_version() -> str:
|
||||
"""The version in ``pyproject.toml``, used for the "New in ..." filter."""
|
||||
import re
|
||||
text = (Path(REPO_ROOT) / "pyproject.toml").read_text(encoding="utf-8")
|
||||
match = re.search(r'(?m)^version\s*=\s*"([^"]+)"', text)
|
||||
return match.group(1) if match else ""
|
||||
|
||||
|
||||
def release_order() -> tuple:
|
||||
"""Every release that shipped roster content, oldest first."""
|
||||
from data.versions import RELEASES
|
||||
return RELEASES
|
||||
|
||||
|
||||
def release_stamps() -> dict:
|
||||
"""``{entry name: release}`` for this gallery's kind.
|
||||
|
||||
Written by ``scripts/stamp_versions.py`` and checked in CI. An entry with no
|
||||
stamp (a user-added one) gets ``""`` and the page treats it as oldest.
|
||||
"""
|
||||
from data.versions import ADDED_IN
|
||||
return dict(ADDED_IN.get(VERSIONS_KIND, {}))
|
||||
|
||||
|
||||
|
||||
#: Characters no Windows (and, for ``/``, no POSIX) filename may contain. A roster
|
||||
#: name is a display label, not a filename, so any entry is free to use them --
|
||||
#: ``B-Boy / B-Girl`` reads correctly in the dropdown and must not be renamed just
|
||||
#: to suit the gallery. The saving side strips them silently, so the MATCHING side
|
||||
#: has to do the same or the image can never be paired with its entry.
|
||||
_UNSAFE_FILENAME_CHARS = re.compile(r'[<>:"/\\|?*]')
|
||||
|
||||
|
||||
def normalize_name(name: str) -> str:
|
||||
"""Normalize a name for filename comparison.
|
||||
|
||||
Three separate things Windows does to a name on its way to disk, each of which
|
||||
silently broke the pairing before it was handled here:
|
||||
|
||||
* **Trailing period dropped** -- the entry ``C.C.`` lands as ``C.C.jpeg``.
|
||||
Without this, that entry was reported as *both* missing an image and having
|
||||
an orphaned one, on every single run.
|
||||
* **Illegal characters removed** -- ``B-Boy / B-Girl`` is saved as
|
||||
``B-Boy B-Girl.jpeg``. Substituting a space (not the empty string) is what
|
||||
makes the stripped filename and the original label converge, since the label
|
||||
already has spaces either side of the slash.
|
||||
* **Whitespace runs** -- the substitution above leaves a double space, and a
|
||||
hand-typed filename may differ in spacing anyway. Collapsing both sides makes
|
||||
``B-Boy B-Girl`` and ``B-Boy B-Girl`` the same key.
|
||||
|
||||
Callers that build a *filename* use this too, so the canonical on-disk form is
|
||||
whatever this returns. NFC last, so a decomposed accent from a Mac-authored
|
||||
filename matches a composed one in the roster.
|
||||
"""
|
||||
name = _UNSAFE_FILENAME_CHARS.sub(" ", name)
|
||||
name = name.rstrip(". ")
|
||||
name = " ".join(name.split())
|
||||
return unicodedata.normalize("NFC", name)
|
||||
|
||||
|
||||
def generate_manifest(images_dir: str, output_path: str) -> dict:
|
||||
"""Build the manifest describing ``images_dir``."""
|
||||
images_path = Path(images_dir)
|
||||
if not images_path.is_dir():
|
||||
# Fail loudly. Continuing would emit a well-formed manifest in which
|
||||
# every entry has has_image=false -- a silently wrong artifact that,
|
||||
# once published, blanks the live gallery.
|
||||
raise SystemExit(
|
||||
f"ERROR: images directory not found: {images_dir}\n"
|
||||
f"Refusing to write a manifest claiming no entry has an image."
|
||||
)
|
||||
|
||||
available: dict[str, str] = {}
|
||||
for f in images_path.iterdir():
|
||||
if f.suffix.lower() == ".jpeg":
|
||||
available.setdefault(normalize_name(f.stem), f.stem)
|
||||
|
||||
stamps = release_stamps()
|
||||
|
||||
entries, missing = [], []
|
||||
for name in sorted(entry_names()):
|
||||
stem = available.get(normalize_name(name))
|
||||
entry = {"name": name, "has_image": stem is not None, **entry_meta(name)}
|
||||
# The release this entry first shipped in, "" for a user-added one. The page
|
||||
# ranks by POSITION IN ``releases`` below, never by parsing this string --
|
||||
# "0.10.0" sorts before "0.9.0" as text.
|
||||
entry["added"] = stamps.get(name, "")
|
||||
if stem is not None:
|
||||
entry["image"] = f"images/{stem}.jpeg"
|
||||
else:
|
||||
missing.append(name)
|
||||
entries.append(entry)
|
||||
|
||||
manifest = {
|
||||
# 2 (0.97.0): entries gained "added", and the manifest gained
|
||||
# "version" + "releases", so the page can offer a Newest-first sort.
|
||||
# A page served an older manifest simply sees every entry as unstamped
|
||||
# and falls back to A-Z, so the bump is informational.
|
||||
"schema_version": 2,
|
||||
"gallery": GALLERY_KIND,
|
||||
"generated": __import__("datetime").datetime.now().isoformat(),
|
||||
"version": pack_version(),
|
||||
"releases": list(release_order()),
|
||||
"total_entries": len(entries),
|
||||
"entries_with_images": len(entries) - len(missing),
|
||||
"entries_missing_images": len(missing),
|
||||
"missing": sorted(missing),
|
||||
"entries": entries,
|
||||
}
|
||||
|
||||
out_dir = os.path.dirname(output_path)
|
||||
if out_dir:
|
||||
os.makedirs(out_dir, exist_ok=True)
|
||||
with open(output_path, "w", encoding="utf-8") as f:
|
||||
json.dump(manifest, f, indent=2, ensure_ascii=False)
|
||||
return manifest
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(
|
||||
description=f"Generate the {GALLERY_KIND} gallery manifest.")
|
||||
parser.add_argument("--images", required=True,
|
||||
help="Directory of optimized JPEGs to describe.")
|
||||
parser.add_argument("--output", default=DEFAULT_OUTPUT)
|
||||
args = parser.parse_args()
|
||||
|
||||
manifest = generate_manifest(args.images, args.output)
|
||||
print(f" Total entries: {manifest['total_entries']}")
|
||||
print(f" With images: {manifest['entries_with_images']}")
|
||||
print(f" Missing images: {manifest['entries_missing_images']}")
|
||||
print(f"Written to {args.output}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,103 @@
|
||||
"""Report which PEOPLE samples still need an image.
|
||||
|
||||
python gallery/people/cross_reference.py # against gh-pages
|
||||
python gallery/people/cross_reference.py --images <dir> # against a folder
|
||||
|
||||
Read-only. Writes ``missing.txt`` / ``orphans.txt`` beside this script (both
|
||||
git-ignored) and prints a summary. Deletes nothing, publishes nothing.
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/ - gallery/archetypes/ - gallery/creatures/ - gallery/people/
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "people"
|
||||
# ============================================================================
|
||||
|
||||
from build_manifest import entry_names, normalize_name # noqa: E402
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
BRANCH = "gh-pages"
|
||||
|
||||
|
||||
def published_stems() -> set[str]:
|
||||
"""Image stems currently on the gh-pages branch, read without checking out."""
|
||||
listing = subprocess.run(
|
||||
["git", "ls-tree", "-r", "--name-only", BRANCH,
|
||||
f"gallery/{GALLERY_KIND}/images/"],
|
||||
capture_output=True, text=True, cwd=str(REPO_ROOT),
|
||||
)
|
||||
if listing.returncode != 0:
|
||||
print(f"WARNING: could not read branch {BRANCH}; treating it as empty.")
|
||||
return set()
|
||||
return {normalize_name(Path(line).stem)
|
||||
for line in listing.stdout.splitlines() if line.endswith(".jpeg")}
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(
|
||||
description=f"Report {GALLERY_KIND} gallery image coverage.")
|
||||
parser.add_argument("--images", help="Check a local folder instead of gh-pages.")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.images:
|
||||
folder = Path(args.images)
|
||||
if not folder.is_dir():
|
||||
print(f"ERROR: folder not found: {folder}")
|
||||
return 1
|
||||
have = {normalize_name(f.stem) for f in folder.iterdir()
|
||||
if f.suffix.lower() == ".jpeg"}
|
||||
source_label = str(folder)
|
||||
else:
|
||||
have = published_stems()
|
||||
source_label = f"branch {BRANCH}"
|
||||
|
||||
names = entry_names()
|
||||
wanted = {normalize_name(n): n for n in names}
|
||||
|
||||
missing = sorted(orig for norm, orig in wanted.items() if norm not in have)
|
||||
orphans = sorted(stem for stem in have if stem not in wanted)
|
||||
|
||||
print(f"Gallery : {GALLERY_KIND}")
|
||||
print(f"Images : {source_label}")
|
||||
print(f"Entries : {len(names)}")
|
||||
print(f" with an image : {len(names) - len(missing)}")
|
||||
print(f" MISSING : {len(missing)}")
|
||||
print(f" orphaned files: {len(orphans)} (no roster entry matches these)")
|
||||
|
||||
(HERE / "missing.txt").write_text(
|
||||
"\n".join(missing) + ("\n" if missing else ""), encoding="utf-8")
|
||||
(HERE / "orphans.txt").write_text(
|
||||
"\n".join(orphans) + ("\n" if orphans else ""), encoding="utf-8")
|
||||
|
||||
if missing:
|
||||
print("\n--- Entries needing an image (first 25) ---")
|
||||
for name in missing[:25]:
|
||||
print(f" {name}")
|
||||
if len(missing) > 25:
|
||||
print(f" ... and {len(missing) - 25} more (see missing.txt)")
|
||||
if orphans:
|
||||
print("\n--- Orphaned images (first 25) ---")
|
||||
for stem in orphans[:25]:
|
||||
print(f" {stem}.jpeg")
|
||||
print("\nThese match no roster entry, usually because the entry was "
|
||||
"renamed or removed.\nRemove them with: publish.py --prune-orphans")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Identity Forge - People Sample Gallery</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='7' fill='%231a1a2e'/><circle cx='16' cy='13' r='6.5' fill='%235b8def'/><path d='M6 27c1.5-5 5.5-7.5 10-7.5S24.5 22 26 27Z' fill='%237aa5ff'/></svg>">
|
||||
<link rel="stylesheet" href="../shared/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="gallery-header">
|
||||
<h1>Identity Forge - People Sample Gallery</h1>
|
||||
<p class="header-subtitle">
|
||||
Random people from the plain <strong>Identity Forge</strong> node, no preset nodes, rendered with the <strong>Krea2 T2I model</strong>.
|
||||
Each card shows its seed and the prompt the node wrote; every other widget was left at its default,
|
||||
so the same seed and gender give the same prompt on your machine (the images were rendered with a short photo style prefix in front of it).
|
||||
</p>
|
||||
<div class="header-links">
|
||||
<a href="https://github.com/EnragedAntelope/comfyui-identity-forge/blob/main/docs/usage.md" class="header-link" target="_blank" rel="noopener">
|
||||
How to use the node
|
||||
</a>
|
||||
<a href="https://github.com/EnragedAntelope/comfyui-identity-forge" class="header-link" target="_blank" rel="noopener">
|
||||
View on GitHub
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="gallery-controls">
|
||||
<div class="search-bar">
|
||||
<input type="text" id="search" placeholder="Search prompts (beach, 70-year-old, linen...)" autocomplete="off" aria-label="Search the sample prompts">
|
||||
<button id="search-clear" class="search-clear hidden" aria-label="Clear search">×</button>
|
||||
</div>
|
||||
<div class="view-controls">
|
||||
<span class="sort-group" id="sort-group" hidden>
|
||||
<label class="sort-label" for="sort">Sort</label>
|
||||
<select id="sort" class="sort-select">
|
||||
<option value="az">A-Z</option>
|
||||
<option value="new">Newest first</option>
|
||||
</select>
|
||||
</span>
|
||||
<button type="button" id="filter-new" class="filter-chip" aria-pressed="false" hidden></button>
|
||||
</div>
|
||||
<div class="stats-bar">
|
||||
<span id="stats-visible">Showing <strong id="count-visible">0</strong> of <strong id="count-total">0</strong> entries</span>
|
||||
<span id="stats-missing" class="stats-missing"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gallery-grid" class="gallery-grid" role="list" aria-label="People sample gallery">
|
||||
<!-- Cards injected by gallery.js -->
|
||||
</div>
|
||||
|
||||
<div id="loading" class="loading-indicator">
|
||||
<div class="spinner"></div>
|
||||
<p>Loading gallery...</p>
|
||||
</div>
|
||||
|
||||
<div id="no-results" class="no-results hidden">
|
||||
<p>Nothing matches the current filters.</p>
|
||||
<button type="button" id="clear-search-btn" class="btn-secondary">Clear filters</button>
|
||||
</div>
|
||||
|
||||
<!-- Lightbox Modal -->
|
||||
<div id="lightbox" class="lightbox hidden" role="dialog" aria-modal="true" aria-label="Image preview">
|
||||
<button id="lightbox-close" class="lightbox-close" aria-label="Close">×</button>
|
||||
<button id="lightbox-prev" class="lightbox-nav lightbox-prev" aria-label="Previous image">‹</button>
|
||||
<button id="lightbox-next" class="lightbox-nav lightbox-next" aria-label="Next image">›</button>
|
||||
<div class="lightbox-content">
|
||||
<img id="lightbox-img" src="" alt="">
|
||||
<p id="lightbox-name" class="lightbox-name"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="gallery-footer">
|
||||
<p>
|
||||
Powered by <a href="https://github.com/EnragedAntelope/comfyui-identity-forge" target="_blank" rel="noopener">ComfyUI Identity Forge</a>.
|
||||
Gallery images are not included in the main repository download.
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<script src="../shared/gallery.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,291 @@
|
||||
"""Publish the PEOPLE gallery: optimize, stage and push, in one pass.
|
||||
|
||||
python gallery/people/publish.py --source <dir> # add missing only
|
||||
python gallery/people/publish.py --source <dir> --overwrite # also replace existing
|
||||
python gallery/people/publish.py --source <dir> --dry-run # report, change nothing
|
||||
|
||||
=============================================================================
|
||||
THIS FILE IS ONE OF FOUR NEAR-IDENTICAL COPIES
|
||||
gallery/cosplay/publish.py - gallery/archetypes/publish.py -
|
||||
gallery/creatures/publish.py - gallery/people/publish.py
|
||||
They differ ONLY in the GALLERY CONFIG block below. Fix a bug here and apply
|
||||
it to the other three (see gallery/README.md).
|
||||
=============================================================================
|
||||
|
||||
THE SAFETY MODEL, which is the whole point of this script:
|
||||
|
||||
* ``gh-pages`` is the source of truth for what is published. The manifest is
|
||||
rebuilt from the files that are actually on the branch AFTER staging, never
|
||||
from the source folder.
|
||||
* The source folder only ever ADDS or OVERWRITES. An entry you did not supply
|
||||
an image for is not touched, not re-encoded, and above all not deleted.
|
||||
* Nothing is removed unless you pass ``--prune-orphans``, and even then only
|
||||
images whose filename matches no roster entry at all - i.e. a sample that
|
||||
was renamed or deleted in the data, never one that is merely absent from
|
||||
this run's source folder.
|
||||
|
||||
The predecessor (``deploy.py``, removed at 0.80.0) got this wrong in a way that
|
||||
could have destroyed the gallery: it built the manifest from the source folder,
|
||||
so pointing it at a folder of five new images marked every other entry as
|
||||
image-less, and its prune step would then have deleted them all from the branch.
|
||||
|
||||
It also switched branches in place with ``git stash``/``git checkout``, which
|
||||
runs over whatever is in your working tree. This uses ``git worktree`` instead,
|
||||
which touches the current checkout not at all.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.insert(0, str(REPO_ROOT))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
# === GALLERY CONFIG - the only part that differs between the four copies ====
|
||||
GALLERY_KIND = "people"
|
||||
GALLERY_TITLE = "random people"
|
||||
PAGE_FILES = ["index.html"]
|
||||
# ============================================================================
|
||||
|
||||
from build_manifest import entry_names, generate_manifest, normalize_name # noqa: E402
|
||||
from build_gallery_images import optimize_image # noqa: E402
|
||||
|
||||
GALLERY_SRC_DIR = Path(__file__).resolve().parent
|
||||
#: 2.6.0: the page assets every gallery shares, published to gallery/shared/.
|
||||
SHARED_SRC_DIR = GALLERY_SRC_DIR.parent / "shared"
|
||||
SHARED_FILES = ["style.css", "gallery.js"]
|
||||
SHARED_REL_DIR = "gallery/shared"
|
||||
BRANCH = "gh-pages"
|
||||
REL_DIR = f"gallery/{GALLERY_KIND}"
|
||||
|
||||
|
||||
def run(*cmd: str, cwd: Path | None = None) -> str:
|
||||
"""Run a git command from argv words.
|
||||
|
||||
Never ``shell=True``: the commit message is user-supplied, and interpolating
|
||||
it into a shell string means a quote breaks the command and a semicolon runs
|
||||
as shell syntax.
|
||||
"""
|
||||
result = subprocess.run(cmd, capture_output=True, text=True,
|
||||
cwd=str(cwd or REPO_ROOT))
|
||||
out = (result.stdout + result.stderr).strip()
|
||||
if result.returncode != 0:
|
||||
print(f" COMMAND FAILED: {' '.join(cmd)}")
|
||||
print(f" {out}")
|
||||
raise RuntimeError(f"git exited {result.returncode}")
|
||||
return out
|
||||
|
||||
|
||||
def published_stems(images_dir: Path) -> dict[str, Path]:
|
||||
"""Map ``normalize_name(stem) -> path`` for every image already on the branch.
|
||||
|
||||
Both callers below used to compare a **raw** ``Path.stem`` against normalized
|
||||
roster names. Any entry whose label cannot be a filename verbatim therefore
|
||||
never matched its own published image: add-mode would re-encode it on every
|
||||
run, and ``--prune-orphans`` would classify it as belonging to no roster entry
|
||||
and DELETE it. That is exactly what would have happened to the two hand-added
|
||||
``B-Boy / B-Girl`` and ``E-Girl / E-Boy`` images.
|
||||
"""
|
||||
return {normalize_name(p.stem): p for p in images_dir.glob("*.jpeg")}
|
||||
|
||||
|
||||
def match_sources(source_dir: Path) -> tuple[dict[str, Path], list[Path]]:
|
||||
"""Pair source images with roster entries by filename stem.
|
||||
|
||||
Returns ``({entry_name: source_path}, [unmatched_files])``. Unmatched files
|
||||
are reported rather than published: a typo in a filename would otherwise put
|
||||
an image on the site under a name no dropdown can ever reach.
|
||||
"""
|
||||
by_norm = {normalize_name(name): name for name in entry_names()}
|
||||
matched: dict[str, Path] = {}
|
||||
unmatched: list[Path] = []
|
||||
for path in sorted(source_dir.iterdir(), key=lambda p: p.name.lower()):
|
||||
if path.suffix.lower() not in (".jpeg", ".jpg", ".png", ".webp"):
|
||||
continue
|
||||
entry = by_norm.get(normalize_name(path.stem))
|
||||
if entry is None:
|
||||
unmatched.append(path)
|
||||
else:
|
||||
matched[entry] = path
|
||||
return matched, unmatched
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(
|
||||
description=f"Publish the {GALLERY_KIND} gallery to the {BRANCH} branch.")
|
||||
parser.add_argument("--source",
|
||||
help="Folder of full-size images named after entries. "
|
||||
"Required unless --pages-only.")
|
||||
parser.add_argument("--overwrite", action="store_true",
|
||||
help="Replace images for entries that already have one. "
|
||||
"Default is to add only what is missing.")
|
||||
parser.add_argument("--dry-run", action="store_true",
|
||||
help="Report the plan and exit without changing anything.")
|
||||
parser.add_argument("--prune-orphans", action="store_true",
|
||||
help="Also delete published images matching no roster "
|
||||
"entry (renamed/deleted characters). Off by default.")
|
||||
parser.add_argument("--pages-only", action="store_true",
|
||||
help="Publish only the page files (HTML/CSS/JS) and "
|
||||
"refresh the manifest. No --source needed, and no "
|
||||
"image is added, replaced or removed.")
|
||||
parser.add_argument("--no-push", action="store_true",
|
||||
help="Commit to the local branch but do not push. Lets you "
|
||||
"inspect the result before it goes live.")
|
||||
parser.add_argument("--message", default=f"Update {GALLERY_KIND} gallery",
|
||||
help="Commit message.")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.pages_only:
|
||||
source_dir, matched, unmatched = None, {}, []
|
||||
else:
|
||||
if not args.source:
|
||||
print("ERROR: --source is required (or use --pages-only).")
|
||||
return 1
|
||||
source_dir = Path(args.source)
|
||||
if not source_dir.is_dir():
|
||||
print(f"ERROR: source folder not found: {source_dir}")
|
||||
return 1
|
||||
matched, unmatched = match_sources(source_dir)
|
||||
print(f"Gallery : {GALLERY_KIND}")
|
||||
if args.pages_only:
|
||||
mode = "PAGE FILES ONLY - no image added, replaced or removed"
|
||||
elif args.overwrite:
|
||||
mode = "OVERWRITE existing"
|
||||
else:
|
||||
mode = "ADD missing only"
|
||||
print(f"Source folder: {source_dir or '(not used)'}")
|
||||
print(f"Mode : {mode}")
|
||||
print(f"Roster : {len(entry_names())} entries")
|
||||
print(f"Source images : {len(matched)} matched, {len(unmatched)} unmatched")
|
||||
if unmatched:
|
||||
print("\n These files match no roster entry and will be IGNORED "
|
||||
"(check the spelling):")
|
||||
for path in unmatched[:20]:
|
||||
print(f" ? {path.name}")
|
||||
if len(unmatched) > 20:
|
||||
print(f" ... and {len(unmatched) - 20} more")
|
||||
if not matched and not args.pages_only:
|
||||
print()
|
||||
print("Nothing to publish. Stopping before touching the branch.")
|
||||
return 0
|
||||
|
||||
worktree = Path(tempfile.mkdtemp(prefix=f"ifgallery-{GALLERY_KIND}-"))
|
||||
created = False
|
||||
try:
|
||||
print(f"\nChecking out {BRANCH} into a temporary worktree...")
|
||||
print("(your current checkout is not touched)")
|
||||
run("git", "worktree", "add", str(worktree), BRANCH)
|
||||
created = True
|
||||
run("git", "pull", "--ff-only", "origin", BRANCH, cwd=worktree)
|
||||
|
||||
images_dir = worktree / "gallery" / GALLERY_KIND / "images"
|
||||
images_dir.mkdir(parents=True, exist_ok=True)
|
||||
published = published_stems(images_dir)
|
||||
print(f"Already published: {len(published)} image(s)")
|
||||
|
||||
# Decide per entry. An entry that already has an image and was not
|
||||
# supplied this run never appears here at all -- that is the guarantee.
|
||||
to_write, skipped = {}, []
|
||||
for entry, src in matched.items():
|
||||
if normalize_name(entry) in published and not args.overwrite:
|
||||
skipped.append(entry)
|
||||
else:
|
||||
to_write[entry] = src
|
||||
|
||||
print(f"\nPlan: {len(to_write)} to write, {len(skipped)} already present "
|
||||
f"(left untouched), {len(published) - len(skipped)} untouched entries "
|
||||
f"not in this source folder")
|
||||
|
||||
orphans = []
|
||||
if args.prune_orphans:
|
||||
keep = {normalize_name(n) for n in entry_names()}
|
||||
orphans = sorted(p.name for norm, p in published_stems(images_dir).items()
|
||||
if norm not in keep)
|
||||
print(f"Orphans to prune: {len(orphans)}")
|
||||
for name in orphans:
|
||||
print(f" - {name}")
|
||||
|
||||
if args.dry_run:
|
||||
print("\nDRY RUN - nothing written, nothing committed, nothing pushed.")
|
||||
for entry in sorted(to_write)[:30]:
|
||||
print(f" + {entry}")
|
||||
if len(to_write) > 30:
|
||||
print(f" ... and {len(to_write) - 30} more")
|
||||
return 0
|
||||
|
||||
# Optimize straight into the branch checkout. No intermediate staging
|
||||
# directory to go stale and be published by accident on a later run.
|
||||
print()
|
||||
written = errors = 0
|
||||
for i, entry in enumerate(sorted(to_write), 1):
|
||||
dest = images_dir / f"{normalize_name(entry)}.jpeg"
|
||||
result = optimize_image(to_write[entry], dest)
|
||||
if result["status"] == "optimized":
|
||||
written += 1
|
||||
print(f" [{i:4d}/{len(to_write)}] {entry[:48]:48s} "
|
||||
f"{result['new_size']} ({result['output_bytes'] // 1024} KB)")
|
||||
else:
|
||||
errors += 1
|
||||
print(f" [{i:4d}/{len(to_write)}] {entry[:48]:48s} "
|
||||
f"ERROR: {result.get('reason')}")
|
||||
|
||||
for name in orphans:
|
||||
(images_dir / name).unlink()
|
||||
|
||||
# Rebuild the manifest from what is ACTUALLY on the branch now. This is
|
||||
# the line that makes the safety guarantee true rather than aspirational.
|
||||
manifest = generate_manifest(str(images_dir),
|
||||
str(images_dir.parent / "manifest.json"))
|
||||
print(f"\nManifest: {manifest['total_entries']} entries, "
|
||||
f"{manifest['entries_with_images']} with images, "
|
||||
f"{manifest['entries_missing_images']} still missing")
|
||||
|
||||
for fname in PAGE_FILES:
|
||||
src = GALLERY_SRC_DIR / fname
|
||||
if src.exists():
|
||||
(worktree / REL_DIR / fname).write_text(
|
||||
src.read_text(encoding="utf-8"), encoding="utf-8", newline="")
|
||||
|
||||
for fname in SHARED_FILES:
|
||||
target = worktree / SHARED_REL_DIR / fname
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_text((SHARED_SRC_DIR / fname).read_text(encoding="utf-8"),
|
||||
encoding="utf-8", newline="")
|
||||
|
||||
# -A, not a bare add: a plain `git add` stages additions and
|
||||
# modifications but NOT deletions, so a prune would be silently undone.
|
||||
run("git", "add", "-A", REL_DIR, SHARED_REL_DIR, cwd=worktree)
|
||||
if not run("git", "status", "--porcelain", cwd=worktree):
|
||||
print("\nNothing changed on the branch.")
|
||||
return 0
|
||||
|
||||
run("git", "commit", "-m", args.message, cwd=worktree)
|
||||
if args.no_push:
|
||||
print()
|
||||
print(f"Committed to the local {BRANCH} branch but NOT pushed.")
|
||||
print(f"Review it: git log {BRANCH} -1 --stat")
|
||||
print(f"Publish it: git push origin {BRANCH}")
|
||||
print(f"Discard it: git branch -f {BRANCH} origin/{BRANCH}")
|
||||
return 1 if errors else 0
|
||||
print("Pushing...")
|
||||
run("git", "push", "origin", BRANCH, cwd=worktree)
|
||||
print(f"\nDone. {written} image(s) published"
|
||||
+ (f", {errors} error(s)" if errors else "") + ".")
|
||||
print(f"https://enragedantelope.github.io/comfyui-identity-forge/{REL_DIR}/")
|
||||
return 1 if errors else 0
|
||||
|
||||
finally:
|
||||
if created:
|
||||
try:
|
||||
run("git", "worktree", "remove", "--force", str(worktree))
|
||||
except RuntimeError:
|
||||
print(f"WARNING: could not remove the temporary worktree at "
|
||||
f"{worktree}.\n Run: git worktree prune")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,115 @@
|
||||
@echo off
|
||||
REM ==========================================================================
|
||||
REM Identity Forge - publish the PEOPLE sample gallery
|
||||
REM
|
||||
REM Drag a folder of images onto this file, or run it and type the path.
|
||||
REM Images must be named after the entry: "Elven Ranger.jpeg", "Pop Star.png", ...
|
||||
REM
|
||||
REM Entries you do NOT supply an image for are left completely alone.
|
||||
REM Nothing is ever deleted by this script.
|
||||
REM
|
||||
REM ONE OF FOUR NEAR-IDENTICAL COPIES (cosplay / archetypes / creatures / people).
|
||||
REM Fix a bug here and apply it to the other three - see gallery\README.md.
|
||||
REM ==========================================================================
|
||||
setlocal
|
||||
set "GALLERY=people"
|
||||
set "HERE=%~dp0"
|
||||
set "REPO=%HERE%..\.."
|
||||
|
||||
title Identity Forge - update %GALLERY% gallery
|
||||
|
||||
echo.
|
||||
echo ==========================================================
|
||||
echo Identity Forge - %GALLERY% gallery
|
||||
echo ==========================================================
|
||||
echo.
|
||||
|
||||
REM --- source folder: dragged onto the .bat, or typed at the prompt ---------
|
||||
set "SOURCE=%~1"
|
||||
if not defined SOURCE goto :ask
|
||||
goto :havesource
|
||||
|
||||
:ask
|
||||
echo Drop the folder of images here, or paste its path.
|
||||
echo Leave it blank and press Enter to cancel.
|
||||
echo.
|
||||
set /p "SOURCE=Source folder: "
|
||||
if not defined SOURCE goto :cancelled
|
||||
|
||||
:havesource
|
||||
REM Strip surrounding quotes that drag-and-drop adds.
|
||||
set "SOURCE=%SOURCE:"=%"
|
||||
if not exist "%SOURCE%\" goto :nosource
|
||||
|
||||
REM --- mode ----------------------------------------------------------------
|
||||
echo.
|
||||
echo Which entries should be written?
|
||||
echo.
|
||||
echo [1] Add only what is missing - default, safest
|
||||
echo [2] Add missing AND replace existing
|
||||
echo [3] Preview only, change nothing - dry run
|
||||
echo.
|
||||
set "CHOICE="
|
||||
set /p "CHOICE=Choose 1, 2 or 3 [1]: "
|
||||
if not defined CHOICE set "CHOICE=1"
|
||||
|
||||
set "FLAGS="
|
||||
if "%CHOICE%"=="1" set "FLAGS="
|
||||
if "%CHOICE%"=="2" set "FLAGS=--overwrite"
|
||||
if "%CHOICE%"=="3" set "FLAGS=--dry-run"
|
||||
if "%CHOICE%"=="1" goto :run
|
||||
if "%CHOICE%"=="2" goto :run
|
||||
if "%CHOICE%"=="3" goto :run
|
||||
goto :badchoice
|
||||
|
||||
:run
|
||||
echo.
|
||||
echo ----------------------------------------------------------
|
||||
python "%HERE%publish.py" --source "%SOURCE%" %FLAGS%
|
||||
if errorlevel 1 goto :failed
|
||||
echo ----------------------------------------------------------
|
||||
echo.
|
||||
echo Finished.
|
||||
echo.
|
||||
pause
|
||||
endlocal
|
||||
exit /b 0
|
||||
|
||||
:nosource
|
||||
echo.
|
||||
echo ERROR: that folder does not exist:
|
||||
echo %SOURCE%
|
||||
echo.
|
||||
pause
|
||||
endlocal
|
||||
exit /b 1
|
||||
|
||||
:badchoice
|
||||
echo.
|
||||
echo ERROR: "%CHOICE%" is not one of 1, 2 or 3.
|
||||
echo.
|
||||
pause
|
||||
endlocal
|
||||
exit /b 1
|
||||
|
||||
:failed
|
||||
echo ----------------------------------------------------------
|
||||
echo.
|
||||
echo FAILED. The gallery was NOT updated. Read the messages above.
|
||||
echo.
|
||||
echo Common causes:
|
||||
echo - Pillow is not installed fix: pip install Pillow
|
||||
echo - not signed in to git/GitHub fix: check your credentials
|
||||
echo - the gh-pages branch moved fix: git fetch origin
|
||||
echo.
|
||||
pause
|
||||
endlocal
|
||||
exit /b 1
|
||||
|
||||
:cancelled
|
||||
echo.
|
||||
echo Cancelled - nothing was changed.
|
||||
echo.
|
||||
pause
|
||||
endlocal
|
||||
exit /b 0
|
||||
+424
-164
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
/* =============================================================
|
||||
Identity Forge - Sample Gallery Script
|
||||
One file for the cosplay, archetype and creature galleries.
|
||||
One file for every gallery page.
|
||||
Lazy-loading image grid with search, lightbox, keyboard nav.
|
||||
============================================================= */
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
|
||||
card.appendChild(wrapper);
|
||||
card.appendChild(nameEl);
|
||||
if (entry.prompt) card.appendChild(createPromptBlock(entry));
|
||||
|
||||
// Click handler
|
||||
if (entry.has_image) {
|
||||
@@ -198,6 +199,43 @@
|
||||
return card;
|
||||
}
|
||||
|
||||
/* People gallery (2.7.0): a sample has no name worth showing, so its card carries
|
||||
the seed and settings, and the prompt the node wrote with a copy button. */
|
||||
function createPromptBlock(entry) {
|
||||
const block = document.createElement('div');
|
||||
block.className = 'card-prompt';
|
||||
if (entry.settings) {
|
||||
const settings = document.createElement('div');
|
||||
settings.className = 'card-settings';
|
||||
settings.textContent = entry.settings;
|
||||
block.appendChild(settings);
|
||||
}
|
||||
const details = document.createElement('details');
|
||||
const summary = document.createElement('summary');
|
||||
summary.textContent = 'Prompt';
|
||||
const text = document.createElement('p');
|
||||
text.textContent = entry.prompt;
|
||||
const copy = document.createElement('button');
|
||||
copy.type = 'button';
|
||||
copy.className = 'btn-secondary card-copy';
|
||||
copy.textContent = 'Copy prompt';
|
||||
copy.addEventListener('click', async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(entry.prompt);
|
||||
copy.textContent = 'Copied';
|
||||
} catch (e) {
|
||||
copy.textContent = 'Copy failed';
|
||||
}
|
||||
setTimeout(() => { copy.textContent = 'Copy prompt'; }, 1500);
|
||||
});
|
||||
details.append(summary, text, copy);
|
||||
block.appendChild(details);
|
||||
// Clicks and keys in here must not open the lightbox.
|
||||
block.addEventListener('click', (e) => e.stopPropagation());
|
||||
block.addEventListener('keydown', (e) => e.stopPropagation());
|
||||
return block;
|
||||
}
|
||||
|
||||
// ── Lazy Loading ───────────────────────────────────────
|
||||
function observeNewImages() {
|
||||
// Disconnect previous observer
|
||||
@@ -252,7 +290,8 @@
|
||||
if (state.onlyMissing) list = list.filter((e) => !e.has_image);
|
||||
if (state.onlyNew) list = list.filter(isNew);
|
||||
if (state.searchTerm) {
|
||||
list = list.filter((e) => e.name.toLowerCase().includes(state.searchTerm));
|
||||
list = list.filter((e) => (e.name + ' ' + (e.prompt || '')).toLowerCase()
|
||||
.includes(state.searchTerm));
|
||||
}
|
||||
|
||||
// The manifest is already name-sorted, so A-Z needs no work; sorting a copy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* =============================================================
|
||||
Identity Forge - Sample Gallery Styles
|
||||
One file for the cosplay, archetype and creature galleries
|
||||
One file for every gallery page
|
||||
(gallery/shared/, published next to each page; see gallery/README.md).
|
||||
Dark theme, tuned for browsing a large lazy-loaded grid.
|
||||
============================================================= */
|
||||
@@ -262,6 +262,24 @@ a:hover { color: var(--accent-hover); }
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* People gallery: seed/settings line and the expandable prompt */
|
||||
.card-prompt {
|
||||
padding: 0 0.6rem 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
cursor: default;
|
||||
}
|
||||
.card-settings { text-align: center; margin-bottom: 0.3rem; }
|
||||
.card-prompt summary { cursor: pointer; color: var(--accent); }
|
||||
.card-prompt p {
|
||||
margin: 0.4rem 0;
|
||||
max-height: 14rem;
|
||||
overflow-y: auto;
|
||||
line-height: 1.4;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.card-copy { margin-top: 0.2rem; padding: 0.3rem 0.8rem; font-size: 0.75rem; }
|
||||
|
||||
/* Missing image card styling */
|
||||
.gallery-card.missing {
|
||||
opacity: 0.6;
|
||||
|
||||
@@ -144,6 +144,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Veronica Lodge"
|
||||
],
|
||||
"Assassin's Creed": [
|
||||
"Evie Frye",
|
||||
"Ezio Auditore",
|
||||
"Kassandra"
|
||||
],
|
||||
@@ -297,6 +298,9 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Bloodshot": [
|
||||
"Bloodshot"
|
||||
],
|
||||
"Bloodstained": [
|
||||
"Miriam (Bloodstained)"
|
||||
],
|
||||
"Bob's Burgers": [
|
||||
"Bob Belcher",
|
||||
"Gene Belcher",
|
||||
@@ -304,6 +308,9 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Louise Belcher",
|
||||
"Tina Belcher"
|
||||
],
|
||||
"Bocchi the Rock!": [
|
||||
"Hitori Gotoh"
|
||||
],
|
||||
"Borderlands": [
|
||||
"Amara",
|
||||
"Claptrap",
|
||||
@@ -626,6 +633,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Momo Ayase"
|
||||
],
|
||||
"Danganronpa": [
|
||||
"Celestia Ludenberg",
|
||||
"Chiaki Nanami",
|
||||
"Junko Enoshima",
|
||||
"Monokuma",
|
||||
@@ -944,19 +952,23 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Aerith Gainsborough",
|
||||
"Auron",
|
||||
"Barret Wallace",
|
||||
"Beatrix (Final Fantasy)",
|
||||
"Cactuar",
|
||||
"Cecil Harvey",
|
||||
"Celes Chere",
|
||||
"Chocobo",
|
||||
"Cindy Aurum",
|
||||
"Cloud Strife",
|
||||
"Fran",
|
||||
"Kain Highwind",
|
||||
"Kefka Palazzo",
|
||||
"Lightning",
|
||||
"Lulu",
|
||||
"Lunafreya Nox Fleuret",
|
||||
"Moogle",
|
||||
"Noctis",
|
||||
"Rikku",
|
||||
"Rinoa Heartilly",
|
||||
"Rosa Farrell",
|
||||
"Rydia",
|
||||
"Sephiroth",
|
||||
@@ -968,6 +980,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Ultros",
|
||||
"Vincent Valentine",
|
||||
"Vivi Ornitier",
|
||||
"Y'shtola Rhul",
|
||||
"Yuffie Kisaragi",
|
||||
"Yuna",
|
||||
"Zidane"
|
||||
@@ -1214,7 +1227,9 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Pinhead"
|
||||
],
|
||||
"Hellsing": [
|
||||
"Alucard (Hellsing)"
|
||||
"Alucard (Hellsing)",
|
||||
"Integra Hellsing",
|
||||
"Seras Victoria"
|
||||
],
|
||||
"Hercules": [
|
||||
"Aphrodite (Hercules)",
|
||||
@@ -1530,6 +1545,9 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Lupin III": [
|
||||
"Fujiko Mine"
|
||||
],
|
||||
"Lycoris Recoil": [
|
||||
"Chisato Nishikigi"
|
||||
],
|
||||
"Mad Max": [
|
||||
"Immortan Joe",
|
||||
"Imperator Furiosa",
|
||||
@@ -1614,6 +1632,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Gorgon",
|
||||
"Green Goblin",
|
||||
"Groot",
|
||||
"Gwenpool",
|
||||
"Hawkeye",
|
||||
"Hela",
|
||||
"Hellcat",
|
||||
@@ -1796,8 +1815,10 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Megamind"
|
||||
],
|
||||
"Metal Gear": [
|
||||
"EVA (Metal Gear)",
|
||||
"Quiet",
|
||||
"Solid Snake"
|
||||
"Solid Snake",
|
||||
"The Boss"
|
||||
],
|
||||
"Metroid": [
|
||||
"Samus Aran (Power Suit)",
|
||||
@@ -1907,6 +1928,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Hawks",
|
||||
"Himiko Toga",
|
||||
"Midnight (My Hero Academia)",
|
||||
"Mina Ashido",
|
||||
"Mirko",
|
||||
"Momo Yaoyorozu",
|
||||
"Mt. Lady",
|
||||
@@ -1984,6 +2006,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Monkey D. Luffy",
|
||||
"Nami",
|
||||
"Nico Robin",
|
||||
"Perona",
|
||||
"Portgas D. Ace",
|
||||
"Roronoa Zoro",
|
||||
"Sanji",
|
||||
@@ -2318,6 +2341,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Shrek"
|
||||
],
|
||||
"Silent Hill": [
|
||||
"Heather Mason",
|
||||
"Nurse (Silent Hill)",
|
||||
"Pyramid Head"
|
||||
],
|
||||
@@ -2328,6 +2352,10 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Eris",
|
||||
"Sinbad"
|
||||
],
|
||||
"Skullgirls": [
|
||||
"Cerebella",
|
||||
"Parasoul"
|
||||
],
|
||||
"Sleeping Beauty": [
|
||||
"Aurora",
|
||||
"Maleficent"
|
||||
@@ -2360,6 +2388,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Siegfried Schtauffen",
|
||||
"Sophitia Alexandra",
|
||||
"Taki",
|
||||
"Tira",
|
||||
"Voldo",
|
||||
"Xianghua",
|
||||
"Yoshimitsu"
|
||||
@@ -2662,6 +2691,11 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Shredder",
|
||||
"Splinter"
|
||||
],
|
||||
"Tales series": [
|
||||
"Judith (Tales)",
|
||||
"Sheena Fujibayashi",
|
||||
"Velvet Crowe"
|
||||
],
|
||||
"Tangled": [
|
||||
"Flynn Rider",
|
||||
"Rapunzel"
|
||||
@@ -2686,6 +2720,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Spy (Team Fortress 2)"
|
||||
],
|
||||
"Tekken": [
|
||||
"Alisa Bosconovitch",
|
||||
"Anna Williams",
|
||||
"Asuka Kazama",
|
||||
"Azucena Ortiz",
|
||||
@@ -2813,6 +2848,7 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Athena Asamiya",
|
||||
"Iori Yagami",
|
||||
"K'",
|
||||
"Kula Diamond",
|
||||
"Kyo Kusanagi",
|
||||
"Leona Heidern",
|
||||
"Mai Shiranui",
|
||||
@@ -3172,6 +3208,9 @@ const COSPLAYER_FRANCHISES = {
|
||||
"Xenoblade Chronicles": [
|
||||
"Pyra"
|
||||
],
|
||||
"Xenosaga": [
|
||||
"KOS-MOS"
|
||||
],
|
||||
"Youngblood": [
|
||||
"Riptide",
|
||||
"Suprema",
|
||||
|
||||
File diff suppressed because one or more lines are too long
+3
-11
@@ -3363,7 +3363,9 @@ def _format_prose(
|
||||
eye_desc = _words(g("eye_color"), g("eye_shape"))
|
||||
features.append(eye_desc if _EYE_PART_RE.search(eye_desc) else f"{eye_desc} eyes")
|
||||
if g("nose"):
|
||||
features.append(_an(g("nose"), "nose"))
|
||||
# "wide with flared nostrils" -> "a wide nose with flared nostrils", not "...nostrils nose".
|
||||
shape, sep, rest = g("nose").partition(" with ")
|
||||
features.append(_an(shape, "nose") + (sep + rest if sep else ""))
|
||||
if g("lips"):
|
||||
features.append(g("lips") + " lips")
|
||||
if g("eyebrows"):
|
||||
@@ -5114,16 +5116,6 @@ if _COMFY_AVAILABLE:
|
||||
],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def fingerprint_inputs(cls, **kwargs: Any) -> float:
|
||||
# Force a fresh roll on every queue. ComfyUI can serve a stale cached
|
||||
# result when control_after_generate auto-advances the seed (ComfyUI
|
||||
# #11905); returning a never-equal value (NaN) makes this node's cache
|
||||
# signature always differ, so it re-executes and reads the new seed.
|
||||
# Pure cache control -- no RNG here, so a fixed seed still reproduces
|
||||
# exactly and nothing biases the randomization.
|
||||
return float("nan")
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
return io.NodeOutput(*run_identity_forge(kwargs))
|
||||
|
||||
@@ -275,16 +275,6 @@ if _COMFY_AVAILABLE:
|
||||
)],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def fingerprint_inputs(cls, **kwargs: Any) -> float:
|
||||
# Force a fresh roll on every queue. ComfyUI can serve a stale cached
|
||||
# result when control_after_generate auto-advances the seed (ComfyUI
|
||||
# #11905); returning a never-equal value (NaN) makes this node's cache
|
||||
# signature always differ, so it re-executes and reads the new seed.
|
||||
# Pure cache control -- no RNG here, so a fixed seed still reproduces
|
||||
# exactly and nothing biases the randomization.
|
||||
return float("nan")
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
own = build_archetype_json(
|
||||
|
||||
@@ -1041,20 +1041,6 @@ if _COMFY_AVAILABLE:
|
||||
)],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def fingerprint_inputs(cls, **kwargs: Any) -> float:
|
||||
# Force a fresh roll on every queue. ComfyUI can serve a stale cached
|
||||
# result when control_after_generate auto-advances the seed (ComfyUI
|
||||
# #11905); returning a never-equal value (NaN) makes this node's cache
|
||||
# signature always differ, so it re-executes and reads the new seed.
|
||||
# Pure cache control -- no RNG here, so a fixed seed still reproduces
|
||||
# exactly and nothing biases the randomization. Unconditional (ignores
|
||||
# kwargs entirely), so a new widget such as random_pool needs no entry
|
||||
# here: caching is already bypassed for every input, not enumerated
|
||||
# per-field -- see docs/architecture.md "Seeded nodes re-roll every
|
||||
# queue".
|
||||
return float("nan")
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
own = build_cosplayer_json(
|
||||
|
||||
@@ -483,16 +483,6 @@ if _COMFY_AVAILABLE:
|
||||
)],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def fingerprint_inputs(cls, **kwargs: Any) -> float:
|
||||
# Force a fresh roll on every queue. ComfyUI can serve a stale cached
|
||||
# result when control_after_generate auto-advances the seed (ComfyUI
|
||||
# #11905); returning a never-equal value (NaN) makes this node's cache
|
||||
# signature always differ, so it re-executes and reads the new seed.
|
||||
# Pure cache control -- no RNG here, so a fixed seed still reproduces
|
||||
# exactly and nothing biases the randomization.
|
||||
return float("nan")
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
own = build_creature_json(
|
||||
|
||||
@@ -187,7 +187,6 @@ if _COMFY_AVAILABLE:
|
||||
],
|
||||
)
|
||||
|
||||
# No fingerprint_inputs: no RNG and no auto-advancing widget (see Turnaround).
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
|
||||
@@ -256,13 +256,6 @@ if _COMFY_AVAILABLE:
|
||||
],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def fingerprint_inputs(cls, **kwargs: Any) -> Any:
|
||||
# 2.6.0: outfit_seed auto-advances (control_after_generate), and
|
||||
# ComfyUI#11905 can serve a stale cached result for that; NaN never equals
|
||||
# itself, so the node always re-runs. Identical prompts keep downstream cached.
|
||||
return float("nan")
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
prompts, labels = resolve_outfit_sheet(
|
||||
|
||||
@@ -31,9 +31,6 @@ Why a list output rather than an auto-incrementing ``index`` widget:
|
||||
downstream once per element (``execution.py`` -> ``merge_result_data``), and
|
||||
shorter inputs — the negative prompt, the model, the latent — broadcast off
|
||||
their last element, so an ordinary graph needs no rewiring.
|
||||
* **No cache hack.** With no auto-advancing widget and no RNG this node is a pure
|
||||
function of its inputs, so it needs no ``fingerprint_inputs`` (contrast the
|
||||
four seeded nodes — architecture.md -> "Seeded nodes re-roll every queue").
|
||||
|
||||
Why the resolved document is enough to re-render from: ``prompt_json`` is
|
||||
self-describing by contract — it is exactly what Vault Save writes and Vault Load
|
||||
@@ -529,11 +526,6 @@ if _COMFY_AVAILABLE:
|
||||
],
|
||||
)
|
||||
|
||||
# No fingerprint_inputs on purpose. The four seeded nodes need one because
|
||||
# control_after_generate silently advances a widget between queues
|
||||
# (ComfyUI#11905); this node has no such widget and no RNG, so it is a
|
||||
# pure function of its inputs and ComfyUI's normal caching is correct.
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
prompts, labels = resolve_turnaround(
|
||||
|
||||
@@ -232,8 +232,7 @@ def _character_fingerprint(vault_root: Path | str, name: str) -> Any:
|
||||
cached ``character_json`` instead of re-reading the file. Folding the
|
||||
selected entry's mtime + size into :meth:`fingerprint_inputs` makes a
|
||||
changed (or now-missing) file force a cache miss; an unchanged file still
|
||||
caches normally, unlike the NaN pattern the other preset nodes use (which
|
||||
disables caching on every queue, not only on a real change).
|
||||
caches normally.
|
||||
"""
|
||||
try:
|
||||
entry = _entry_dir(Path(vault_root), name)
|
||||
@@ -312,12 +311,12 @@ if _COMFY_AVAILABLE:
|
||||
# 1.5.5: see _character_fingerprint. Folds the SELECTED entry's
|
||||
# mtime+size into the cache key so an Overwrite/rename/delete that
|
||||
# left the `character` widget unchanged still invalidates the cache.
|
||||
# 2.6.0: a random pick rides an auto-advancing seed, which ComfyUI#11905
|
||||
# can serve stale from cache; NaN never equals itself, so it always re-runs
|
||||
# (cheap: one file read, and identical output keeps downstream cached).
|
||||
if kwargs.get("character") == _RANDOM:
|
||||
return float("nan")
|
||||
return _character_fingerprint(_vault_root(), kwargs.get("character", _NO_CHARACTERS))
|
||||
# 2.7.1: a random pick folds in WHICH entry the seed lands on, so a save or
|
||||
# delete that moves the pick re-runs; the seed itself is already in the key.
|
||||
root = _vault_root()
|
||||
name = resolve_selection(root, kwargs.get("character", _NO_CHARACTERS),
|
||||
int(kwargs.get("seed", 0) or 0))
|
||||
return (name, _character_fingerprint(root, name))
|
||||
|
||||
@classmethod
|
||||
def execute(cls, **kwargs: Any) -> "io.NodeOutput":
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "comfyui-identity-forge"
|
||||
version = "2.6.1"
|
||||
version = "2.7.1"
|
||||
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 also show offline. Sheet nodes build one-queue reference sets of the same resolved character: Turnaround (camera views), Expression Sheet, Outfit Sheet, Scene Sheet (several places) and Age Progression. 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"
|
||||
|
||||
+63
-15
@@ -1,7 +1,8 @@
|
||||
"""Render, record and publish the gallery images for roster entries.
|
||||
|
||||
The three galleries show one image per cosplayer, archetype and creature.
|
||||
Keeping ~2,200 of those honest by hand is not possible, so the build is
|
||||
The galleries show one image per cosplayer, archetype and creature, plus a set
|
||||
of fixed-seed people from the plain Identity Forge node (``PEOPLE``).
|
||||
Keeping thousands of those honest by hand is not possible, so the build is
|
||||
content-addressed: every image records a hash of the prose that produced it,
|
||||
and an entry whose prose has changed (its own text, or an engine change) is
|
||||
reported stale until it is re-rendered.
|
||||
@@ -77,7 +78,24 @@ SEED_FORMULA = "int(sha256(name)[:15], 16)"
|
||||
#: workflow uses, so originals land beside their hand-run renders.
|
||||
ORIGINALS_PREFIX = "identityforge"
|
||||
|
||||
KINDS = ("cosplay", "archetypes", "creatures")
|
||||
KINDS = ("cosplay", "archetypes", "creatures", "people")
|
||||
|
||||
#: The people gallery (2.7.0): the plain Identity Forge node, no preset node, every
|
||||
#: widget at its schema default except the gender. Seeds were scouted so the set
|
||||
#: spans age, outfit style and indoor/outdoor places; an engine change can move what
|
||||
#: a seed draws, and the prose hash then reports the tile stale. No gallery pins
|
||||
#: apply, so a card's seed and gender reproduce its prompt on a fresh node.
|
||||
PEOPLE: dict[str, dict[str, Any]] = {
|
||||
f"Sample {number:02d}": {"seed": seed, "widgets": {"gender": gender}}
|
||||
for number, (seed, gender) in enumerate((
|
||||
(43, "Female"), (82, "Male"), (4, "Female"), (59, "Male"),
|
||||
(7, "Female"), (73, "Male"), (11, "Female"), (76, "Male"),
|
||||
(50, "Female"), (61, "Male"), (58, "Female"), (83, "Male"),
|
||||
(27, "Female"), (30, "Male"), (19, "Female"), (37, "Male"),
|
||||
(6, "Female"), (86, "Male"), (70, "Female"), (74, "Male"),
|
||||
(62, "Female"), (46, "Male"), (52, "Female"), (23, "Male"),
|
||||
), 1)
|
||||
}
|
||||
|
||||
#: Widget values, mirrored from the workflows the gallery images were rendered
|
||||
#: with. Every one is checked against the node's own option list before use, so
|
||||
@@ -368,6 +386,8 @@ def entries_for(kind: str) -> dict[str, dict]:
|
||||
from data.creatures import CREATURES
|
||||
|
||||
return CREATURES
|
||||
if kind == "people":
|
||||
return PEOPLE
|
||||
raise RenderError(f"Unknown kind: {kind!r}")
|
||||
|
||||
|
||||
@@ -396,12 +416,12 @@ def entry_hash(kind: str, name: str, reroll: int = 0) -> str:
|
||||
return hashlib.sha256(payload.encode("utf-8")).hexdigest()[:16]
|
||||
|
||||
|
||||
def record_reroll(name: str, record: dict) -> int:
|
||||
def record_reroll(kind: str, name: str, record: dict) -> int:
|
||||
"""The ``--reroll`` a manifest record was rendered with (0 when it has no seed)."""
|
||||
return record.get("seed", entry_seed(name)) - entry_seed(name)
|
||||
return record.get("seed", entry_seed(kind, name)) - entry_seed(kind, name)
|
||||
|
||||
|
||||
def entry_seed(name: str, reroll: int = 0) -> int:
|
||||
def entry_seed(kind: str, name: str, reroll: int = 0) -> int:
|
||||
"""Deterministic per entry, so the same entry always re-renders the same person.
|
||||
|
||||
``reroll`` re-draws a single bad tile without touching the data. The seed
|
||||
@@ -410,7 +430,11 @@ def entry_seed(name: str, reroll: int = 0) -> int:
|
||||
in profile against a window shows neither the mask nor the face. A non-zero
|
||||
reroll is recorded in the manifest as an explicit ``seed``, because a tile
|
||||
nobody can reproduce is worse than a tile nobody likes.
|
||||
|
||||
A people sample's seed is its own fixed one, shown on its card.
|
||||
"""
|
||||
if kind == "people":
|
||||
return PEOPLE[name]["seed"] + reroll
|
||||
return int(hashlib.sha256(name.encode("utf-8")).hexdigest()[:15], 16) + reroll
|
||||
|
||||
|
||||
@@ -468,7 +492,7 @@ def survey(kinds: tuple[str, ...] = KINDS) -> dict[str, dict[str, list[str]]]:
|
||||
record = recorded.get(name)
|
||||
if record is None:
|
||||
missing.append(name)
|
||||
elif record.get("hash") != entry_hash(kind, name, record_reroll(name, record)):
|
||||
elif record.get("hash") != entry_hash(kind, name, record_reroll(kind, name, record)):
|
||||
stale.append(name)
|
||||
# 1.10.0: rendered but never pushed to gh-pages, which --check used to
|
||||
# pass. A record without the key predates it: published.
|
||||
@@ -566,7 +590,14 @@ def resolve_prose(kind: str, name: str, reroll: int = 0) -> str:
|
||||
from nodes.identity_forge_cosplayer import IdentityForgeCosplayer
|
||||
from nodes.identity_forge_creature import IdentityForgeCreature
|
||||
|
||||
seed = entry_seed(name, reroll)
|
||||
seed = entry_seed(kind, name, reroll)
|
||||
if kind == "people":
|
||||
widgets = PEOPLE[name]["widgets"]
|
||||
_check_options(IdentityForge, widgets)
|
||||
forge_kwargs = {spec.id: spec.default for spec in IdentityForge.define_schema().inputs
|
||||
if hasattr(spec, "default")}
|
||||
forge_kwargs.update(seed=seed, archetype_json="", **widgets)
|
||||
return _forged_prose(IdentityForge, forge_kwargs, kind, name)
|
||||
if kind == "cosplay":
|
||||
_check_options(IdentityForgeCosplayer, COSPLAYER_WIDGETS)
|
||||
preset = IdentityForgeCosplayer.execute(
|
||||
@@ -595,13 +626,30 @@ def resolve_prose(kind: str, name: str, reroll: int = 0) -> str:
|
||||
forge_kwargs["gender"] = _GALLERY_GENDER[kind][name]
|
||||
if name in _GALLERY_POSE.get(kind, {}):
|
||||
forge_kwargs["pose"] = _GALLERY_POSE[kind][name]
|
||||
forged = IdentityForge.execute(**forge_kwargs)
|
||||
prose = _unwrap(forged)[0]
|
||||
return _forged_prose(IdentityForge, forge_kwargs, kind, name)
|
||||
|
||||
|
||||
def _forged_prose(forge_class: Any, forge_kwargs: dict[str, Any], kind: str, name: str) -> str:
|
||||
prose = _unwrap(forge_class.execute(**forge_kwargs))[0]
|
||||
if not isinstance(prose, str) or not prose.strip():
|
||||
raise RenderError(f"{kind}/{name}: the engine produced no prose")
|
||||
return prose
|
||||
|
||||
|
||||
def people_card(name: str) -> dict[str, Any]:
|
||||
"""A people sample's card: its seed, the widgets it pins, and its full prompt.
|
||||
|
||||
Read by ``gallery/people/build_manifest.py``. Honours a recorded ``--reroll``, so
|
||||
the card always names the seed its image was rendered with.
|
||||
"""
|
||||
record = load_manifest()["entries"].get("people", {}).get(name, {})
|
||||
reroll = record_reroll("people", name, record)
|
||||
seed = entry_seed("people", name, reroll)
|
||||
pins = ", ".join(f"{key} {value}" for key, value in PEOPLE[name]["widgets"].items())
|
||||
return {"seed": seed, "settings": f"seed {seed}, {pins}",
|
||||
"prompt": resolve_prose("people", name, reroll)}
|
||||
|
||||
|
||||
def positive_prompt(prose: str, settings: dict[str, Any]) -> str:
|
||||
"""Style prefix first: a trailing noun-phrase style gets drawn as scene content."""
|
||||
return f"{settings['style_prefix']}{settings['style_delimiter']}{prose}"
|
||||
@@ -815,7 +863,7 @@ def render_one(client: ComfyClient, kind: str, name: str, settings: dict[str, An
|
||||
stem = normalize_name(name)
|
||||
prose = resolve_prose(kind, name, reroll)
|
||||
graph = build_graph(
|
||||
positive_prompt(prose, settings), entry_seed(name, reroll), settings,
|
||||
positive_prompt(prose, settings), entry_seed(kind, name, reroll), settings,
|
||||
save_originals, stem,
|
||||
)
|
||||
prompt_id = client.submit(graph, front=front)
|
||||
@@ -1055,7 +1103,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
record = recorded.get(name)
|
||||
if record is None:
|
||||
continue
|
||||
fresh = entry_hash(kind, name, record_reroll(name, record))
|
||||
fresh = entry_hash(kind, name, record_reroll(kind, name, record))
|
||||
if record.get("hash") != fresh:
|
||||
record["hash"] = fresh
|
||||
moved += 1
|
||||
@@ -1100,12 +1148,12 @@ def main(argv: list[str] | None = None) -> int:
|
||||
if args.dry_run:
|
||||
for kind, name in targets:
|
||||
prose = resolve_prose(kind, name, args.reroll)
|
||||
print(f"\n=== {kind} / {name} (seed {entry_seed(name, args.reroll)}) ===")
|
||||
print(f"\n=== {kind} / {name} (seed {entry_seed(kind, name, args.reroll)}) ===")
|
||||
print(positive_prompt(prose, settings))
|
||||
print(f"\n--- graph for {targets[0][1]} ---")
|
||||
print(json.dumps(
|
||||
build_graph(positive_prompt(resolve_prose(*targets[0], args.reroll), settings),
|
||||
entry_seed(targets[0][1], args.reroll), settings,
|
||||
entry_seed(*targets[0], args.reroll), settings,
|
||||
args.save_originals, targets[0][1]),
|
||||
indent=2,
|
||||
))
|
||||
@@ -1149,7 +1197,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
record = {"hash": entry_hash(kind, name, args.reroll), "rendered": today,
|
||||
"published": False}
|
||||
if args.reroll:
|
||||
record["seed"] = entry_seed(name, args.reroll)
|
||||
record["seed"] = entry_seed(kind, 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()
|
||||
|
||||
@@ -2550,6 +2550,7 @@
|
||||
"Aleta Ogord",
|
||||
"Alice",
|
||||
"Alice Nakiri",
|
||||
"Alisa Bosconovitch",
|
||||
"Alita",
|
||||
"All Might",
|
||||
"Allen the Alien",
|
||||
@@ -2683,6 +2684,7 @@
|
||||
"Beast (X-Men)",
|
||||
"Beast Boy",
|
||||
"Beast Man",
|
||||
"Beatrix (Final Fantasy)",
|
||||
"Beerus",
|
||||
"Beetlejuice",
|
||||
"Bellatrix Lestrange",
|
||||
@@ -2821,8 +2823,10 @@
|
||||
"Catwoman",
|
||||
"Cecil Harvey",
|
||||
"Celes Chere",
|
||||
"Celestia Ludenberg",
|
||||
"Cell",
|
||||
"Celty Sturluson",
|
||||
"Cerebella",
|
||||
"Cersei Lannister",
|
||||
"Cervantes de Leon",
|
||||
"Cetrion",
|
||||
@@ -2848,6 +2852,7 @@
|
||||
"Chiaki Nanami",
|
||||
"Chiana",
|
||||
"Chief Chirpa",
|
||||
"Chisato Nishikigi",
|
||||
"Chizuru Mizuhara",
|
||||
"Chocobo",
|
||||
"Chopper",
|
||||
@@ -2860,6 +2865,7 @@
|
||||
"Ciel Phantomhive",
|
||||
"Cinder",
|
||||
"Cinderella",
|
||||
"Cindy Aurum",
|
||||
"Circe",
|
||||
"Ciri",
|
||||
"Claire Redfield",
|
||||
@@ -3015,6 +3021,7 @@
|
||||
"Dupli-Kate",
|
||||
"Duros",
|
||||
"E. Honda",
|
||||
"EVA (Metal Gear)",
|
||||
"EVE (Stellar Blade)",
|
||||
"Eda Clawthorne",
|
||||
"Edelgard",
|
||||
@@ -3073,6 +3080,7 @@
|
||||
"Etrigan the Demon",
|
||||
"Eureka",
|
||||
"Evelynn",
|
||||
"Evie Frye",
|
||||
"Evil Queen",
|
||||
"Evil-Lyn",
|
||||
"Eyedol",
|
||||
@@ -3222,6 +3230,7 @@
|
||||
"Guy Gardner",
|
||||
"Gwen (League of Legends)",
|
||||
"Gwen Tennyson",
|
||||
"Gwenpool",
|
||||
"Gyarados",
|
||||
"Gypsy",
|
||||
"Hades",
|
||||
@@ -3246,6 +3255,7 @@
|
||||
"Hawks",
|
||||
"Hayate",
|
||||
"He-Man",
|
||||
"Heather Mason",
|
||||
"Heavy (Team Fortress 2)",
|
||||
"Hector Barbossa",
|
||||
"Hector Rivera",
|
||||
@@ -3273,6 +3283,7 @@
|
||||
"Hit-Girl",
|
||||
"Hitagi Senjougahara",
|
||||
"Hitomi",
|
||||
"Hitori Gotoh",
|
||||
"Hoggish Greedly",
|
||||
"Holli Would",
|
||||
"Holo",
|
||||
@@ -3315,6 +3326,7 @@
|
||||
"Ino Yamanaka",
|
||||
"Inosuke Hashibira",
|
||||
"Inspector Gadget",
|
||||
"Integra Hellsing",
|
||||
"Inuyasha",
|
||||
"Invincible",
|
||||
"Invisible Woman",
|
||||
@@ -3409,6 +3421,7 @@
|
||||
"Jubilee",
|
||||
"Judge Anderson",
|
||||
"Judge Dredd",
|
||||
"Judith (Tales)",
|
||||
"Judy Alvarez",
|
||||
"Judy Hopps",
|
||||
"Judy Jetson",
|
||||
@@ -3425,6 +3438,7 @@
|
||||
"Jyn Erso",
|
||||
"K'",
|
||||
"K-2SO",
|
||||
"KOS-MOS",
|
||||
"Ka D'Argo",
|
||||
"Kabal",
|
||||
"Kabuki",
|
||||
@@ -3514,6 +3528,7 @@
|
||||
"Krusty the Clown",
|
||||
"Krystalin",
|
||||
"Kuiil",
|
||||
"Kula Diamond",
|
||||
"Kung Lao",
|
||||
"Kurapika",
|
||||
"Kuromi",
|
||||
@@ -3630,6 +3645,7 @@
|
||||
"Lumine",
|
||||
"Luna (Sailor Moon)",
|
||||
"Luna Lovegood",
|
||||
"Lunafreya Nox Fleuret",
|
||||
"Lune",
|
||||
"Lurch",
|
||||
"Lust",
|
||||
@@ -3764,6 +3780,7 @@
|
||||
"Miles Morales",
|
||||
"Milim Nava",
|
||||
"Millia Rage",
|
||||
"Mina Ashido",
|
||||
"Minato Namikaze",
|
||||
"Minerva McGonagall",
|
||||
"Ming the Merciless",
|
||||
@@ -3775,6 +3792,7 @@
|
||||
"Mirabel Madrigal",
|
||||
"Mirajane Strauss",
|
||||
"Miranda Lawson",
|
||||
"Miriam (Bloodstained)",
|
||||
"Mirko",
|
||||
"Misa Amane",
|
||||
"Misaka Mikoto",
|
||||
@@ -3943,6 +3961,7 @@
|
||||
"Panty Anarchy",
|
||||
"Papa Smurf",
|
||||
"Papyrus",
|
||||
"Parasoul",
|
||||
"Patrick Star",
|
||||
"Paul Atreides",
|
||||
"Paul Bunyan",
|
||||
@@ -3955,6 +3974,7 @@
|
||||
"Peggy Carter",
|
||||
"Pennywise",
|
||||
"Peridot",
|
||||
"Perona",
|
||||
"Peter Griffin",
|
||||
"Peter Pan",
|
||||
"Phantom Lady (Dee Tyler)",
|
||||
@@ -4094,6 +4114,7 @@
|
||||
"Rikuo",
|
||||
"Rin Tohsaka",
|
||||
"Rindou Kobayashi",
|
||||
"Rinoa Heartilly",
|
||||
"Riptide",
|
||||
"River Tam",
|
||||
"Rivet",
|
||||
@@ -4218,6 +4239,7 @@
|
||||
"Seong Mi-na",
|
||||
"Sephiroth",
|
||||
"Seraphine",
|
||||
"Seras Victoria",
|
||||
"Serena",
|
||||
"Sersi",
|
||||
"Serval (Kemono Friends)",
|
||||
@@ -4239,6 +4261,7 @@
|
||||
"She-Hulk",
|
||||
"She-Ra",
|
||||
"Sheena",
|
||||
"Sheena Fujibayashi",
|
||||
"Sheeva",
|
||||
"Shego",
|
||||
"Sheik",
|
||||
@@ -4411,6 +4434,7 @@
|
||||
"The 50 Foot Woman",
|
||||
"The Atom",
|
||||
"The BFG",
|
||||
"The Boss",
|
||||
"The Bride (Beatrix Kiddo)",
|
||||
"The Cat in the Hat",
|
||||
"The Comedian",
|
||||
@@ -4469,6 +4493,7 @@
|
||||
"Tina Belcher",
|
||||
"Tinker Bell",
|
||||
"Tiny Tina",
|
||||
"Tira",
|
||||
"Titania",
|
||||
"Toad",
|
||||
"Tohka Yatogami",
|
||||
@@ -4533,6 +4558,7 @@
|
||||
"Vegeta",
|
||||
"Velma Dinkley",
|
||||
"Velocity",
|
||||
"Velvet Crowe",
|
||||
"Venom",
|
||||
"Venti",
|
||||
"Venus (Marvel)",
|
||||
@@ -4604,6 +4630,7 @@
|
||||
"Xena",
|
||||
"Xenomorph",
|
||||
"Xianghua",
|
||||
"Y'shtola Rhul",
|
||||
"Yae Miko",
|
||||
"Yamada Asaemon Sagiri",
|
||||
"Yamato (One Piece)",
|
||||
@@ -4733,6 +4760,7 @@
|
||||
"Franchise: TMNT",
|
||||
"Franchise: Tekken",
|
||||
"Franchise: The Boys",
|
||||
"Franchise: The King of Fighters",
|
||||
"Franchise: The Legend of Zelda",
|
||||
"Franchise: The Lord of the Rings",
|
||||
"Franchise: The Sandman",
|
||||
|
||||
+19
-11
@@ -5631,6 +5631,14 @@ class ValidatorGuardTests(unittest.TestCase):
|
||||
self.assertEqual(
|
||||
_duplicate_literal_keys(ROOT / filename, dict_name), [], filename)
|
||||
|
||||
def test_tobacco_guard_catches_smoking_items_but_not_garment_cuts(self):
|
||||
from tests.validate_data import _SMOKING_RE
|
||||
for bad in ("a thick lit cigar", "a corncob pipe", "a calabash pipe", "a hookah"):
|
||||
self.assertTrue(_SMOKING_RE.search(bad), bad)
|
||||
for ok in ("cigarette trousers", "a rusted lead pipe", "a blowdart pipe",
|
||||
"barbecue joint", "jointed limbs", "a bagpipe"):
|
||||
self.assertIsNone(_SMOKING_RE.search(ok), ok)
|
||||
|
||||
|
||||
class UserOptionsIntegrationTests(unittest.TestCase):
|
||||
"""user_options.json additions must be first-class: reachable by the random
|
||||
@@ -6144,19 +6152,19 @@ 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, at 1.11.0, at 2.1.0 and at 2.2.0 to
|
||||
# cosplayers, one folded duplicate), at 1.9.0, at 1.11.0, at 2.1.0, at 2.2.0 and at 2.7.0 to
|
||||
# the new ground truth. It is expected to need refreshing every time the roster grows.
|
||||
expected = {
|
||||
(_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_ANY, 0): 'Rebecca (Cyberpunk)',
|
||||
(_RANDOM_ANY, 1): 'Emma Frost',
|
||||
(_RANDOM_ANY, 2): 'Boba Fett',
|
||||
(_RANDOM_ANY, 3): 'Kenny McCormick',
|
||||
(_RANDOM_ANY, 4): 'Katma Tui',
|
||||
(_RANDOM_FEMALE, 0): 'Ranni the Witch',
|
||||
(_RANDOM_FEMALE, 1): 'Faith Connors',
|
||||
(_RANDOM_FEMALE, 2): 'Blake Belladonna',
|
||||
(_RANDOM_FEMALE, 3): 'Lapis Lazuli',
|
||||
(_RANDOM_FEMALE, 4): 'Lady Tremaine',
|
||||
(_RANDOM_MALE, 0): 'Reverse-Flash',
|
||||
(_RANDOM_MALE, 1): 'Duff Killigan',
|
||||
(_RANDOM_MALE, 2): 'Bowser',
|
||||
|
||||
@@ -37,7 +37,10 @@ except ImportError:
|
||||
PILImage = None
|
||||
|
||||
GALLERY_ROOT = ROOT / "gallery"
|
||||
KINDS = ("cosplay", "archetypes", "creatures")
|
||||
KINDS = ("cosplay", "archetypes", "creatures", "people")
|
||||
#: The galleries built from a roster. The people gallery is fixed seeds: no release
|
||||
#: stamps and no downloadable cycle workflow (its cards carry the seed and prompt).
|
||||
ROSTER_KINDS = KINDS[:3]
|
||||
SCRIPTS = ("publish.py", "build_manifest.py", "build_gallery_images.py",
|
||||
"cross_reference.py")
|
||||
|
||||
@@ -396,7 +399,7 @@ class StagedFileTests(unittest.TestCase):
|
||||
f"the file does not exist; it would be skipped silently")
|
||||
|
||||
def test_every_gallery_ships_a_downloadable_workflow(self):
|
||||
for kind in KINDS:
|
||||
for kind in ROSTER_KINDS:
|
||||
pub = load(kind, "publish")
|
||||
workflows = [f for f in pub.PAGE_FILES if f.endswith(".json")]
|
||||
self.assertEqual(len(workflows), 1,
|
||||
@@ -407,7 +410,7 @@ class StagedFileTests(unittest.TestCase):
|
||||
|
||||
def test_the_page_links_to_the_workflow_it_stages(self):
|
||||
"""The link and the staged filename are set in two different files."""
|
||||
for kind in KINDS:
|
||||
for kind in ROSTER_KINDS:
|
||||
pub = load(kind, "publish")
|
||||
workflow = next(f for f in pub.PAGE_FILES if f.endswith(".json"))
|
||||
page = (GALLERY_ROOT / kind / "index.html").read_text(encoding="utf-8")
|
||||
@@ -599,7 +602,7 @@ class ReleaseStampTests(unittest.TestCase):
|
||||
self.assertEqual({k: added["cosplayers"][k] for k in before}, before)
|
||||
|
||||
def test_the_manifest_carries_what_the_sort_needs(self):
|
||||
for kind in KINDS:
|
||||
for kind in ROSTER_KINDS:
|
||||
mod = load(kind, "build_manifest")
|
||||
with self.subTest(kind):
|
||||
self.assertTrue(mod.pack_version())
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"""Contracts every node class in ``nodes/`` keeps (2.6.0).
|
||||
|
||||
These were per-node tests (the Turnaround's tooltip check) or memory-only rules, and
|
||||
the Outfit Sheet shipped in 2.3.0 with an auto-advancing ``outfit_seed`` and no cache
|
||||
buster. Walking every module means a new node is covered without anyone listing it.
|
||||
These were per-node tests (the Turnaround's tooltip check) or memory-only rules.
|
||||
Walking every module means a new node is covered without anyone listing it.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -43,20 +42,14 @@ class NodeContractTests(unittest.TestCase):
|
||||
self.assertTrue((output.tooltip or "").strip(),
|
||||
f"{name} output {output.display_name}")
|
||||
|
||||
def test_an_auto_advancing_widget_busts_the_cache(self):
|
||||
"""ComfyUI#11905 can serve a cached result after a control_after_generate
|
||||
widget advances; such a node must define fingerprint_inputs (NaN when it
|
||||
matters, see the seeded nodes and Vault Load's random pick)."""
|
||||
def test_no_node_returns_a_nan_fingerprint(self):
|
||||
"""2.7.1: NaN never equals itself, and ComfyUI folds every ancestor's
|
||||
fingerprint into a node's cache key, so one NaN re-runs the whole graph
|
||||
downstream (sampler included) every queue. A seed is already in the key."""
|
||||
for name, cls in self.classes.items():
|
||||
if any(getattr(spec, "control_after_generate", None)
|
||||
for spec in cls.define_schema().inputs):
|
||||
self.assertIn("fingerprint_inputs", cls.__dict__, name)
|
||||
|
||||
def test_outfit_sheet_and_a_random_vault_pick_always_rerun(self):
|
||||
self.assertTrue(math.isnan(
|
||||
self.classes["IdentityForgeOutfitSheet"].fingerprint_inputs(outfit_seed=3)))
|
||||
self.assertTrue(math.isnan(self.classes["IdentityForgeVaultLoad"].fingerprint_inputs(
|
||||
character="(random saved character)", seed=3)))
|
||||
if "fingerprint_inputs" in cls.__dict__:
|
||||
value = cls.fingerprint_inputs(character="(random saved character)", seed=3)
|
||||
self.assertFalse(isinstance(value, float) and math.isnan(value), name)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -173,16 +173,34 @@ class EntryHashTests(unittest.TestCase):
|
||||
|
||||
def test_a_rerolled_tile_hashes_its_own_seed(self) -> None:
|
||||
name = "2B"
|
||||
record = {"seed": render_gallery.entry_seed(name, 3)}
|
||||
self.assertEqual(render_gallery.record_reroll(name, record), 3)
|
||||
self.assertEqual(render_gallery.record_reroll(name, {}), 0)
|
||||
record = {"seed": render_gallery.entry_seed("cosplay", name, 3)}
|
||||
self.assertEqual(render_gallery.record_reroll("cosplay", name, record), 3)
|
||||
self.assertEqual(render_gallery.record_reroll("cosplay", name, {}), 0)
|
||||
|
||||
def test_a_people_sample_uses_its_own_seed_on_a_stock_node(self) -> None:
|
||||
# 2.7.0: a card names its seed and gender, and that pair alone must
|
||||
# reproduce the prompt on a fresh node: no preset node, no gallery pins.
|
||||
from nodes.identity_forge import IdentityForge
|
||||
|
||||
seeds = [(s["seed"], s["widgets"]["gender"]) for s in render_gallery.PEOPLE.values()]
|
||||
self.assertEqual(len(seeds), len(set(seeds)), "two samples share a seed")
|
||||
name, sample = next(iter(render_gallery.PEOPLE.items()))
|
||||
self.assertEqual(render_gallery.entry_seed("people", name, 2), sample["seed"] + 2)
|
||||
stock = {s.id: s.default for s in IdentityForge.define_schema().inputs
|
||||
if hasattr(s, "default")}
|
||||
stock.update(seed=sample["seed"], archetype_json="", **sample["widgets"])
|
||||
prose = IdentityForge.execute(**stock).args[0]
|
||||
self.assertEqual(render_gallery.resolve_prose("people", name), prose)
|
||||
card = render_gallery.people_card(name)
|
||||
self.assertEqual(card["prompt"], prose)
|
||||
self.assertIn(f"seed {sample['seed']}", card["settings"])
|
||||
|
||||
def test_seed_is_deterministic_and_matches_the_recorded_formula(self) -> None:
|
||||
import hashlib
|
||||
|
||||
name = "Jack Skellington"
|
||||
expected = int(hashlib.sha256(name.encode("utf-8")).hexdigest()[:15], 16)
|
||||
self.assertEqual(render_gallery.entry_seed(name), expected)
|
||||
self.assertEqual(render_gallery.entry_seed("cosplay", name), expected)
|
||||
self.assertEqual(
|
||||
render_gallery.load_manifest()["seed_formula"],
|
||||
render_gallery.SEED_FORMULA,
|
||||
|
||||
@@ -452,16 +452,11 @@ class SchemaShapeTests(unittest.TestCase):
|
||||
"only 'pose' may share a name with an IdentityForge input")
|
||||
|
||||
def test_no_widget_auto_advances(self):
|
||||
# The corollary of having no fingerprint_inputs: this node is a pure
|
||||
# function, so ComfyUI's normal caching is correct. A widget with
|
||||
# control_after_generate would reintroduce ComfyUI#11905 and need the
|
||||
# NaN signature back (architecture.md -> "Seeded nodes re-roll every queue").
|
||||
for spec in self.schema.inputs:
|
||||
self.assertIsNone(getattr(spec, "control_after_generate", None), spec.id)
|
||||
# `vars`, not `hasattr`: the real comfy_api's ComfyNode base declares
|
||||
# fingerprint_inputs (raising NotImplementedError), so hasattr is True on
|
||||
# every node and would assert nothing. The stub declares no such method,
|
||||
# which is exactly how a hasattr check passes here and fails in ComfyUI.
|
||||
# every node. The test stub also declares the base method.
|
||||
self.assertNotIn("fingerprint_inputs", vars(IdentityForgeTurnaround))
|
||||
|
||||
def test_character_json_is_a_required_socket_not_a_multiline_box(self):
|
||||
|
||||
@@ -1008,9 +1008,38 @@ def validate() -> list[str]:
|
||||
if band not in SKIN_TONE_BANDS:
|
||||
errors.append(f"ETHNICITY_REGION['{ethnicity}']: unknown band {band!r}")
|
||||
|
||||
# --- no tobacco or drugs anywhere in the prose (maintainer's standing rule) ---
|
||||
for where, data in (("COSPLAYERS", COSPLAYERS), ("ARCHETYPES", ARCHETYPES),
|
||||
("CREATURES", CREATURES), ("COSTUME_SLOTS", COSTUME_SLOTS),
|
||||
("OUTFIT_DESCRIPTIONS", OUTFIT_DESCRIPTIONS),
|
||||
("FIELD_DEFINITIONS", FIELD_DEFINITIONS)):
|
||||
for path, text in _strings(data, where):
|
||||
hit = _SMOKING_RE.search(text)
|
||||
if hit:
|
||||
errors.append(f"{path}: names {hit.group(0)!r} - no tobacco or drug items")
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
#: Tobacco and drug items. "cigarette trousers/pants" is a garment cut, not a cigarette.
|
||||
_SMOKING_RE = re.compile(
|
||||
r"\b(?:cigars?|cigarillos?|cheroots?|cigarettes?(?! (?:trousers|pants|jeans|skirts?))|"
|
||||
r"tobacco|vapes?|vaping|hookahs?|bongs?|marijuana|cannabis|opium|narcotics?|"
|
||||
r"(?:corncob|calabash|briar|clay|tobacco|smoking) pipes?)\b", re.IGNORECASE)
|
||||
|
||||
|
||||
def _strings(value, path: str):
|
||||
"""Yield (path, text) for every string nested in dicts, lists and tuples."""
|
||||
if isinstance(value, str):
|
||||
yield path, value
|
||||
elif isinstance(value, dict):
|
||||
for key, item in value.items():
|
||||
yield from _strings(item, f"{path}[{key!r}]")
|
||||
elif isinstance(value, (list, tuple)):
|
||||
for item in value:
|
||||
yield from _strings(item, path)
|
||||
|
||||
|
||||
def _archetype_lock_clashes() -> list[str]:
|
||||
"""1.5.1: no archetype may lock a pair the engine's own rules forbid.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user