INNER CODE UNIT · Python
paths
ChenShuo2004/cs-board · webapp/server.py:418
paths = [PAPER_METAPHOR_REFERENCE_DIR / filename for filename in filenames]
paths = [path for path in paths if valid_image_file(path)][:3]
if not paths:
raise RuntimeError("纸感隐喻拼贴风的本地参考图缺失")
instruction = (
f"这些输入图仅作为纸艺视觉语言与“{structure}”构图参考,不提供人物身份或具体故事。"
"只迁移纸纤维、撕边、叠层阴影、配色、构图密度与情绪表达;禁止照搬参考图中的人物、商品、文字、符号和场景组合。"
f"本图统一使用“{structure}”作为唯一主结构,先用一个具体主隐喻表达观点,不做逐句图标化。"
)
return paths, instruction
OIL_VISUAL_STYLE = "漫画墨线解释风"
OIL_VISUAL_REFERENCE_DIR = ROOT / "assets" / "style-references" / "oil-visual"
def oil_visual_reference_context(scenes: list[dict[str, Any]], infographic: bool = False) -> tuple[list[Path], str]:
scene = scenes[0] if scenes else {}