summaryrefslogtreecommitdiff
path: root/internal/comic/runner.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-21 23:12:52 +0300
committerPaul Buetow <paul@buetow.org>2026-04-21 23:12:52 +0300
commit3e99f5a75e14455aa75ca3a1dc7d08bd3e6f55fd (patch)
tree568bb781c0d71bdea58f5dc7192e6c5edec94c27 /internal/comic/runner.go
parentd15846a2784d15c5043833874b6539b727555cb0 (diff)
u7: wire documented config knobs into runtime
Diffstat (limited to 'internal/comic/runner.go')
-rw-r--r--internal/comic/runner.go42
1 files changed, 29 insertions, 13 deletions
diff --git a/internal/comic/runner.go b/internal/comic/runner.go
index 0b47a52..cc45e53 100644
--- a/internal/comic/runner.go
+++ b/internal/comic/runner.go
@@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"strings"
+ "time"
"codeberg.org/snonux/comicforge/internal/provider"
"codeberg.org/snonux/comicforge/internal/vocab"
@@ -36,6 +37,14 @@ type RunnerConfig struct {
Slug string
NarrateEnabled bool
UltraRealistic *bool
+ RealisticWeight float64
+ ComicStyles []string
+ RealisticStyles []string
+ AspectRatio string
+ PromptMaxChars int
+ PageMaxRetries int
+ PageRetryBase time.Duration
+ ChunkWords int
StoryPages int
GalleryPages int
PanelsPerPage int
@@ -58,7 +67,7 @@ func NewRunner(cfg *RunnerConfig) *Runner {
return r
}
- ultra := pickUltraRealistic()
+ ultra := pickUltraRealistic(cfg.RealisticWeight)
if cfg.UltraRealistic != nil {
ultra = *cfg.UltraRealistic
}
@@ -73,18 +82,24 @@ func NewRunner(cfg *RunnerConfig) *Runner {
PanelsPerPage: cfg.PanelsPerPage,
})
r.artist = NewArtist(&ArtistConfig{
- ImageProvider: cfg.ImageProvider,
- TextProvider: cfg.TextProvider,
- Prompts: cfg.Prompts,
- OutputDir: cfg.OutputDir,
- Style: cfg.Style,
- Theme: cfg.Theme,
- Language: cfg.Language,
- Script: cfg.Script,
- UltraRealistic: ultra,
- StoryPages: cfg.StoryPages,
- GalleryPages: cfg.GalleryPages,
- PanelsPerPage: cfg.PanelsPerPage,
+ ImageProvider: cfg.ImageProvider,
+ TextProvider: cfg.TextProvider,
+ Prompts: cfg.Prompts,
+ OutputDir: cfg.OutputDir,
+ Style: cfg.Style,
+ ComicStyles: cfg.ComicStyles,
+ RealisticStyles: cfg.RealisticStyles,
+ Theme: cfg.Theme,
+ AspectRatio: cfg.AspectRatio,
+ Language: cfg.Language,
+ Script: cfg.Script,
+ UltraRealistic: ultra,
+ PromptMaxChars: cfg.PromptMaxChars,
+ PageMaxRetries: cfg.PageMaxRetries,
+ PageRetryBase: cfg.PageRetryBase,
+ StoryPages: cfg.StoryPages,
+ GalleryPages: cfg.GalleryPages,
+ PanelsPerPage: cfg.PanelsPerPage,
})
r.narrator = NewNarrator(&NarratorConfig{
TextProvider: cfg.TextProvider,
@@ -94,6 +109,7 @@ func NewRunner(cfg *RunnerConfig) *Runner {
VoiceName: cfg.NarratorVoice,
Language: cfg.Language,
Script: cfg.Script,
+ ChunkWords: cfg.ChunkWords,
})
return r
}