This commit is contained in:
lilly
2023-06-27 18:27:10 +09:00
parent 2148bbd6df
commit ab31903931
3 changed files with 19 additions and 16 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ class LoraLoaderText:
print("[red]No lora_name[/red] : ", lora_name) print("[red]No lora_name[/red] : ", lora_name)
return (model, clip) return (model, clip)
lora_path=getFullPath(lora_name,"lora") lora_path=getFullPath(lora_name,"loras")
if lora_path is None: if lora_path is None:
print("[red]No lora_path of lora_name [/red] : ", lora_name) print("[red]No lora_path of lora_name [/red] : ", lora_name)
return (model, clip) return (model, clip)
+13 -11
View File
@@ -27,6 +27,8 @@ import numpy as np
#print(f"SimpleSampler __file__ {os.path.splitext(os.path.basename(__file__))[0]}") #print(f"SimpleSampler __file__ {os.path.splitext(os.path.basename(__file__))[0]}")
import os import os
if __name__ == os.path.splitext(os.path.basename(__file__))[0] or __name__ =='__main__': if __name__ == os.path.splitext(os.path.basename(__file__))[0] or __name__ =='__main__':
from ConsoleColor import print, console from ConsoleColor import print, console
from wildcards import wildcards from wildcards import wildcards
@@ -37,18 +39,18 @@ else:
#print(os.path.basename(__file__)) #print(os.path.basename(__file__))
#---------------------------- #----------------------------
wildcardsOn=True
# wildcards support check # wildcards support check
wildcardsOn=False #wildcardsOn=False
try: #try:
from wildcards import * # wildcardsOn=True
wildcardsOn=True # #wildcards.card_path=os.path.dirname(__file__)+"\\..\\wildcards\\**\\*.txt"
#wildcards.card_path=os.path.dirname(__file__)+"\\..\\wildcards\\**\\*.txt" # print(f"import wildcards succ", style="bold GREEN" )
print(f"import wildcards succ", style="bold GREEN" ) #except:
except: # print(f"import wildcards fail", style="bold RED")
print(f"import wildcards fail", style="bold RED") # wildcardsOn=False
wildcardsOn=False # err_msg = traceback.format_exc()
err_msg = traceback.format_exc() # print(err_msg)
print(err_msg)
def encode(clip, text): def encode(clip, text):
+5 -4
View File
@@ -175,9 +175,10 @@ class wildcards:
#print(__name__) #print(__name__)
#if __name__ == '__main__' : #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}" #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("[green]wildcards test : [/green]",wildcards.run(test),style="reset")
#print("wildcards test : "+wildcards.run("{9$$a|b}")) #print("wildcards test : "+wildcards.run("{9$$a|b}"))
#print("[green]wildcards test : [/green]",wildcards.run("__my__")) #print("[green]wildcards test : [/green]",wildcards.run("__my__"))
print("wildcards test : "+wildcards.run("{9$$-$$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("{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, }"))