From 5cb49d4ec75b2ac3a34118e7e98104a78aa07f0b Mon Sep 17 00:00:00 2001 From: AIrjen Date: Sun, 11 Jun 2023 06:53:44 +0200 Subject: [PATCH 1/2] reduced templates showing up minor additions some prefixes for upscaling --- build_dynamic_prompt.py | 2 +- call_img2img.py | 6 +++--- csvfiles/special_lists/animaladditions.csv | 3 ++- csvfiles/special_lists/buildoutfit.csv | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 13922ae..927fb98 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -224,7 +224,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all # determine wether we should go for a template or not. Not hooked up to insanitylevel templatemode = False - if(random.randint(1, 20) == 1 or imagetype == "only templates"): + if(random.randint(1, 75) == 1 or imagetype == "only templates"): templatemode = True diff --git a/call_img2img.py b/call_img2img.py index ffa2269..dd3e902 100644 --- a/call_img2img.py +++ b/call_img2img.py @@ -25,8 +25,8 @@ def call_img2img(imagelocation,originalimage, originalpnginfo ="", apiurl="http: # need to convert the values to the correct index number for Ultimate SD Upscaler redrawmodelist =["Linear","Chess","None"] seamsfixmodelist = ["None","Band pass","Half tile offset pass","Half tile offset pass + intersections"] - usduredrawint = redrawmodelist.index(usduredraw) - seamsfixmodeint = seamsfixmodelist.index(usduSeamsfix) + usduredrawint = int(redrawmodelist.index(usduredraw)) + seamsfixmodeint = int(seamsfixmodelist.index(usduSeamsfix)) @@ -159,7 +159,7 @@ def call_img2img(imagelocation,originalimage, originalpnginfo ="", apiurl="http: if(upscalescript=="Ultimate SD upscale"): upscaler_index = [x.name.lower() for x in shared.sd_upscalers].index(upscaler.lower()) payload.update({"script_name": upscalescript}) - payload.update({"script_args": ["",int(usdutilewidth),int(usdutileheight),int(usdumaskblur),int(padding), int(usduswidth), usdusdenoise,int(usduspadding), + payload.update({"script_args": ["",int(usdutilewidth),int(usdutileheight),int(usdumaskblur),int(padding), int(usduswidth), float(usdusdenoise),int(usduspadding), upscaler_index,True,usduredrawint,False,int(usdusmaskblur), seamsfixmodeint,2,"","",float(scale)]}) diff --git a/csvfiles/special_lists/animaladditions.csv b/csvfiles/special_lists/animaladditions.csv index c9ca671..c8a71f2 100644 --- a/csvfiles/special_lists/animaladditions.csv +++ b/csvfiles/special_lists/animaladditions.csv @@ -1,4 +1,5 @@ baby were giant -monster \ No newline at end of file +monster +head of a \ No newline at end of file diff --git a/csvfiles/special_lists/buildoutfit.csv b/csvfiles/special_lists/buildoutfit.csv index 52ab1f6..5a6605b 100644 --- a/csvfiles/special_lists/buildoutfit.csv +++ b/csvfiles/special_lists/buildoutfit.csv @@ -10,4 +10,6 @@ -descriptor- -material- -outfit- -job- -outfit- -rpgclass- -minioutfit- --season- -minioutfit- \ No newline at end of file +-season- -minioutfit- +-minioutfit- designed by -brand- +-material- \ No newline at end of file From 03d6d152314bac273a2772cd8169d51655f14667 Mon Sep 17 00:00:00 2001 From: AIrjen Date: Sun, 11 Jun 2023 07:59:05 +0200 Subject: [PATCH 2/2] added print command --- build_dynamic_prompt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 927fb98..66c7d01 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -226,6 +226,7 @@ def build_dynamic_prompt(insanitylevel = 5, forcesubject = "all", artists = "all templatemode = False if(random.randint(1, 75) == 1 or imagetype == "only templates"): templatemode = True + print("Running with a randomized template instead of a randomized prompt") # main stuff