fix: add IS_CHANGED to prevent ComfyUI caching

ComfyUI caches node output when inputs are unchanged. Since
emotion annotation depends on external LLM API, we need to
force re-execution each time.
This commit is contained in:
Hawk Lee
2026-02-16 01:39:30 +08:00
parent 68d71bb728
commit 19ea3ec847
+6
View File
@@ -114,6 +114,12 @@ class AIIA_Emotion_Annotator:
FUNCTION = "annotate"
CATEGORY = "AIIA/Podcast"
@classmethod
def IS_CHANGED(cls, **kwargs):
# 每次都重新执行,不缓存(LLM 标注结果可能因模型/参数变化而不同)
import time
return time.time()
def _get_api_key(self, api_key_override=""):
"""获取 API Key:优先使用 override,否则读取环境变量 GROQ_API_KEY"""
if api_key_override and api_key_override.strip():