Files
EnragedAntelope 34f2c89740 2.8.0: vault pick survives, picker plural search and Queue random (#32)
- Vault Load: validate_inputs names character, so a name this vault lacks passes the upstream through instead of failing ComfyUI's combo check
- Vault frontend: Refresh keeps a missing or unreachable pick, only placeholders move to the first entry; rename follows the pick; deleting the pick moves to the first entry
- Picker: plural query also matches the whole-word singular ("boots" finds "boot")
- Picker: Queue random button queues one random matching entry
- Tests: Python validate_inputs contract, jsdom vault selection and picker search/queue tests
- CI: setup-python and setup-node pin comments name v7.1.0
- Docs: history 2.8.0, usage, README, backlog items closed, AGENTS.md state
2026-11-24 20:47:47 -05:00

24 KiB

Identity Forge — usage guide

The full reference for the main node's controls, locking, constraints, custom options, and field set. For the overview, install, and node chaining, see the README. Per-node design notes live in cosplayer-notes.md and creature-notes.md; the system map is in architecture.md.

Controls

The widgets at the top of Identity Forge steer the whole character:

Control Default Effect
seed randomize Reproducibility. Auto-randomizes each run; set to fixed to repeat. Not written to the JSON.
gender Any Pronouns + gender-specific presentation (no beards on women; no random makeup, nail polish, feminine jewellery or hairstyles on men). Any rolls a coherent man OR woman each run (a 50/50 coin-flip; an anatomical lock like a beard decides it), so features stay self-consistent. Defers to a connected preset's gender. To instead unlock fully mixed-gender output, set wardrobe to Any (see below).
wardrobe Match gender Outfit wardrobe and presentation. Match gender follows the (rolled) gender; Feminine/Masculine force a wardrobe (e.g. a man in feminine outfits). Any mixes outfits — and, when gender is also Any, restores the fully mixed-gender "anything goes" mode (both feature pools unioned, neutral they/them pronouns). On a man, a Feminine or Any wardrobe also lifts the masculine defaults for jewellery, nails, footwear, bags and makeup, so the whole femme look is reachable; Match gender/Masculine keep him bare-faced, unjewelled and carrying a men's bag if any. Structural defaults (hair, brows, lips, eye shape, bust) always apply. Set to Auto (preset) when loading a saved character to replay its exact saved wardrobe instead of the default.
hair_color_scope Natural only Keeps random hair realistic; Full spectrum allows fantasy colours. Set to Auto (preset) when loading a saved character to replay its exact saved scope.
accessory_density Balanced How often bags/jewellery/accessories appear: None (bare), Minimal, Balanced, Maximal. Drop it for clean portraits without locking fields by hand.
location_setting Any indoor/outdoor Restrict the random scene. Any indoor/outdoor picks any real location but never a studio; Indoor/Outdoor narrow to real scenes; Studio / solid backdrop forces a plain, easily-maskable background (seamless grey, solid white, solid black, or chroma-key green) plus clean studio light. A locked location wins.
set_all_fields Off All to None blanks every field still on Random so only the fields you lock to a value appear — a one-click "start from nothing". A wired costume and the character's signature look (hair, eyes, physique) are kept.

How locking works

A field's dropdown value is its lock state — there is no separate lock button:

  • Random (default) — randomize each run.
  • a concrete value — lock it (kept across runs).
  • None — omit the field from the output entirely. Every field offers exactly one None, so you can set location, lighting, framing, mood, etc. to None to describe a character only and add your own scene in a larger prompt.

Master buttons act on all fields: Unlock all (set to Random) and Roll + lock all fields (lock every Random field to one coherent roll from the engine, so you can tweak from there; fields you already locked are kept and shape the roll). Click a group header to collapse it.

To go the other way — start from nothing and switch on only a handful of fields — set set_all_fields to All to None: every field left on Random is dropped, so just the ones you lock to a value are emitted. Ideal for tweaking a cosplay (its costume and signature look are preserved) without setting dozens of fields to None by hand.

Constraints

After randomizing, an engine resolves coherence rules — a buzz cut never gets a braid, "no makeup" clears every cosmetic, an athletic outfit drops the handbag, a sedentary build is never "very muscular", and so on. A rule never overrides a field you locked; it logs an [IdentityForge] notice and keeps your value.

The gender toggle is a hard gate, not a coherence rule: gender-specific values (e.g. facial hair) are always validated against the chosen gender, even when they arrive locked from a preset. Pointing a masculine preset at a Female node never produces a beard — the engine drops the incompatible value, re-randomizes it within the Female pool, and logs a notice.

Male also applies masculine presentation defaults to the random fill: no makeup, nail polish, feminine jewellery, lip colour or hairstyles. These govern randomization only — a value you lock yourself, or one carried by a preset's signature, is respected (so a man cosplaying a pigtailed character keeps the pigtails).

Any resolves to a concrete man or woman per seed (so the whole character is coherent — no beard beside a feminine bust), then applies that gender's rules above. A strongly gendered lock decides the coin-flip (locking a beard yields a man); otherwise it is an even 50/50. For deliberately mixed-gender output, set wardrobe: Any together with gender: Any — that keeps both feature pools unioned and uses neutral they/them pronouns.

Pairing with a rendering pack

prose is a plain string, so it composes with any downstream node that takes text — notably Stylebook, which adds medium, lighting, colour grade, era, finish and mood on top. When pairing the two, set lighting and mood here to None so the two packs don't each state the same axis; see the README for the full split.

Custom options

Add your own choices without editing the source (they survive updates): copy user_options.example.json to user_options.json in the pack folder, then restart ComfyUI. Five optional sections:

{
  "fields":     { "ethnicity": ["Atlantean"], "location": ["a floating sky temple"] },
  "outfits":    { "spacesuit": { "unisex": ["a sleek white EVA suit with a gold visor"] } },
  "archetypes": { "Sky Pirate": { "gender": "Female", "outfit_description": "a {color} longcoat over a leather bodice" } },
  "cosplayers": { "Custom Hero (My OC)": { "gender": "Female", "costume": "a teal-and-silver bodysuit with a star emblem" } },
  "creatures":  { "axolotl": { "class": "Marine Life", "palette": "pale pink", "head": "a smiling axolotl head with feathery gills", "eyes": "tiny dark eyes", "integument": "smooth translucent skin" } }
}
  • fields extends a dropdown's options — any field except the control toggles (gender, hair_color_scope, location_setting) and the garment-coupled outfit_style / outfit_description. A custom hair_color is only drawn at random under Full spectrum: the Natural only scope filters the pool through the shipped realistic-shade list, which your additions are not part of. They stay selectable by hand under either scope.

  • outfits adds a whole new outfit_style, registering its garment text and the dropdown entry together (so the style can never be picked without clothing).

    Write garment text as a garment phrase: garments and fabrics only, no leading article, and no shoes, colour, jewellery or bag. The engine composes the palette, the pattern and the footwear onto it from their own fields — "satin slip gown with delicate straps" renders as "a jewel-toned satin slip gown with delicate straps, in strappy heels". Strings written the old way (with an article and their own shoes) still work: the engine detects what a string already states and skips that clause rather than doubling up. They simply will not gain the new colour/pattern/footwear variety until reworded.

    Buckets are unisex (always eligible) plus female / male, chosen by the wardrobe control; any subset works.

  • archetypes adds presets to the Archetype node (same {field: value} shape as the built-ins; outfit_description may use {slot} placeholders). A value may be a list, one picked per seed ("hair_color": ["copper", "auburn"]), and a "variants" object holds separate "Female" / "Male" looks. Anything else is skipped with a warning in the log.

  • cosplayers adds characters to the Cosplayer node. costume (worn items only) is required; franchise/gender are optional; signature (both modes) and physique (Full character) are {field: value} maps. An optional "prop" string adds a signature held item; an optional free-text "eyes" string sets a canonical non-standard eye colour (e.g. "crimson"). A gender: "Male" entry is how you populate the Random — male pick. For a fully masked head set "covers_face": true and put the head covering in a separate "mask" string. The advanced flags work too, each optional and off by default: "covers_body": true (full hard suit — hides bare skin, suppresses jewellery/nails), "covers_hair": true (hood/cowl hides the hair while the face shows), "bald": true (fully hairless head), "body_paint": true (the skin itself is the costume colour; add "skin": "warm green" to name the colour when it isn't obvious from the costume text). Four more keys match the built-ins: "costumes" (a list of alternate looks, each a costume string or an object with its own "costume" plus per-look keys such as "mask" or "signature"; one look is picked per seed), "costume_weights" (one positive number per look, the main costume first), "costume_back" (the costume seen from behind, used by the Turnaround's back views) and "subject" (a lead noun for a non-human head, such as "pig-headed alien"). Word a full-body colour skin-native - "smooth, flawless <colour> skin" - not as "body paint"/"dye", which t2i models render as a streaky coat over a human tone; the skin-native marker is auto-detected, so the flag is only needed for other phrasings. See the worked examples in user_options.example.json.

  • creatures adds forms to the Creature node. class (one of the nine classes), palette and the three core slots head / eyes / integument are required; the rest are optional.

A user entry whose name matches a built-in overrides it. Run python tests/validate_data.py to check that your custom field values are valid options.

Field groups

Group Fields
Demographics age, ethnicity
Body skin tone, body type, height, bust/chest, waist, hips, shoulders, neck, posture, fitness
Face shape, forehead, cheekbones, eyebrows, eyes, nose, lips, smile, jawline, chin, complexion, skin details, freckles
Hair colour, length, texture, style, part, highlights, facial hair, accessory
Makeup style, eyeshadow, eyeliner, lashes, lips, blush, brows, contour, highlight, finish
Jewelry & Nails earrings, necklace, rings, bracelet, watch, other jewellery, piercings, nails
Clothing outfit style (which picks a garment set, narrowed to what fits the location), footwear, colour palette, pattern, legwear, outerwear (outdoors in cold seasons only), bag, accessories — the palette, pattern, legwear, coat and shoes are composed onto the garment, so locking any of them changes the outfit
Setting & Shot expression, pose, location (indoor/outdoor), lighting, season (outdoors only), framing, composition, mood

Example

Seed 42, Female, hair_color = auburn:

A 22-year-old Finnish woman with an average build, short, and very pale skin. … Her hair is mid back loosely wavy auburn, worn in a French twist. … She wears a fresh-faced dewy look, cool browns and taupes eyeshadow, …, and natural finish. She has a simple gold bracelet, a chain bracelet, and medium length natural nails. She wears a burgundy wrap dress with gold hoop earrings and strappy heels, carrying a tan leather crossbody. Her expression is relaxed, set in a suburban basement, …

prompt_json mirrors this, nested by group with a small _meta block.

subject_text (the third output, 1.8.0) is the same prose cut down to the person and outfit: no pose, held item, expression, mouth or scene. Use it when a larger graph brings its own pose and scene and would otherwise re-parse them out. It keeps the Cosplaying as ... label, face, hair, makeup, jewellery and the full outfit including footwear (framing is scene, so shoes are never trimmed). It is built from the same roll with no extra random draws, so prompt_text and prompt_json are unchanged.

Turnaround views

The Identity Forge Turnaround node builds a reference set: one character, every camera angle, from a single queue.

Cosplayer/Archetype -> Identity Forge -(prompt_json)-> Turnaround -(prompt)-> CLIPTextEncode -> ...

Wire Identity Forge's prompt_json output into character_json. That output is a fully resolved character, so every angle reproduces it exactly - nothing is re-rolled between views, and it does not matter whether the nodes upstream are set to randomize each run.

prompt and view_label are list outputs: ComfyUI runs everything downstream once per view, so one queue produces the whole set. The rest of the graph needs no rewiring - a single negative prompt, model and latent are reused across all of them. Wire view_label into Save Image's filename_prefix and the set lands on disk in rotation order (1-front, 2-three-quarter-left, …).

Three controls, all camera:

  • views - Turnaround (6), Turnaround (4), Front + back (2) or Front + profile (2). This is also how many images one queue produces.
  • framing - how much of the subject each view frames, Full body by default. It is combined with the angle and replaces whatever framing the character resolved to.
  • pose - a standing, symmetric stance, so the only thing changing between views is the camera. An asymmetric pose (a hand on one hip) reads as a different body from each side. Keep the character's pose leaves it alone for a looser character sheet. A pinned stance also drops the character's gaze, so each view's camera decides where the head points.

The straight-back view drops the face automatically. A t2i model draws whatever the prose names, so "bright blue eyes ... deep red lip colour ... a broad smile" made it turn the head to show them - which is not a back view. On 6-back the Face and Makeup fields, facial_hair, expression and gaze are simply omitted; hair, costume, build, earrings and the scene all stay, and a masked character keeps their mask. Nothing is ever negated (a prompt that says "the face is not visible" draws a face). 5-rear-three-quarter keeps its face description, because at that angle a cheek and jaw genuinely are in frame.

Some cosplayers also carry a back-of-costume description (2.0.0: Superman's cape, the spider on Spider-Man's back). The back and rear-three-quarter views use it in place of the front costume text, so a chest emblem is not drawn on the back. Entries without one keep their usual costume text in every view.

Everything else belongs on the Identity Forge node - it owns the character and the scene, the Turnaround owns only the camera. For a clean reference sheet, set that node's location_setting to Studio / solid backdrop and lock composition to centered symmetry. A ready-made workflow is example_workflows/Identity Forge - Turnaround.json.

Expression sheets

The Identity Forge Expression Sheet node is wired exactly like the Turnaround (prompt_json into character_json, prompt into CLIPTextEncode, view_label into Save Image's filename_prefix), and it owns only the face's emotion: expression, mood and smile_type. The person, outfit, scene and pose are the document's, unchanged.

  • sheet - Basic (6) (neutral, smile, laughing, surprised, serious, sad), Full (10) (adds angry, smirk, thoughtful, worried) or Smiles (3) (smile, laughing, smirk).
  • framing - Head and shoulders by default, so the face is large enough to read. Unspecified keeps the character's own framing.
  • gaze - Keep the character's gaze by default; pick one (into the camera, off past it, a head tilt, a lifted chin) to hold it across every view, or None to state none.

Each view sets a fixed, curated expression/mood/smile combination, so a sheet is deterministic and no two views land on the same face. A face-covering character (a mascot head, a full helmet) has no visible expression, so the sheet emits one view, 1-masked. A ready-made workflow is example_workflows/Identity Forge - Expression Sheet.json.

Outfit sheets

The Identity Forge Outfit Sheet node is wired like the Turnaround and keeps the person while it redresses them once per outfit style.

  • sheet - Range (6) (casual, smart casual, business formal, evening formal, athletic, resort vacation), Everyday (4), Work to evening (4) or Every style.
  • backdrop - a grey (default), white or black studio backdrop, or Keep the character's scene. A studio backdrop also redraws lighting and composition to suit the studio, so every style fits. Keeping the scene skips styles the place does not allow (no evening gown on a hiking trail), so that sheet is often shorter.
  • framing - Full body by default, so the whole outfit shows. pose - a standing pose by default; Keep the character's pose keeps theirs.
  • outfit_seed - every outfit is drawn at random within its style, and differs from one character to the next. Change this number to re-dress the same person; set its control to randomize for new outfits every queue.

The face, body and hair colour stay; makeup, jewellery and hair styling follow each outfit when the old ones would clash with it. Labels read 1-casual, 2-smart-casual and so on. A cosplay character or a full-body suit has its costume, so the sheet emits one view as resolved. A ready-made workflow is example_workflows/Identity Forge - Outfit Sheet.json (also in ComfyUI's template browser).

Scene sheets

The Identity Forge Scene Sheet node (2.6.0) is wired like the Turnaround and shows the same person in several places.

  • sheet - Everyday (6) (city park, coffee shop, living room, office, beach, forest trail), Indoors (4), Outdoors (4) or Studio backdrops (3).
  • framing - Cowboy (mid-thigh up) by default, so the place shows around the person; Unspecified keeps the character's own framing.
  • clothes - Dress for each place (default) picks a new outfit that suits each place. Keep the outfit keeps the character's clothes and skips any place they do not suit, so that sheet can be shorter, or a single view as resolved if no place fits.

Lighting, composition and season are drawn again for each place. A pose, gaze, makeup, jewellery or hair styling a place refuses is redrawn for that view; anything else a place refuses (age, body, a held item) skips it. The face and body never change. A cosplay character or a full-body suit keeps the costume. Labels read 1-sunny-city-park and so on. A ready-made workflow is example_workflows/Identity Forge - Scene Sheet.json.

Age progression

The Identity Forge Age Progression node shows the same person at several ages.

  • stages - Life stages (4) (20, 35, 50, 70), Decades (6) (20 to 70) or Young and old (2) (25, 70).
  • framing - Head and shoulders by default; Unspecified keeps the character's own.

Only the age and what depends on it change (skin detail, and an outfit or hair style the new age does not allow). With a natural hair colour scope, hair greys past 55: dark hair goes salt and pepper, then silver from 70. A grey-haired character shown younger gets a natural colour. Dyed or vivid scopes, cosplay hair and covered hair are left alone. A face-covering character emits one view as resolved. Labels read 1-age-20 and so on. A ready-made workflow is example_workflows/Identity Forge - Age Progression.json.

Searching the picker

  • Words match from their start. bow finds a bow tie or a bowler hat, not "elbow" or "rainbow". A name still matches anywhere (man finds Batman). Several words must all match, in any order; put a phrase in quotes ("bow tie") to match it as written.
  • Accents are optional. dia and día both find Día de los Muertos; pokemon finds Pokémon. The same holds in the franchise box.
  • Everything in an entry's description is searched: name, franchise, costume, alternate costumes, back view, mask, prop, eyes, hair and body text.
  • A few words also find their synonyms and compounds: pants finds trousers, slacks and jeans, suit finds bodysuits and jumpsuits, sword finds katanas, gray finds grey. The list is SEARCH_ALSO in js/identity_forge_picker.js; it is one-way (jeans does not find slacks).
  • Plurals find the singular (2.8.0). boots also finds a lone "boot" and gloves a lone "glove". The singular must be a whole word, so pants never finds "panther", and words ending in "ss" (dress, glasses) are left as typed.
  • Franchise box (Cosplayer node): type part of a name. star keeps Star Wars and Star Trek; picking a suggestion, or typing a full name, keeps that franchise only. Trait, gender and franchise filters only appear on nodes where they can narrow something.
  • Your place is kept. Reopening the picker scrolls to the character the node holds (outlined), with the same search and filters, so you can pick, queue, and come back to the next one.
  • Queue each (N) appears while you are filtering: it queues one run per matching entry the node can take, then puts your original pick back. Each run uses the rest of the workflow as it stands, so a seed set to randomize gives each one a new person. Queue random (2.8.0), beside it, queues a single run with one random matching entry and does not ask first.
  • Star your favourites (2.6.0). Click the star on a card (or press S on the focused card), then tick Starred only to see just those. Stars are kept in this browser, shared by all three pickers, and work with every other filter and with Queue each.

Recalling a random saved character

Vault Load's character list ends with (random saved character) once anything is saved (2.6.0). It picks one saved character by the node's seed: the same seed and vault give the same pick, and randomize gives a different one each queue.

If the node names a character this vault does not hold (a workflow from another machine, or an entry deleted since), it logs a warning and passes the upstream through instead of failing the queue (2.8.0). Refresh keeps such a name rather than swapping in a different saved character; pick another from the list to replace it.

Preview images in the picker

"Show preview images" in the roster picker is off by default. When it is on, your ComfyUI server downloads each sample image the first time you scroll to it and keeps it in <ComfyUI user folder>/identity_forge/gallery_cache/, so previews also show when ComfyUI runs with --offline (once the server has fetched them). Only images you view are stored. "Clear cached previews" in the picker deletes the folder and shows how much it freed.

Holding something specific

The Modifier node's optional held_item box takes a free-text noun phrase - a red paper umbrella, a steaming mug of coffee - voiced as "holding ...". It counts as a lock: poses that need both hands free are dropped, and it replaces a Cosplayer's own prop when the Modifier sits downstream of it. Leave it empty for none.

A related framing rule: a shot that crops the legs (a close-up or a waist-up portrait) no longer names tights or stockings in the prose, the same way it drops the shoes. The JSON keeps the value, and a cowboy shot (mid-thigh up) still voices it.

Notes

  • The ethnicity-to-skin-tone link is a soft bias over coarse regional bands; lock skin_tone for an exact tone.
  • Costume archetypes carry their own outfit, so wardrobe/outfit randomization don't apply (colours still vary by seed).
  • Prose summarizes: a few fine fields (eye size, teeth) live in the JSON but are left out of the prose to avoid clutter.