新增模型补全空洞
This commit is contained in:
@@ -420,7 +420,12 @@ def inpaint(req: InpaintRequest) -> Dict[str, Any]:
|
||||
out_path = out_dir / f"{model_name}_inpaint.png"
|
||||
out.save(out_path)
|
||||
|
||||
return {"success": True, "output_path": str(out_path)}
|
||||
# 兼容 Qt 前端:直接返回结果图,避免前端再去读取服务器磁盘路径
|
||||
return {
|
||||
"success": True,
|
||||
"output_path": str(out_path),
|
||||
"output_image_b64": _pil_image_to_png_b64(out),
|
||||
}
|
||||
except Exception as e:
|
||||
return {"success": False, "error": str(e)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user