Commit ImageTaggerSave and ImageAutoCropV3 nodes

This commit is contained in:
chflame163
2024-08-25 18:55:28 +08:00
parent 18e21036ef
commit deedca42ca
10 changed files with 958 additions and 1 deletions
+6
View File
@@ -1975,6 +1975,12 @@ def tensor_info(tensor:object) -> str:
value = f"tensor_info: Not tensor, type is {type(tensor)}"
return value
# 去除空行
def remove_empty_lines(text):
lines = text.split('\n')
non_empty_lines = [line for line in lines if line.strip() != '']
return '\n'.join(non_empty_lines)
# 去除重复的句子
def remove_duplicate_string(text:str) -> str:
sentences = re.split(r'(?<=[:;,.!?])\s+', text)