Skip to content

Commit

Permalink
Fix bug getting h,w
Browse files Browse the repository at this point in the history
  • Loading branch information
corystephenson-db committed Jul 20, 2024
1 parent 1150340 commit 6fabbf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diffusion/datasets/laion/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def __init__(
self.log_aspect_ratio_buckets = torch.log(self.aspect_ratio_buckets)

def __call__(self, img, aspect_ratio):
orig_h, orig_w = img.size
orig_w, orig_h = img.size
orig_aspect_ratio = orig_h / orig_w
# Figure out target H/W given the input aspect ratio
bucket_ind = torch.abs(self.log_aspect_ratio_buckets - math.log(aspect_ratio)).argmin()
Expand Down

0 comments on commit 6fabbf5

Please sign in to comment.