Gender NL Filter π³οΈβπ
The node that fixes female-biased prose prompts without mangling your grammar
- spacy_nlp
- filtered_text
Tag filters have a blind spot: a lot of people don't prompt in Danbooru tags at all. If you're writing natural language prompts, pasting in a SillyTavern character card, or running a chain where your tag expander sprinkles prose into the mix, the whole "remove breasts" approach falls apart - the word breasts never appears, but the text still says "she sat down, her dress riding up." Gender NL Filter is the sibling node that handles exactly that. It reads sentences, finds the gendered vocabulary, and rewrites it into the opposite gender's vocabulary while leaving the actual sentence structure alone.
It's the second stage in the pack's recommended chain (Gender Tag Filter cleans the tags, then this cleans the prose), but it works standalone too - feed it a plain prompt, a tag list, or a mess of both, and it sorts out what's what.
What it actually rewrites
The headline party trick is pronoun handling. handle_pronouns swaps she/her/hers/herself β he/him/his/himself, and when spaCy is connected it gets the her case right: possessive her becomes his, object her becomes him. That's the sort of detail that separates this from a sloppy find-and-replace. Alongside that:
replace_anatomy(on) - cross-gender pairs:Her breasts bouncedβHis pecs bounced,pussyβcock,vaginaβpenis. Words without a clean match still get removed.rewrite_references(on) -woman/girl/ladyβman/boy/guy, plus the furry set:vixen/doe/mare/tigressand their male counterparts.swap_clothing(on) -dressβsuit,skirtβtrousers,braβ removed. Turn offfilter_presentationentirely for crossdressing characters so clothing stays put while anatomy still gets corrected.map_neopronouns(on) -shi/hir,xe/xem,ze/zir,ey/em,fae/faerget mapped to binary equivalents the image model actually recognises. If your character is furry-flavoured, this is the setting you care about.handle_negations(on) - the safety net.no breastsandwithout a vaginastay untouched, because a rewrite here would do the exact opposite of what you asked.
The mode dropdown flips the whole thing between strip_female_language (default), strip_male_language, and off. Output is a single filtered_text STRING that wires straight into your CLIP encode, or into the next node in the chain.
Why spaCy matters here
This is the one node in the pack where the optional backend genuinely changes the results. The filter ships with 128 femaleβmale and 118 maleβfemale word swaps, but without spaCy it's running on a regex fallback that gets the easy cases and fumbles the hard ones. Plural they/them gets remapped to he even when it shouldn't; negation detection falls back to a 4-token proximity scan that misses longer sentence structures. With a spaCy model connected to the spacy_nlp input, you get dependency parsing for negations, proper plural they/them preservation, and multi-word span matching.
So install it:
pip install spacy
python -m spacy download en_core_web_sm
One warning: spaCy still doesn't build on Python 3.13/3.14 (pydantic v1 and blis break), so if your ComfyUI venv is on those, the node quietly drops to regex mode and logs it in the console. If NL accuracy is the whole point for you, recreate the venv under Python 3.12 - the README has the exact commands. On the flip side, the regex fallback means this node is genuinely usable out of the box, which is more than most "NLP-powered" ComfyUI nodes can claim.
Installing
It's all one pack - install via ComfyUI Manager (search "Gender Tag Filter") or git clone https://github.com/senjinthedragon/comfyui-gender-tag-filter into custom_nodes, then restart. You'll find it under utils/tags. Chain it after Gender Tag Filter for mixed tag+prose prompts, or use it solo for character-card-driven workflows where your whole prompt is prose.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Natural language prompt, tag list, or mixed content. Chain after GenderTagFilter for full tag+NL coverage. Standalone tags are detected and skipped automatically. | |
| mode | COMBO | strip_female_language | 'strip_female_language' -> rewrite female-coded vocabulary 'strip_male_language' -> rewrite male-coded vocabulary 'off' -> pass through unchanged |
| filter_anatomy | BOOLEAN | true | Process anatomy words at all. Turn off to leave all anatomy language completely untouched. |
| replace_anatomy | BOOLEAN | true | Replace anatomy words with gender-appropriate counterparts rather than removing them entirely. e.g. 'Her breasts bounced' -> 'His pecs bounced' 'His cock throbbed' -> 'Her pussy throbbed' Words with no clean equivalent are still removed. Has no effect when filter_anatomy is off. |
| filter_presentation | BOOLEAN | true | Process clothing and accessory language at all. Turn off to leave all clothing language completely untouched. Useful for crossdressing characters. |
| swap_clothing | BOOLEAN | true | Replace clothing terms with gender-appropriate equivalents rather than removing them. e.g. dress -> suit, skirt -> trousers, bra -> removed, bikini -> swim trunks Has no effect when filter_presentation is off. |
| handle_pronouns | BOOLEAN | true | Swap binary gendered pronouns. she/her/hers/herself <-> he/him/his/himself spaCy correctly disambiguates 'her' between possessive (-> his) and object (-> him). |
| rewrite_references | BOOLEAN | true | Swap gendered nouns and adjectives. woman/girl/lady/feminine <-> man/boy/guy/masculine Also covers furry terms: vixen/doe/mare/tigress etc. Plus titles, family terms, and mythological figures. |
| map_neopronouns | BOOLEAN | true | Map neopronouns to binary equivalents image models recognise. Covers: shi/hir (Chakat/furry), they/them, xe/xem, ze/zir, ey/em (Spivak), fae/faer, ve/ver, per. Plural they/them preserved by spaCy (regex is approximate). When off, all neopronouns pass through unchanged. |
| handle_negations | BOOLEAN | true | Protect negated anatomy terms from removal or replacement. e.g. 'no breasts' and 'without a vagina' are left untouched. spaCy uses dependency parsing; regex uses 4-token heuristic. |
| spacy_nlpopt | SPACY_NLP | Connect a SpaCy Model Loader node to enable spaCy-backed NLP processing with accurate negation detection, pronoun disambiguation, and multi-word span matching. Leave disconnected to use the regex fallback instead. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filtered_text | STRING | β |