comrender commited on
Commit
f28b6d8
·
verified ·
1 Parent(s): 5720168

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -114,6 +114,10 @@ def tiled_flux_img2img(pipe, prompt, image, strength, steps, guidance, generator
114
  generator=generator,
115
  ).images[0]
116
 
 
 
 
 
117
  # Paste with blending if overlap
118
  if overlap > 0:
119
  paste_box = (x, y, x + tile_w, y + tile_h)
 
114
  generator=generator,
115
  ).images[0]
116
 
117
+ # Resize gen_tile back to original tile dimensions if pipeline resized it
118
+ if gen_tile.size != (tile_w, tile_h):
119
+ gen_tile = gen_tile.resize((tile_w, tile_h), resample=Image.LANCZOS)
120
+
121
  # Paste with blending if overlap
122
  if overlap > 0:
123
  paste_box = (x, y, x + tile_w, y + tile_h)