start of stuff

pull/206/head
AIrjen 2024-06-09 15:16:33 +02:00
parent 933afa907e
commit 9f6dd830e0
10 changed files with 37 additions and 17 deletions

View File

@ -351,6 +351,14 @@ class OneButtonPrompt:
"multiline": False, # This is the overwrite for an outfit, super nice
"default": ""
}),
"prompt_prefix": ("STRING", {
"multiline": False, # prefix the prompt
"default": ""
}),
"prompt_suffix": ("STRING", {
"multiline": False, # Suffix of the prompt
"default": ""
}),
"humanoids_gender": (genders, {"default": "all"}),
"emojis":(emojis, {"default": False}),
"base_model":(models, {"default": "SDXL"}),
@ -369,8 +377,8 @@ class OneButtonPrompt:
CATEGORY = "OneButtonPrompt"
def Comfy_OBP(self, insanitylevel, custom_subject, seed, artist, imagetype, subject, imagemodechance, humanoids_gender, emojis, custom_outfit, base_model, prompt_enhancer):
generatedpromptlist = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"","","",1,"",custom_subject,True,"",imagemodechance, humanoids_gender,"all", "all", "all", False, emojis, seed, custom_outfit, True, base_model, "", prompt_enhancer)
def Comfy_OBP(self, insanitylevel, custom_subject, seed, artist, imagetype, subject, imagemodechance, humanoids_gender, emojis, custom_outfit, base_model, prompt_enhancer, prompt_prefix, prompt_suffix):
generatedpromptlist = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"",prompt_prefix,prompt_suffix,1,"",custom_subject,True,"",imagemodechance, humanoids_gender,"all", "all", "all", False, emojis, seed, custom_outfit, True, base_model, "", prompt_enhancer)
#print(generatedprompt)
generatedprompt = generatedpromptlist[0]
prompt_g = generatedpromptlist[1]
@ -579,7 +587,15 @@ class OneButtonPreset:
},
"optional": {
"base_model":(models, {"default": "SDXL"}),
"prompt_enhancer":(prompt_enhancers, {"default": "none"}),
"prompt_enhancer":(prompt_enhancers, {"default": "none"}),
"preset_prefix": ("STRING", {
"multiline": False, # prefix the preset
"default": ""
}),
"preset_suffix": ("STRING", {
"multiline": False, # Suffix of the preset
"default": ""
}),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFFFFFFFFFFFF}),
},
}
@ -594,7 +610,7 @@ class OneButtonPreset:
CATEGORY = "OneButtonPrompt"
def Comfy_OBP_OneButtonPreset(self, OneButtonPreset, seed, base_model, prompt_enhancer):
def Comfy_OBP_OneButtonPreset(self, OneButtonPreset, seed, base_model, prompt_enhancer, preset_prefix, preset_suffix):
# load the stuff
if(OneButtonPreset == OBPresets.RANDOM_PRESET_OBP):
selected_opb_preset = OBPresets.get_obp_preset("Standard")
@ -640,6 +656,8 @@ class OneButtonPreset:
base_model=base_model,
OBP_preset=OneButtonPreset,
prompt_enhancer=prompt_enhancer,
preset_prefix=preset_prefix,
preset_suffix=preset_suffix,
)

View File

@ -142,7 +142,7 @@ You an use the Subject Types filter to select on main subject types to generate.
Artists have a major impact on the result. Automatically, it will select between 0-3 artists out of 3483 artists for your prompt.
You can turn it off. Add your own artists to the prompt, and they will be added to the end of the prompt.
Type of image can be used to force a certain direction. For example when using Realistic Vision, it might be a good idea to set it to photograph. For an anime model, you might want to use "Anime key visual"
Type of image can be used to force a certain direction. For example when using Realistic Vision, it might be a good idea to set it to photograph. For an anime model, you might want to use "all - anime"
Special image type modes have chance to trigger. Those follow different rules of prompt generation.

View File

