You might get non-deterministic results, if you don’t set all required flags mentioned in the reproducibility docs 2.
Could you take a look at these docs and add e.g. torch.use_deterministic_algorithms(True) to the script?