mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-23 18:13:28 +08:00
Simplify Unhashable sentinel implementation
This commit is contained in:
parent
17863f603a
commit
2bea0ee5d7
@ -56,10 +56,8 @@ class CacheKeySet(ABC):
|
|||||||
return self.subcache_keys.get(node_id, None)
|
return self.subcache_keys.get(node_id, None)
|
||||||
|
|
||||||
class Unhashable:
|
class Unhashable:
|
||||||
"""Hashable sentinel for values that cannot be represented safely in cache keys."""
|
"""Hashable identity sentinel for values that cannot be represented safely in cache keys."""
|
||||||
def __init__(self):
|
pass
|
||||||
"""Initialize a sentinel that stays hashable while never comparing equal."""
|
|
||||||
self.value = float("NaN")
|
|
||||||
|
|
||||||
|
|
||||||
def _sanitized_sort_key(obj, depth=0, max_depth=32):
|
def _sanitized_sort_key(obj, depth=0, max_depth=32):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user