File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " vector-quantize-pytorch"
3- version = " 1.17.1 "
3+ version = " 1.17.2 "
44description = " Vector Quantization - Pytorch"
55authors = [
66 { name = " Phil Wang" , email = " lucidrains@gmail.com" }
Original file line number Diff line number Diff line change 1010from functools import partial , cache
1111from collections import namedtuple
1212from contextlib import nullcontext
13+
1314import torch .distributed as dist
15+ from torch .distributed import nn as dist_nn
1416
1517import torch
1618from torch import nn , einsum
@@ -36,7 +38,7 @@ def maybe_distributed_mean(t):
3638 if not is_distributed ():
3739 return t
3840
39- dist . nn .all_reduce (t )
41+ dist_nn .all_reduce (t )
4042 t = t / dist .get_world_size ()
4143 return t
4244
You can’t perform that action at this time.
0 commit comments