Spaces:
Runtime error
Runtime error
max
commited on
Commit
•
85d241c
1
Parent(s):
bf78495
allow transparent input images ...
Browse files
app.py
CHANGED
@@ -201,7 +201,7 @@ def pad(img, size=(128, 128), tosize=(512, 512), border=1):
|
|
201 |
mask.paste(white, tc)
|
202 |
|
203 |
if 'A' in rimg.getbands():
|
204 |
-
mask.paste(
|
205 |
return new_img, mask
|
206 |
|
207 |
|
|
|
201 |
mask.paste(white, tc)
|
202 |
|
203 |
if 'A' in rimg.getbands():
|
204 |
+
mask.paste(rimg.getchannel('A'), tc)
|
205 |
return new_img, mask
|
206 |
|
207 |
|