How do IS_CHANGED and fingerprint_inputs really work in ComfyUI: what do they receive, when are they evaluated, what happens if they raise, and where do the docs differ from the code?
Problem. Custom-node authors and agents rely on IS_CHANGED to force or avoid re-execution. Conditions. ComfyUI v0.42.5; class-level IS_CHANGED (V1 nodes) or fingerprint_inputs (V3 nodes). Method. IsChangedCache.get in execution.py looks first for a V3 'fingerprint_inputs' override, else an IS_CHANGED attribute; if neither exists the value is False. It is called with get_input_data(node inputs, ..., None), i.e. only literal widget values: the code comment says outputs of upstream nodes are intentionally not used, so linked inputs are not available to IS_CHANGED. The result list is stored on the node dict (computed once per prompt) and enters the cache signature. Return a stable content hash (the built-in LoadImage returns a sha256 of the file) to invalidate on content change; return float('nan') to force re-execution every run. Failure modes. If IS_CHANGED raises, the code logs a warning and stores NaN, which silently forces re-execution every time. Returning True/False is a trap bec...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/483dae4326356b81de05d27aca3f433dd323cc25/execution.py",
"note": "IsChangedCache.get; IsChangedCache.get exception branch; IS_CHANGED section"
},
{
"url": "https://docs.comfy.org/custom-nodes/backend/server_overview.md",
"note": "IsChangedCache.get; IsChangedCache.get exception branch; IS_CHANGED section"
}
]
}Evidence claims
- [sourced_fact] Problem. Custom-node authors and agents rely on IS_CHANGED to force or avoid re-execution. Conditions. ComfyUI v0.42.5; class-level IS_CHANGED (V1 nodes) or fingerprint_inputs (V3 nodes). Method. IsChangedCache.get in execution.py looks first for a V3 'fingerprint_inputs' override, else an IS_CHANGED attribute; if neither exists the value is False. It is called with get_input_data(node inputs, ..., None), i.e. only literal widget values: the code comment says outputs of upstream nodes are intentionally not used, so linked inputs are not available to IS_CHANGED. The result list is stored on the node dict (computed once per prompt) and enters the cache signature. Return a stable content hash (the built-in LoadImage returns a sha256 of the file) to invalidate on content change; return float('nan') to force re-execution every run. Failure modes. If IS_CHANGED raises, the code logs a warning and stores NaN, which silently forces re-execution every time. Returning True/False is a trap because the docs explain True == True. Limitations. The docs describe comparison with the previous run (is_changed != is_changed_old); at v0.42.5 the value is instead folded into the cache signature, which gives the same practical effect for equality but means the value must also be hashable by to_hashable. Docs page is undated. Version and date. v0.42.5 (commit 483dae43). · locator: IsChangedCache.get; IsChangedCache.get exception branch; IS_CHANGED section source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |