fix single element return type

This commit is contained in:
RyanOnTheInside
2025-04-24 18:32:52 -04:00
parent 9a0e97efcb
commit 36cbf8e4ec
2 changed files with 10 additions and 1 deletions
+4 -1
View File
@@ -1083,6 +1083,9 @@ class RoundNode:
CATEGORY = "utils"
def round_value(self, value, decimal_places):
rounded = [round(v, decimal_places) for v in value]
if isinstance(value, (list, tuple, np.ndarray, torch.Tensor)):
rounded = [round(v, decimal_places) for v in value]
else:
rounded = round(value, decimal_places)
return (rounded,)