astrbot_plugin_imagestudio/engines/character_flow.py

94 行
2.7 KiB
Python

"""Gradual character workflow templates."""
from __future__ import annotations
from typing import Any
CHARACTER_GRADUAL_STEPS: tuple[dict[str, Any], ...] = (
{
"node_key": "profile_brief",
"title": "Profile brief",
"step_name": "profile_brief",
"description": "Core identity, personality, and visual anchors.",
"sort_order": 10,
},
{
"node_key": "prompt_plan",
"title": "Prompt plan",
"step_name": "prompt_plan",
"description": "Prompt matrix for portrait, half body, full body, and design sheet nodes.",
"node_type": "planning",
"sort_order": 20,
},
{
"node_key": "material_bind",
"title": "Material binding",
"step_name": "material_bind",
"description": "Bind style, composition, clothing, shoes, and accessory references to downstream nodes.",
"node_type": "reference_binding",
"sort_order": 30,
},
{
"node_key": "headshot",
"title": "Headshot",
"step_name": "headshot",
"description": "Face, hair, eyes, and expression direction.",
"sort_order": 40,
},
{
"node_key": "half_body",
"title": "Half body",
"step_name": "half_body",
"description": "Upper body costume, posture, and silhouette.",
"sort_order": 50,
},
{
"node_key": "full_body",
"title": "Full body",
"step_name": "full_body",
"description": "Full outfit, proportions, and full-body design.",
"sort_order": 60,
},
{
"node_key": "expression_sheet",
"title": "Expression sheet",
"step_name": "expression_sheet",
"description": "Reusable expression variants.",
"sort_order": 70,
},
{
"node_key": "pose_sheet",
"title": "Pose sheet",
"step_name": "pose_sheet",
"description": "Reusable pose and action variants.",
"sort_order": 80,
},
{
"node_key": "style_lock",
"title": "Style lock",
"step_name": "style_lock",
"description": "Final style pass and prompt consistency lock.",
"sort_order": 90,
},
{
"node_key": "final_pack",
"title": "Final pack",
"step_name": "final_pack",
"description": "Final accepted images and production metadata.",
"sort_order": 100,
},
)
def gradual_node_templates() -> list[dict[str, Any]]:
return [
{
**step,
"node_type": step.get("node_type", "generation"),
"status": "draft",
"branch_name": "main",
"metadata": {"template": "character_gradual_v1"},
}
for step in CHARACTER_GRADUAL_STEPS
]