Spaces:
Runtime error
Runtime error
max
commited on
Commit
•
0f09c7c
1
Parent(s):
3746f14
removed debug code
Browse files
app.py
CHANGED
@@ -301,7 +301,7 @@ class Predictor:
|
|
301 |
)
|
302 |
i.putalpha(morig)
|
303 |
img = i
|
304 |
-
img.save('0.png')
|
305 |
assert img.width == img.height
|
306 |
assert img.width > 512 and img.width < 512*2
|
307 |
|
@@ -319,7 +319,7 @@ class Predictor:
|
|
319 |
|
320 |
for ix, tc in enumerate(tile_coords(img, n=2)):
|
321 |
i = img.crop(tc)
|
322 |
-
i.save(f't{ix}.png')
|
323 |
m = i.getchannel('A')
|
324 |
|
325 |
"""Run a single prediction on the model"""
|
@@ -338,7 +338,7 @@ class Predictor:
|
|
338 |
inpainted,
|
339 |
1-(np.array(m) / 255)
|
340 |
)
|
341 |
-
inpainted.save(f't{ix}_op.png')
|
342 |
minpainted = mask_to_alpha(inpainted, m)
|
343 |
# continue with partially inpainted image
|
344 |
# since the tiles overlap, the next tile will contain (possibly inpainted) parts of the previous tile
|
|
|
301 |
)
|
302 |
i.putalpha(morig)
|
303 |
img = i
|
304 |
+
# img.save('0.png')
|
305 |
assert img.width == img.height
|
306 |
assert img.width > 512 and img.width < 512*2
|
307 |
|
|
|
319 |
|
320 |
for ix, tc in enumerate(tile_coords(img, n=2)):
|
321 |
i = img.crop(tc)
|
322 |
+
# i.save(f't{ix}.png')
|
323 |
m = i.getchannel('A')
|
324 |
|
325 |
"""Run a single prediction on the model"""
|
|
|
338 |
inpainted,
|
339 |
1-(np.array(m) / 255)
|
340 |
)
|
341 |
+
# inpainted.save(f't{ix}_op.png')
|
342 |
minpainted = mask_to_alpha(inpainted, m)
|
343 |
# continue with partially inpainted image
|
344 |
# since the tiles overlap, the next tile will contain (possibly inpainted) parts of the previous tile
|