mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
【增加】midjourney 增加版本号设置
This commit is contained in:
parent
bd9474994f
commit
47ff5bf814
@ -26,12 +26,15 @@ public class AiImageMidjourneyImagineReqVO {
|
||||
@Schema(description = "模型(midjourney、niji)")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "图片宽度")
|
||||
@Schema(description = "图片宽度 --ar 设置")
|
||||
private String width;
|
||||
|
||||
@Schema(description = "图片高度")
|
||||
@Schema(description = "图片高度 --ar 设置")
|
||||
private String height;
|
||||
|
||||
@Schema(description = "版本号 --v 设置")
|
||||
private String version;
|
||||
|
||||
@Schema(description = "垫图(参考图)base64数组")
|
||||
private List<String> base64Array;
|
||||
}
|
||||
|
@ -158,7 +158,9 @@ public class AiImageServiceImpl implements AiImageService {
|
||||
MidjourneyImagineReqVO imagineReqVO = BeanUtils.toBean(req, MidjourneyImagineReqVO.class);
|
||||
imagineReqVO.setNotifyHook(midjourneyNotifyUrl);
|
||||
// 设置 midjourney 扩展参数,通过 --ar 来设置尺寸
|
||||
imagineReqVO.setState(String.format("--ar %s:%s", req.getWidth(), req.getHeight()));
|
||||
String midjourneySizeParam = String.format("--ar %s:%s", req.getWidth(), req.getHeight());
|
||||
String midjourneyVersionParam = String.format("--v %s", req.getVersion());
|
||||
imagineReqVO.setState(midjourneySizeParam.concat(" ").concat(midjourneyVersionParam));
|
||||
MidjourneySubmitRespVO submitRespVO = midjourneyProxyClient.imagine(imagineReqVO);
|
||||
|
||||
// 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误))
|
||||
|
Loading…
Reference in New Issue
Block a user