feat(llm): enrich polish prompts with directing heuristics for higher image/video quality - #62
Open
Yuyyxz wants to merge 1 commit into
Open
feat(llm): enrich polish prompts with directing heuristics for higher image/video quality#62Yuyyxz wants to merge 1 commit into
Yuyyxz wants to merge 1 commit into
Conversation
将 KPE + Master-director 的导演方法论注入三个 polish prompt: - DEFAULT_STORYBOARD_POLISH_PROMPT(图像): 拒绝空话套话/光影塑形/细节密度/一图一职/风格一致性 - DEFAULT_VIDEO_POLISH_PROMPT(视频): 一镜一主动作/动作幅度分级/身体联动/细节到部位级/多人动作顺序/对白口型 - DEFAULT_R2V_POLISH_PROMPT(参考视频): 锚点逐字复述/动作幅度分级/风格一致 实测: 故意给违反铁律的草稿(堆5个动作+空话), LLM 按导演铁律输出(幅度分级slight/slowly+身体联动+光影塑形)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The three default polish prompts (
DEFAULT_STORYBOARD_POLISH_PROMPT,DEFAULT_VIDEO_POLISH_PROMPT,DEFAULT_R2V_POLISH_PROMPT) currently give the LLM only high-level instructions ("describe motion + camera"). This leaves quality to the model's defaults, which often produces vague adjectives ("beautiful / stunning / masterpiece") and stacked actions that cause limb deformation.This PR injects a set of directing heuristics into the prompts, so the LLM polishes every shot with concrete, model-friendly constraints.
What changed
All changes are in
src/apps/comic_gen/llm.py(3 default prompt strings, +29/-1). No call-site logic changed — these prompts were already designed to be overridable.1.
DEFAULT_STORYBOARD_POLISH_PROMPT(image)2.
DEFAULT_VIDEO_POLISH_PROMPT(video)3.
DEFAULT_R2V_POLISH_PROMPT(reference-to-video)Verification
Tested against a deliberately bad draft ("a beautiful girl stands up, walks to the window, turns, sits, stands again, gorgeous, masterpiece, cinematic"). The polished output now includes motion-amplitude words (slowly/gently) and body linkage ("head rotates smoothly, causing her hair to sway; shoulders dip and rise") — heuristics the old prompt never produced.
Notes
Happy to adjust wording or split into separate PRs if preferred.