forked from mrq/DL-Art-School
Fix saver in distributed mode
This commit is contained in:
parent
545f2db170
commit
60079a1572
|
@ -50,8 +50,8 @@ class SrDiffusionFidEvaluator(evaluator.Evaluator):
|
|||
torch.distributed.all_gather(gather_list, gen)
|
||||
gen = torch.cat(gather_list, dim=0)
|
||||
|
||||
for b in range(self.batch_sz):
|
||||
torchvision.utils.save_image(gen[b], osp.join(fid_fake_path, "%i_.png" % (counter)))
|
||||
for g in gen:
|
||||
torchvision.utils.save_image(g, osp.join(fid_fake_path, f"{counter}.png"))
|
||||
counter += 1
|
||||
|
||||
return {"fid": fid_score.calculate_fid_given_paths([self.fid_real_samples, fid_fake_path], self.fid_batch_size,
|
||||
|
|
Loading…
Reference in New Issue
Block a user