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 1
1
[project ]
2
2
name = " vector-quantize-pytorch"
3
- version = " 1.17.1 "
3
+ version = " 1.17.2 "
4
4
description = " Vector Quantization - Pytorch"
5
5
authors = [
6
6
{ name = " Phil Wang" , email = " lucidrains@gmail.com" }
Original file line number Diff line number Diff line change 10
10
from functools import partial , cache
11
11
from collections import namedtuple
12
12
from contextlib import nullcontext
13
+
13
14
import torch .distributed as dist
15
+ from torch .distributed import nn as dist_nn
14
16
15
17
import torch
16
18
from torch import nn , einsum
@@ -36,7 +38,7 @@ def maybe_distributed_mean(t):
36
38
if not is_distributed ():
37
39
return t
38
40
39
- dist . nn .all_reduce (t )
41
+ dist_nn .all_reduce (t )
40
42
t = t / dist .get_world_size ()
41
43
return t
42
44
You can’t perform that action at this time.
0 commit comments