@ -13,7 +13,7 @@ OBPresets = OneButtonPresets()
# insanity level controls randomness of propmt 0-10
# forcesubject van be used to force a certain type of subject
# Set artistmode to none, to exclude artists
def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all", onlyartists = False, antivalues = "", prefixprompt = "", suffixprompt ="",promptcompounderlevel ="1", seperator = "comma", givensubject="",smartsubject = True,giventypeofimage="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False, seed=-1, overrideoutfit="", prompt_g_and_l = False, base_model = "SD1.5", OBP_preset = "", prompt_enhancer = "none", subtypeanimal="all", subtypelocation="all"):
def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all", imagetype = "all", onlyartists = False, antivalues = "", prefixprompt = "", suffixprompt ="",promptcompounderlevel ="1", seperator = "comma", givensubject="",smartsubject = True,giventypeofimage="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False, seed=-1, overrideoutfit="", prompt_g_and_l = False, base_model = "SD1.5", OBP_preset = "", prompt_enhancer = "none", subtypeanimal="all", subtypelocation="all", preset_prefix = "", preset_suffix = ""):
remove_weights = False
less_verbose = False
@ -105,6 +105,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
giventypeofimage = selected_opb_preset["giventypeofimage"]
antistring = selected_opb_preset["antistring"]
prefixprompt = preset_prefix + ", " + prefixprompt
suffixprompt = preset_suffix + ", " + suffixprompt
# new method of subject choosing from the interface, lets translate this:
# really hacky way of doing this now.
if("-" in forcesubject):

View File

@ -37,7 +37,6 @@ Anaglyph
Anatomical Illustration
Ancient Egyptian Art
Animation
Anime key visual
Anthotype Print
Aquatint
Architectural Digest

1 -color- and -color- fractals
37 Anatomical Illustration
38 Ancient Egyptian Art
39 Animation
Anime key visual
40 Anthotype Print
41 Aquatint
42 Architectural Digest

View File

@ -17,7 +17,7 @@ futuristic, sci fi, sci-fi, modern, technology
fashionable, fashion, haute couture, avant-garde
concept art, fantasy, sci-fi, science fiction, D&D, digital art
cinema, cinematic, cinestill, movie still, cinemascope
anime, manga, anime key visual, key visual, studio anime, anime style, anime sketch
anime, manga, studio anime, anime style, anime sketch
funny, whimsical, fun, amusing
authentic, traditional, classic, indigenous, ethnic
monochromatic, greyscale, BW, black and white, stark

1 adorable, alluring, appealing, attractive, beautiful, charming, cozy, cute, elegant, exquisite, flawless, glamourous, good-looking, gorgeous, lovely, magnificent, pleasant, pretty
17 fashionable, fashion, haute couture, avant-garde
18 concept art, fantasy, sci-fi, science fiction, D&D, digital art
19 cinema, cinematic, cinestill, movie still, cinemascope
20 anime, manga, anime key visual, key visual, studio anime, anime style, anime sketch anime, manga, studio anime, anime style, anime sketch
21 funny, whimsical, fun, amusing
22 authentic, traditional, classic, indigenous, ethnic
23 monochromatic, greyscale, BW, black and white, stark

View File

@ -1,6 +1,6 @@
professional 3d model -subject-, octane render, highly detailed, volumetric, dramatic lighting
analog film photo -subject-, faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage
anime artwork -subject-, anime style, key visual, vibrant, studio anime, highly detailed
anime artwork -subject-, anime style, vibrant, studio anime, highly detailed
cinematic film still -subject-, shallow depth of field, vignette, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy
comic -subject-, graphic illustration, comic art, graphic novel art, vibrant, highly detailed
play-doh style -subject-, sculpture, clay art, centered composition, Claymation

