Skip to content

Commit ea5713e

Browse files
committed
only calculate fid on main process
1 parent fd59db2 commit ea5713e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

denoising_diffusion_pytorch/denoising_diffusion_pytorch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,9 @@ def __init__(
912912

913913
# FID-score computation
914914

915-
self.calculate_fid = calculate_fid
916-
if calculate_fid:
915+
self.calculate_fid = calculate_fid and self.accelerator.is_main_process
916+
917+
if self.calculate_fid:
917918
if not self.model.is_ddim_sampling:
918919
self.accelerator.print(
919920
"WARNING: Robust FID computation requires a lot of generated samples and can therefore be very time consuming."\
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.8.1'
1+
__version__ = '1.8.2'

0 commit comments

Comments
 (0)