Add Little Doom vocab resources
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Added `resources/english_words.csv` and selectable vocabulary files for `Random Vocab String List (Nukun)`.
|
||||
- Added categorized vocabulary files for places/environments, objects, `*ing` words, person names, countries, and cities.
|
||||
- Added categorized vocabulary files for animals and mythical creatures, verbs, nouns, and adjectives.
|
||||
- Added deduplicated `little_doom_*.csv` Illustrious LoRA keyword resources and a reproducible generator utility.
|
||||
- Added a browser-side rectangle editor for rectangular regional nodes.
|
||||
- Added `Tiled HiRes Fix Advanced (Nukun)` for step-ranged tiled HiResFix workflows.
|
||||
- Added expanded Universal Noise Sampler profiles and `Noise Profile Cycler (Nukun)`.
|
||||
|
||||
@@ -97,6 +97,7 @@ It can use `ComfyUI/user/vocab.json` or bundled files such as `resources/english
|
||||
Set `amount` for the number of words and use the `seed` widget's control-after-generate behavior to keep, increment, decrement, or randomize selections between queued runs.
|
||||
Words are sampled without duplicates; if `amount` is larger than the available vocabulary, the output is clamped to the full list.
|
||||
Bundled category vocabularies include places/environments, objects, animals and mythical creatures, verbs, nouns, adjectives, `*ing` words, person names, countries, and cities.
|
||||
Bundled Little Doom LoRA keyword resources are also available as `little_doom_*.csv`, including clean, character/source, visual feature, clothing, action, setting, style, mature, and dark/gore subsets.
|
||||
Connect the optional `chain` input to append generated words after an existing string and build prompt chains.
|
||||
|
||||
## Regional Split Regions
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
after rape, amputee, amputee bone, asphyxiation, ass rape, back stab, beheading, belly bruise, belly stab, bisection, blood, blood fountain, blood foutnain, blood from eyes, blood from mouth, blood on clothes, blood on face, blood on hands, blood on knife, blood on weapon, blood splatter, blood stain, bloody knife, bloody sword, boned amputee, brain, brain_fuck, breast stab, breasts impaled by metal pole, bruise, bruise on face, chest stab, chest wound, corpse, corpse dead, covered in blood, cum on brain, cutting board, cutting hair, cutting throat, cutting_throat, dark skinned female, dark-skinned female, dark-skinned male, dead, death, decapitation, dildo impaled intestines, disembodied pussy, disembodied arm, disembodied arm in bucket, disembodied below ass, disembodied breast, disembodied breast impaled by skewer, disembodied breast on ground, disembodied breast on plate, disembodied breasts, disembodied breasts impaled by metal pole, disembodied breasts in bucket, disembodied breasts in plastic bag, disembodied breasts in wooden box, disembodied breasts pinned on trash bin, disembodied feet, disembodied feet on ground, disembodied foot, disembodied foot impaled by skewer, disembodied foot in bucket, disembodied hand, disembodied hands, disembodied head, disembodied head below ass, disembodied head between feet, disembodied head hanging, disembodied head impaled by metal pole, disembodied head in bucket, disembodied head in plastic bag, disembodied head on ass, disembodied head on couch, disembodied head on ground, disembodied head on metal plate, disembodied head on metal pole, disembodied head on pole, disembodied head on scale, disembodied leg, disembodied leg in bucket, disembodied legs, disembodied legs on plate, disembodied limb, disembodied limbs impaled, disembodied limbs in bucket, disembodied penis, disembodied pussy, disembodied pussy impaled by metal pole, disembodied pussy in box, disembodied pussy on ground, disembodied pussy on mouth, disembodied pussy on plate, disembodied pussy tied on toe, disembodied uterus, disembodied uterus impaled by skewer, disembodied uterus in box, disembodied uterus on ground, disembodied uterus tied on toe, disembodied womb, disembodied womb impaled by skewer, disembodied womb in box, disembodied womb on ground, disembodied womb tied on toe, double amputee, emerging stab, eviscerated, exposded brain, exposed brain, exposed brain, face bruise, grabbing disembodied feet, grabbing disembodied head, grabbing disembodied breast, gunshot_wound, gunshot_wound_head, guro, head and torso impaled on the same pole, head stab, head wound, head wound., headless, headless body impaled by skewer, headless body on metal plate, headless_with_jaw, imminent rape, impaled, impaled feet, impaled foot, impaled head, impaled horizontal, impaled torso, impaled vertical, injury, intestines, knife stab, knife_cutting, longitudinal bisection, longitudinal_bisection, lyn \(fire emblem\). headless, missing limb, mutilated, mutilated amputee, mutilated breast, mutilated pussy, neck stab, pool of blood, pussy stab, quadruple amputee, rape, rape_, scars, severed arm, severed arm, severed breast, severed breasts, severed feet, severed fingers, severed foot, severed hand, severed head, severed head in the belly cavity, severed head on a plate, severed head on a stand, severed leg, severed limb, severed nipple, severed pussy, severed tail, severed uterus, severed womb, severed_head_impaled_on_dildo, severed_head_in_belly_cavity, severed_head_on_ground, severed_head_upper_half, single amputee, skinned, stab, stab breast, strangling, tomatoes impaled by skewer, tongue on severed neck, torso stab, transversal bisection, transversal_bisection, viscera, wound
|
||||
|
@@ -0,0 +1 @@
|
||||
absurdly long hair, adjusting eyewear, alternate hair length, animal ear fluff, animal ears, animal nose, antenna hair, apple on mouth, aqua eyes, aqua hair, armpit hair, artificial eye, asymmetrical bangs, asymmetrical hair, bandage over one eye, bandaid on face, bangs, beard, big hair, bisected_through_lips, black eyes, black hair, black hairband, black lips, black sclera, black-framed eyewear, blank eyes, blonde hair, blonde pubic hair, blood from eyes, blood from mouth, blood on face, blue eyes, blue hair, blunt bangs, blush, bow-shaped hair, braid, braided bun, braided ponytail, bright pupils, brown eyes, brown hair, bruise on face, bunny ears, butterfly hair ornament, cat ears, character hair ornament, cheek bulge, cheek poking, cheek squash, chest hair, clenched teeth, closed eyes, closed mouth, colored eyelashes, colored pubic hair, colored sclera, colored tongue, cone hair bun, constricted pupils, covered eyes, covering mouth, cow ears, crazy eyes, crazy smile, crossed bangs, crown braid, crying, crying with eyes open, cum in mouth, cum in nose, cum on face, cum on hair, cum on tongue, curly hair, cutting hair, damaged eye, deer ears, diagonal bangs, dirty face, disembodied pussy on mouth, drill hair, drop-shaped pupils, dyed bangs, ear fuck, ear piercing, ear tag, empty eyes, evil smile, excessive pubic hair, exposed_lower_teeth, exposed_tongue, exposed_upper_teeth, extra ears, extra eyes, extra mouth, eye contact, eye dangle, eye fuck, eye mask, eye of horus, eye removal, eyelashes, eyes visible through hair, eyewear on head, face bruise, facial, facial hair, facial mark, facial tattoo, fake animal ears, fangs, female pubic hair, fiery hair, finger in another's mouth, finger in eye, finger in mouth, floppy ears, foaming mouth, food in mouth, fox ears, french braid, frog hair ornament, full-face blush, glasses, glowing eye, grabbing another's ear, grabbing another's hair, grabbing own hair, gradient hair, green apple on mouth, green eyes, green hair, grey eyes, grey hair, hair between eyes, hair bobbles, hair bow, hair bun, hair down, hair flower, hair grab, hair horns, hair in mouth, hair intakes, hair on penis, hair ornament, hair over eyes, hair over one eye, hair over shoulder, hair pull, hair pulled back, hair ribbon, hair rings, hair slicked back, hair stick, hair tubes, hair up, hair_on_penis, hairband, hairclip, half-closed eyes, hand on another's ear, hand on another's face, hands on another's face, hands on own face, head grabbed by the hair, heart hair ornament, heart-shaped pupils, high ponytail, hook through the mouth, hooked on tongue, horizontal pupils, horse ears, in the face, laser eyes, lcking tongue, leg hair, licking lips, light blue hair, light brown hair, light green hair, light purple hair, lion ears, lips, lipstick, lipstick mark, lipstick marks on penis, long hair, long tongue, low twintails, low-tied long hair, makeup, male pubic hair, mechanical eye, medium hair, messy hair, mismatched pupils, missing teeth, mole above mouth, mole under eye, mole under mouth, mouth decap, mouth hold, mouth mask, mouth pull, mouth veil, multi-tied hair, multicolored hair, naughty face, no pupils, nose, nose blush, nose hook, nose piercing, one eye closed, one eye covered, opaque glasses, open mouth, orange eyes, orange hair, over-rim eyewear, parted bangs, parted lips, penis on face, penis over eyes, penis_from_mouth, pink eyes, pink hair, pink hairband, pink lips, pink-tinted eyewear, pointy ears, pom pom hair ornament, ponytail, pubic hair, pupil heart-shaped pupils, puple face, purpel face, purple eyes, purple face, purple hair, purple lips, purple-tinted eyewear, rabbit ears, red eyes, red hair, red hairband, red lips, red pupils, red sclera, red-framed eyewear, red-tinted eyewear, rimless eyewear, ringed eyes, rolling eye, rolling eyes, round eyewear, runny makeup, sagittal_face_section, scar across eye, scar on cheek, scar on face, semi-rimless eyewear, sharp teeth, sheep ears, shiny hair, short hair, short hair with long locks, short ponytail, short twintails, side braid, side braids, side ponytail, single braid, single hair bun, sitting on face, skewer_from_eye, skewer_from_mouth, skull hair ornament, slit pupils, smile, snake hair ornament, snowflake hair ornament, spiked hair, spit_from_mouth, split-color hair, squirrel ears, star hair ornament, streaked hair, streaming tears, swept bangs, symbol-shaped pupils, tears, teeth, tentacle hair, tentacle_from_mouth, thick eyebrows, third eye, tinted eyewear, tongue, tongue on severed neck, tongue out, tongue piercing, tongue pull, trachea tongue, trachea_tongue, twin braids, twintails, two-tone hair, under-rim eyewear, upper teeth only, upside down face, uterus on mouth, v-shaped eyebrows, very long hair, very short hair, wavy hair, wavy mouth, white eyes, white hair, white hairband, white pupils, wolf ears, x hair ornament, x-hair ornament, yellow eyes, yellow hairband
|
||||
|
@@ -0,0 +1 @@
|
||||
after anal, after ejaculation, after fellatio, after sex, after vaginal, anal, anal ball, anal beads, anal beeds, anal dildo, anal fisting, anal fluid, anal hook, anal insertion, anal object insertion, anal sex, anal tail, animal penis, bdsm, bite nipple, bite pussy, biting pussy, black panties, blue panties, bondage, bondage breasts, bondage outfit, bow panties, breast bondage, bukkake, carving pussy, clitoris, clitoris piercing, clothed female nude female, clothed female nude male, clothed male nude female, clothed sex, completely nude, cooperative fellatio, covered in cum, covered in cum, covered nipples, cum, cum from nipples, cum in ass, cum in container, cum in empty eyesocket, cum in mouth, cum in nose, cum in pussy, cum in trachea, cum in trached, cum leaking from anus, cum on ass, cum on body, cum on brain, cum on breasts, cum on clothes, cum on face, cum on feet, cum on hair, cum on hands, cum on head, cum on penis, cum on stomach, cum on tongue, cum overflow, cum pool, cum string, dark nipples, dark penis, dildo, dildo impaled intestines, dildo in nipples, dildo in pussy, dildo riding, disembodied pussy, disembodied penis, disembodied pussy, disembodied pussy impaled by metal pole, disembodied pussy in box, disembodied pussy on ground, disembodied pussy on mouth, disembodied pussy on plate, disembodied pussy tied on toe, dog penis, double dildo, double handjob, ejaculation, erection, erection under clothes, excessive cum, eyeball in pussy, fellatio, female ejaculation, female masturbation, female orgasm, fff threesome, ffm threesome, fingering, fisting, folded sex, forced orgasm, gaping pussy, glans penis, glass penis, gloved handjob, green penis, group sex, gun in pussy, hair on penis, hair_on_penis, handjob, highleg panties, hook through pussy, horse penis, huge dildo, huge nipples, huge penis, imminent anal, imminent fellatio, imminent vaginal, implied sex, inverted nipples, invisible penis, irrumatio, lace-trimmed panties, lactation, large penis, leaking cum, licking nipple, licking penis, lingerie, lipstick marks on penis, looking at penis, male masturbation, male underwear, masturbation, mechancial penis, mmf threesome, mutilated pussy, nailed nipples, naked apron, naked coat, naked overalls, naked towel, nipple, nipple bar, nipple chain, nipple clamp, nipple clamps, nipple cutout, nipple insertion, nipple jewelry, nipple penetration, nipple piercing, nipple pinch, nipple pull, nipple rings, nipple slip, nipple stimulation, nipple suspension, nipple tag, nipple tweak, nipple wire pull, nipples, no nipples, no panties, no pussy, nude, one leg up bondage, orgasm, panties, panties around one leg, panties aside, panties on head, panties removed, panties under pantyhose, penis, penis emerging, penis awe, penis emerging, penis on face, penis out, penis over eyes, penis shadow, penis stand, penis through stomach, penis to breast, penis_from_mouth, piledriver (sex), pink panties, pins spread pussy, print panties, projectile cum, puffy nipples, purple panties, pussy, pussy juice, pussy juice puddle, pussy juice trail, pussy juices, pussy perspective, pussy spread by pins, pussy stab, pussy tag, pussy view, radish in pussy, red panties, rough sex, severed nipple, severed pussy, severed_head_impaled_on_dildo, sex, sex from behind, sex machine, sex penetration, sex toy, side-tie panties, simulated fellatio, spitroast, spread pussy, standing sex, sucking nipples., tentacle sex, thigh sex, threesome, underwear, underwear only, unworn panties, vaginal, vaginal ball, vaginal gape, vaginal insertion, vaginal object insertion, vaginal penetration, veiny penis, weight on pussy, wet panties, white panties, yellow panties, yuri, yuri \(doki doki literature club\)
|
||||
|
@@ -0,0 +1 @@
|
||||
all fours, arched, arched back, arms behind back, arms behind head, arms up, ass up, bent, bent over, bent_backwards, bound, bound ankles, bound arms, bound legs, bound together, bound wrists, breast sucking, carrying, clenched hands, clenched teeth, covering, covering breasts, covering mouth, crazy smile, crying, crying with eyes open, cutting board, cutting hair, cutting throat, cutting_throat, disembodied head hanging, disembodied pussy tied on toe, disembodied uterus tied on toe, disembodied womb tied on toe, evil smile, facing away, facing viewer, falling, falling down, fallopian tube tied on toe, fingering, from behind, grabbing, grabbing another's ass, grabbing another's breast, grabbing another's ear, grabbing another's hair, grabbing another's head, grabbing disembodied feet, grabbing disembodied head, grabbing disembodied breast, grabbing from behind, grabbing own breast, grabbing own hair, grabbing_another's_breast, hand grabbing another's ass, hand grabbing head, hanging, hanging breasts, hanging limbs, head down ass up, head_facing_backwards, holding, holding another's wrist, holding axe, holding bottle, holding camera, holding chopsticks, holding cigarette, holding dagger, holding gun, holding hands, holding head, holding knife, holding phone, holding plate, holding spoon, holding sword, holding syringe, holding tray, holding weapon, kneeling, knife_cutting, leaning forward, licking, licking feet, licking foot, licking lips, licking neck, licking nipple, licking penis, looking at another, looking at penis, looking at viewer, looking away, looking back, looking down, looking to the side, looking up, low-tied long hair, lying, lying in jack-o'-lantern, lying on back, multi-tied hair, on back, open bodysuit, open clothes, open fly, open jacket, open kimono, open mouth, open shirt, open-chest sweater, peeing, peeing self, restrained, reverse suspended congress, sex from behind, sitting, sitting on couch, sitting on face, sitting on person, smile, spitroast, spread legs, standing, standing on one leg, standing sex, standing split, strangling, sucking nipples., suspended, suspended congress, suspended_by_breasts, testicle sucking, tied, tied breast, tied breasts, tied shirt, tied up (nonsexual), two hand choke from behind, view from behind, wide spread legs
|
||||
|
@@ -0,0 +1 @@
|
||||
against wall, anal dildo, aqua background, arcade, assault rifle, bad food, bag, beach, bed, bed sheet, belly chain, black background, blood on knife, blood on weapon, bloodied weapon, bloody knife, bloody sword, blue background, blue sky, blurry background, blury background, bowl, box, breasts on table, brick wall, broken weapon, brown background, camera, car interior, carving knife, chain, chain leash, chain on neck, chair, chicken \(food\), christmas tree, cloud, cloud strife, cloudy sky, club \(weapon\), coffee, couch, crotch rope, cum pool, desk, dildo, dildo impaled intestines, dildo in nipples, dildo in pussy, dildo riding, disembodied breasts in plastic bag, disembodied breasts in wooden box, disembodied head in plastic bag, disembodied head on couch, disembodied pussy in box, disembodied uterus in box, disembodied womb in box, door, double dildo, electrical chair, energy sword, fence, food, food focus, food in mouth, forest, full moon, gas mask, glory wall, gradient background, green background, grey background, greyscale with colored background, gun, gun in pussy, gun insertion, holding camera, holding gun, holding knife, holding sword, holding weapon, huge dildo, in box, in food, indoors, joystick, kalashnikov rifle, kitchen, kitchen knife, knife, knife stab, knife_cutting, large knife, machine, milking machine, mirror, moon, night sky, nipple chain, on bed, on couch, on desk, on table, orange background, outdoors, palm tree, pet bowl, photo background, pillow, pink background, planted sword, pool, pool of blood, punching bag, purple background, red background, red rope, rifle, rope, rope noose, rope on arm, rope on neck, rope on thigh, sailor moon, school chair, school desk, severed_head_impaled_on_dildo, sex machine, sex toy, shared food, short sword, simple background, sitting on couch, sky, sniper rifle, snow, spaghetti, spotlight, star \(sky\), starry sky, submachine gun, sword, sword in the ass, table, through wall, trash bag, tree, tree stump, video camera, water, water drop, watercraft, weapon, weapon over shoulder, white background, window, wooden table, wooden wall, wrench, yellow background
|
||||
|
@@ -0,0 +1 @@
|
||||
animal print, arrow \(symbol\), bar censor, bat print, black border, blank speech bubble, border, bunny print, censored, comic, cow print, female pov, heart censor, konohagakure symbol, leopard print, mitsudomoe (shape), mitsudomoe \(shape\), mosaic censoring, phallic symbol, pink border, pov, pov crotch, pov hand, pov hands, print gloves, print legwear, print panties, print pantyhose, pussy perspective, see-through silhouette, sepia, silent comic, silhouette, sound effect, sound effects, spade \(shape\), speech bubble, spider web print, star (symbol), star \(symbol\), symbol-shaped, symbol-shaped pupils, tiger print, tomoe (symbol), tomoe \(symbol\), transparent, transparent guillotine, tribal, uncensored
|
||||
|
@@ -0,0 +1,610 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
RESOURCES_DIR = ROOT / "resources"
|
||||
DEFAULT_SOURCE = ROOT.parent.parent / "user" / "little_doom.txt"
|
||||
|
||||
|
||||
OUTPUT_FILES = {
|
||||
"clean": "little_doom_clean.csv",
|
||||
"characters_sources": "little_doom_characters_sources.csv",
|
||||
"hair_eyes": "little_doom_hair_eyes.csv",
|
||||
"clothing_accessories": "little_doom_clothing_accessories.csv",
|
||||
"body_features": "little_doom_body_features.csv",
|
||||
"poses_actions": "little_doom_poses_actions.csv",
|
||||
"settings_props": "little_doom_settings_props.csv",
|
||||
"symbols_style": "little_doom_symbols_style.csv",
|
||||
"mature": "little_doom_mature.csv",
|
||||
"dark_gore": "little_doom_dark_gore.csv",
|
||||
}
|
||||
|
||||
|
||||
CHARACTER_SOURCE_TOKENS = {
|
||||
"anime",
|
||||
"cosplay",
|
||||
"creeper",
|
||||
"disney",
|
||||
"genshin",
|
||||
"league",
|
||||
"minecraft",
|
||||
"nintendo",
|
||||
"pokemon",
|
||||
"sanrio",
|
||||
"sonic",
|
||||
"vocaloid",
|
||||
}
|
||||
|
||||
HAIR_EYES_TOKENS = {
|
||||
"bangs",
|
||||
"beard",
|
||||
"blush",
|
||||
"braid",
|
||||
"braided",
|
||||
"braids",
|
||||
"cheek",
|
||||
"cheeks",
|
||||
"crying",
|
||||
"ear",
|
||||
"ears",
|
||||
"eye",
|
||||
"eyebrow",
|
||||
"eyebrows",
|
||||
"eyelashes",
|
||||
"eyes",
|
||||
"eyewear",
|
||||
"face",
|
||||
"facial",
|
||||
"fangs",
|
||||
"glasses",
|
||||
"hair",
|
||||
"hairband",
|
||||
"hairclip",
|
||||
"hairpods",
|
||||
"hairtie",
|
||||
"lipstick",
|
||||
"lips",
|
||||
"makeup",
|
||||
"mouth",
|
||||
"nose",
|
||||
"ponytail",
|
||||
"pupil",
|
||||
"pupils",
|
||||
"sclera",
|
||||
"smile",
|
||||
"tears",
|
||||
"teeth",
|
||||
"tongue",
|
||||
"twintails",
|
||||
"whiskers",
|
||||
}
|
||||
|
||||
HAIR_EYES_PHRASES = {
|
||||
"animal ear",
|
||||
"black eye",
|
||||
"hair between eyes",
|
||||
"open mouth",
|
||||
"single eye",
|
||||
}
|
||||
|
||||
CLOTHING_ACCESSORY_TOKENS = {
|
||||
"accessory",
|
||||
"apron",
|
||||
"armor",
|
||||
"bag",
|
||||
"bandaid",
|
||||
"bandage",
|
||||
"belt",
|
||||
"bikini",
|
||||
"bodysuit",
|
||||
"boots",
|
||||
"bra",
|
||||
"cape",
|
||||
"choker",
|
||||
"clothes",
|
||||
"clothing",
|
||||
"collar",
|
||||
"corset",
|
||||
"costume",
|
||||
"dress",
|
||||
"earrings",
|
||||
"eyewear",
|
||||
"glasses",
|
||||
"gloves",
|
||||
"goggles",
|
||||
"hat",
|
||||
"headband",
|
||||
"headphones",
|
||||
"heels",
|
||||
"helmet",
|
||||
"hood",
|
||||
"jacket",
|
||||
"jewelry",
|
||||
"kimono",
|
||||
"leotard",
|
||||
"lingerie",
|
||||
"mask",
|
||||
"necklace",
|
||||
"outfit",
|
||||
"panties",
|
||||
"pants",
|
||||
"piercing",
|
||||
"ribbon",
|
||||
"scarf",
|
||||
"shirt",
|
||||
"shoes",
|
||||
"shorts",
|
||||
"skirt",
|
||||
"sleeve",
|
||||
"sleeves",
|
||||
"socks",
|
||||
"suit",
|
||||
"swimsuit",
|
||||
"thighhighs",
|
||||
"uniform",
|
||||
"underwear",
|
||||
"veil",
|
||||
}
|
||||
|
||||
CLOTHING_ACCESSORY_PHRASES = {
|
||||
"bunny suit",
|
||||
"maid outfit",
|
||||
"school uniform",
|
||||
"swim suit",
|
||||
}
|
||||
|
||||
BODY_FEATURE_TOKENS = {
|
||||
"abs",
|
||||
"anatomy",
|
||||
"anus",
|
||||
"arm",
|
||||
"arms",
|
||||
"ass",
|
||||
"back",
|
||||
"belly",
|
||||
"body",
|
||||
"breast",
|
||||
"breasts",
|
||||
"butt",
|
||||
"claws",
|
||||
"clitoris",
|
||||
"ear",
|
||||
"ears",
|
||||
"fangs",
|
||||
"feet",
|
||||
"fingers",
|
||||
"foot",
|
||||
"genitals",
|
||||
"hand",
|
||||
"hands",
|
||||
"head",
|
||||
"heart",
|
||||
"hips",
|
||||
"horn",
|
||||
"horns",
|
||||
"leg",
|
||||
"legs",
|
||||
"mouth",
|
||||
"muscle",
|
||||
"muscular",
|
||||
"nail",
|
||||
"nails",
|
||||
"navel",
|
||||
"neck",
|
||||
"nipple",
|
||||
"nipples",
|
||||
"penis",
|
||||
"piercing",
|
||||
"pubic",
|
||||
"pussy",
|
||||
"skin",
|
||||
"tail",
|
||||
"teeth",
|
||||
"thigh",
|
||||
"thighs",
|
||||
"toe",
|
||||
"toes",
|
||||
"tongue",
|
||||
"torso",
|
||||
"vagina",
|
||||
"veins",
|
||||
"waist",
|
||||
"wings",
|
||||
}
|
||||
|
||||
BODY_FEATURE_PHRASES = {
|
||||
"animal ears",
|
||||
"body hair",
|
||||
"large breasts",
|
||||
"small breasts",
|
||||
}
|
||||
|
||||
POSE_ACTION_TOKENS = {
|
||||
"arched",
|
||||
"bent",
|
||||
"bound",
|
||||
"carrying",
|
||||
"clenched",
|
||||
"covering",
|
||||
"crying",
|
||||
"cutting",
|
||||
"facing",
|
||||
"falling",
|
||||
"fingering",
|
||||
"grabbing",
|
||||
"hanging",
|
||||
"holding",
|
||||
"kneeling",
|
||||
"leaning",
|
||||
"licking",
|
||||
"looking",
|
||||
"lying",
|
||||
"open",
|
||||
"peeing",
|
||||
"pulling",
|
||||
"pushing",
|
||||
"restrained",
|
||||
"running",
|
||||
"sitting",
|
||||
"smile",
|
||||
"spitroast",
|
||||
"spreading",
|
||||
"standing",
|
||||
"strangling",
|
||||
"sucking",
|
||||
"suspended",
|
||||
"tied",
|
||||
"touching",
|
||||
"walking",
|
||||
}
|
||||
|
||||
POSE_ACTION_PHRASES = {
|
||||
"all fours",
|
||||
"arms behind",
|
||||
"arms up",
|
||||
"ass up",
|
||||
"bent over",
|
||||
"from behind",
|
||||
"on back",
|
||||
"open mouth",
|
||||
"spread legs",
|
||||
}
|
||||
|
||||
SETTING_PROP_TOKENS = {
|
||||
"arcade",
|
||||
"background",
|
||||
"bag",
|
||||
"bath",
|
||||
"beach",
|
||||
"bed",
|
||||
"bowl",
|
||||
"box",
|
||||
"cafe",
|
||||
"camera",
|
||||
"car",
|
||||
"chain",
|
||||
"chair",
|
||||
"city",
|
||||
"cloud",
|
||||
"cloudy",
|
||||
"coffee",
|
||||
"couch",
|
||||
"desk",
|
||||
"dildo",
|
||||
"door",
|
||||
"fence",
|
||||
"food",
|
||||
"forest",
|
||||
"gun",
|
||||
"hammer",
|
||||
"indoor",
|
||||
"indoors",
|
||||
"joystick",
|
||||
"kalashnikov",
|
||||
"kitchen",
|
||||
"knife",
|
||||
"machine",
|
||||
"mirror",
|
||||
"moon",
|
||||
"outdoor",
|
||||
"outdoors",
|
||||
"pillow",
|
||||
"pool",
|
||||
"rifle",
|
||||
"rope",
|
||||
"room",
|
||||
"sky",
|
||||
"snow",
|
||||
"sofa",
|
||||
"spaghetti",
|
||||
"spotlight",
|
||||
"street",
|
||||
"sword",
|
||||
"table",
|
||||
"tool",
|
||||
"toy",
|
||||
"tree",
|
||||
"wall",
|
||||
"water",
|
||||
"watercraft",
|
||||
"weapon",
|
||||
"window",
|
||||
"wrench",
|
||||
}
|
||||
|
||||
SETTING_PROP_PHRASES = {
|
||||
"gas mask",
|
||||
"sex toy",
|
||||
}
|
||||
|
||||
SYMBOL_STYLE_TOKENS = {
|
||||
"border",
|
||||
"censor",
|
||||
"censored",
|
||||
"comic",
|
||||
"effect",
|
||||
"emoji",
|
||||
"icon",
|
||||
"mosaic",
|
||||
"perspective",
|
||||
"pov",
|
||||
"print",
|
||||
"sepia",
|
||||
"shape",
|
||||
"silhouette",
|
||||
"style",
|
||||
"symbol",
|
||||
"transparent",
|
||||
"tribal",
|
||||
"uncensored",
|
||||
}
|
||||
|
||||
SYMBOL_STYLE_PHRASES = {
|
||||
"sound effect",
|
||||
"speech bubble",
|
||||
}
|
||||
|
||||
MATURE_TOKENS = {
|
||||
"anal",
|
||||
"bdsm",
|
||||
"bondage",
|
||||
"bukkake",
|
||||
"clitoris",
|
||||
"cum",
|
||||
"dildo",
|
||||
"ejaculation",
|
||||
"erection",
|
||||
"fellatio",
|
||||
"fingering",
|
||||
"fisting",
|
||||
"genitals",
|
||||
"handjob",
|
||||
"hentai",
|
||||
"irrumatio",
|
||||
"lactation",
|
||||
"lingerie",
|
||||
"masturbation",
|
||||
"naked",
|
||||
"nipple",
|
||||
"nipples",
|
||||
"nude",
|
||||
"orgasm",
|
||||
"panties",
|
||||
"penis",
|
||||
"pussy",
|
||||
"sex",
|
||||
"sexual",
|
||||
"spitroast",
|
||||
"threesome",
|
||||
"underwear",
|
||||
"vaginal",
|
||||
"yuri",
|
||||
}
|
||||
|
||||
MATURE_PHRASES = {
|
||||
"after sex",
|
||||
"sex toy",
|
||||
}
|
||||
|
||||
DARK_GORE_TOKENS = {
|
||||
"amputated",
|
||||
"amputee",
|
||||
"asphyxiation",
|
||||
"beheading",
|
||||
"bisection",
|
||||
"blood",
|
||||
"bloody",
|
||||
"brain",
|
||||
"bruise",
|
||||
"corpse",
|
||||
"cutting",
|
||||
"dead",
|
||||
"death",
|
||||
"decapitation",
|
||||
"disembodied",
|
||||
"eviscerated",
|
||||
"gore",
|
||||
"guro",
|
||||
"headless",
|
||||
"impaled",
|
||||
"injury",
|
||||
"intestines",
|
||||
"mutilated",
|
||||
"rape",
|
||||
"scars",
|
||||
"severed",
|
||||
"skinned",
|
||||
"stab",
|
||||
"strangling",
|
||||
"viscera",
|
||||
"wound",
|
||||
}
|
||||
|
||||
DARK_GORE_PHRASES = {
|
||||
"missing limb",
|
||||
}
|
||||
|
||||
|
||||
def normalize_for_matching(term: str) -> str:
|
||||
return re.sub(r"[^a-z0-9]+", " ", term.casefold()).strip()
|
||||
|
||||
|
||||
def token_set(term: str) -> set[str]:
|
||||
normalized = normalize_for_matching(term)
|
||||
return set(normalized.split()) if normalized else set()
|
||||
|
||||
|
||||
def has_token(term: str, keywords: set[str]) -> bool:
|
||||
return bool(token_set(term) & keywords)
|
||||
|
||||
|
||||
def has_phrase(term: str, phrases: set[str]) -> bool:
|
||||
normalized = normalize_for_matching(term)
|
||||
return any(phrase in normalized for phrase in phrases)
|
||||
|
||||
|
||||
def has_any(term: str, keywords: set[str], phrases: set[str] | None = None) -> bool:
|
||||
return has_token(term, keywords) or has_phrase(term, phrases or set())
|
||||
|
||||
|
||||
def parse_terms(source: Path) -> list[str]:
|
||||
text = source.read_text(encoding="utf-8-sig")
|
||||
terms = [part.strip() for part in text.split(",")]
|
||||
return [term for term in terms if term]
|
||||
|
||||
|
||||
def dedupe_case_insensitive(terms: list[str]) -> list[str]:
|
||||
deduped: dict[str, str] = {}
|
||||
for term in terms:
|
||||
deduped.setdefault(term.casefold(), term)
|
||||
return sorted(deduped.values(), key=str.casefold)
|
||||
|
||||
|
||||
def categorize(terms: list[str]) -> dict[str, list[str]]:
|
||||
categories: dict[str, list[str]] = {
|
||||
"clean": terms,
|
||||
"characters_sources": [],
|
||||
"hair_eyes": [],
|
||||
"clothing_accessories": [],
|
||||
"body_features": [],
|
||||
"poses_actions": [],
|
||||
"settings_props": [],
|
||||
"symbols_style": [],
|
||||
"mature": [],
|
||||
"dark_gore": [],
|
||||
}
|
||||
|
||||
for term in terms:
|
||||
if "(" in term or r"\(" in term or has_token(term, CHARACTER_SOURCE_TOKENS):
|
||||
categories["characters_sources"].append(term)
|
||||
if has_any(term, HAIR_EYES_TOKENS, HAIR_EYES_PHRASES):
|
||||
categories["hair_eyes"].append(term)
|
||||
if has_any(term, CLOTHING_ACCESSORY_TOKENS, CLOTHING_ACCESSORY_PHRASES):
|
||||
categories["clothing_accessories"].append(term)
|
||||
if has_any(term, BODY_FEATURE_TOKENS, BODY_FEATURE_PHRASES):
|
||||
categories["body_features"].append(term)
|
||||
if has_any(term, POSE_ACTION_TOKENS, POSE_ACTION_PHRASES):
|
||||
categories["poses_actions"].append(term)
|
||||
if has_any(term, SETTING_PROP_TOKENS, SETTING_PROP_PHRASES):
|
||||
categories["settings_props"].append(term)
|
||||
if has_any(term, SYMBOL_STYLE_TOKENS, SYMBOL_STYLE_PHRASES):
|
||||
categories["symbols_style"].append(term)
|
||||
if has_any(term, MATURE_TOKENS, MATURE_PHRASES):
|
||||
categories["mature"].append(term)
|
||||
if has_any(term, DARK_GORE_TOKENS, DARK_GORE_PHRASES):
|
||||
categories["dark_gore"].append(term)
|
||||
|
||||
return categories
|
||||
|
||||
|
||||
def format_csv(terms: list[str]) -> str:
|
||||
return ", ".join(terms) + "\n"
|
||||
|
||||
|
||||
def build_outputs(source: Path) -> tuple[list[str], dict[str, str]]:
|
||||
raw_terms = parse_terms(source)
|
||||
clean_terms = dedupe_case_insensitive(raw_terms)
|
||||
categories = categorize(clean_terms)
|
||||
|
||||
clean_set = set(clean_terms)
|
||||
for name, terms in categories.items():
|
||||
if any(not term for term in terms):
|
||||
raise RuntimeError(f"{name} contains an empty term")
|
||||
if not set(terms).issubset(clean_set):
|
||||
raise RuntimeError(f"{name} contains terms outside little_doom_clean.csv")
|
||||
|
||||
outputs = {
|
||||
OUTPUT_FILES[name]: format_csv(terms)
|
||||
for name, terms in categories.items()
|
||||
}
|
||||
return raw_terms, outputs
|
||||
|
||||
|
||||
def write_outputs(resources_dir: Path, outputs: dict[str, str]) -> None:
|
||||
resources_dir.mkdir(parents=True, exist_ok=True)
|
||||
for filename, content in outputs.items():
|
||||
(resources_dir / filename).write_text(content, encoding="utf-8")
|
||||
|
||||
|
||||
def check_outputs(resources_dir: Path, outputs: dict[str, str]) -> list[str]:
|
||||
problems: list[str] = []
|
||||
for filename, expected in outputs.items():
|
||||
path = resources_dir / filename
|
||||
if not path.exists():
|
||||
problems.append(f"missing {path}")
|
||||
continue
|
||||
actual = path.read_text(encoding="utf-8")
|
||||
if actual != expected:
|
||||
problems.append(f"out of date {path}")
|
||||
return problems
|
||||
|
||||
|
||||
def print_counts(raw_terms: list[str], outputs: dict[str, str]) -> None:
|
||||
clean_terms = [term.strip() for term in outputs[OUTPUT_FILES["clean"]].split(",") if term.strip()]
|
||||
print(f"source terms: {len(raw_terms)}")
|
||||
print(f"unique clean terms: {len(clean_terms)}")
|
||||
print(f"duplicates removed: {len(raw_terms) - len(clean_terms)}")
|
||||
for name, filename in OUTPUT_FILES.items():
|
||||
terms = [term.strip() for term in outputs[filename].split(",") if term.strip()]
|
||||
print(f"{filename}: {len(terms)}")
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
parser = argparse.ArgumentParser(description="Build Little Doom LoRA keyword CSV resources.")
|
||||
parser.add_argument("--source", type=Path, default=DEFAULT_SOURCE, help="Comma-separated source tag file.")
|
||||
parser.add_argument("--resources-dir", type=Path, default=RESOURCES_DIR, help="Output resources directory.")
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show generated counts without writing files.")
|
||||
parser.add_argument("--check", action="store_true", help="Fail when generated files differ from disk.")
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
if not args.source.exists():
|
||||
raise RuntimeError(f"source file not found: {args.source}")
|
||||
|
||||
raw_terms, outputs = build_outputs(args.source)
|
||||
print_counts(raw_terms, outputs)
|
||||
|
||||
if args.check:
|
||||
problems = check_outputs(args.resources_dir, outputs)
|
||||
if problems:
|
||||
for problem in problems:
|
||||
print(problem, file=sys.stderr)
|
||||
return 1
|
||||
print("check passed")
|
||||
return 0
|
||||
|
||||
if args.dry_run:
|
||||
print("dry run: no files written")
|
||||
return 0
|
||||
|
||||
write_outputs(args.resources_dir, outputs)
|
||||
print(f"wrote {len(outputs)} files to {args.resources_dir}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user