Make it easier to debug nested tensors. (#15383)

This commit is contained in:
comfyanonymous 2026-08-07 19:14:04 -07:00 committed by GitHub
parent 43cb4fffc8
commit cd84f47efe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ class NestedTensor:
def layout(self):
return self.tensors[0].layout
def __repr__(self):
return f"{type(self).__name__}({self.tensors!r})"
def cat_nested(tensors, *args, **kwargs):
cated_tensors = []