Merge branch 'release/3.0' into dev/dev
This commit is contained in:
@@ -314,7 +314,14 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
|||||||
|
|
||||||
private String modifyPrompt(String userInput, Generate generate, String level1Type) {
|
private String modifyPrompt(String userInput, Generate generate, String level1Type) {
|
||||||
String text = "";
|
String text = "";
|
||||||
String translated = pythonService.promptTranslate(userInput);
|
String prefix = "";
|
||||||
|
if (userInput.startsWith("Painting Style")
|
||||||
|
|| userInput.startsWith("Illustration Style")
|
||||||
|
|| userInput.startsWith("Real Style") ){
|
||||||
|
prefix = userInput.substring(0, userInput.indexOf(",")) + ", ";
|
||||||
|
userInput = userInput.substring(userInput.indexOf(",") + 1);
|
||||||
|
}
|
||||||
|
String translated = prefix + pythonService.promptTranslate(userInput);
|
||||||
switch (level1Type) {
|
switch (level1Type) {
|
||||||
case "Moodboard":
|
case "Moodboard":
|
||||||
text = translated + ",high quality";
|
text = translated + ",high quality";
|
||||||
|
|||||||
@@ -300,9 +300,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
sb.append("wearing ").append(collect);
|
sb.append("wearing ").append(collect);
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(prompt)) {
|
if (StringUtils.isEmpty(prompt)) {
|
||||||
sb.append(",8K realistic,HDR");
|
sb.append(",high quality clothing details,8K realistic,HDR");
|
||||||
}else {
|
}else {
|
||||||
sb.append(",").append(prompt).append(",8K realistic,HDR");
|
sb.append(",high quality clothing details,").append(prompt).append(",8K realistic,HDR");
|
||||||
}
|
}
|
||||||
// 走模型
|
// 走模型
|
||||||
pythonService.toProductImage(tDesignPythonOutfit.getDesignUrl(), taskId, sb.toString(), toProductImageDTO.getImageStrength(), productType);
|
pythonService.toProductImage(tDesignPythonOutfit.getDesignUrl(), taskId, sb.toString(), toProductImageDTO.getImageStrength(), productType);
|
||||||
@@ -320,9 +320,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
result.add(toProductImageResult);
|
result.add(toProductImageResult);
|
||||||
}else {
|
}else {
|
||||||
if (StringUtils.isEmpty(prompt)) {
|
if (StringUtils.isEmpty(prompt)) {
|
||||||
sb.append(",8K realistic,HDR");
|
sb.append(",high quality clothing details,8K realistic,HDR");
|
||||||
}else {
|
}else {
|
||||||
sb.append(",").append(prompt).append(",8K realistic,HDR");
|
sb.append(",high quality clothing details,").append(prompt).append(",8K realistic,HDR");
|
||||||
}
|
}
|
||||||
|
|
||||||
taskId = UUID.randomUUID() + "-" + i + "-" + userHolder.getId();
|
taskId = UUID.randomUUID() + "-" + i + "-" + userHolder.getId();
|
||||||
@@ -342,6 +342,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
result.add(toProductImageResult);
|
result.add(toProductImageResult);
|
||||||
}
|
}
|
||||||
i ++;
|
i ++;
|
||||||
|
sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||||
// 添加需要扣除的积分到预扣除区
|
// 添加需要扣除的积分到预扣除区
|
||||||
creditsService.addRecordToCreditsDeduction(userHolder.getId(), taskId, CreditsEventsEnum.TO_PRODUCT_IMAGE);
|
creditsService.addRecordToCreditsDeduction(userHolder.getId(), taskId, CreditsEventsEnum.TO_PRODUCT_IMAGE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user