max commited on
Commit
bf78495
1 Parent(s): aab7fa9

allow transparent input images

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -302,7 +302,7 @@ def _outpaint(img, tosize, border, seed, size, model):
302
  # %%
303
 
304
 
305
- searchimage = gc.Image(shape=(224, 224), label="image", type='pil')
306
  to_size = gc.Slider(1, 1920, 512, step=1, label='output size')
307
  border = gc.Slider(
308
  1, 50, 0, step=1, label='border to crop from the image before outpainting')
@@ -310,7 +310,7 @@ seed = gc.Slider(1, 65536, 10, step=1, label='seed')
310
  size = gc.Slider(0, 1, .5, step=0.01,
311
  label='scale of the image before outpainting')
312
 
313
- out = gc.Image(label="primed image with alpha channel", type='pil')
314
  outwithoutalpha = gc.Image(
315
  label="primed image without alpha channel", type='pil')
316
  mask = gc.Image(label="outpainting mask", type='pil')
 
302
  # %%
303
 
304
 
305
+ searchimage = gc.Image(shape=(224, 224), label="image", type='pil', image_mode='RGBA')
306
  to_size = gc.Slider(1, 1920, 512, step=1, label='output size')
307
  border = gc.Slider(
308
  1, 50, 0, step=1, label='border to crop from the image before outpainting')
 
310
  size = gc.Slider(0, 1, .5, step=0.01,
311
  label='scale of the image before outpainting')
312
 
313
+ out = gc.Image(label="primed image with alpha channel", type='pil', image_mode='RGBA')
314
  outwithoutalpha = gc.Image(
315
  label="primed image without alpha channel", type='pil')
316
  mask = gc.Image(label="outpainting mask", type='pil')