Skip to content

Commit 52c9e45

Browse files
committed
more
1 parent 11d760d commit 52c9e45

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

python/sglang/srt/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,8 @@ def flatten_nested_list(nested_list):
17961796
return [
17971797
item for sublist in nested_list for item in flatten_nested_list(sublist)
17981798
]
1799+
elif isinstance(nested_list, torch.Tensor):
1800+
return [nested_list.flatten()]
17991801
else:
18001802
return [nested_list]
18011803

0 commit comments

Comments
 (0)