max commited on
Commit
c1ef964
1 Parent(s): 7ee08c3

fix image resize

Browse files
Files changed (1) hide show
  1. app.py +6 -12
app.py CHANGED
@@ -320,30 +320,24 @@ with gr.Blocks() as demo:
320
  btn = gr.Button("Run", variant="primary")
321
  with gr.Row():
322
  with gr.Column():
323
- searchimage = gc.Image(
324
- shape=(224, 224), label="image", type='pil', image_mode='RGBA')
325
  to_size = gc.Slider(1, 1920, 512, step=1, label='output size')
326
- border = gc.Slider(
327
- 1, 50, 0, step=1, label='border to crop from the image before outpainting')
328
  seed = gc.Slider(1, 65536, 10, step=1, label='seed')
329
- size = gc.Slider(0, 1, .5, step=0.01,
330
- label='scale of the image before outpainting')
331
 
332
  model = gc.Dropdown(
333
  choices=['places2',
334
  'places2+laion300k',
335
  'places2+laion300k+laion300k(opmasked)',
336
- 'places2+laion300k+laion1200k(opmasked)'
337
- ],
338
  value='places2+laion300k+laion1200k(opmasked)',
339
  label='model',
340
  )
341
  with gr.Column():
342
- outwithoutalpha = gc.Image(
343
- label="primed image without alpha channel", type='pil', image_mode='RGBA')
344
  mask = gc.Image(label="outpainting mask", type='pil')
345
- out = gc.Image(label="primed image with alpha channel",
346
- type='pil', image_mode='RGBA')
347
 
348
  btn.click(
349
  fn=_outpaint,
 
320
  btn = gr.Button("Run", variant="primary")
321
  with gr.Row():
322
  with gr.Column():
323
+ searchimage = gc.Image(label="image", type='pil', image_mode='RGBA')
 
324
  to_size = gc.Slider(1, 1920, 512, step=1, label='output size')
325
+ border = gc.Slider(1, 50, 0, step=1, label='border to crop from the image before outpainting')
 
326
  seed = gc.Slider(1, 65536, 10, step=1, label='seed')
327
+ size = gc.Slider(0, 1, .5, step=0.01,label='scale of the image before outpainting')
 
328
 
329
  model = gc.Dropdown(
330
  choices=['places2',
331
  'places2+laion300k',
332
  'places2+laion300k+laion300k(opmasked)',
333
+ 'places2+laion300k+laion1200k(opmasked)'],
 
334
  value='places2+laion300k+laion1200k(opmasked)',
335
  label='model',
336
  )
337
  with gr.Column():
338
+ outwithoutalpha = gc.Image(label="primed image without alpha channel", type='pil', image_mode='RGBA')
 
339
  mask = gc.Image(label="outpainting mask", type='pil')
340
+ out = gc.Image(label="primed image with alpha channel",type='pil', image_mode='RGBA')
 
341
 
342
  btn.click(
343
  fn=_outpaint,