From a5093311f93e5b6881281b70203c19cb934cf675 Mon Sep 17 00:00:00 2001 From: litianxiang Date: Thu, 12 Mar 2026 19:06:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93style=E4=B8=BA=E6=B4=9B=E4=B8=BD?= =?UTF-8?q?=E5=A1=94=E6=97=B6=E6=97=A0sketch=E5=92=8C=E8=B0=B7=E6=AD=8C?= =?UTF-8?q?=E9=A3=8E=E6=8E=A7=E9=97=AE=E9=A2=98FIX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/python/PythonService.java | 3 +++ .../com/ai/da/service/impl/GenerateServiceImpl.java | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 5ef07e16..6bebcaf3 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -3993,6 +3993,9 @@ public class PythonService { // throw new BusinessException("system.error"); // } //**********************end*********************************** + if (category.split("_")[0].equals("male")&&style.toLowerCase().equals("lolita")){ + style=null; + } AuthPrincipalVo userHolder = UserContext.getUserHolder(); OkHttpClient client = new OkHttpClient().newBuilder() diff --git a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java index 8c25c7fc..4a40fa2b 100644 --- a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java @@ -1260,8 +1260,14 @@ public class GenerateServiceImpl extends ServiceImpl i modelAndPromptMap.put(ModelConstants.USE_MODEL, ModelConstants.LOCAL_MODEL); } } else if (ModelConstants.SKETCHBOARD.equals(generateDTO.getLevel1Type())) { - String prompt = generateDTO.getText() + "rules:front view sketch only,plain white background, single garment only, orthographic, centered on white background, borderless canvas, thin monochrome black line art.\n" + - " No clothes hanger, no fake clothes hanger, no human-related lines, no color fill, no words, no text, no black background, no boundary or frame."; + String[] split = generateDTO.getText().split(","); + String style = split[0].trim(); + if ("Lolita".equals( style)){ + style = "洛丽塔"; + } + String userPrompt = split[1]; + String prompt = userPrompt + "rules:front view sketch only,plain white background, single garment only, orthographic, centered on white background, borderless canvas, thin monochrome black line art.\n" + + " No clothes hanger, no fake clothes hanger, no human-related lines, no color fill, no words, no text, no black background, no boundary or frame.sketch style:"+ style; modelAndPromptMap.put(ModelConstants.PROMPT, prompt); if (isUseImage) { if (ModelConstants.ADVANCED.equals(modelName)) {