后端方法设计概念;请求返回422;

1.后端方法设计概念
image_segment_by_texts;image_segment_by_text
大模型的张量PyTorch Tensor都在GPU的显存当中,推理出来的结果不能直接转成 Python 列表,需要先移回 CPU。
把 Tensor(张量) 转成 Python 原生的 list;

2.请求返回422
422 Unprocessable Entity
422 Unprocessable Entity 说明 FastAPI 收到的请求数据格式不符合你接口声明的要求。

posted @ 2026-01-23 11:58  asphyxiasea  阅读(2)  评论(0)    收藏  举报