diff --git a/csv_reader.py b/csv_reader.py index 17178d0..5b2a5cc 100644 --- a/csv_reader.py +++ b/csv_reader.py @@ -256,5 +256,6 @@ def sort_and_dedupe_csv_file(): # write each item on a new line fp.write("%s\n" % item) -# -#sort_and_dedupe_csv_file() \ No newline at end of file + +# sort_and_dedupe_csv_file() + diff --git a/enhancepositivetester.py b/enhancepositivetester.py index 9d01b76..6925cb8 100644 --- a/enhancepositivetester.py +++ b/enhancepositivetester.py @@ -33,4 +33,5 @@ def generateprompts(amount = 1,positive_prompt = "",amountofwords="3"): print("") print("All done!") -generateprompts(10,"",5) \ No newline at end of file +if __name__ == "__main__": + generateprompts(10,"",5) \ No newline at end of file diff --git a/negativeprompttester.py b/negativeprompttester.py index 58866e8..adea71c 100644 --- a/negativeprompttester.py +++ b/negativeprompttester.py @@ -32,4 +32,5 @@ def generateprompts(amount = 1,positive_prompt = "",insanitylevel="0",enhance=Fa print("") print("All done!") -generateprompts(1,"photo, photograph, realism",0,False,"", base_model="Stable Cascade") \ No newline at end of file +if __name__ == "__main__": + generateprompts(1,"photo, photograph, realism",0,False,"", base_model="Stable Cascade") diff --git a/prompttester.py b/prompttester.py index 10671a3..4d67830 100644 --- a/prompttester.py +++ b/prompttester.py @@ -94,7 +94,8 @@ def generateprompts(amount = 1,insanitylevel="5",subject="all", artist="all", im print("") print("All done!") -generateprompts(10,5 +if __name__ == "__main__": + generateprompts(10,5 ,"all" # 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", "dynamic templates mode", "artify mode" diff --git a/promptvarianttester.py b/promptvarianttester.py index 7c01e0e..92b13a3 100644 --- a/promptvarianttester.py +++ b/promptvarianttester.py @@ -36,6 +36,7 @@ def generatepromptvariants(amount = 1,prompt="",insanitylevel="5"): print("") print("All done!") -generatepromptvariants(10 +if __name__ == "__main__": + generatepromptvariants(10 ,"a cute woman" #purple (galaxy) in a (bottle:1.2), , background is a lush jungle and a woman wearing a summer dress, -artmovement- , 1) diff --git a/upscaler.py b/upscaler.py index b6fbff1..3d89495 100644 --- a/upscaler.py +++ b/upscaler.py @@ -8,13 +8,14 @@ import os # takes all images with prompt info in their PNG, from the upscale directory, and upscales them -directory = 'C:\\automated_output\\Upscale me\\' +if __name__ == "__main__": + directory = 'C:\\automated_output\\Upscale me\\' -for filename in os.listdir(directory): - f = os.path.join(directory, filename) - # checking if it is a file - if os.path.isfile(f): - - img2img1 = call_img2img(f,0.25,1.5,256) - - finalfile = call_extras(img2img1) + for filename in os.listdir(directory): + f = os.path.join(directory, filename) + # checking if it is a file + if os.path.isfile(f): + + img2img1 = call_img2img(f,0.25,1.5,256) + + finalfile = call_extras(img2img1)