summaryrefslogtreecommitdiff
path: root/internal/comic/artist.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-22 08:42:56 +0300
committerPaul Buetow <paul@buetow.org>2026-04-22 08:42:56 +0300
commitf9baad3a11e48a6d438d3e614e1ca1ee45c1547d (patch)
tree72db85faa6307b7b586d0ed982da977ad12c6e46 /internal/comic/artist.go
parent15639ba3508ab92599bd1884ba07139c73b2dac0 (diff)
Fix manual prompt mode flags
Diffstat (limited to 'internal/comic/artist.go')
-rw-r--r--internal/comic/artist.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/internal/comic/artist.go b/internal/comic/artist.go
index 13826ee..7ccf084 100644
--- a/internal/comic/artist.go
+++ b/internal/comic/artist.go
@@ -214,7 +214,11 @@ func (a *Artist) generateWithRetry(ctx context.Context, prompt, outputFile, labe
}
func (a *Artist) generatePromptImage(ctx context.Context, prompt, outputFile string) error {
- return a.generateWithRetryAndValidation(ctx, prompt, outputFile, "manual prompt image", nil, nil)
+ renderedPrompt, err := a.prompts.RenderPrompt(manualPromptTemplate, a.manualPromptData(prompt))
+ if err != nil {
+ return fmt.Errorf("render manual prompt: %w", err)
+ }
+ return a.generateWithRetryAndValidation(ctx, renderedPrompt, outputFile, "manual prompt image", nil, nil)
}
type imageOutputValidator func(context.Context, string, string, string) error
@@ -379,6 +383,16 @@ func (a *Artist) backPromptData(storyText, style, bible, blurb string) map[strin
}
}
+func (a *Artist) manualPromptData(prompt string) map[string]any {
+ return map[string]any{
+ "Prompt": strings.TrimSpace(prompt),
+ "Style": localizedStylePrompt(a.style, a.language, a.script),
+ "Theme": a.theme,
+ "RenderingRequirement": a.renderingRequirement(),
+ "RenderingRequirementEnd": a.renderingRequirementEnd(),
+ }
+}
+
func (a *Artist) renderingRequirement() string {
if a.ultraRealistic {
text, err := a.prompts.RenderPrompt(renderingRequirementPrompt, nil)