Identity Forge
A 70+ field character randomizer node pack for ComfyUI with a constraint engine, themed archetype presets with varying costumes, and dual prose/JSON output.
Nodes (7)
One queue, a brand-new person every time — ComfyUI's Identity Forge, explained
A themed look on a person who still randomizes underneath
Drop a random person into Spider-Man's suit (or 2B's) — cosplay without the prompt fight
A praying-mantis body with a sloth's head — slot-by-slot creature hybrids in ComfyUI
A scalpel for one element of a character
Pull a saved character back into your graph with one dropdown
The Identity Forge vault, explained
ComfyUI Identity Forge
Believable people from dropdowns — no prompt-wrangling. Queue once and you get a coherent, fully described person. Queue again and you get someone completely new. Identity Forge turns menu choices into clean natural-language prose (straight into CLIP Text Encode) plus a structured JSON record.
A constraint engine keeps every result sensible — no beard on the buzz cut, no handbag with the gym kit, no open-sky sunlight indoors, and a skin tone that stays plausible for the chosen ancestry in either direction. Lock the few traits you care about; let the rest roll.
Why you'll like it
- Coherent by design — clashing traits get resolved for you, automatically.
- Reproducible — seed-driven, so a person you liked comes back exactly.
- Yours to steer — every field is roll it, lock it, or leave it out.
- Zero dependencies, fully offline — no LLM, no API keys, no model downloads.
Optional layers
Four preset nodes stack in front of Identity Forge to steer the look. Each one is optional and
passes through when you set it to None, so you can leave them all wired and just toggle.
Archetype drops a themed look (knight, sorceress, astronaut, surgeon…) onto a still-random
person. Creature turns that person into an animal, monster or alien. Modifier tweaks one
field or a whole group. And Cosplayer puts a fictional character's costume on a random,
optionally cross-gender person.
The Cosplayer node is worth a special mention: most character wildcards emit a name and hope the
model recognises it. Every character here instead carries a hand-written, canon-checked
description of the costume — garments, colours, masks, markings, signature props — so the look
renders even on checkpoints that have never heard of the character. Ask a plain wildcard for
Chun-Li and your prompt says Chun-Li; ask this one and you get the blue qipao with gold trim,
the brown tights, the white cross-laced boots and the spiked bracelets.
Browse what's on offer — a searchable sample render for every entry: cosplay gallery · archetype gallery · creature gallery. Or read the full lists: cosplay characters · archetypes · creatures. Something obvious missing? Open an issue — suggestions are welcome.
Built on the ComfyUI V3 API (comfy_api.latest). Category: conditioning/character.
Showcase
Chain the preset nodes into the main Identity Forge node — the node closest to Identity Forge wins any conflict:
<img width="560" alt="Sample node chain" src="https://github.com/user-attachments/assets/82d80ecd-b25a-475a-a4e0-ae0d6116a744" />A taste of archetypes, cosplay characters and creatures:
<table> <tr> <td><img width="240" alt="Archetypes" src="https://github.com/user-attachments/assets/c1871f28-f52d-42b6-8ca6-6dff2d1793f8" /></td> <td><img width="240" alt="Cosplay characters" src="https://github.com/user-attachments/assets/256d81e2-ed75-47cd-80f5-e8e7e2837a91" /></td> <td><img width="240" alt="Creatures" src="https://github.com/user-attachments/assets/65b0cbfa-6e93-47de-bf39-8d497c9dfb47" /></td> </tr> </table>[!TIP] Browse the galleries — cosplay · archetypes · creatures Every entry on every roster with a sample render, searchable by name and franchise — so you can see the look before you pick the name. Each gallery also links the exact ComfyUI workflow its samples were made with. Generated with the Krea2 T2I model on randomized identities, so your own results will vary.
Sample outputs
Identity Forge — random 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> </tr> </table>Archetypes — themed looks on a random person:
<table> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/8bc9809d-c0be-4edd-b60c-cd8ac84d9f05" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/d48eddbb-97a8-4e61-ab11-de41d4ef386c" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/7ce1a556-dc01-454b-ac7e-0646815ecddc" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/a75a9f6f-3db1-4e08-b219-249a029a2aba" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/90857fdd-7d17-4e36-aa4d-15e42a1a5424" /></td> </tr> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/9fa83b75-2028-4362-b67b-4459810fd2d6" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/6a25443a-e040-44f4-8d48-33a4118ab55b" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/c0d28e5e-094b-413e-babc-d88d03fc539c" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/6526567f-c660-4be3-b426-0a7c80438405" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/9132bccc-9f3b-49f9-9968-a7510048f2f8" /></td> </tr> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/9a2acf90-ef21-4acc-9161-b132b9245130" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/33bd47f1-1789-473f-b041-4b1af0332146" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/757f60c8-8ebc-42f8-a3d8-9d2b79abae57" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/1ffecfc2-b2c7-4ff2-aa95-a998e798283a" /></td> <td></td> </tr> </table>Cosplayers — a fictional character's costume on a random (optionally cross-gender) person:
<table> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/62c88ab8-52d3-4798-a8e2-b9aa47be82c9" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/286001ec-b6ff-43aa-be11-4e8adbcc5c82" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/0661c12c-5e6f-47a9-9315-0435e3950c61" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/a88405b4-0e94-4092-886a-550b49a59c1a" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/5ebb67c2-ce9c-4099-a1a4-8fcc91dbad81" /></td> </tr> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/3ee5c9bf-1c76-4161-a6b7-f0dbfc889a78" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/1018c740-86f9-4da4-88f1-de2b8615bb53" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/0c26529d-e39e-4696-a674-39efe2681f9d" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/3d91ddf8-5a41-4ec7-995e-b6cae00628fc" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/2b0fd5c6-08e8-4a2a-bfb9-e829823d7c13" /></td> </tr> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/5eb24c4f-4812-4d3e-953a-147aec5db6d5" /></td> <td></td> <td></td> <td></td> <td></td> </tr> </table>Creatures — the character rendered as a non-human form:
<table> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/42802824-755a-4a7d-aebf-2b2c4c9183e2" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/32267bfd-0b15-4312-be08-9b378f7783a9" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/c4236750-a597-4680-b1a1-5a610b2b172a" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/08d138c7-c05f-436c-ba65-c4d9768f7cef" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/f1f30601-754b-4fcd-b44f-15314f0804c7" /></td> </tr> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/6b58cce8-eec8-46a8-bb8a-893a35cd7d72" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/a0ab604d-7aaa-482b-af7c-3020ba9eac38" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/de7237f7-3989-409a-939c-1cd607965aa8" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/e9b96ae3-e795-4cee-a6da-8c39789dde74" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/d4a1714d-72ec-40d1-bc01-f5be5b019d1e" /></td> </tr> <tr> <td><img width="200" src="https://github.com/user-attachments/assets/0eac2c2a-e93a-422d-99a6-b870a13242ae" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/41ffb934-702d-4299-8fdf-f260a3836ec2" /></td> <td><img width="200" src="https://github.com/user-attachments/assets/0ba4e7a2-b897-4d8b-9132-2eca3e3262f7" /></td> <td></td> <td></td> </tr> </table>The nodes
| Node | What it does |
| --- | --- |
| Identity Forge | Lockable dropdowns in collapsible groups + the constraint engine → prompt_text (prose) and prompt_json. |
| Archetype | Themed presets (knight, sorceress, pirate, samurai, pop star, astronaut, surgeon, 1950s homemaker…) that set the look while the person randomizes. |
| Cosplayer | Fictional characters (Spider-Man, 2B, She-Hulk, Zelda…) as a cosplay look — the costume on a random, optionally cross-gender person. |
| Creature | Render the character as a non-human form (animal, insect, marine, reptile, bird, monster, alien, mythic, plant), across all classes or one, hybridized slot-by-slot. |
| Modifier | Prepend a custom descriptor to one field (footwear: sci-fi) or a whole group (Clothing: weathered). |
| Vault Save / Load | Save a generated character (with a thumbnail) to a local vault; recall it later as a chainable preset, with a Manage Vault gallery. |
Install
Clone into custom_nodes and restart ComfyUI (no Python dependencies):
cd ComfyUI/custom_nodes
git clone https://github.com/EnragedAntelope/comfyui-identity-forge
Or install via ComfyUI Manager (search Identity Forge).
Quick start
- Add Identity Forge, connect
prompt_text→ CLIP Text Encode. - Leave fields on
Random, or pick a value to lock the ones you care about. - Queue. The seed auto-randomizes, so each run is a new character (set the seed control to fixed to reproduce one).
Chaining presets
The Archetype, Cosplayer, Creature and Modifier nodes all feed Identity Forge's single
archetype_json socket. Instead of swapping plugs, chain them through each node's optional
upstream input:
Archetype ─▶ Cosplayer ─▶ Creature ─▶ Modifier ─(character_json)─▶ Identity Forge.archetype_json
- The node closest to Identity Forge wins where fields overlap; non-overlapping upstream values survive.
- Set any node to
Noneand it passes its upstream through — keep every preset wired and just toggle which is active.
The headline combo: a Cosplayer in front of a Creature gives Superman as an anthropomorphic praying-mantis hybrid with a sloth's head — the costume survives, the body becomes the creature.
Using with Stylebook
Stylebook describes the
rendering: medium, lighting, colour grade, era, finish and mood. Identity Forge
describes the subject — who or what is in the picture, and where the camera is:
framing, shot type, composition, pose, expression and eye contact. Connect Identity
Forge's prose output into Stylebook's user_prompt and chain Stylebook downstream.
Stylebook owns lighting and mood, so set both to None here when pairing the two packs
— otherwise you get two descriptions competing for the same axis. See Stylebook's
examples/stylebook_with_identity_forge.json
for a ready-to-run workflow.
Must-know
- Seed auto-randomizes each run; set it to fixed to reproduce a character. Not written to the JSON.
- Every field is
Random(roll) / a value (lock) /None(omit). Set scene fields (location,lighting, framing) toNonefor a character-only description to splice elsewhere. accessory_density— drop it toMinimal/Nonefor clean portraits without locking fields by hand.size_scale— force an unrealistic body scale on an ordinary person: a doll-sized office worker, a fifty-foot commuter. It is manual only;Autois the default and is never chosen at random, so it can't affect normal output. Picking a tier replaces the height description in the opening sentence and overrides a wired character's own scale, so you can make anyone giant or tiny.- The scene shows the scale. A giant only looks giant if the frame has something to
compare against, so a giant tier — or a canonically giant character like Godzilla or the
Iron Giant — moves the shot outdoors and picks a wide, low or establishing framing, and stops
the build being described as petite. Lock
locationorshot_typeyourself and your choice wins as always. Tiny characters get the lighter version: only the framings too wide to resolve them are dropped. - The light matches the place. Indoor locations never draw open-sky light and outdoor ones never
draw window or hearth light, and a light naming a physical fixture — a hearth, a television, a
stained-glass window, a stage rig — only appears where that fixture exists. The location
stands and the light adapts; lock a light instead and the location re-rolls to somewhere it can
exist. Most locations are interiors, so set
location_setting: Outdoorwhen you want sunny, golden-hour looks. The pool includes named world landmarks (the Eiffel Tower plaza, Shibuya Crossing, Uluru, the Cliffs of Moher) alongside everyday places. - The outfit is built, not just picked.
outfit_stylechooses a garment set, thenclothing_color,clothing_patternandfootwearare composed onto it — "a jewel-toned satin slip gown with delicate straps, in strappy heels". Locking any of them changes the outfit, and the shoes are kept plausible for the style (no slippers with a business suit). A garment that names its own colour or shoes keeps them and the matching field steps aside. A costume from the Cosplayer or Archetype node is a complete look and overrides all of this. - Nothing is worn twice. If a costume or outfit already names a necklace, earrings, a ring, a bangle, a bag or a hat, the randomizer does not add a second one.
- The pose fits the body. Poses that reach for something the subject does not have are never drawn: hair to run a hand through under a helmet, pockets on a mascot suit, a free hand when a signature prop is switched on (no more "hands in pockets, holding Mjolnir"), or a seat to perch on when the subject is fifty feet tall outdoors. Lock a pose and your choice wins.
- A mask hides the face — unless you say otherwise. A full-mask character drops the randomized face, hair, makeup and expression, so nothing contradicts the helmet. Set any of those widgets yourself and it renders anyway: the character's own look stays hidden, your explicit choice does not.
- Gender & crossplay. The person's gender is the Identity Forge
genderwidget, independent of any character's.Anyrolls a coherent man or woman each run; pair it withwardrobe: Anyfor fully mixed-gender output. Locked / archetype / cosplayer values always win. - Scope the random character. On the Cosplayer node,
random_scopenarrows theRandom — …picks to an attribute (Giant, Tiny, Non-human / colored, Masked, Mascot / full-suit), a broad category (Anime & Manga, Marvel, DC, …), or a single franchise. It combines with gender, and the console prints the in-scope pool size the first time you use a combination. If a franchise has nobody of the chosen gender, the scope wins and the gender relaxes — crossplay makes that valid anyway. - Alternate costumes. Characters with more than one iconic look (Harley Quinn, Catwoman, Poison Ivy, …) rotate between them by seed, so the same character yields a different signature costume each roll.
- Non-human skin colour skips ethnicity too. When a character's colour covers the whole body (She-Hulk's green, Lobo's chalk-white), the wearer's ethnicity is dropped along with the human skin tone — naming one only fought the colour and left the face rendering as an ordinary human above a coloured body.
- Fully-encased cosplays skip ethnicity. With no visible skin or face left (Iron Giant, a droid), mentioning the cosplayer's ethnicity only risked nudging the render toward a stray human trait. Face-visible cosplays still describe the person underneath as usual.
- Masked characters (Spider-Man, a Mandalorian helmet) suppress the randomized face/hair so
only the mask shows; the Cosplayer
Unmasktoggle reveals the head under the suit. - Vault — Vault Save is a terminal node used like Save Image (branch
prompt_jsonin, optionally the image for a thumbnail; mute it to skip). Vault Load recalls a save as acharacter_jsonthat wires intoarchetype_json.
Troubleshooting
- A
NoneTypeerror (or a missing/blank widget) after updating. A node's fields are built when it is created, so a node on a saved graph can hold a stale widget after an update changes the options. Right-click the node and choose Fix node (recreate) and the error clears — every widget value and every link is preserved (this pack ships its own working recreate; ComfyUI- Manager's own version of that menu entry can fail on the current frontend — see docs/architecture.md).
Learn more
- docs/usage.md — controls, locking, constraints, custom options
(
user_options.json), the field set, and a worked example. - docs/cosplayer-notes.md · docs/creature-notes.md — per-node design notes and how to add your own characters / creatures.
- docs/architecture.md — schemas and engine internals for contributors.
Contributing characters & archetypes
Add private entries via user_options.json (see Custom options in
docs/usage.md) — or open an
issue / PR proposing new
cosplayers, archetypes, outfit styles, creatures or fields to fold into the built-in set. For
cosplayers, a costume description (worn items only) and the franchise are enough to start; mark
covers_face + mask if the head is fully covered. The advanced flags (covers_body,
covers_hair, bald, body_paint + skin) also work in custom entries — see the commented
examples in user_options.example.json.
Development
The engine runs without ComfyUI:
python tests/validate_data.py # data integrity
python -m unittest discover -s tests -t . -v # engine + integration tests
js/identity_forge.js embeds data generated from data/fields.py by
scripts/generate_js_data.py — rerun it (and commit the result) after changing the field set
or the gender-divergent pools; CI's --check catches a stale commit.
A jsdom suite exercises the real, unmodified frontend files outside a browser (wiring, collapse/expand, gender pool swaps, the vault dialog, "Fix node (recreate)") — see docs/architecture.md for what it does and doesn't catch.
npm ci
npm run test:frontend
License
MIT — see LICENSE.