diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-22 09:51:43 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-22 09:51:43 +0300 |
| commit | 664c7d300c4a9326e5aebbd84a20cee5af829a0b (patch) | |
| tree | f7f13e390002ba935d06c67043395a8167411430 /internal/config | |
| parent | c3ccee67ab204dab4ad77b44fa789a43d826321a (diff) | |
Improve comic style generation
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 46 | ||||
| -rw-r--r-- | internal/config/config_test.go | 36 |
2 files changed, 80 insertions, 2 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 754c816..d7e7d49 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -95,8 +95,15 @@ type StoryConfig struct { // StyleConfig stores prompt style pools. type StyleConfig struct { - Comic []string `mapstructure:"comic" yaml:"comic"` - Realistic []string `mapstructure:"realistic" yaml:"realistic"` + Comic []string `mapstructure:"comic" yaml:"comic"` + Realistic []string `mapstructure:"realistic" yaml:"realistic"` + Cartoon []string `mapstructure:"cartoon" yaml:"cartoon"` + Action90s []string `mapstructure:"action_90s" yaml:"action_90s"` + Manga []string `mapstructure:"manga" yaml:"manga"` + Cyberpunk []string `mapstructure:"cyberpunk" yaml:"cyberpunk"` + GoldenAge []string `mapstructure:"golden_age" yaml:"golden_age"` + Horror []string `mapstructure:"horror" yaml:"horror"` + Watercolor []string `mapstructure:"watercolor" yaml:"watercolor"` } // NarrationConfig stores narration prompt knobs. @@ -152,6 +159,34 @@ func DefaultConfig() *Config { "ultra-realistic DSLR photography, cinematic 35mm lens", "cinematic realism with natural light", }, + Cartoon: []string{ + "very cartoonish 1930s rubber-hose animation comic style, pie-cut eyes, white gloves, noodle arms, squash-and-stretch bodies, round heads, huge expressions, flat candy colors, simple gag staging, no realism", + "vintage theatrical funny-animal cartoon comic style, beaks and round snouts, white gloves, oversized shoes, elastic limbs, cheerful slapstick poses, bold clean outlines, bright flat backgrounds, no realistic anatomy", + }, + Action90s: []string{ + "1990s superhero comic splash-page style like a bold caped hero punching a masked villain in a city, huge muscles, spandex costumes, flowing cape, explosive impact burst, speed lines, smoke, rubble, halftone print texture, heavy black inks, saturated primary colors", + "classic 90s action superhero cover style, oversized yellow masthead energy, caped spandex hero, armored villain, clenched fists, dramatic foreshortening, city skyline, explosions, speech balloons, thick ink outlines, Ben-Day dots", + }, + Manga: []string{ + "authentic black-and-white shonen manga page style, right-to-left manga energy, screentone shading, manga speed lines, large expressive eyes, sharp angular hair, sweat drops, impact bursts, Japanese comic panel language, minimal western color", + "high-energy manga action style, monochrome ink, dense screentones, exaggerated emotional close-ups, chibi reaction inset where appropriate, motion blur lines, diagonal panel rhythm, dramatic sound-effect shapes", + }, + Cyberpunk: []string{ + "cyberpunk neon comic style, rain-slick streets, glowing signage, chrome technology, high contrast shadows, electric cyan and magenta accents", + "tech-noir cyberpunk comic style, dense futuristic cityscapes, holograms, cybernetic details, saturated neon rim lighting", + }, + GoldenAge: []string{ + "golden age superhero comic style, clean heroic poses, bright primary colors, simple confident linework, optimistic mid-century adventure energy", + "vintage golden age comic book style, bold flat colors, classic caped hero staging, simple dramatic compositions, retro print texture", + }, + Horror: []string{ + "vintage horror comic style, eerie shadows, gothic atmosphere, unsettling monsters, dramatic candlelit contrast, suspenseful panel staging", + "creepy supernatural horror comic style, fog, haunted architecture, anxious expressions, heavy inks, sickly green and crimson accents", + }, + Watercolor: []string{ + "watercolor storybook comic style, soft washes, gentle ink outlines, luminous paper texture, warm hand-painted colors, whimsical atmosphere", + "delicate watercolor children's adventure style, airy backgrounds, expressive simple characters, pastel palette, soft brush edges", + }, }, Narration: NarrationConfig{ Voices: []string{ @@ -388,6 +423,13 @@ func setDefaults(v *viper.Viper, cfg *Config) { v.SetDefault("styles.comic", cfg.Styles.Comic) v.SetDefault("styles.realistic", cfg.Styles.Realistic) + v.SetDefault("styles.cartoon", cfg.Styles.Cartoon) + v.SetDefault("styles.action_90s", cfg.Styles.Action90s) + v.SetDefault("styles.manga", cfg.Styles.Manga) + v.SetDefault("styles.cyberpunk", cfg.Styles.Cyberpunk) + v.SetDefault("styles.golden_age", cfg.Styles.GoldenAge) + v.SetDefault("styles.horror", cfg.Styles.Horror) + v.SetDefault("styles.watercolor", cfg.Styles.Watercolor) v.SetDefault("narration.voices", cfg.Narration.Voices) v.SetDefault("narration.chunk_words", cfg.Narration.ChunkWords) diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 1a53486..1ae967c 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -47,6 +47,20 @@ styles: - custom comic realistic: - custom realistic + cartoon: + - custom cartoon + action_90s: + - custom 90s action + manga: + - custom manga + cyberpunk: + - custom cyberpunk + golden_age: + - custom golden age + horror: + - custom horror + watercolor: + - custom watercolor narration: chunk_words: 42 `)), 0o644); err != nil { @@ -93,6 +107,27 @@ narration: if got, want := len(cfg.Styles.Realistic), 1; got != want || cfg.Styles.Realistic[0] != "custom realistic" { t.Fatalf("Styles.Realistic = %#v, want %q", cfg.Styles.Realistic, "custom realistic") } + if got, want := len(cfg.Styles.Cartoon), 1; got != want || cfg.Styles.Cartoon[0] != "custom cartoon" { + t.Fatalf("Styles.Cartoon = %#v, want %q", cfg.Styles.Cartoon, "custom cartoon") + } + if got, want := len(cfg.Styles.Action90s), 1; got != want || cfg.Styles.Action90s[0] != "custom 90s action" { + t.Fatalf("Styles.Action90s = %#v, want %q", cfg.Styles.Action90s, "custom 90s action") + } + if got, want := len(cfg.Styles.Manga), 1; got != want || cfg.Styles.Manga[0] != "custom manga" { + t.Fatalf("Styles.Manga = %#v, want %q", cfg.Styles.Manga, "custom manga") + } + if got, want := len(cfg.Styles.Cyberpunk), 1; got != want || cfg.Styles.Cyberpunk[0] != "custom cyberpunk" { + t.Fatalf("Styles.Cyberpunk = %#v, want %q", cfg.Styles.Cyberpunk, "custom cyberpunk") + } + if got, want := len(cfg.Styles.GoldenAge), 1; got != want || cfg.Styles.GoldenAge[0] != "custom golden age" { + t.Fatalf("Styles.GoldenAge = %#v, want %q", cfg.Styles.GoldenAge, "custom golden age") + } + if got, want := len(cfg.Styles.Horror), 1; got != want || cfg.Styles.Horror[0] != "custom horror" { + t.Fatalf("Styles.Horror = %#v, want %q", cfg.Styles.Horror, "custom horror") + } + if got, want := len(cfg.Styles.Watercolor), 1; got != want || cfg.Styles.Watercolor[0] != "custom watercolor" { + t.Fatalf("Styles.Watercolor = %#v, want %q", cfg.Styles.Watercolor, "custom watercolor") + } if got, want := cfg.Narration.ChunkWords, 42; got != want { t.Fatalf("Narration.ChunkWords = %d, want %d", got, want) } @@ -260,6 +295,7 @@ func TestEmbeddedPromptTemplatesRender(t *testing.T) { "rendering_requirement.md", "rendering_requirement_end.md", "manual_prompt.md", + "manual_title_prompt.md", } { t.Run(name, func(t *testing.T) { got, err := cfg.RenderPrompt(name, data) |
