summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/comic/artist.go2
-rw-r--r--internal/config/config_test.go2
-rw-r--r--internal/image/gemini_api.go4
3 files changed, 7 insertions, 1 deletions
diff --git a/internal/comic/artist.go b/internal/comic/artist.go
index a54c01a..b089769 100644
--- a/internal/comic/artist.go
+++ b/internal/comic/artist.go
@@ -345,6 +345,8 @@ func (a *Artist) galleryPromptData(style, bible string, galleryNum int) map[stri
"ScriptName": localizedScriptName(a.script),
"Style": localizedStylePrompt(style, a.language, a.script),
"Bible": bible,
+ "GalleryNum": galleryNum,
+ "TotalGalleryPages": a.galleryPages,
"Pose": galleryPoses[(galleryNum-1)%len(galleryPoses)],
"RenderingRequirement": a.renderingRequirement(),
"RenderingRequirementEnd": a.renderingRequirementEnd(),
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index e27906d..60152be 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -210,6 +210,8 @@ func TestEmbeddedPromptTemplatesRender(t *testing.T) {
"BlurbBox": "правоъгълно текстово поле с кратък текст",
"SeriesTitle": "КомиксФордж Приключения",
"Pose": "extreme close-up portrait",
+ "GalleryNum": 1,
+ "TotalGalleryPages": 5,
}
for _, name := range []string{
diff --git a/internal/image/gemini_api.go b/internal/image/gemini_api.go
index f1aa1c8..720388b 100644
--- a/internal/image/gemini_api.go
+++ b/internal/image/gemini_api.go
@@ -59,7 +59,9 @@ func geminiReferenceParts(prompt string, refs [][]byte) []*genai.Part {
refNote := fmt.Sprintf(
"The %d reference image(s) above show the exact character appearance that must be preserved. "+
- "Every character, animal, or object must look identical in the new image. Now generate:\n\n",
+ "Every character, animal, or object must keep the same identity, face, costume, colours, and markings. "+
+ "Use the references for identity only: do not copy their scene, pose, camera angle, panel layout, lighting, action, or background. "+
+ "The new image must follow the new prompt's story beat and composition. Now generate:\n\n",
len(refs),
)
parts = append(parts, &genai.Part{Text: refNote + prompt})