Merge pull request #121 from AIrjen/fixed_styles_and_comfyui_improvements
Fixed styles and comfyui improvements
This commit is contained in:
+226
-18
@@ -3,6 +3,7 @@ import os
|
||||
import folder_paths
|
||||
from datetime import datetime
|
||||
import uuid
|
||||
import platform
|
||||
|
||||
custom_nodes_path = os.path.join(folder_paths.base_path, "custom_nodes")
|
||||
onebuttonprompt_path = os.path.join(custom_nodes_path, "OneButtonPrompt")
|
||||
@@ -10,16 +11,162 @@ onebuttonprompt_path = os.path.join(custom_nodes_path, "OneButtonPrompt")
|
||||
sys.path.append(onebuttonprompt_path)
|
||||
|
||||
from build_dynamic_prompt import *
|
||||
from csv_reader import *
|
||||
|
||||
artists = ["all", "none", "popular", "greg mode", "3D", "abstract", "angular", "anime" ,"architecture", "art nouveau", "art deco", "baroque", "bauhaus", "cartoon", "character", "children's illustration", "cityscape", "clean", "cloudscape", "collage", "colorful", "comics", "cubism", "dark", "detailed", "digital", "expressionism", "fantasy", "fashion", "fauvism", "figurativism", "gore", "graffiti", "graphic design", "high contrast", "horror", "impressionism", "installation", "landscape", "light", "line drawing", "low contrast", "luminism", "magical realism", "manga", "melanin", "messy", "monochromatic", "nature", "nudity", "photography", "pop art", "portrait", "primitivism", "psychedelic", "realism", "renaissance", "romanticism", "scene", "sci-fi", "sculpture", "seascape", "space", "stained glass", "still life", "storybook realism", "street art", "streetscape", "surrealism", "symbolism", "textile", "ukiyo-e", "vibrant", "watercolor", "whimsical"]
|
||||
imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "only other types", "only templates mode", "art blaster mode", "quality vomit mode", "color cannon mode", "unique art mode", "massive madness mode", "photo fantasy mode", "subject only mode"]
|
||||
imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "only other types", "only templates mode", "art blaster mode", "quality vomit mode", "color cannon mode", "unique art mode", "massive madness mode", "photo fantasy mode", "subject only mode", "fixed styles mode"]
|
||||
subjects =["all", "object", "animal", "humanoid", "landscape", "concept"]
|
||||
genders = ["all", "male", "female"]
|
||||
emojis = [False, True]
|
||||
|
||||
subjectsubtypesobject = ["all", "generic objects", "vehicles", "food", "buildings", "space", "flora"]
|
||||
subjectsubtypeshumanoid = ["all", "generic humans", "generic human relations", "celebrities e.a.", "fictional characters", "humanoids", "based on job or title", "based on first name"]
|
||||
subjectsubtypesconcept = ["all", "event", "the X of Y concepts", "lines from poems", "lines from songs"]
|
||||
|
||||
subjects =["all"]
|
||||
subjectsubtypesobject = ["all"]
|
||||
subjectsubtypeshumanoid = ["all"]
|
||||
subjectsubtypesconcept = ["all"]
|
||||
#subjectsubtypesobject = ["all", "generic objects", "vehicles", "food", "buildings", "space", "flora"]
|
||||
#subjectsubtypeshumanoid = ["all", "generic humans", "generic human relations", "celebrities e.a.", "fictional characters", "humanoids", "based on job or title", "based on first name"]
|
||||
#subjectsubtypesconcept = ["all", "event", "the X of Y concepts", "lines from poems", "lines from songs"]
|
||||
|
||||
|
||||
# Load up stuff for personal artists list, if any
|
||||
# find all artist files starting with personal_artits in userfiles
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__)) # Script directory
|
||||
userfilesfolder = os.path.join(script_dir, "./userfiles/" )
|
||||
for filename in os.listdir(userfilesfolder):
|
||||
if(filename.endswith(".csv") and filename.startswith("personal_artists") and filename != "personal_artists_sample.csv"):
|
||||
name = os.path.splitext(filename)[0]
|
||||
name = name.replace("_"," ",-1).lower()
|
||||
# directly insert into the artists list
|
||||
artists.insert(2, name)
|
||||
|
||||
# on startup, check if we have a config file, or else create it
|
||||
config = load_config_csv()
|
||||
|
||||
|
||||
# load subjects stuff from config
|
||||
generatevehicle = True
|
||||
generateobject = True
|
||||
generatefood = True
|
||||
generatebuilding = True
|
||||
generatespace = True
|
||||
generateflora = True
|
||||
generateanimal = True
|
||||
generatemanwoman = True
|
||||
generatemanwomanrelation = True
|
||||
generatefictionalcharacter = True
|
||||
generatenonfictionalcharacter = True
|
||||
generatehumanoids = True
|
||||
generatejob = True
|
||||
generatefirstnames = True
|
||||
generatelandscape = True
|
||||
generateevent = True
|
||||
generateconcepts = True
|
||||
generatepoemline = True
|
||||
generatesongline = True
|
||||
|
||||
|
||||
for item in config:
|
||||
# objects
|
||||
if item[0] == 'subject_vehicle' and item[1] != 'on':
|
||||
generatevehicle = False
|
||||
if item[0] == 'subject_object' and item[1] != 'on':
|
||||
generateobject = False
|
||||
if item[0] == 'subject_food' and item[1] != 'on':
|
||||
generatefood = False
|
||||
if item[0] == 'subject_building' and item[1] != 'on':
|
||||
generatebuilding = False
|
||||
if item[0] == 'subject_space' and item[1] != 'on':
|
||||
generatespace = False
|
||||
if item[0] == 'subject_flora' and item[1] != 'on':
|
||||
generateflora = False
|
||||
# animals
|
||||
if item[0] == 'subject_animal' and item[1] != 'on':
|
||||
generateanimal = False
|
||||
# humanoids
|
||||
if item[0] == 'subject_manwoman' and item[1] != 'on':
|
||||
generatemanwoman = False
|
||||
if item[0] == 'subject_manwomanrelation' and item[1] != 'on':
|
||||
generatemanwomanrelation = False
|
||||
if item[0] == 'subject_fictional' and item[1] != 'on':
|
||||
generatefictionalcharacter = False
|
||||
if item[0] == 'subject_nonfictional' and item[1] != 'on':
|
||||
generatenonfictionalcharacter = False
|
||||
if item[0] == 'subject_humanoid' and item[1] != 'on':
|
||||
generatehumanoids = False
|
||||
if item[0] == 'subject_job' and item[1] != 'on':
|
||||
generatejob = False
|
||||
if item[0] == 'subject_firstnames' and item[1] != 'on':
|
||||
generatefirstnames = False
|
||||
# landscape
|
||||
if item[0] == 'subject_landscape' and item[1] != 'on':
|
||||
generatelandscape = False
|
||||
# concept
|
||||
if item[0] == 'subject_event' and item[1] != 'on':
|
||||
generateevent = False
|
||||
if item[0] == 'subject_concept' and item[1] != 'on':
|
||||
generateconcepts = False
|
||||
if item[0] == 'poemline' and item[1] != 'on':
|
||||
generatepoemline = False
|
||||
if item[0] == 'songline' and item[1] != 'on':
|
||||
generatesongline = False
|
||||
|
||||
# build up all subjects we can choose based on the loaded config file
|
||||
if(generatevehicle or generateobject or generatefood or generatebuilding or generatespace):
|
||||
subjects.append("object")
|
||||
if(generateanimal):
|
||||
subjects.append("animal")
|
||||
if(generatemanwoman or generatemanwomanrelation or generatefictionalcharacter or generatenonfictionalcharacter or generatehumanoids or generatejob):
|
||||
subjects.append("humanoid")
|
||||
if(generatelandscape):
|
||||
subjects.append("landscape")
|
||||
if(generateevent or generateconcepts or generatepoemline or generatesongline):
|
||||
subjects.append("concept")
|
||||
|
||||
|
||||
# do the same for the subtype subjects
|
||||
# subjectsubtypesobject = ["all"]
|
||||
# subjectsubtypeshumanoid = ["all"]
|
||||
# subjectsubtypesconcept = ["all"]
|
||||
|
||||
# objects first
|
||||
if(generateobject):
|
||||
subjectsubtypesobject.append("generic objects")
|
||||
if(generatevehicle):
|
||||
subjectsubtypesobject.append("vehicles")
|
||||
if(generatefood):
|
||||
subjectsubtypesobject.append("food")
|
||||
if(generatebuilding):
|
||||
subjectsubtypesobject.append("buildings")
|
||||
if(generatespace):
|
||||
subjectsubtypesobject.append("space")
|
||||
if(generateflora):
|
||||
subjectsubtypesobject.append("flora")
|
||||
|
||||
# humanoids (should I review descriptions??)
|
||||
if(generatemanwoman):
|
||||
subjectsubtypeshumanoid.append("generic humans")
|
||||
if(generatemanwomanrelation):
|
||||
subjectsubtypeshumanoid.append("generic human relations")
|
||||
if(generatenonfictionalcharacter):
|
||||
subjectsubtypeshumanoid.append("celebrities e.a.")
|
||||
if(generatefictionalcharacter):
|
||||
subjectsubtypeshumanoid.append("fictional characters")
|
||||
if(generatehumanoids):
|
||||
subjectsubtypeshumanoid.append("humanoids")
|
||||
if(generatejob):
|
||||
subjectsubtypeshumanoid.append("based on job or title")
|
||||
if(generatefirstnames):
|
||||
subjectsubtypeshumanoid.append("based on first name")
|
||||
|
||||
# concepts
|
||||
if(generateevent):
|
||||
subjectsubtypesconcept.append("event")
|
||||
if(generateconcepts):
|
||||
subjectsubtypesconcept.append("the X of Y concepts")
|
||||
if(generatepoemline):
|
||||
subjectsubtypesconcept.append("lines from poems")
|
||||
if(generatesongline):
|
||||
subjectsubtypesconcept.append("lines from songs")
|
||||
|
||||
class OneButtonPrompt:
|
||||
|
||||
@@ -57,6 +204,7 @@ class OneButtonPrompt:
|
||||
"subject_subtypes_humanoids": (subjectsubtypeshumanoid, {"default": "all"}),
|
||||
"humanoids_gender": (genders, {"default": "all"}),
|
||||
"subject_subtypes_concepts": (subjectsubtypesconcept, {"default": "all"}),
|
||||
"emojis":(emojis, {"default": False}),
|
||||
|
||||
"seed": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFFFFFFFFFFFF}),
|
||||
},
|
||||
@@ -71,8 +219,8 @@ class OneButtonPrompt:
|
||||
|
||||
CATEGORY = "OneButtonPrompt"
|
||||
|
||||
def Comfy_OBP(self, insanitylevel, custom_subject,seed, artist,imagetype, subject, imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts):
|
||||
generatedprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"","","",1,"",custom_subject,True,"",imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, False)
|
||||
def Comfy_OBP(self, insanitylevel, custom_subject,seed, artist,imagetype, subject, imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, emojis):
|
||||
generatedprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"","","",1,"",custom_subject,True,"",imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, False, emojis)
|
||||
#print(generatedprompt)
|
||||
return (generatedprompt,)
|
||||
|
||||
@@ -120,12 +268,15 @@ class CreatePromptVariant:
|
||||
# Let us create our own prompt saver. Not everyone has WAS installed
|
||||
class SavePromptToFile:
|
||||
def __init__(self):
|
||||
pass
|
||||
self.output_dir = folder_paths.get_output_directory()
|
||||
self.type = "output"
|
||||
self.prefix_append = ""
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"filename_prefix": ("STRING", {"default": "Prompt"}),
|
||||
"positive_prompt": ("STRING",{"multiline": True}),
|
||||
"negative_prompt": ("STRING",{"multiline": True}),
|
||||
},
|
||||
@@ -137,8 +288,61 @@ class SavePromptToFile:
|
||||
|
||||
CATEGORY = "OneButtonPrompt"
|
||||
|
||||
def saveprompttofile(self, positive_prompt, negative_prompt):
|
||||
|
||||
def saveprompttofile(self, positive_prompt, negative_prompt, filename_prefix):
|
||||
# Some stuff for the prefix
|
||||
filename_prefix += self.prefix_append
|
||||
|
||||
# turns out there is some hardcoded stuff on saveimage we have to kind of repeat here
|
||||
# Find the %date:yyyy-M-d% pattern using regular expression
|
||||
pattern = r'%date:([^\%]+)%'
|
||||
match = re.search(pattern, filename_prefix)
|
||||
|
||||
if match:
|
||||
# Extract the date format from the match
|
||||
date_format = match.group(1)
|
||||
|
||||
# Get the current date
|
||||
current_date = datetime.now()
|
||||
|
||||
# convert the ComfyUI standard into Python standard format.
|
||||
# What a crazy way of doing this
|
||||
# first lol, I got to make sure it doesn't overlap things
|
||||
date_format = date_format.replace('M', 'X')
|
||||
date_format = date_format.replace('m', 'Z')
|
||||
|
||||
# This is so bad
|
||||
|
||||
# lets make it even worse, it work differently on windows than in Linux
|
||||
if(platform.system() == 'Windows'):
|
||||
|
||||
date_format = date_format.replace('yyyy', '%Y')
|
||||
date_format = date_format.replace('yy', '%#y')
|
||||
date_format = date_format.replace('X', '%#m')
|
||||
date_format = date_format.replace('d', '%#d')
|
||||
date_format = date_format.replace('h', '%#H')
|
||||
date_format = date_format.replace('Z', '%#M')
|
||||
date_format = date_format.replace('s', '%#S')
|
||||
else:
|
||||
date_format = date_format.replace('yyyy', '%Y')
|
||||
date_format = date_format.replace('yy', '%-y')
|
||||
date_format = date_format.replace('X', '%-m')
|
||||
date_format = date_format.replace('d', '%-d')
|
||||
date_format = date_format.replace('h', '%-H')
|
||||
date_format = date_format.replace('Z', '%-M')
|
||||
date_format = date_format.replace('s', '%-S')
|
||||
|
||||
|
||||
# Format the date using the extracted format
|
||||
formatted_date = current_date.strftime(date_format)
|
||||
|
||||
# Replace the matched pattern with the formatted date
|
||||
filename_prefix = re.sub(pattern, formatted_date, filename_prefix)
|
||||
|
||||
|
||||
|
||||
|
||||
full_output_folder, filename_short, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir)
|
||||
|
||||
# make the filename, from from a to the first comma
|
||||
# find the index of the first comma after "of a" or end of the prompt
|
||||
if(positive_prompt.find("of a ") != -1):
|
||||
@@ -150,8 +354,6 @@ class SavePromptToFile:
|
||||
start_index = 0
|
||||
end_index = 128
|
||||
|
||||
|
||||
|
||||
# extract the desired substring using slicing
|
||||
filename = positive_prompt[start_index:end_index]
|
||||
|
||||
@@ -163,6 +365,7 @@ class SavePromptToFile:
|
||||
filename = filename.replace("<", "")
|
||||
filename = filename.replace(">", "")
|
||||
filename = filename.replace(":", "_")
|
||||
filename = filename.replace(".", "")
|
||||
filename = re.sub(r'[0-9]+', '', filename)
|
||||
|
||||
safe_characters = set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.")
|
||||
@@ -174,15 +377,20 @@ class SavePromptToFile:
|
||||
if(filename==""):
|
||||
filename = str(uuid.uuid4())
|
||||
|
||||
if(filename_prefix == ""):
|
||||
# create a datetime object for the current date and time
|
||||
now = datetime.now()
|
||||
filenamecomplete = now.strftime("%Y%m%d%H%M%S") + "_" + filename.replace(" ", "_").strip() + ".txt"
|
||||
|
||||
# if there is no prefix
|
||||
now = datetime.now()
|
||||
filenamecomplete = now.strftime("%Y%m%d%H%M%S") + "_" + filename.replace(" ", "_").strip() + ".txt"
|
||||
|
||||
# Get the output folder from comfy
|
||||
output_directory = folder_paths.output_directory
|
||||
else:
|
||||
# lol since we insert a file, the counter of the image goes up by 1.
|
||||
# So we add 1 here, so the prompt file matches the image file
|
||||
formatted_counter = str(counter + 1).zfill(5)
|
||||
filenamecomplete = filename_short + "_" + formatted_counter + "_" + filename.replace(" ", "_").strip() + ".txt"
|
||||
|
||||
|
||||
directoryandfilename = os.path.abspath(os.path.join(output_directory, filenamecomplete))
|
||||
directoryandfilename = os.path.abspath(os.path.join(full_output_folder, filenamecomplete))
|
||||
|
||||
|
||||
with open(directoryandfilename, 'w', encoding="utf-8") as file:
|
||||
|
||||
+26
-1
@@ -10,7 +10,7 @@ from random_functions import *
|
||||
# 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):
|
||||
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):
|
||||
|
||||
|
||||
# load the config file
|
||||
@@ -140,6 +140,9 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
minilocationadditionslist = csv_to_list("minilocationadditions", antilist,"./csvfiles/special_lists/")
|
||||
overalladditionlist = csv_to_list("overalladditions", antilist,"./csvfiles/special_lists/")
|
||||
imagetypemodelist = csv_to_list("imagetypemodes", antilist,"./csvfiles/special_lists/")
|
||||
|
||||
styleslist = csv_to_list("styles", antilist,"./csvfiles/templates/")
|
||||
|
||||
|
||||
|
||||
# subjects
|
||||
@@ -349,6 +352,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
if item[0] == 'emojichance':
|
||||
emojichance = item[1]
|
||||
if(hardturnoffemojis==True):
|
||||
emojichance='never'
|
||||
if item[0] == 'joboractivitychance':
|
||||
joboractivitychance = item[1]
|
||||
|
||||
@@ -559,6 +564,8 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
photofantasymode = False
|
||||
massivemadnessmode = False
|
||||
onlysubjectmode = False
|
||||
stylesmode = False
|
||||
|
||||
# determine wether we should go for a template or not. Not hooked up to insanitylevel
|
||||
if(imagetype == "only templates mode"):
|
||||
specialmode = True
|
||||
@@ -601,6 +608,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
onlysubjectmode = True
|
||||
print("Running in only subject mode")
|
||||
|
||||
if(imagetype == "fixed styles mode"):
|
||||
specialmode = True
|
||||
stylesmode = True
|
||||
print("Running with a randomized style instead of a randomized prompt")
|
||||
|
||||
|
||||
# main stuff
|
||||
generatetype = not specialmode
|
||||
@@ -1055,6 +1067,14 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
completeprompt += " ("
|
||||
|
||||
|
||||
# start styles mode here
|
||||
if(stylesmode == True):
|
||||
chosenstyle = random.choice(styleslist)
|
||||
chosenstyleprefix = chosenstyle.split("-subject-")[0]
|
||||
chosenstylesuffix= chosenstyle.split("-subject-")[1]
|
||||
completeprompt += chosenstyleprefix
|
||||
|
||||
|
||||
|
||||
# start artist part
|
||||
|
||||
@@ -1749,6 +1769,11 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
if(rare_dist(insanitylevel) and bool(cameralist)):
|
||||
completeprompt += "-camera-, "
|
||||
step = step + 1
|
||||
|
||||
# start styles mode here
|
||||
if(stylesmode == True):
|
||||
completeprompt += chosenstylesuffix
|
||||
|
||||
|
||||
# custom style list
|
||||
if(chance_roll(insanitylevel, customstyle1chance) and generatestyle == True):
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,4 +5,5 @@ color cannon mode
|
||||
unique art mode
|
||||
massive madness mode
|
||||
photo fantasy mode
|
||||
subject only mode
|
||||
subject only mode
|
||||
fixed styles mode
|
||||
|
@@ -0,0 +1,108 @@
|
||||
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
|
||||
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
|
||||
concept art -subject-, digital artwork, illustrative, painterly, matte painting, highly detailed
|
||||
breathtaking -subject-, award-winning, professional, highly detailed
|
||||
ethereal fantasy concept art of -subject-, magnificent, celestial, ethereal, painterly, epic, majestic, magical, fantasy art, cover art, dreamy
|
||||
isometric style -subject-, vibrant, beautiful, crisp, detailed, ultra detailed, intricate
|
||||
line art drawing -subject-, professional, sleek, modern, minimalist, graphic, line art, vector graphics
|
||||
low-poly style -subject-, low-poly game art, polygon mesh, jagged, blocky, wireframe edges, centered composition
|
||||
neonpunk style -subject-, cyberpunk, vaporwave, neon, vibes, vibrant, stunningly beautiful, crisp, detailed, sleek, ultramodern, magenta highlights, dark purple shadows, high contrast, cinematic, ultra detailed, intricate, professional
|
||||
origami style -subject-, paper art, pleated paper, folded, origami art, pleats, cut and fold, centered composition
|
||||
cinematic photo -subject-, 35mm photograph, film, bokeh, professional, 4k, highly detailed
|
||||
pixel-art -subject-, low-res, blocky, pixel art style, 8-bit graphics
|
||||
texture {prompt} top down close-up
|
||||
advertising poster style -subject-, Professional, modern, product-focused, commercial, eye-catching, highly detailed
|
||||
automotive advertisement style -subject-, sleek, dynamic, professional, commercial, vehicle-focused, high-resolution, highly detailed
|
||||
corporate branding style -subject-, professional, clean, modern, sleek, minimalist, business-oriented, highly detailed
|
||||
fashion editorial style -subject-, high fashion, trendy, stylish, editorial, magazine style, professional, highly detailed
|
||||
food photography style -subject-, appetizing, professional, culinary, high-resolution, commercial, highly detailed
|
||||
gourmet food photo of -subject-, soft natural lighting, macro details, vibrant colors, fresh ingredients, glistening textures, bokeh background, styled plating, wooden tabletop, garnished, tantalizing, editorial quality
|
||||
luxury product style -subject-, elegant, sophisticated, high-end, luxurious, professional, highly detailed
|
||||
real estate photography style -subject-, professional, inviting, well-lit, high-resolution, property-focused, commercial, highly detailed
|
||||
retail packaging style -subject-, vibrant, enticing, commercial, product-focused, eye-catching, professional, highly detailed
|
||||
abstract style -subject-, non-representational, colors and shapes, expression of feelings, imaginative, highly detailed
|
||||
abstract expressionist painting -subject-, energetic brushwork, bold colors, abstract forms, expressive, emotional
|
||||
art deco style -subject-, geometric shapes, bold colors, luxurious, elegant, decorative, symmetrical, ornate, detailed
|
||||
art nouveau style -subject-, elegant, decorative, curvilinear forms, nature-inspired, ornate, detailed
|
||||
constructivist style -subject-, geometric shapes, bold colors, dynamic composition, propaganda art style
|
||||
cubist artwork -subject-, geometric shapes, abstract, innovative, revolutionary
|
||||
expressionist -subject-, raw, emotional, dynamic, distortion for emotional effect, vibrant, use of unusual colors, detailed
|
||||
graffiti style -subject-, street art, vibrant, urban, detailed, tag, mural
|
||||
hyperrealistic art -subject-, extremely high-resolution details, photographic, realism pushed to extreme, fine texture, incredibly lifelike
|
||||
impressionist painting -subject-, loose brushwork, vibrant color, light and shadow play, captures feeling over form
|
||||
pointillism style -subject-, composed entirely of small, distinct dots of color, vibrant, highly detailed
|
||||
pop Art style -subject-, bright colors, bold outlines, popular culture themes, ironic or kitsch
|
||||
psychedelic style -subject-, vibrant colors, swirling patterns, abstract forms, surreal, trippy
|
||||
renaissance style -subject-, realistic, perspective, light and shadow, religious or mythological themes, highly detailed
|
||||
steampunk style -subject-, antique, mechanical, brass and copper tones, gears, intricate, detailed
|
||||
surrealist art -subject-, dreamlike, mysterious, provocative, symbolic, intricate, detailed
|
||||
typographic art -subject-, stylized, intricate, detailed, artistic, text-based
|
||||
watercolor painting -subject-, vibrant, beautiful, painterly, detailed, textural, artistic
|
||||
biomechanical style -subject-, blend of organic and mechanical elements, futuristic, cybernetic, detailed, intricate
|
||||
biomechanical cyberpunk -subject-, cybernetics, human-machine fusion, dystopian, organic meets artificial, dark, intricate, highly detailed
|
||||
cybernetic style -subject-, futuristic, technological, cybernetic enhancements, robotics, artificial intelligence themes
|
||||
cybernetic robot -subject-, android, AI, machine, metal, wires, tech, futuristic, highly detailed
|
||||
cyberpunk cityscape -subject-, neon lights, dark alleys, skyscrapers, futuristic, vibrant colors, high contrast, highly detailed
|
||||
futuristic style -subject-, sleek, modern, ultramodern, high tech, detailed
|
||||
retro cyberpunk -subject-, 80's inspired, synthwave, neon, vibrant, detailed, retro futurism
|
||||
retro-futuristic -subject-, vintage sci-fi, 50s and 60s style, atomic age, vibrant, highly detailed
|
||||
sci-fi style -subject-, futuristic, technological, alien worlds, space themes, advanced civilizations
|
||||
vaporwave style -subject-, retro aesthetic, cyberpunk, vibrant, neon colors, vintage 80s and 90s style, highly detailed
|
||||
Bubble Bobble style -subject-, 8-bit, cute, pixelated, fantasy, vibrant, reminiscent of Bubble Bobble game
|
||||
cyberpunk game style -subject-, neon, dystopian, futuristic, digital, vibrant, detailed, high contrast, reminiscent of cyberpunk genre video games
|
||||
fighting game style -subject-, dynamic, vibrant, action-packed, detailed character design, reminiscent of fighting video games
|
||||
GTA-style artwork -subject-, satirical, exaggerated, pop art style, vibrant colors, iconic characters, action-packed
|
||||
Super Mario style -subject-, vibrant, cute, cartoony, fantasy, playful, reminiscent of Super Mario series
|
||||
Minecraft style -subject-, blocky, pixelated, vibrant colors, recognizable characters and objects, game assets
|
||||
Pokémon style -subject-, vibrant, cute, anime, fantasy, reminiscent of Pokémon series
|
||||
retro arcade style -subject-, 8-bit, pixelated, vibrant, classic video game, old school gaming, reminiscent of 80s and 90s arcade games
|
||||
retro game art -subject-, 16-bit, vibrant colors, pixelated, nostalgic, charming, fun
|
||||
role-playing game (RPG) style fantasy -subject-, detailed, vibrant, immersive, reminiscent of high fantasy RPG games
|
||||
strategy game style -subject-, overhead view, detailed map, units, reminiscent of real-time strategy video games
|
||||
Street Fighter style -subject-, vibrant, dynamic, arcade, 2D fighting game, highly detailed, reminiscent of Street Fighter series
|
||||
Legend of Zelda style -subject-, vibrant, fantasy, detailed, epic, heroic, reminiscent of The Legend of Zelda series
|
||||
architectural style -subject-, clean lines, geometric shapes, minimalist, modern, architectural drawing, highly detailed
|
||||
disco-themed -subject-, vibrant, groovy, retro 70s style, shiny disco balls, neon lights, dance floor, highly detailed
|
||||
dreamscape -subject-, surreal, ethereal, dreamy, mysterious, fantasy, highly detailed
|
||||
dystopian style -subject-, bleak, post-apocalyptic, somber
|
||||
fairy tale -subject-, magical, fantastical, enchanting, storybook style, highly detailed
|
||||
gothic style -subject-, dark, mysterious, haunting, dramatic, ornate, detailed
|
||||
grunge style -subject-, textured, distressed, vintage, edgy, punk rock vibe, dirty, noisy
|
||||
horror-themed -subject-, eerie, unsettling, dark, spooky, suspenseful, grim, highly detailed
|
||||
kawaii style -subject-, cute, adorable, brightly colored, cheerful, anime influence, highly detailed
|
||||
lovecraftian horror -subject-, eldritch, cosmic horror, unknown, mysterious, surreal, highly detailed
|
||||
macabre style -subject-, dark, gothic, grim, haunting, highly detailed
|
||||
manga style -subject-, vibrant, high-energy, detailed, iconic, Japanese comic style
|
||||
metropolis-themed -subject-, urban, cityscape, skyscrapers, modern, futuristic, highly detailed
|
||||
minimalist style -subject-, simple, clean, uncluttered, modern, elegant
|
||||
monochrome -subject-, black and white, contrast, tone, texture, detailed
|
||||
nautical-themed -subject-, sea, ocean, ships, maritime, beach, marine life, highly detailed
|
||||
space-themed -subject-, cosmic, celestial, stars, galaxies, nebulas, planets, science fiction, highly detailed
|
||||
stained glass style -subject-, vibrant, beautiful, translucent, intricate, detailed
|
||||
techwear fashion -subject-, futuristic, cyberpunk, urban, tactical, sleek, dark, highly detailed
|
||||
tribal style -subject-, indigenous, ethnic, traditional patterns, bold, natural colors, highly detailed
|
||||
zentangle -subject-, intricate, abstract, monochrome, patterns, meditative, highly detailed
|
||||
collage style -subject-, mixed media, layered, textural, detailed, artistic
|
||||
flat papercut style -subject-, silhouette, clean cuts, paper, sharp edges, minimalist, color block
|
||||
kirigami representation of -subject-, 3D, paper folding, paper cutting, Japanese, intricate, symmetrical, precision, clean lines
|
||||
paper mache representation of -subject-, 3D, sculptural, textured, handmade, vibrant, fun
|
||||
paper quilling art of -subject-, intricate, delicate, curling, rolling, shaping, coiling, loops, 3D, dimensional, ornamental
|
||||
papercut collage of -subject-, mixed media, textured paper, overlapping, asymmetrical, abstract, vibrant
|
||||
3D papercut shadow box of -subject-, layered, dimensional, depth, silhouette, shadow, papercut, handmade, high contrast
|
||||
stacked papercut art of -subject-, 3D, layered, dimensional, depth, precision cut, stacked layers, papercut, high contrast
|
||||
thick layered papercut art of -subject-, deep 3D, volumetric, dimensional, depth, thick paper, high stack, heavy texture, tangible layers
|
||||
alien-themed -subject-, extraterrestrial, cosmic, otherworldly, mysterious, sci-fi, highly detailed
|
||||
film noir style -subject-, monochrome, high contrast, dramatic shadows, 1940s style, mysterious, cinematic
|
||||
glamorous photo -subject-, high fashion, luxurious, extravagant, stylish, sensual, opulent, elegance, stunning beauty, professional, high contrast, detailed
|
||||
HDR photo of -subject-, High dynamic range, vivid, rich details, clear shadows and highlights, realistic, intense, enhanced contrast, highly detailed
|
||||
iphone photo -subject-, large depth of field, deep depth of field, highly detailed
|
||||
long exposure photo of -subject-, Blurred motion, streaks of light, surreal, dreamy, ghosting effect, highly detailed
|
||||
neon noir -subject-, cyberpunk, dark, rainy streets, neon signs, high contrast, low light, vibrant, highly detailed
|
||||
silhouette style -subject-, high contrast, minimalistic, black and white, stark, dramatic
|
||||
tilt-shift photo of -subject-, selective focus, miniature effect, blurred background, highly detailed, vibrant, perspective control
|
||||
Vintage tattoo flash style of -subject-, Traditional motifs, bright colors, bold outlines, roses, snakes, nautical, old school tattoo artwork
|
||||
Vintage tattoo flash print of -subject-, Sailor Jerry style, nautical themes, retro pin-up, aquatint
|
||||
|
@@ -159,6 +159,7 @@ def generateimages(amount = 1, size = "all",model = "currently selected model",s
|
||||
filename = filename.replace("<", "")
|
||||
filename = filename.replace(">", "")
|
||||
filename = filename.replace(":", "_")
|
||||
filename = filename.replace(".", "")
|
||||
filename = re.sub(r'[0-9]+', '', filename)
|
||||
|
||||
safe_characters = set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.")
|
||||
|
||||
+3
-3
@@ -10,7 +10,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):
|
||||
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):
|
||||
loops = int(amount) # amount of images to generate
|
||||
steps = 0
|
||||
|
||||
@@ -18,7 +18,7 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
while steps < loops:
|
||||
# build prompt
|
||||
|
||||
result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting)
|
||||
result = build_dynamic_prompt(insanitylevel,subject,artist,imagetype, onlyartists,antistring,prefixprompt,suffixprompt,promptcompounderlevel, seperator,givensubject,smartsubject,giventypeofimage,imagemodechance, gender, subtypeobject, subtypehumanoid, subtypeconcept, advancedprompting, hardturnoffemojis)
|
||||
|
||||
print("")
|
||||
print("loop " + str(steps))
|
||||
@@ -46,4 +46,4 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
print("")
|
||||
print("All done!")
|
||||
|
||||
generateprompts(10,8,"all","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","(hello:1.3)",True,"",100, "all", "all", "all", "all", False)
|
||||
generateprompts(10,9,"humanoid","all","all",False,"","","PREFIXPROMPT" ,"SUFFIXPROMPT","",1,"","",True,"",100, "all", "all", "all", "all", False, True)
|
||||
+4
-2
@@ -38,13 +38,15 @@ def one_button_prompt_api(_: gr.Blocks, app: FastAPI):
|
||||
gender: str = Body('all',title='gender'),
|
||||
subtypeobject: str = Body('all',title='subtypeobject'),
|
||||
subtypehumanoid: str = Body('all', title='subtypehumanoid'),
|
||||
subtypeconcept: str = Body('all', title='subtypeconcept')
|
||||
subtypeconcept: str = Body('all', title='subtypeconcept'),
|
||||
advancedprompting:bool = Body(True,title='advancedprompting'),
|
||||
hardturnoffemojis:bool = Body(False,title='hardturnoffemojis')
|
||||
):
|
||||
|
||||
|
||||
keys = ['insanitylevel', 'forcesubject', 'artists', 'imagetype', 'onlyartists', 'antivalues', 'prefixprompt',
|
||||
'suffixprompt', 'promptcompounderlevel', 'seperator', 'givensubject', 'smartsubject', 'giventypeofimage',
|
||||
'imagemodechance', 'gender', 'subtypeobject','subtypehumanoid','subtypeconcept']
|
||||
'imagemodechance', 'gender', 'subtypeobject','subtypehumanoid','subtypeconcept','advancedprompting','hardturnoffemojis']
|
||||
payload = {}
|
||||
for key in keys:
|
||||
payload[key] = locals()[key]
|
||||
|
||||
@@ -22,7 +22,7 @@ subjectsubtypesobject = ["all"]
|
||||
subjectsubtypeshumanoid = ["all"]
|
||||
subjectsubtypesconcept = ["all"]
|
||||
artists = ["all", "none", "popular", "greg mode", "3D", "abstract", "angular", "anime" ,"architecture", "art nouveau", "art deco", "baroque", "bauhaus", "cartoon", "character", "children's illustration", "cityscape", "clean", "cloudscape", "collage", "colorful", "comics", "cubism", "dark", "detailed", "digital", "expressionism", "fantasy", "fashion", "fauvism", "figurativism", "gore", "graffiti", "graphic design", "high contrast", "horror", "impressionism", "installation", "landscape", "light", "line drawing", "low contrast", "luminism", "magical realism", "manga", "melanin", "messy", "monochromatic", "nature", "nudity", "photography", "pop art", "portrait", "primitivism", "psychedelic", "realism", "renaissance", "romanticism", "scene", "sci-fi", "sculpture", "seascape", "space", "stained glass", "still life", "storybook realism", "street art", "streetscape", "surrealism", "symbolism", "textile", "ukiyo-e", "vibrant", "watercolor", "whimsical"]
|
||||
imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "only other types", "only templates mode", "art blaster mode", "quality vomit mode", "color cannon mode", "unique art mode", "massive madness mode", "photo fantasy mode", "subject only mode"]
|
||||
imagetypes = ["all", "all - force multiple", "photograph", "octane render","digital art","concept art", "painting", "portrait", "anime key visual", "only other types", "only templates mode", "art blaster mode", "quality vomit mode", "color cannon mode", "unique art mode", "massive madness mode", "photo fantasy mode", "subject only mode", "fixed styles mode"]
|
||||
promptmode = ["at the back", "in the front"]
|
||||
promptcompounder = ["1", "2", "3", "4", "5"]
|
||||
ANDtogglemode = ["none", "automatic", "prefix AND prompt + suffix", "prefix + prefix + prompt + suffix"]
|
||||
@@ -456,6 +456,8 @@ class Script(scripts.Script):
|
||||
|
||||
16. subject only mode --> Will only generate a subject, with no additional frills.
|
||||
|
||||
17. fixed styles mode --> Generate a subject on top of a fixed style.
|
||||
|
||||
### One in X chance to use special image type mode
|
||||
|
||||
<font size="2">
|
||||
|
||||
Reference in New Issue
Block a user