arXiv:2609.31451cs.MMSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.31451

TemplateCraft: Agentic Visual Template Generation

Hongjie Yu, Zhiyuan Fan, Yuzhe Zhang, Jiangcun Du, Zhicheng Gao, Yuhong Zhang, Xiaokai Zhan, Zongshi Xie

ABSTRACT

The growing popularity of short videos has driven demand for one-click content creation. Visual templates turn uploaded images into personalized content with preset effects, but reusable template generation still requires substantial manual effort in asset preparation and tool orchestration. We propose TemplateCraft, a multi-agent system that converts natural-language instructions into client-executable templates through planning, material generation, effect-workflow generation, and protocol compilation. Its Planner-Evaluator loop uses execution feedback for targeted rollback, while stage-level and long-term memory support revision without parameter updates. We evaluate TemplateCraft on TemplateBench 1^{1}, derived from 60 real-world templates. With the same Qwen3-VL backbone, TemplateCraft raises image/video generation success rates from 56.7%/30.0% to 66.7%/50.0% over Planner-only (best-of-three) and improves template adherence and style consistency. With additional evaluation and revision, it matches or exceeds a GPT-4o Planner-only baseline on selected metrics. Persistent assets further improve cross-input style consistency.

Index Terms— Visual template generation, Multi-agent systems, Generative media

1. INTRODUCTION

A portrait-restyling template can be reused by many users: each user uploads a photograph, and the template applies a predefined clothing style and scene through a fixed sequence of transformations to produce personalized content. We refer to such a reusable workflow as a visual template. It encapsulates the creative decisions and production operations, reducing the burden of tool selection and workflow orchestration on users. Creating such templates, however, still requires designers to devise effects, prepare assets, and repeatedly refine the pipeline. New themes and styles often demand new templates, leaving the conversion of creative ideas into deployable templates heavily dependent on manual effort.

Large language model agents provide a foundation for automating this process. Toolformer [1], ReAct [2], and ToolLLM [3] study tool-use learning, interleaved reasoning and acting through environment interaction, and large-scale API learning and invocation, respectively. HuggingGPT [4] and Visual ChatGPT [5] extend tool orchestration to multimodal tasks, while ComfyGPT [6], ComfyUI-R1 [7], and ComfyUI-Copilot [8] further support workflow generation. In cinematic production, FilmAgent [9] and MovieAgent [10] coordinate scriptwriting, storyboarding, and multi-shot generation through role specialization. Related studies also address animation generation, human–AI collaboration during pre-production, and feedback-guided editing [11, 12, 13].

Although these studies support content generation and workflow orchestration, they primarily target one-off content generation and conventional video production. To the best of our knowledge, reusable visual-template generation remains underexplored. Turning a generated workflow into a deployable template further requires defining replaceable user inputs, binding persistent assets, and connecting both to the appropriate generation steps. A single successful execution is also insufficient to establish how well a workflow can be reused after its inputs are replaced. We therefore study how to generate complete visual templates from natural-language instructions, so that different users can execute the same workflow while preserving the intended creative effect. This task requires a model to coordinate input constraints and dependencies across steps while detecting outputs that fail to meet the requirements despite successful execution. For example, a portrait-restyling result may exhibit the target aesthetic while failing to preserve the input subject. Synchromesh [14] reduces program-generation errors through syntactic and semantic constraints, whereas template generation additionally requires assessing intermediate artifacts and visual outputs and identifying where revision should occur.

To address this problem, we propose TemplateCraft, which decomposes template generation into four stages: template planning, material generation, effect-workflow generation, and protocol compilation. The first three stages are governed by a Planner–Evaluator loop. The Planner generates specifications and workflows from the creative instruction, category skills, and tool constraints, and an executor invokes the selected tools. The Evaluator diagnoses problems from execution feedback and candidate outputs and directs the system to the earliest stage requiring revision. The revised template is then compiled and packaged, and users replace only the designated inputs at deployment. Inspired by Reflexion [15], which uses feedback and experiential memory to guide subsequent attempts, TemplateCraft employs stage memory for targeted revision of the current task and long-term memory to store diagnostic knowledge for reuse across tasks, without updating model parameters.

To evaluate template reuse across inputs, we construct TemplateBench from production templates in KwaiCut 2^{2}. It contains 30 image-template and 30 video-template tasks, each with a creative instruction, scoring rules, and five test input sets. Our experiments evaluate TemplateCraft's effectiveness in template generation and reuse and analyze the roles of feedback-driven revision, long-term memory, and shared persistent assets.

Our main contributions are as follows:

  1. We formulate reusable visual-template generation and establish a four-stage pipeline from natural-language creative briefs to client-executable templates.

1^{1}The benchmark will be released upon acceptance: https://github.com/Xiaoyu-Fish-hub/TemplateBench.

2^{2}Kwai's official video editing tool.

  1. We propose a Planner–Evaluator system that uses execution feedback and memory for stage-specific rollback, revision, and cross-task experience reuse.

  2. We construct TemplateBench, a benchmark for reusable visual-template generation, and validate the system through comparative experiments, analyzing the roles of iterative revision and shared persistent assets.

References (26)