English
Inference Endpoints
garg-aayush commited on
Commit
be9602a
·
1 Parent(s): ffe5bc9

update handler file

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -28,7 +28,7 @@ class EndpointHandler:
28
  tile=0,
29
  tile_pad=10,
30
  # pre_pad=args.pre_pad,
31
- # half=not args.fp32,
32
  # gpu_id=args.gpu_id
33
  )
34
 
@@ -46,6 +46,7 @@ class EndpointHandler:
46
 
47
  img_byte_arr = BytesIO()
48
  output = Image.fromarray(output)
 
49
  output.save(img_byte_arr, format='PNG')
50
  img_str = base64.b64encode(img_byte_arr.getvalue())
51
  return {"out_image": img_str.decode()}
 
28
  tile=0,
29
  tile_pad=10,
30
  # pre_pad=args.pre_pad,
31
+ half=True,
32
  # gpu_id=args.gpu_id
33
  )
34
 
 
46
 
47
  img_byte_arr = BytesIO()
48
  output = Image.fromarray(output)
49
+ print(output.size)
50
  output.save(img_byte_arr, format='PNG')
51
  img_str = base64.b64encode(img_byte_arr.getvalue())
52
  return {"out_image": img_str.decode()}