Skip to content

Commit ae7918f

Browse files
committed
attempt to fix issue with torch 1.7, ddp and detach_()
1 parent 56674a0 commit ae7918f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stylegan2_pytorch/stylegan2_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def forward(self, images, prob = 0., types = [], detach = False):
330330
images = DiffAugment(images, types=types)
331331

332332
if detach:
333-
images.detach_()
333+
images = images.detach()
334334

335335
return self.D(images)
336336

stylegan2_pytorch/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.2.7'
1+
__version__ = '1.2.8'

0 commit comments

Comments
 (0)