BUGFIX: 1、sketch extract 没返回taskId
2、relight输入文本太长导致数据存储报错
This commit is contained in:
@@ -962,7 +962,8 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
||||
|
||||
String clothCategory = pythonService.getClothCategory(sketchPath, gender);
|
||||
|
||||
return new GenerateResultVO(generateDetail.getId(), minioUtil.getPreSignedUrl(sketchPath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME), "Success", clothCategory);
|
||||
return new GenerateResultVO(generate.getUniqueId(), generateDetail.getId(),
|
||||
minioUtil.getPreSignedUrl(sketchPath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME), "Success", clothCategory);
|
||||
}
|
||||
|
||||
public void doCreditsSubtract(Long accountId, CreditsEventsEnum event){
|
||||
|
||||
@@ -382,6 +382,18 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
toProductImageRecord.setUserLikeGroupId(userLikeGroupId);
|
||||
}
|
||||
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
StringBuilder sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
prompt = pythonService.promptTranslate(prompt);
|
||||
}
|
||||
|
||||
String[] words = prompt.split("\\s+");
|
||||
if (words.length > 200) {
|
||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||
}
|
||||
|
||||
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
||||
if (!StringUtils.isEmpty(toProductImageDTO.getPrompt())) {
|
||||
toProductImageRecord.setPrompt(toProductImageDTO.getPrompt());
|
||||
@@ -391,12 +403,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
List<ToProductImageResult> result = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
StringBuilder sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
prompt = pythonService.promptTranslate(prompt);
|
||||
}
|
||||
|
||||
// else {
|
||||
// s = "best quality, masterpiece. detailed, high-res, simple background, studio photography, extremely detailed, updo, detailed face, face, close-up, HDR, UHD, 8K realistic, Highly detailed, simple background, Studio lighting";
|
||||
// }
|
||||
@@ -901,6 +908,20 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
toProductImageRecord.setUserLikeGroupId(userLikeGroupId);
|
||||
}
|
||||
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
String s = "";
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
s = pythonService.promptTranslate(prompt);
|
||||
}else {
|
||||
s = "Snow moutain, snowy day, natural light";
|
||||
}
|
||||
// 对输入文本进行长度限制
|
||||
String[] words = prompt.split("\\s+");
|
||||
if (words.length > 200) {
|
||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||
}
|
||||
|
||||
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
||||
if (!StringUtils.isEmpty(toProductImageDTO.getPrompt())) {
|
||||
toProductImageRecord.setPrompt(toProductImageDTO.getPrompt());
|
||||
@@ -910,14 +931,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
List<ToProductImageResult> result = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
// 翻译
|
||||
String prompt = toProductImageDTO.getPrompt();
|
||||
String s = "";
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
s = pythonService.promptTranslate(prompt);
|
||||
}else {
|
||||
s = "Snow moutain, snowy day, natural light";
|
||||
}
|
||||
|
||||
for (ToProductImageVO toProductImageVO : toProductImageDTO.getToProductImageVOList()) {
|
||||
String taskId = UUID.randomUUID() + "-" + i + "-" + userHolder.getId();
|
||||
i ++;
|
||||
|
||||
Reference in New Issue
Block a user