From c232f7f1471a2b7b57d2957312eb460e15ad719d Mon Sep 17 00:00:00 2001 From: lilly Date: Wed, 22 Mar 2023 17:29:46 +0900 Subject: [PATCH] 1 --- CLIPTextEncodeWildcards.py | 11 +++++++++-- ConsoleColor.py | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CLIPTextEncodeWildcards.py b/CLIPTextEncodeWildcards.py index 2444f47..fc9ad4f 100644 --- a/CLIPTextEncodeWildcards.py +++ b/CLIPTextEncodeWildcards.py @@ -1,8 +1,15 @@ import os, glob, sys import random import re -from .wildcards import wildcards -#import wildcards +import os +if __name__ == os.path.splitext(os.path.basename(__file__))[0] or __name__ =='__main__': + from ConsoleColor import print, console + from wildcards import wildcards +else: + from .ConsoleColor import print, console + from .wildcards import wildcards +print(__file__) +print(os.path.basename(__file__)) print("wildcards_ComfyUI") #print(os.getcwd()) diff --git a/ConsoleColor.py b/ConsoleColor.py index d93b441..e74dff5 100644 --- a/ConsoleColor.py +++ b/ConsoleColor.py @@ -24,7 +24,7 @@ print( print("test", style="bold white on blue") """ import os -if __name__ == os.path.splitext(os.path.basename(__file__))[0] : +if __name__ == os.path.splitext(os.path.basename(__file__))[0] or __name__ =='__main__': from ConsoleColor import print, console else: from .ConsoleColor import print, console