From 7c48b852d26337ddf9b866826e8a0e65cc952d8d Mon Sep 17 00:00:00 2001 From: HP657 Date: Sat, 18 Apr 2026 00:04:41 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=20Volulme=20->=20Volume=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/tondo/api/application/ArtworkOrchestrator.kt | 2 +- src/main/kotlin/com/tondo/api/dto/ArtworkCreateRequest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/tondo/api/application/ArtworkOrchestrator.kt b/src/main/kotlin/com/tondo/api/application/ArtworkOrchestrator.kt index e714ba0..4552fd9 100644 --- a/src/main/kotlin/com/tondo/api/application/ArtworkOrchestrator.kt +++ b/src/main/kotlin/com/tondo/api/application/ArtworkOrchestrator.kt @@ -67,7 +67,7 @@ class ArtworkOrchestrator( val artworkRepresentation = try { ArtworkRepresentation( averageHz = request.averageHz, - averageVolume = request.averageVolulme, + averageVolume = request.averageVolume, averageTimbre = request.averageTimbre, base64Image = Base64.getDecoder().decode(request.base64Image), voiceColor = request.voiceColor diff --git a/src/main/kotlin/com/tondo/api/dto/ArtworkCreateRequest.kt b/src/main/kotlin/com/tondo/api/dto/ArtworkCreateRequest.kt index 5e0928a..81785b5 100644 --- a/src/main/kotlin/com/tondo/api/dto/ArtworkCreateRequest.kt +++ b/src/main/kotlin/com/tondo/api/dto/ArtworkCreateRequest.kt @@ -6,7 +6,7 @@ package com.tondo.api.dto data class ArtworkCreateRequest( val uuid: String, val averageHz: Double, - val averageVolulme: Double, + val averageVolume: Double, val averageTimbre: Double, val base64Image: String, // 이 필드의 크기가 클 수 있습니다! JSON 페이로드 크기 보고, request body size limit 늘려야할 수 있습니다! val voiceColor: String // 음색의 HEX CODE From 58741847cf63a6e417b6374a25886c479967b523 Mon Sep 17 00:00:00 2001 From: HP657 Date: Sat, 18 Apr 2026 00:06:16 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EC=9A=94=EC=B2=AD=20=EB=8B=A4=EC=96=91?= =?UTF-8?q?=EC=84=B1=EC=9D=84=20=EC=9C=84=ED=95=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aws/bedrock/service/BedrockService.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/service/BedrockService.kt b/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/service/BedrockService.kt index 8f2ee99..b35fd6a 100644 --- a/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/service/BedrockService.kt +++ b/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/service/BedrockService.kt @@ -7,6 +7,8 @@ import com.tondo.api.infrastructure.aws.bedrock.dto.BedrockImageRequest import com.tondo.api.infrastructure.aws.bedrock.dto.BedrockMessage import com.tondo.api.infrastructure.aws.bedrock.dto.BedrockRequest import com.tondo.api.infrastructure.aws.bedrock.template.BedrockPromptTemplate +import com.tondo.api.infrastructure.aws.bedrock.template.BedrockPromptTemplate.createImageGenerationPrompt +import com.tondo.api.infrastructure.aws.bedrock.template.BedrockPromptTemplate.createNegativePrompt import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Qualifier import org.springframework.context.annotation.Profile @@ -132,8 +134,6 @@ class BedrockService( "similarityStrength" to 0.7 ), "imageGenerationConfig" to mapOf( - "width" to request.width, - "height" to request.height, "numberOfImages" to 1, "quality" to "standard" ) @@ -145,8 +145,6 @@ class BedrockService( "text" to request.prompt ), "imageGenerationConfig" to mapOf( - "width" to request.width, - "height" to request.height, "numberOfImages" to 1, "quality" to "standard" ) @@ -162,9 +160,11 @@ class BedrockService( if (request.referenceImageBase64 != null) { body["mode"] = "image-to-image" + body["negative_prompt"] = createNegativePrompt() body["image"] = request.referenceImageBase64 - body["strength"] = 0.50 // Fine-tuning 을 위해 조정해야하는 파라미터. 0으로 가까울수록 Skeletal 이미지에 가깝게, 멀 수록 artistic. - } + body["strength"] = 0.62 + body["seed"] = 0 + } if (request.negativePrompt.isNotBlank()) { body["negative_prompt"] = request.negativePrompt From 4ca5c20c186db96839e5e8afd60c560085964027 Mon Sep 17 00:00:00 2001 From: HP657 Date: Sat, 18 Apr 2026 00:06:59 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=20NegativePrompt=EB=A1=9C=20=ED=82=A4?= =?UTF-8?q?=EC=9B=8C=EB=93=9C=20=EC=B2=A8=EB=B6=80=EC=99=80=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=83=9D=EC=84=B1=EC=8B=9C=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EB=90=A0=20=ED=94=84=EB=A1=AC=ED=94=84=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bedrock/template/BedrockPromptTemplate.kt | 49 ++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/template/BedrockPromptTemplate.kt b/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/template/BedrockPromptTemplate.kt index 2eea422..ea8b8d5 100644 --- a/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/template/BedrockPromptTemplate.kt +++ b/src/main/kotlin/com/tondo/api/infrastructure/aws/bedrock/template/BedrockPromptTemplate.kt @@ -54,19 +54,46 @@ object BedrockPromptTemplate { // Convert fine points into flowing, continuous lines with a binary contrast of light and shadow. // Ensure a perfect harmony between symmetrical structure and rich, thick paint texture. // """.trimIndent() +// } +// fun createImageGenerationPrompt(voiceColor: String = "#97b6e1"): String { +// return """ +// Sophisticated acrylic painting on textured canvas, +// preserving the exact geometric Chladni pattern structure, +// primary color $voiceColor with deep dark tones in shadow regions and vibrant bright tones in highlights, +// colors structurally distributed along the geometric forms, +// bold and dynamic composition, +// fine acrylic brushstroke texture, +// reinterpreted pointillism with flowing continuous lines instead of dots, +// binary contrast of light and shadow, +// symmetrical structure with rich thick paint texture, +// smartphone wallpaper, 8k resolution, masterpiece +// """.trimIndent() // } fun createImageGenerationPrompt(voiceColor: String = "#97b6e1"): String { return """ - Sophisticated acrylic painting on textured canvas, - preserving the exact geometric Chladni pattern structure, - primary color $voiceColor with deep dark tones in shadow regions and vibrant bright tones in highlights, - colors structurally distributed along the geometric forms, - bold and dynamic composition, - fine acrylic brushstroke texture, - reinterpreted pointillism with flowing continuous lines instead of dots, - binary contrast of light and shadow, - symmetrical structure with rich thick paint texture, - smartphone wallpaper, 8k resolution, masterpiece - """.trimIndent() + A luxurious acrylic oil painting on textured canvas, + depicting the flowing wave pattern from the reference image, + thick impasto brushstrokes, palette knife texture, + visible canvas weave, rich layered pigment, tactile surface, + + dominant color palette built around $voiceColor, + harmonious tonal variations from deep shadow to bright highlight of this hue, + painterly gradients following the wave ridges, + + museum-quality fine art, gallery piece, + dramatic chiaroscuro lighting on paint texture, + ultra detailed brush fibers, 8k, smartphone wallpaper composition + """.trimIndent() + } + + fun createNegativePrompt(): String { + return """ + sand particles, dots, pointillism, halftone, dotted pattern, + photorealistic, photograph, 3d render, CGI, smooth plastic surface, + flat illustration, vector art, digital art, + dark background, black background, low contrast, + geometric shapes, mandala, kaleidoscope, radial symmetry, + text, watermark, signature, blurry, low quality + """.trimIndent() } }