1 professional 3d model -subject-, octane render, highly detailed, volumetric, dramatic lighting
2 analog film photo -subject-, faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage
3 anime artwork -subject-, anime style, key visual, vibrant, studio anime, highly detailed anime artwork -subject-, anime style, vibrant, studio anime, highly detailed
4 cinematic film still -subject-, shallow depth of field, vignette, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy
5 comic -subject-, graphic illustration, comic art, graphic novel art, vibrant, highly detailed
6 play-doh style -subject-, sculpture, clay art, centered composition, Claymation

View File

@ -90,7 +90,6 @@ Impressionism
Instagram
intricate
intricate details
key visual
Kintsugi
layered textures
League of Legends Splash Art

1 -basicbitchdescriptor-
90 Instagram
91 intricate
92 intricate details
key visual
93 Kintsugi
94 layered textures
95 League of Legends Splash Art

View File

@ -59,7 +59,6 @@ Impasto
Instagram
intricate
intricate details
key visual
Kintsugi
layered textures
League of Legends Splash Art

1 -basicbitchdescriptor-
59 Instagram
60 intricate
61 intricate details
key visual
62 Kintsugi
63 layered textures
64 League of Legends Splash Art

View File

@ -151,13 +151,13 @@
"chosensubjectsubtypehumanoid": "all",
"chosensubjectsubtypeconcept": "all",
"chosengender": "female",
"imagetype": "subject only mode",
"imagetype": "all - anime",
"imagemodechance": "20",
"givensubject": "-basicbitchdescriptor- 1girl, solo,",
"smartsubject": true,
"givenoutfit": "",
"prefixprompt": "(((masterpiece))), (((best quality))), anime style, 2d,",
"suffixprompt": "key visual",
"suffixprompt": "",
"giventypeofimage": "",
"antistring": ""
},
@ -169,13 +169,13 @@
"chosensubjectsubtypehumanoid": "all",
"chosensubjectsubtypeconcept": "all",
"chosengender": "male",
"imagetype": "subject only mode",
"imagetype": "all - anime",
"imagemodechance": "20",
"givensubject": "-basicbitchdescriptor- 1boy, solo,",
"smartsubject": true,
"givenoutfit": "",
"prefixprompt": "(((masterpiece))), (((best quality))), anime style, 2d,",
"suffixprompt": "key visual",
"suffixprompt": "",
"giventypeofimage": "",
"antistring": ""
},

View File

@ -11,7 +11,7 @@ from build_dynamic_prompt import *
def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", imagetype="all",onlyartists=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma",givensubject="",smartsubject=True,giventypeofimage="",imagemodechance=20, gender = "all", subtypeobject = "all", subtypehumanoid = "all", subtypeconcept = "all", advancedprompting = True, hardturnoffemojis=False, seed=0, overrideoutfit="", prompt_g_and_l = False, base_model = "SD1.5", OBP_preset = "", prompt_enhancer="none"):
def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", imagetype="all",onlyartists=False, workprompt="", antistring="",prefixprompt="", suffixprompt="", negativeprompt="",promptcompounderlevel = "1", seperator="comma",givensubject="",smartsubject=True,giventypeofimage="",imagemodechance=20, gender = "all", subtypeobject = "all", subtypehumanoid = "all", subtypeconcept = "all", advancedprompting = True, hardturnoffemojis=False, seed=0, overrideoutfit="", prompt_g_and_l = False, base_model = "SD1.5", OBP_preset = "", prompt_enhancer="none", preset_prefix = "", preset_suffix =""):
loops = int(amount) # amount of images to generate
steps = 0
@ -27,7 +27,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
print(resultlist[2])
else:
result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis, seed, overrideoutfit, prompt_g_and_l, base_model, OBP_preset, prompt_enhancer)
result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis, seed, overrideoutfit, prompt_g_and_l, base_model, OBP_preset, prompt_enhancer,"","", preset_prefix, preset_suffix)
#if(superprompter):
# load_models()
@ -133,4 +133,6 @@ if __name__ == "__main__":
, "SDXL" #base model
, "" #preset "All (random)..."
, "" # superprompter
, "hello" # preset prefix
, "" # preset suffix
)