yay for concept mixer

This commit is contained in:
AIrjen
2024-04-05 15:22:35 +02:00
parent d6d6102694
commit dba2c193ec
9 changed files with 133 additions and 11 deletions
+6 -1
View File
@@ -82,6 +82,7 @@ generatepoemline = True
generatesongline = True
generatecardname = True
generateepisodetitle = True
generateconceptmixer = True
for item in config:
@@ -134,6 +135,8 @@ for item in config:
generatecardname = False
if item[0] == 'subject_episodetitle' and item[1] != 'on':
generateepisodetitle = False
if item[0] == 'subject_conceptmixer' and item[1] != 'on':
generateconceptmixer = False
# build up all subjects we can choose based on the loaded config file
if(generatevehicle or generateobject or generatefood or generatebuilding or generatespace):
@@ -144,7 +147,7 @@ if(generatemanwoman or generatemanwomanrelation or generatefictionalcharacter or
subjects.append("humanoid")
if(generatelandscape):
subjects.append("landscape")
if(generateevent or generateconcepts or generatepoemline or generatesongline or generatecardname or generateepisodetitle):
if(generateevent or generateconcepts or generatepoemline or generatesongline or generatecardname or generateepisodetitle or generateconceptmixer):
subjects.append("concept")
@@ -198,6 +201,8 @@ if(generatecardname):
subjectsubtypesconcept.append("names from card based games")
if(generateepisodetitle):
subjectsubtypesconcept.append("episode titles from tv shows")
if(generateconceptmixer):
subjectsubtypesconcept.append("concept mixer")
class OneButtonPrompt:
+33 -8
View File
@@ -360,6 +360,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
miniactivitylist = csv_to_list("miniactivity", antilist,"./csvfiles/special_lists/",0,"?")
animalsuffixadditionlist = csv_to_list("animalsuffixadditions", antilist,"./csvfiles/special_lists/",0,"?")
buildfacepartlist = csv_to_list("buildfaceparts", antilist,"./csvfiles/special_lists/",0,"?")
conceptmixerlist = csv_to_list("conceptmixer", antilist,"./csvfiles/special_lists/",0,"?")
tokinatorlist = csv_to_list("tokinator", antilist,"./csvfiles/templates/",0,"?")
@@ -1304,6 +1305,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
subjectchooser = "cardname"
if(subtypeconcept == "episode titles from tv shows"):
subjectchooser = "episodetitle"
if(subtypeconcept == "concept mixer"):
subjectchooser = "conceptmixer"
# After we chose the subject, lets set all things ready for He/She/It etc
@@ -2151,9 +2154,28 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
if(mainchooser == "concept"):
# first add a wildcard that can be used to create prompt strenght
completeprompt += " -objectstrengthstart- "
if(givensubject == "" or (subjectingivensubject and givensubject != "")):
if(subjectchooser == "conceptmixer"):
chosenconceptmixerprelist = random.choice(conceptmixerlist)
chosenconceptmixerlist = chosenconceptmixerprelist.split("@")
chosenconceptmixer = ''.join([chosenconceptmixerlist[0]])
chosenconceptmixersubject = ''.join([chosenconceptmixerlist[1]])
# if there is a subject override, then replace the subject with that
if(givensubject==""):
chosenconceptmixer = chosenconceptmixer.replace("-subject-",chosenconceptmixersubject )
elif(givensubject != "" and subjectingivensubject == False):
chosenconceptmixer = chosenconceptmixer.replace("-subject-",givensubject )
if(overrideoutfit!="" and ("-outfit-" in chosenconceptmixer or "-minioutfit-" in chosenconceptmixer)):
chosenconceptmixer = chosenconceptmixer.replace("-outfit-",overrideoutfit )
chosenconceptmixer = chosenconceptmixer.replace("-minioutfit-",overrideoutfit )
outfitmode = 1 # We dont want another outfit in this case
completeprompt += chosenconceptmixer
elif(givensubject == "" or (subjectingivensubject and givensubject != "")):
if(subjectchooser == "event"):
completeprompt += " \"" + random.choice(eventlist) + "\" "
completeprompt += " \"-event-\" "
if(subjectchooser == "concept"):
completeprompt += " \"The -conceptprefix- of -conceptsuffix-\" "
@@ -2170,6 +2192,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
if(subjectchooser == "episodetitle"):
completeprompt += " \"-episodetitle-\" "
# making subject override work with X and Y concepts, much fun!
elif(givensubject != "" and subjectchooser == "concept" and subjectingivensubject == False):
@@ -3198,11 +3221,12 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
"-episodetitle-" in completeprompt or
"-token-" in completeprompt or
"-allstylessuffix-" in completeprompt or
"-fluff-" in completeprompt):
"-fluff-" in completeprompt or
"-event-" in completeprompt):
allwildcardslistnohybrid = [ "-color-","-object-", "-animal-", "-fictional-","-nonfictional-","-building-","-vehicle-","-location-","-conceptprefix-","-food-","-haircolor-","-hairstyle-","-job-", "-accessory-", "-humanoid-", "-manwoman-", "-human-", "-colorscheme-", "-mood-", "-genderdescription-", "-artmovement-", "-malefemale-", "-bodytype-", "-minilocation-", "-minilocationaddition-", "-pose-", "-season-", "-minioutfit-", "-elaborateoutfit-", "-minivomit-", "-vomit-", "-rpgclass-", "-subjectfromfile-","-outfitfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-fantasyartist-", "-popularartist-", "-romanticismartist-", "-photographyartist-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-addontolocationinside-", "-addontolocation-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-animalsuffixaddition-", "-chair-", "-cardname-", "-covering-", "-heshe-", "-hisher-", "-himher-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-buildfacepart-", "-outfitvomit-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-", "-humanvomit-", "-eyecolor-", "-fashiondesigner-", "-colorcombination-", "-materialcombination-", "-oppositefictional-", "-oppositenonfictional-", "-photoaddition-", "-age-", "-agecalculator-", "-gregmode-"
,"-portraitartist-", "-characterartist-" , "-landscapeartist-", "-scifiartist-", "-graphicdesignartist-", "-digitalartist-", "-architectartist-", "-cinemaartist-", "-setting-", "-charactertype-", "-objectstohold-", "-episodetitle-", "-token-", "-allstylessuffix-", "-fluff-"]
,"-portraitartist-", "-characterartist-" , "-landscapeartist-", "-scifiartist-", "-graphicdesignartist-", "-digitalartist-", "-architectartist-", "-cinemaartist-", "-setting-", "-charactertype-", "-objectstohold-", "-episodetitle-", "-token-", "-allstylessuffix-", "-fluff-", "-event-"]
allwildcardslistnohybridlists = [colorlist, objectlist, animallist, fictionallist, nonfictionallist, buildinglist, vehiclelist, locationlist,conceptprefixlist,foodlist,haircolorlist, hairstylelist,joblist, accessorielist, humanoidlist, manwomanlist, humanlist, colorschemelist, moodlist, genderdescriptionlist, artmovementlist, malefemalelist, bodytypelist, minilocationlist, minilocationadditionslist, poselist, seasonlist, minioutfitlist, elaborateoutfitlist, minivomitlist, vomitlist, rpgclasslist, customsubjectslist, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, addontolocationinsidelist, addontolocationlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, animalsuffixadditionlist, chairlist, cardnamelist, coveringlist, heshelist, hisherlist, himherlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, buildfacepartlist, outfitvomitlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist, humanvomitlist, eyecolorlist, fashiondesignerlist, colorcombinationlist, materialcombinationlist, oppositefictionallist, oppositenonfictionallist, photoadditionlist, agelist, agecalculatorlist, gregmodelist
, portraitartistlist, characterartistlist, landscapeartistlist, scifiartistlist, graphicdesignartistlist, digitalartistlist, architectartistlist, cinemaartistlist, settinglist, charactertypelist, objectstoholdlist, episodetitlelist, tokenlist, allstylessuffixlist, flufferlist]
, portraitartistlist, characterartistlist, landscapeartistlist, scifiartistlist, graphicdesignartistlist, digitalartistlist, architectartistlist, cinemaartistlist, settinglist, charactertypelist, objectstoholdlist, episodetitlelist, tokenlist, allstylessuffixlist, flufferlist, eventlist]
allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-", "-element-"]
allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist, elementlist]
@@ -3969,12 +3993,13 @@ def createpromptvariant(prompt = "", insanitylevel = 5, antivalues = "" , gender
"-objectstohold-" in completeprompt or
"-episodetitle-" in completeprompt or
"-allstylessuffix-" in completeprompt or
"-fluff-" in completeprompt
"-fluff-" in completeprompt or
"-event-" in completeprompt
):
allwildcardslistnohybrid = [ "-color-","-object-", "-animal-", "-fictional-","-nonfictional-","-building-","-vehicle-","-location-","-conceptprefix-","-food-","-haircolor-","-hairstyle-","-job-", "-accessory-", "-humanoid-", "-manwoman-", "-human-", "-colorscheme-", "-mood-", "-genderdescription-", "-artmovement-", "-malefemale-", "-bodytype-", "-minilocation-", "-minilocationaddition-", "-pose-", "-season-", "-minioutfit-", "-elaborateoutfit-", "-minivomit-", "-vomit-", "-rpgclass-", "-subjectfromfile-", "-outfitfromfile-", "-brand-", "-space-", "-artist-", "-imagetype-", "-othertype-", "-quality-", "-lighting-", "-camera-", "-lens-","-imagetypequality-", "-poemline-", "-songline-", "-greatwork-", "-fantasyartist-", "-popularartist-", "-romanticismartist-", "-photographyartist-", "-emoji-", "-timeperiod-", "-shotsize-", "-musicgenre-", "-animaladdition-", "-objectaddition-", "-humanaddition-", "-overalladdition-", "-focus-", "-direction-", "-styletilora-", "-manwomanrelation-", "-waterlocation-", "-container-", "-firstname-", "-flora-", "-print-", "-miniactivity-", "-pattern-", "-chair-", "-cardname-", "-covering-", "-outfitdescriptor-", "-hairdescriptor-", "-hairvomit-", "-humandescriptor-", "-manwomanmultiple-", "-facepart-", "-locationdescriptor-", "-basicbitchdescriptor-", "-animaldescriptor-", "-humanexpression-", "-humanvomit-", "-eyecolor-", "-fashiondesigner-", "-colorcombination-", "-materialcombination-", "-photoaddition-", "-age-", "agecalculator-", "-gregmode-"
,"-portraitartist-", "-characterartist-" , "-landscapeartist-", "-scifiartist-", "-graphicdesignartist-", "-digitalartist-", "-architectartist-", "-cinemaartist-", "-setting-", "-charactertype-", "-objectstohold-", "-episodetitle-", "-allstylessuffix-", "-fluff-"]
,"-portraitartist-", "-characterartist-" , "-landscapeartist-", "-scifiartist-", "-graphicdesignartist-", "-digitalartist-", "-architectartist-", "-cinemaartist-", "-setting-", "-charactertype-", "-objectstohold-", "-episodetitle-", "-allstylessuffix-", "-fluff-", "-event-"]
allwildcardslistnohybridlists = [colorlist, objectlist, animallist, fictionallist, nonfictionallist, buildinglist, vehiclelist, locationlist,conceptprefixlist,foodlist,haircolorlist, hairstylelist,joblist, accessorielist, humanoidlist, manwomanlist, humanlist, colorschemelist, moodlist, genderdescriptionlist, artmovementlist, malefemalelist, bodytypelist, minilocationlist, minilocationadditionslist, poselist, seasonlist, minioutfitlist, elaborateoutfitlist, minivomitlist, vomitlist, rpgclasslist, customsubjectslist, customoutfitslist, brandlist, spacelist, artistlist, imagetypelist, othertypelist, qualitylist, lightinglist, cameralist, lenslist, imagetypequalitylist, poemlinelist, songlinelist, greatworklist, fantasyartistlist, popularartistlist, romanticismartistlist, photographyartistlist, emojilist, timeperiodlist, shotsizelist, musicgenrelist, animaladditionlist, objectadditionslist, humanadditionlist, overalladditionlist, focuslist, directionlist, stylestiloralist, manwomanrelationlist, waterlocationlist, containerlist, firstnamelist, floralist, printlist, miniactivitylist, patternlist, chairlist, cardnamelist, coveringlist, outfitdescriptorlist, hairdescriptorlist, hairvomitlist, humandescriptorlist, manwomanmultiplelist, facepartlist, locationdescriptorlist, basicbitchdescriptorlist, animaldescriptorlist, humanexpressionlist, humanvomitlist, eyecolorlist, fashiondesignerlist, colorcombinationlist, materialcombinationlist, photoadditionlist, agelist, agecalculatorlist, gregmodelist
, portraitartistlist, characterartistlist, landscapeartistlist, scifiartistlist, graphicdesignartistlist, digitalartistlist, architectartistlist, cinemaartistlist, settinglist, charactertypelist, objectstoholdlist, episodetitlelist, allstylessuffixlist, flufferlist]
, portraitartistlist, characterartistlist, landscapeartistlist, scifiartistlist, graphicdesignartistlist, digitalartistlist, architectartistlist, cinemaartistlist, settinglist, charactertypelist, objectstoholdlist, episodetitlelist, allstylessuffixlist, flufferlist, eventlist]
allwildcardslistwithhybrid = ["-material-", "-descriptor-", "-outfit-", "-conceptsuffix-","-culture-", "-objecttotal-", "-outfitprinttotal-", "-element-"]
allwildcardslistwithhybridlists = [materiallist, descriptorlist,outfitlist,conceptsuffixlist,culturelist, objecttotallist, outfitprinttotallist, elementlist]
+1
View File
@@ -31,6 +31,7 @@ subject_poemline;on
subject_songline;on
subject_cardname;on
subject_episodetitle;on
subject_conceptmixer;on
#----;
# other main lists, in order of appearance;
# setting the random chance, for normal generation;
1 #this file controls the generation process
31 subject_songline on
32 subject_cardname on
33 subject_episodetitle on
34 subject_conceptmixer on
35 #----
36 # other main lists, in order of appearance
37 # setting the random chance, for normal generation
+19 -1
View File
@@ -6092,4 +6092,22 @@ Small Potatoes;X-files
Zero Sum;X-files
Elegy;X-files
Demons;X-files
Gethsemane;X-files
Gethsemane;X-files
Countdown;3 body problem
Red Coast;3 body problem
Destroyer of Worlds;3 body problem
Our Lord;3 body problem
Judgment Day;3 body problem
The Stars Our Destination;3 body problem
Only Advance;3 body problem
Wallfacer;3 body problem
Anjin;Shogun
Servants of Two Masters;Shogun
Tomorrow Is Tomorrow;Shogun
The Eightfold Fence;Shogun
Broken to the Fist;Shogun
Ladies of the Willow World;Shogun
A Stick of Time;Shogun
The Abyss of Life;Shogun
Crimson Sky;Shogun
A Dream of a Dream;Shogun
Can't render this file because it contains an unexpected character in line 1657 and column 50.
+9 -1
View File
@@ -12,4 +12,12 @@ Christ Pantocrator
The Creation of Adam
The Scream
Star Wars
-brand-
-brand-
Gearnica
The Arnolfini Portrait
The Garden of Earthly Delights
A Sunday Afternoon on the Island of La Grande Jatte
Composition with Red Blue and Yellow
Nighthawks
The thinker
Perseus with the Head of Medusa
1 Starry Night
12 The Creation of Adam
13 The Scream
14 Star Wars
15 -brand-
16 Gearnica
17 The Arnolfini Portrait
18 The Garden of Earthly Delights
19 A Sunday Afternoon on the Island of La Grande Jatte
20 Composition with Red Blue and Yellow
21 Nighthawks
22 The thinker
23 Perseus with the Head of Medusa
+37
View File
@@ -0,0 +1,37 @@
anthropomorphic -food---subject-@OR(person;animal;bird)
-subject--o-saurus@-food-
-subject- wearing OR(-animal-;-element-)-style -outfit-@-manwoman-
anthropomorphic, -subject- with the head of an -animal-@-manwoman-
-subject- shaped as a -food-@-objecttotal-
-subject- shaped as a -object-@-food-
-subject---animal- hybrid@OR(-humanoid-;-animal-)
-subject- as a -charactertype- character@OR(-nonfictional-;-fictional-;-animal-)
-subject---fictional- hybrid person@-fictional-
the personification of -subject-@-conceptsuffix-
-subject- made by -brand-@-objecttotal-
-subject- turned -job-@-job-
-subject---building- hybrid@-building-
-subject---location- hybrid@-location-
-subject---vehicle- hybrid@-vehicle-
-element--style -subject-@-rpgclass-
-subject---humanoid- hybrid@-humanoid-
displaying the words "-subject-"@-cardname-
-subject- inside a -container-@-objecttotal-
-subject- adorned with -flora-, -flora-, -flora- and -flora-@landscape
-subject- with -pattern- print@-animal-
-musicgenre--style -subject-@-objecttotal-
the -subject- of the -animal-s@-job-
-basicbitchdescriptor- -subject- as a -rpgclass-@-animal-
-subject- made out of -materialcombination-@OR(-objecttotal-;-animal-)
"-cardname-"-inspired -subject-@OR(-manwoman-;-animal-;-objecttotal-)
the -subject- from -charactertype-@OR(-job-;-humanoid-;-animal-;-objecttotal-)
-accessory-, -accessory-, -subject-@-manwoman-
a -accessory- wearing -subject-@-manwoman-
the -job- -subject- of -conceptsuffix-@-animal-
the -subject- -job- of -conceptsuffix-@-malefemale-
-subject- capturing the essence of "-poemline-"@OR(-malefemale-;-animal-)
-subject- based on "-episodetitle-"@OR(-malefemale-;-animal-)
-charactertype- inspired -subject-@-objecttotal-
-subject- set in a -setting- setting@OR(-manwoman-;-animal)
-greatwork- but with -subject-@OR(-nonfictional-;-fictional-;-animal-)
the -event- reenacted by -subject-@OR(-nonfictional-;-fictional-;-animal-)
Can't render this file because it contains an unexpected character in line 18 and column 22.
+18
View File
@@ -233,6 +233,24 @@
"giventypeofimage": "wallpaper art, in the center is an image",
"antistring": ""
},
"The Cauldron": {
"insanitylevel": 5,
"subject": "concept",
"artist": "all",
"chosensubjectsubtypeobject": "all",
"chosensubjectsubtypehumanoid": "all",
"chosensubjectsubtypeconcept": "concept mixer",
"chosengender": "all",
"imagetype": "subject only mode",
"imagemodechance": "20",
"givensubject": "",
"smartsubject": true,
"givenoutfit": "",
"prefixprompt": "",
"suffixprompt": "-quality-, -fluff-, -fluff-, -quality-, -fluff-",
"giventypeofimage": "",
"antistring": ""
},
"The Connaisseur": {
"insanitylevel": 5,
"subject": "concept",
+2
View File
@@ -82,6 +82,8 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
resultnew = resultnew.replace("-da-", " da ")
resultnew = resultnew.replace("-doo-", " doo ")
resultnew = resultnew.replace("-and-", " and ")
resultnew = resultnew.replace("-o-", " o ")
resultnew = resultnew.replace("-horse-", " horse ")
matches = re.findall(r'-\w+-', resultnew)
# Filter out matches with commas and spaces
+8
View File
@@ -108,6 +108,7 @@ generatepoemline = True
generatesongline = True
generatecardname = True
generateepisodetitle = True
generateconceptmixer = True
for item in config:
@@ -160,6 +161,8 @@ for item in config:
generatecardname = False
if item[0] == 'subject_episodetitle' and item[1] != 'on':
generateepisodetitle = False
if item[0] == 'subject_conceptmixer' and item[1] != 'on':
generateconceptmixer = False
# build up all subjects we can choose based on the loaded config file
if(generatevehicle or generateobject or generatefood or generatebuilding or generatespace):
@@ -225,6 +228,8 @@ if(generatecardname):
subjectsubtypesconcept.append("names from card based games")
if(generateepisodetitle):
subjectsubtypesconcept.append("episode titles from tv shows")
if(generateconceptmixer):
subjectsubtypesconcept.append("concept mixer")
@@ -466,6 +471,9 @@ class Script(scripts.Script):
6. names from card based games - Picks a card name from various card games, such as magic the gathering, yugioh and many others.
7. episode titles from tv shows - Picks a episode title from a popular tv series, such as Star Trek, Simpsons, game of Thrones, etc.
6. concept mixer - A mixer of different keywords and concepts. For example animal hybrids, objects shaped as other objects or other unusual combinations.
</font>
### 🎨 Artists