commit ImageAutoCropV2 node

This commit is contained in:
chflame
2024-03-21 15:27:56 +08:00
parent e987626ed7
commit 6a142a41ea
5 changed files with 290 additions and 24 deletions
+4 -6
View File
@@ -49,17 +49,15 @@ def log(message:str, message_type:str='info'):
try:
from cv2.ximgproc import guidedFilter
except ImportError as e:
print(e)
log(f'Dependency package error, unable import "cv2.ximgproc".'
f'\nPlease REINSTALL package "opencv-contrib-python".'
f'\nFor detail refer to \033[4mhttps://github.com/chflame163/ComfyUI_LayerStyle/issues/5\033[0m',
message_type='error')
# print(e)
log(f"Cannot import name 'guidedFilter' from 'cv2.ximgproc'"
f"\nA few nodes cannot works properly, while most nodes are not affected. Please REINSTALL package 'opencv-contrib-python'."
f"\nFor detail refer to \033[4mhttps://github.com/chflame163/ComfyUI_LayerStyle/issues/5\033[0m")
'''pickle'''
def read_image(filename:str) -> Image:
return Image.open(filename)