diff --git a/LoraLoaderText.py b/LoraLoaderText.py index 17e614e..ba994a5 100644 --- a/LoraLoaderText.py +++ b/LoraLoaderText.py @@ -38,7 +38,7 @@ class LoraLoaderText: print("[red]No lora_name[/red] : ", lora_name) return (model, clip) - lora_path=getFullPath(lora_name,"lora") + lora_path=getFullPath(lora_name,"loras") if lora_path is None: print("[red]No lora_path of lora_name [/red] : ", lora_name) return (model, clip) diff --git a/SimpleSampler.py b/SimpleSampler.py index a7c875c..54fd175 100644 --- a/SimpleSampler.py +++ b/SimpleSampler.py @@ -27,6 +27,8 @@ import numpy as np #print(f"SimpleSampler __file__ {os.path.splitext(os.path.basename(__file__))[0]}") import os + + if __name__ == os.path.splitext(os.path.basename(__file__))[0] or __name__ =='__main__': from ConsoleColor import print, console from wildcards import wildcards @@ -37,18 +39,18 @@ else: #print(os.path.basename(__file__)) #---------------------------- +wildcardsOn=True # wildcards support check -wildcardsOn=False -try: - from wildcards import * - wildcardsOn=True - #wildcards.card_path=os.path.dirname(__file__)+"\\..\\wildcards\\**\\*.txt" - print(f"import wildcards succ", style="bold GREEN" ) -except: - print(f"import wildcards fail", style="bold RED") - wildcardsOn=False - err_msg = traceback.format_exc() - print(err_msg) +#wildcardsOn=False +#try: +# wildcardsOn=True +# #wildcards.card_path=os.path.dirname(__file__)+"\\..\\wildcards\\**\\*.txt" +# print(f"import wildcards succ", style="bold GREEN" ) +#except: +# print(f"import wildcards fail", style="bold RED") +# wildcardsOn=False +# err_msg = traceback.format_exc() +# print(err_msg) def encode(clip, text): diff --git a/wildcards.py b/wildcards.py index e158504..0d54f2f 100644 --- a/wildcards.py +++ b/wildcards.py @@ -175,9 +175,10 @@ class wildcards: #print(__name__) #if __name__ == '__main__' : # 테스트용 -test="{3$$a1|{b2|c3|}|d4|{-$$|f|g}|{-2$$h||i}|{1-$$j|k|}}/{$$l|m|}/{0$$n|}/{9$$-$$a|b|c}/{9$$ {and|or} $$a|b|c}" -print("[green]wildcards test : [/green]",wildcards.run(test),style="reset") +#test="{3$$a1|{b2|c3|}|d4|{-$$|f|g}|{-2$$h||i}|{1-$$j|k|}}/{$$l|m|}/{0$$n|}/{9$$-$$a|b|c}/{9$$ {and|or} $$a|b|c}" +#print("[green]wildcards test : [/green]",wildcards.run(test),style="reset") #print("wildcards test : "+wildcards.run("{9$$a|b}")) #print("[green]wildcards test : [/green]",wildcards.run("__my__")) -print("wildcards test : "+wildcards.run("{9$$-$$a|b|c}")) -print("wildcards test : "+wildcards.run("{9$$ {and|or} $$a|b|c}")) +#print("wildcards test : "+wildcards.run("{9$$-$$a|b|c}")) +#print("wildcards test : "+wildcards.run("{9$$ {and|or} $$a|b|c}")) +print("wildcards test : "+wildcards.run("{{slender,|} {nature,|} {curvy,|} {thin,|} {narrow,|} {slim,|} {mini,|} {little,|}| {|very }{-$$ $$thin|slender|narrow|slim|little|skinny|mini} body, }"))