Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26c5416fc5 | ||
|
|
fbf5bad67e | ||
|
|
70d7e5374a |
@@ -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,13 @@ investigation notes, 1.5.0+ — the reasoning for every item in the release list
|
||||
|
||||
## Current state
|
||||
|
||||
_Last verified: 2026-11-18_
|
||||
_Last verified: 2026-11-19_
|
||||
|
||||
- **Status:** in active development; main is v2.7.0 (`pyproject.toml`); 2.0.0 was the seed epoch (every seed resolves differently from 1.x, by design). Published to the Comfy Registry via `.github/workflows/publish_action.yml`, which fires on a `pyproject.toml` version change on `main` - bump the version on every functional commit or the release never ships. CI (`.github/workflows/ci.yml`) is deliberately dependency-free, has a Windows leg, and `publish-node` needs it (1.8.0).
|
||||
- **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".
|
||||
@@ -23,7 +24,6 @@ _Last verified: 2026-11-18_
|
||||
- **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".
|
||||
- **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).
|
||||
|
||||
|
||||
+5
-29
@@ -223,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.**
|
||||
@@ -239,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
|
||||
@@ -376,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.
|
||||
|
||||
@@ -2636,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
|
||||
@@ -3535,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.
|
||||
|
||||
@@ -1841,3 +1841,18 @@ A "same seed, one lock changed" row was considered and dropped: locking an early
|
||||
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.
|
||||
|
||||
@@ -5116,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.7.0"
|
||||
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"
|
||||
|
||||
@@ -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__":
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user