Fix for only artists
and warning in Gradio
This commit is contained in:
+16
-1
@@ -719,7 +719,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
|
||||
# determine wether we have a special mode or not
|
||||
if(random.randint(1,int(imagemodechance)) == 1 and imagetype == "all" and giventypeofimage == ""):
|
||||
if(random.randint(1,int(imagemodechance)) == 1 and imagetype == "all" and giventypeofimage == "" and onlyartists == False):
|
||||
imagetype = random.choice(imagetypemodelist) # override imagetype with a random "mode" value
|
||||
|
||||
|
||||
@@ -1497,10 +1497,25 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all
|
||||
|
||||
|
||||
if(onlyartists == True):
|
||||
#Parse or statements
|
||||
completeprompt = parse_custom_functions(completeprompt, insanitylevel)
|
||||
|
||||
# replace artist wildcards
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-artist-", artistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-gregmode-", gregmodelist, False, False)
|
||||
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-fantasyartist-", fantasyartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-popularartist-", popularartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-romanticismartist-", romanticismartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-photographyartist-", photographyartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-portraitartist-", portraitartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-characterartist-", characterartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-landscapeartist-", landscapeartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-scifiartist-", scifiartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-graphicdesignartist-", graphicdesignartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-digitalartist-", digitalartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-architectartist-", architectartistlist, False, False)
|
||||
completeprompt = replacewildcard(completeprompt, insanitylevel, "-cinemaartist-", cinemaartistlist, False, False)
|
||||
|
||||
# clean it up
|
||||
completeprompt = cleanup(completeprompt, advancedprompting, insanitylevel)
|
||||
|
||||
@@ -3,7 +3,7 @@ has OR(;large;small;giant;tiny;normal) OR(;Leather;normal) OR(belt;strap)OR(;s;n
|
||||
has OR(Metal;Iron;Diamond;Steel;metallic;-materialcombination-) OR(plates;plating)
|
||||
has a crest on chest
|
||||
OR(is zipped up;is unzipped;is partially unzipped;zipper;buttons;is buttoned up;is partially unbuttoned;is unbuttoned)
|
||||
has OR(;large;small;giant;tiny;normal) (zipper;button;buttons;zippers)
|
||||
has OR(;large;small;giant;tiny;normal) OR(zipper;button;buttons;zippers)
|
||||
is OR(off-the-shoulder;strapless;cropped;ruffled)
|
||||
is OR(;very;normal) OR(large;small;tight;loose;baggy;delicate;wet;-outfitdescriptor-)
|
||||
is made from OR(satin;curderoy;lace;cotton;metal;-materialcombination-)
|
||||
|
||||
|
+2
-2
@@ -88,11 +88,11 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im
|
||||
print("")
|
||||
print("All done!")
|
||||
|
||||
generateprompts(100,5
|
||||
generateprompts(10,5
|
||||
,"" # subject
|
||||
,"all" # artists
|
||||
,"all" # image type "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"
|
||||
, False # only artists
|
||||
, True # only artists
|
||||
,"","","PREFIXPROMPT"
|
||||
,"SUFFIXPROMPT"
|
||||
,"",1,""
|
||||
|
||||
@@ -697,10 +697,10 @@ class Script(scripts.Script):
|
||||
sizelist, label="Size to generate", value="all")
|
||||
basesize = gr.Dropdown(
|
||||
basesizelist, label="base size", value="512")
|
||||
with gr.Row(scale=1):
|
||||
with gr.Row():
|
||||
samplingsteps = gr.Slider(1, 100, value="20", step=1, label="Sampling steps")
|
||||
cfg = gr.Slider(1,20, value="6.0", step=0.1, label="CFG")
|
||||
with gr.Row(scale=1):
|
||||
with gr.Row():
|
||||
hiresfix = gr.Checkbox(label="hires. fix", value=True)
|
||||
hiressteps = gr.Slider(0, 100, value = "0", step=1, label="Hires steps")
|
||||
hiresscale = gr.Slider(1, 4, value = "2", step=0.05, label="Scale")
|
||||
|
||||
Reference in New Issue
Block a user