mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-17 07:05:12 +08:00
Fix caching sanitization logic
This commit is contained in:
parent
39086890e2
commit
4d9516b909
@ -48,6 +48,7 @@ class CacheKeySet(ABC):
|
||||
|
||||
class Unhashable:
|
||||
def __init__(self):
|
||||
"""Create a hashable sentinel value for unhashable prompt inputs."""
|
||||
self.value = float("NaN")
|
||||
|
||||
|
||||
@ -186,6 +187,7 @@ class CacheKeySetInputSignature(CacheKeySet):
|
||||
return to_hashable(signature)
|
||||
|
||||
async def get_immediate_node_signature(self, dynprompt, node_id, ancestor_order_mapping):
|
||||
"""Build the cache-signature fragment for a node's immediate inputs."""
|
||||
if not dynprompt.has_node(node_id):
|
||||
# This node doesn't exist -- we can't cache it.
|
||||
return [float("NaN")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user