start of stuff
parent
933afa907e
commit
9f6dd830e0
|
|
@ -351,6 +351,14 @@ class OneButtonPrompt:
|
||||||
"multiline": False, # This is the overwrite for an outfit, super nice
|
"multiline": False, # This is the overwrite for an outfit, super nice
|
||||||
"default": ""
|
"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"}),
|
"humanoids_gender": (genders, {"default": "all"}),
|
||||||
"emojis":(emojis, {"default": False}),
|
"emojis":(emojis, {"default": False}),
|
||||||
"base_model":(models, {"default": "SDXL"}),
|
"base_model":(models, {"default": "SDXL"}),
|
||||||
|
|
@ -369,8 +377,8 @@ class OneButtonPrompt:
|
||||||
|
|
||||||
CATEGORY = "OneButtonPrompt"
|
CATEGORY = "OneButtonPrompt"
|
||||||
|
|
||||||
def Comfy_OBP(self, insanitylevel, custom_subject, seed, artist, imagetype, subject, imagemodechance, humanoids_gender, emojis, custom_outfit, 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,"","","",1,"",custom_subject,True,"",imagemodechance, humanoids_gender,"all", "all", "all", False, emojis, seed, custom_outfit, True, base_model, "", prompt_enhancer)
|
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)
|
#print(generatedprompt)
|
||||||
generatedprompt = generatedpromptlist[0]
|
generatedprompt = generatedpromptlist[0]
|
||||||
prompt_g = generatedpromptlist[1]
|
prompt_g = generatedpromptlist[1]
|
||||||
|
|
@ -579,7 +587,15 @@ class OneButtonPreset:
|
||||||
},
|
},
|
||||||
"optional": {
|
"optional": {
|
||||||
"base_model":(models, {"default": "SDXL"}),
|
"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}),
|
"seed": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFFFFFFFFFFFF}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -594,7 +610,7 @@ class OneButtonPreset:
|
||||||
|
|
||||||
CATEGORY = "OneButtonPrompt"
|
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
|
# load the stuff
|
||||||
if(OneButtonPreset == OBPresets.RANDOM_PRESET_OBP):
|
if(OneButtonPreset == OBPresets.RANDOM_PRESET_OBP):
|
||||||
selected_opb_preset = OBPresets.get_obp_preset("Standard")
|
selected_opb_preset = OBPresets.get_obp_preset("Standard")
|
||||||
|
|
@ -640,6 +656,8 @@ class OneButtonPreset:
|
||||||
base_model=base_model,
|
base_model=base_model,
|
||||||
OBP_preset=OneButtonPreset,
|
OBP_preset=OneButtonPreset,
|
||||||
prompt_enhancer=prompt_enhancer,
|
prompt_enhancer=prompt_enhancer,
|
||||||
|
preset_prefix=preset_prefix,
|
||||||
|
preset_suffix=preset_suffix,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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.
|
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.
|
Special image type modes have chance to trigger. Those follow different rules of prompt generation.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ OBPresets = OneButtonPresets()
|
||||||
# insanity level controls randomness of propmt 0-10
|
# insanity level controls randomness of propmt 0-10
|
||||||
# forcesubject van be used to force a certain type of subject
|
# forcesubject van be used to force a certain type of subject
|
||||||
# Set artistmode to none, to exclude artists
|
# 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
|
remove_weights = False
|
||||||
less_verbose = False
|
less_verbose = False
|
||||||
|
|
@ -105,6 +105,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||||
giventypeofimage = selected_opb_preset["giventypeofimage"]
|
giventypeofimage = selected_opb_preset["giventypeofimage"]
|
||||||
antistring = selected_opb_preset["antistring"]
|
antistring = selected_opb_preset["antistring"]
|
||||||
|
|
||||||
|
prefixprompt = preset_prefix + ", " + prefixprompt
|
||||||
|
suffixprompt = preset_suffix + ", " + suffixprompt
|
||||||
|
|
||||||
# new method of subject choosing from the interface, lets translate this:
|
# new method of subject choosing from the interface, lets translate this:
|
||||||
# really hacky way of doing this now.
|
# really hacky way of doing this now.
|
||||||
if("-" in forcesubject):
|
if("-" in forcesubject):
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ Anaglyph
|
||||||
Anatomical Illustration
|
Anatomical Illustration
|
||||||
Ancient Egyptian Art
|
Ancient Egyptian Art
|
||||||
Animation
|
Animation
|
||||||
Anime key visual
|
|
||||||
Anthotype Print
|
Anthotype Print
|
||||||
Aquatint
|
Aquatint
|
||||||
Architectural Digest
|
Architectural Digest
|
||||||
|
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ futuristic, sci fi, sci-fi, modern, technology
|
||||||
fashionable, fashion, haute couture, avant-garde
|
fashionable, fashion, haute couture, avant-garde
|
||||||
concept art, fantasy, sci-fi, science fiction, D&D, digital art
|
concept art, fantasy, sci-fi, science fiction, D&D, digital art
|
||||||
cinema, cinematic, cinestill, movie still, cinemascope
|
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
|
funny, whimsical, fun, amusing
|
||||||
authentic, traditional, classic, indigenous, ethnic
|
authentic, traditional, classic, indigenous, ethnic
|
||||||
monochromatic, greyscale, BW, black and white, stark
|
monochromatic, greyscale, BW, black and white, stark
|
||||||
|
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
professional 3d model -subject-, octane render, highly detailed, volumetric, dramatic lighting
|
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
|
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
|
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
|
comic -subject-, graphic illustration, comic art, graphic novel art, vibrant, highly detailed
|
||||||
play-doh style -subject-, sculpture, clay art, centered composition, Claymation
|
play-doh style -subject-, sculpture, clay art, centered composition, Claymation
|
||||||
|
|
|
||||||
|
|
|
@ -90,7 +90,6 @@ Impressionism
|
||||||
Instagram
|
Instagram
|
||||||
intricate
|
intricate
|
||||||
intricate details
|
intricate details
|
||||||
key visual
|
|
||||||
Kintsugi
|
Kintsugi
|
||||||
layered textures
|
layered textures
|
||||||
League of Legends Splash Art
|
League of Legends Splash Art
|
||||||
|
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ Impasto
|
||||||
Instagram
|
Instagram
|
||||||
intricate
|
intricate
|
||||||
intricate details
|
intricate details
|
||||||
key visual
|
|
||||||
Kintsugi
|
Kintsugi
|
||||||
layered textures
|
layered textures
|
||||||
League of Legends Splash Art
|
League of Legends Splash Art
|
||||||
|
|
|
||||||
|
|
|
@ -151,13 +151,13 @@
|
||||||
"chosensubjectsubtypehumanoid": "all",
|
"chosensubjectsubtypehumanoid": "all",
|
||||||
"chosensubjectsubtypeconcept": "all",
|
"chosensubjectsubtypeconcept": "all",
|
||||||
"chosengender": "female",
|
"chosengender": "female",
|
||||||
"imagetype": "subject only mode",
|
"imagetype": "all - anime",
|
||||||
"imagemodechance": "20",
|
"imagemodechance": "20",
|
||||||
"givensubject": "-basicbitchdescriptor- 1girl, solo,",
|
"givensubject": "-basicbitchdescriptor- 1girl, solo,",
|
||||||
"smartsubject": true,
|
"smartsubject": true,
|
||||||
"givenoutfit": "",
|
"givenoutfit": "",
|
||||||
"prefixprompt": "(((masterpiece))), (((best quality))), anime style, 2d,",
|
"prefixprompt": "(((masterpiece))), (((best quality))), anime style, 2d,",
|
||||||
"suffixprompt": "key visual",
|
"suffixprompt": "",
|
||||||
"giventypeofimage": "",
|
"giventypeofimage": "",
|
||||||
"antistring": ""
|
"antistring": ""
|
||||||
},
|
},
|
||||||
|
|
@ -169,13 +169,13 @@
|
||||||
"chosensubjectsubtypehumanoid": "all",
|
"chosensubjectsubtypehumanoid": "all",
|
||||||
"chosensubjectsubtypeconcept": "all",
|
"chosensubjectsubtypeconcept": "all",
|
||||||
"chosengender": "male",
|
"chosengender": "male",
|
||||||
"imagetype": "subject only mode",
|
"imagetype": "all - anime",
|
||||||
"imagemodechance": "20",
|
"imagemodechance": "20",
|
||||||
"givensubject": "-basicbitchdescriptor- 1boy, solo,",
|
"givensubject": "-basicbitchdescriptor- 1boy, solo,",
|
||||||
"smartsubject": true,
|
"smartsubject": true,
|
||||||
"givenoutfit": "",
|
"givenoutfit": "",
|
||||||
"prefixprompt": "(((masterpiece))), (((best quality))), anime style, 2d,",
|
"prefixprompt": "(((masterpiece))), (((best quality))), anime style, 2d,",
|
||||||
"suffixprompt": "key visual",
|
"suffixprompt": "",
|
||||||
"giventypeofimage": "",
|
"giventypeofimage": "",
|
||||||
"antistring": ""
|
"antistring": ""
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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
|
loops = int(amount) # amount of images to generate
|
||||||
steps = 0
|
steps = 0
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||||
print(resultlist[2])
|
print(resultlist[2])
|
||||||
|
|
||||||
else:
|
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):
|
#if(superprompter):
|
||||||
# load_models()
|
# load_models()
|
||||||
|
|
@ -133,4 +133,6 @@ if __name__ == "__main__":
|
||||||
, "SDXL" #base model
|
, "SDXL" #base model
|
||||||
, "" #preset "All (random)..."
|
, "" #preset "All (random)..."
|
||||||
, "" # superprompter
|
, "" # superprompter
|
||||||
|
, "hello" # preset prefix
|
||||||
|
, "" # preset suffix
|
||||||
)
|
)
|
||||||
Loading…
Reference in New Issue