-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from erictik/banne-words
add detectBannedWords
- Loading branch information
Showing
4 changed files
with
258 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import "dotenv/config"; | ||
import { Midjourney, detectBannedWords } from "../src"; | ||
/** | ||
* | ||
* a simple example of how to use the banned words | ||
* ``` | ||
* npx tsx example/banend-words.ts | ||
* ``` | ||
*/ | ||
async function main() { | ||
var prompt = "horny girl"; | ||
var message = detectBannedWords(prompt); | ||
if (message.length > 0) { | ||
console.error("banned words detected"); | ||
} | ||
console.log(message); | ||
} | ||
main().catch((err) => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
// https://tokenizedhq.com/list-of-banned-words-in-midjourney/ | ||
// https://www.greataiprompts.com/imageprompt/list-of-banned-words-in-midjourney/ | ||
export const bannedWords = [ | ||
"blood", | ||
"twerk", | ||
"making love", | ||
"voluptuous", | ||
"naughty", | ||
"wincest", | ||
"orgy", | ||
"no clothes", | ||
"au naturel", | ||
"no shirt", | ||
"decapitate", | ||
"bare", | ||
"nude", | ||
"barely dressed", | ||
"nude", | ||
"bra", | ||
"risque", | ||
"scantily clad", | ||
"cleavage", | ||
"stripped", | ||
"infested", | ||
"full frontal", | ||
"unclothed", | ||
"invisible clothes", | ||
"wearing nothing", | ||
"lingerie", | ||
"with no shirt", | ||
"naked", | ||
"without clothes on", | ||
"negligee", | ||
"zero clothes", | ||
"gruesome", | ||
"fascist", | ||
"nazi", | ||
"prophet mohammed", | ||
"slave", | ||
"coon", | ||
"honkey", | ||
"cocaine", | ||
"heroin", | ||
"meth", | ||
"crack", | ||
"kill", | ||
"belle delphine", | ||
"hitler", | ||
"jinping", | ||
"lolita", | ||
"president xi", | ||
"torture", | ||
"disturbing", | ||
"farts", | ||
"fart", | ||
"poop", | ||
"infected", | ||
"warts", | ||
"shit", | ||
"brown pudding", | ||
"bunghole", | ||
"vomit", | ||
"voluptuous", | ||
"seductive", | ||
"sperm", | ||
"sexy", | ||
"sadist", | ||
"sensored", | ||
"censored", | ||
"silenced", | ||
"deepfake", | ||
"inappropriate", | ||
"waifu", | ||
"succubus", | ||
"slaughter", | ||
"surgery", | ||
"reproduce", | ||
"crucified", | ||
"seductively", | ||
"explicit", | ||
"inappropriate", | ||
"large bust", | ||
"explicit", | ||
"wang", | ||
"inappropriate", | ||
"teratoma", | ||
"intimate", | ||
"see through", | ||
"tryphophobia", | ||
"bloodbath", | ||
"wound", | ||
"cronenberg", | ||
"khorne", | ||
"cannibal", | ||
"cannibalism", | ||
"visceral", | ||
"guts", | ||
"bloodshot", | ||
"gory", | ||
"killing", | ||
"crucifixion", | ||
"surgery", | ||
"vivisection", | ||
"massacre", | ||
"hemoglobin", | ||
"suicide", | ||
"arse", | ||
"labia", | ||
"ass", | ||
"mammaries", | ||
"badonkers", | ||
"bloody", | ||
"minge", | ||
"big ass", | ||
"mommy milker", | ||
"booba", | ||
"nipple", | ||
"oppai", | ||
"booty", | ||
"organs", | ||
"bosom", | ||
"ovaries", | ||
"flesh", | ||
"breasts", | ||
"penis", | ||
"busty", | ||
"phallus", | ||
"clunge", | ||
"sexy female", | ||
"crotch", | ||
"skimpy", | ||
"dick", | ||
"thick", | ||
"bruises", | ||
"girth", | ||
"titty", | ||
"honkers", | ||
"vagina", | ||
"hooters", | ||
"veiny", | ||
"knob", | ||
"ahegao", | ||
"pinup", | ||
"ballgag", | ||
"car crash", | ||
"playboy", | ||
"bimbo", | ||
"pleasure", | ||
"bodily fluids", | ||
"pleasures", | ||
"boudoir", | ||
"rule34", | ||
"brothel", | ||
"seducing", | ||
"dominatrix", | ||
"corpse", | ||
"seductive", | ||
"erotic", | ||
"seductive", | ||
"fuck", | ||
"sensual", | ||
"hardcore", | ||
"sexy", | ||
"hentai", | ||
"shag", | ||
"horny", | ||
"crucified", | ||
"shibari", | ||
"incest", | ||
"smut", | ||
"jav", | ||
"succubus", | ||
"jerk off king at pic", | ||
"thot", | ||
"kinbaku", | ||
"legs spread", | ||
"sensuality", | ||
"belly button", | ||
"porn", | ||
"patriotic", | ||
"bleed", | ||
"excrement", | ||
"petite", | ||
"seduction", | ||
"mccurry", | ||
"provocative", | ||
"sultry", | ||
"erected", | ||
"camisole", | ||
"tight white", | ||
"arrest", | ||
"see-through", | ||
"feces", | ||
"anus", | ||
"revealing clothing", | ||
"vein", | ||
"loli", | ||
"-edge", | ||
"boobs", | ||
"-backed", | ||
"tied up", | ||
"zedong", | ||
"bathing", | ||
"jail", | ||
"reticulum", | ||
"rear end", | ||
"sakimichan", | ||
"behind bars", | ||
"shirtless", | ||
"sakimichan", | ||
"seductive", | ||
"sexi", | ||
"sexualiz", | ||
"sexual", | ||
]; | ||
export function detectBannedWords(prompt: string): string[] { | ||
const matches: string[] = []; | ||
bannedWords.forEach((word) => { | ||
const regex = new RegExp(`\\b${word}\\b`, "gi"); | ||
const wordMatches = prompt.match(regex); | ||
if (wordMatches) { | ||
wordMatches.forEach((match) => { | ||
matches.push(match); | ||
}); | ||
} | ||
}); | ||
return matches; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters