Skip to content

Commit

Permalink
fix(api): avoid padding latents when they are not being tiled
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Sep 5, 2023
1 parent 944c92b commit d94a8d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/onnx_web/diffusers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def get_tile_latents(

tile_latents = full_latents[:, :, y:yt, x:xt]

if tile_latents.shape[2] < t or tile_latents.shape[3] < t:
if tile_latents.shape != full_latents.shape and (tile_latents.shape[2] < t or tile_latents.shape[3] < t):
extra_latents = get_latents_from_seed(seed, size, batch=tile_latents.shape[0])
extra_latents[
:, :, 0 : tile_latents.shape[2], 0 : tile_latents.shape[3]
Expand Down

0 comments on commit d94a8d6

Please sign in to comment.