fix channel to variables mapping for image and video

This commit is contained in:
mcDandy
2026-02-27 13:14:21 +01:00
parent 9f49c6d054
commit 3f97c5c75d
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -91,12 +91,12 @@ class ImageMathNode(io.ComfyNode):
"x": F.get("F1", 0.0) if F.get("F1") is not None else 0.0,
"y": F.get("F2", 0.0) if F.get("F2") is not None else 0.0,
"z": F.get("F3", 0.0) if F.get("F3") is not None else 0.0,
"X": getIndexTensorAlongDim(ae, 3),
"Y": getIndexTensorAlongDim(ae, 2),
"X": getIndexTensorAlongDim(ae, 2),
"Y": getIndexTensorAlongDim(ae, 1),
"B": getIndexTensorAlongDim(ae, 0),
"batch": getIndexTensorAlongDim(ae, 0),
"C": getIndexTensorAlongDim(ae, 1),
"channel": getIndexTensorAlongDim(ae, 1),
"C": getIndexTensorAlongDim(ae, 3),
"channel": getIndexTensorAlongDim(ae, 3),
"W": float(ae.shape[2]),
"width": float(ae.shape[2]),
"H": float(ae.shape[1]),
+4 -4
View File
@@ -92,12 +92,12 @@ class VideoMathNode(io.ComfyNode):
"x": F.get("F1", 0.0) if F.get("F1") is not None else 0.0,
"y": F.get("F2", 0.0) if F.get("F2") is not None else 0.0,
"z": F.get("F3", 0.0) if F.get("F3") is not None else 0.0,
"X": getIndexTensorAlongDim(ae, 3),
"Y": getIndexTensorAlongDim(ae, 2),
"X": getIndexTensorAlongDim(ae, 2),
"Y": getIndexTensorAlongDim(ae, 1),
"B": getIndexTensorAlongDim(ae, 0),
"batch": getIndexTensorAlongDim(ae, 0),
"C": getIndexTensorAlongDim(ae, 1),
"channel": getIndexTensorAlongDim(ae, 1),
"C": getIndexTensorAlongDim(ae, 3),
"channel": getIndexTensorAlongDim(ae, 3),
"W": float(ae.shape[2]),
"width": float(ae.shape[2]),
"H": float(ae.shape[1]),