Changes to make sure it works on A1111
Moved seed to last part of the command. Changed so it only works when seed < 1, so it will keep working on A1111.
This commit is contained in:
@@ -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,)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user