diff --git a/OneButtonPromptNodes.py b/OneButtonPromptNodes.py index a76852d..9cf3b09 100644 --- a/OneButtonPromptNodes.py +++ b/OneButtonPromptNodes.py @@ -220,7 +220,7 @@ 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, emojis): - generatedprompt = build_dynamic_prompt(insanitylevel,subject,artist,imagetype,False,"","","",1,"",seed,custom_subject,True,"",imagemodechance, humanoids_gender, subject_subtype_objects, subject_subtypes_humanoids, subject_subtypes_concepts, False, 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, seed) #print(generatedprompt) return (generatedprompt,) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 086e363..fdd9b62 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -10,10 +10,14 @@ 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", seed=0, givensubject="",smartsubject = True,giventypeofimage="", imagemodechance = 20, gender = "all", subtypeobject="all", subtypehumanoid="all", subtypeconcept="all", advancedprompting=True, hardturnoffemojis=False): +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): # set seed - random.seed(seed) + # For use in ComfyUI (might bring to Automatic1111 as well) + # lets do it when its lower than 1, to have it work on 0 and -1 + # Otherwise, just do nothing and it will keep on working based on an earlier set seed + if(seed < 1): + random.seed(seed) # load the config file config = load_config_csv()