修改 imageToSketch

This commit is contained in:
2024-09-24 10:20:08 +08:00
parent 5a86f2e649
commit 3eb8626831
6 changed files with 32 additions and 7 deletions

View File

@@ -774,6 +774,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
public GenerateResultVO imageToSketch(ImageToSketchDTO imageToSketchDTO) {
String bucket = userBucket;
Long accountId = UserContext.getUserHolder().getId();
log.info("imageToSketch parameter : {}", imageToSketchDTO);
CollectionElement collectionElement = collectionElementService.getById(imageToSketchDTO.getElementId());
String imagePath = collectionElement.getUrl();
@@ -790,7 +791,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
CollectionElement styleElement = collectionElementService.getById(imageToSketchDTO.getElementId());
styleImage = styleElement.getUrl();
} else {
styleImage = null;
styleImage = "";
}
String sketchPath = pythonService.imageToSketch(imagePath, bucket, objectName, styleCode, styleImage);