Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,17 @@ class BedrockService(
private fun buildStabilityRequest(request: BedrockImageRequest): Map<String, Any> {
val body = mutableMapOf<String, Any>(
"prompt" to request.prompt,
"mode" to "text-to-image",
"aspect_ratio" to "1:1",
"output_format" to "png"
)

if (request.negativePrompt.isNotBlank()) {
body["negative_prompt"] = request.negativePrompt
if (request.referenceImageBase64 != null) {
body["mode"] = "image-to-image"
body["image"] = request.referenceImageBase64
body["strength"] = 0.65 // Fine-tuning 을 위해 조정해야하는 파라미터. 0으로 가까울수록 Skeletal 이미지에 가깝게, 멀 수록 artistic.
}

if (request.referenceImageBase64 != null) {
log.warn("Stability Core v1 does not support img2img. Reference image ignored.")
if (request.negativePrompt.isNotBlank()) {
body["negative_prompt"] = request.negativePrompt
}

return body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,16 @@ object BedrockPromptTemplate {
// }
fun createImageGenerationPrompt(voiceColor: String = "#97b6e1"): String {
return """
High-quality acrylic painting on canvas,
intricate Chladni pattern with geometric symmetry,
primary color palette of $voiceColor with deep contrasting shadows,
thick brushstroke texture, rhythmic pointillism,
modern abstract art style, 8k resolution, masterpiece.
""".trimIndent()
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()
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ spring:
application:
name: tondo-api
profiles:
active: prod # 로컬 개발 환경을 기본으로 설정 (필요에 따라 prod, test 등으로 변경)
active: local # 로컬 개발 환경을 기본으로 설정 (필요에 따라 prod, test 등으로 변경)
Loading