Skip to content

Commit 3ce4c52

Browse files
committed
address issue with resolutions in generator for calculating attention placement, thanks to @inspirit #44
1 parent 6c760c9 commit 3ce4c52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gigagan_pytorch/gigagan_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def __init__(
919919
num_layers = int(log2(image_size) - 1)
920920
self.num_layers = num_layers
921921

922-
resolutions = image_size / ((2 ** torch.arange(num_layers)))
922+
resolutions = image_size / ((2 ** torch.arange(num_layers).flip(0)))
923923
resolutions = resolutions.long().tolist()
924924

925925
dim_layers = (2 ** (torch.arange(num_layers) + 1)) * dim_capacity

gigagan_pytorch/version.py

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

0 commit comments

Comments
 (0)