Commit 81933108 authored by xiaoyu liu's avatar xiaoyu liu
Browse files

update,fix bug,增加mask通道输出

parent cb2cd957
No related merge requests found
Showing with 4 additions and 3 deletions
+4 -3
......@@ -78,13 +78,14 @@ def _upload_image(input_path, name, image_type="input", overwrite=False, subfold
def infer(ws, local_image_path, upload_image_name, prompt):
# 将local_image_path的图片上传到server,命名为upload_image_name
# _upload_image(local_image_path, upload_image_name)
_upload_image(local_image_path, upload_image_name)
# 将promt中的input节点需要读取的图片名称设置为刚刚上传的图片名
prompt["2"]["inputs"]["image"] = upload_image_name
#run inference
img = get_images(ws, prompt)
print('biref matting output: %s'%img.shape)
return img
print('biref matting output size: %s'% str(img.size))
r, g, b, a = img.split()
return img, a
if __name__ == "__main__":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment