Merge branch 'dev/dev_xp' into dev/3.1_release_merge

# Conflicts:
#	src/main/java/com/ai/da/python/PythonService.java
#	src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java
This commit is contained in:
2025-11-13 13:41:31 +08:00
23 changed files with 314 additions and 53 deletions

View File

@@ -4093,7 +4093,7 @@ public class PythonService {
//生成失败
throw new BusinessException("segProduct.interface.exception");
}
public Boolean poseTransformation(String productImage, int poseId, String taskId) {
public Boolean poseTransformation(JSONObject content, String apiUri) {
OkHttpClient client = new OkHttpClient().newBuilder()
.connectTimeout(30, TimeUnit.SECONDS)
.pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒)
@@ -4101,17 +4101,11 @@ public class PythonService {
.writeTimeout(60, TimeUnit.SECONDS)//写入超时(单位:秒)
.build();
MediaType mediaType = MediaType.parse("application/json");
Map<String, String> content = Maps.newHashMap();
content.put("image_url", productImage);
content.put("tasks_id", taskId);
content.put("pose_id", String.valueOf(poseId));
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));
// String uri = "/api/pose_transform";
String uri = "/api/comfyui_pose_transform";
log.info("poseTransformation 请求地址: {}", accessPythonIp + ":" + accessPythonPort + uri);
log.info("poseTransformation 请求地址: {}", accessPythonIp + ":" + accessPythonPort + apiUri);
Request request = new Request.Builder()
.url(accessPythonIp + ":" + accessPythonPort + uri)
.url(accessPythonIp + ":" + accessPythonPort + apiUri)
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();