diff --git a/src/open_clip/loss.py b/src/open_clip/loss.py index e4f9c650b..06134015b 100644 --- a/src/open_clip/loss.py +++ b/src/open_clip/loss.py @@ -324,7 +324,7 @@ def forward(self, image_features, text_features, logit_scale, logit_bias, output loss += neg_loss text_features_to_right = text_features_from_left - loss /= self.world_size # not 100% clear if this should be here + # loss /= self.world_size # better without this # approach #2 # loss = torch.distributed.nn.all_reduce(loss)