From 245f51393e81c225c0cb9e7771fb22259b709f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Deltheil?= Date: Wed, 26 Jun 2024 12:02:58 +0000 Subject: [PATCH] auto_encoder: swap x/y names when generating tiles Cosmetic change --- .../foundationals/latent_diffusion/auto_encoder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/refiners/foundationals/latent_diffusion/auto_encoder.py b/src/refiners/foundationals/latent_diffusion/auto_encoder.py index 0d1794d..ba8b3f2 100644 --- a/src/refiners/foundationals/latent_diffusion/auto_encoder.py +++ b/src/refiners/foundationals/latent_diffusion/auto_encoder.py @@ -419,13 +419,13 @@ class LatentDiffusionAutoencoder(Chain): """ tiles: list[_Tile] = [] - for y in range(0, size.width, tile_size.width - overlap): - for x in range(0, size.height, tile_size.height - overlap): + for x in range(0, size.width, tile_size.width - overlap): + for y in range(0, size.height, tile_size.height - overlap): tile = _Tile( - top=max(0, x), - left=max(0, y), - bottom=min(size.height, x + tile_size.height), - right=min(size.width, y + tile_size.width), + top=max(0, y), + left=max(0, x), + bottom=min(size.height, y + tile_size.height), + right=min(size.width, x + tile_size.width), ) tiles.append(tile)