Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Don't call torch.equal when the two tensors are the same. (#17439)

comfyanonymousb5a432157de6
diff --git a/comfy/conds.py b/comfy/conds.py
index fabe1d301..c2a8e7ecd 100644
--- a/comfy/conds.py
+++ b/comfy/conds.py
@@ -5,6 +5,8 @@ import logging
def is_equal(x, y):
+ if x is y:
+ return True
if torch.is_tensor(x) and torch.is_tensor(y):
return torch.equal(x, y)
elif isinstance(x, dict) and isinstance(y, dict):