Source-linked AI summary

GenRouter: Unified Workflow Routing for Agentic Image Generation

Harold Haodong Chen, Zhiyu Hou, Wen-Jie Shu, Weilin Ruan, Yingjie Xu, Litao Guo, Ying-Cong Chen

arXiv:2608.16721v1cs.CV

TL;DR

Agentic image-generation workflows often use isolated, fixed pipelines that mismatch computational effort to prompt demands. GenRouter unifies workflow primitives and adaptively routes prompts, achieving superior visual alignment while reducing execution costs by over 95% and latency by 65% versus heavyweight static pipelines.

  • Problem

    Existing agentic image-generation frameworks use isolated, fixed workflows that impose one-size-fits-all computation on increasingly diverse prompts.

  • Method

    GenRouter standardizes agentic pipelines into GenCanvas primitives and templates, then routes prompts through profiling, experience matching, and cost-aware Pareto filtering.

  • Results

    Across diverse benchmarks, GenRouter achieves superior visual alignment while reducing execution costs by over 95% and latency by 65% versus heavyweight static pipelines.

  • Takeaways & Limitations

    Continuous experience distillation enables robust generalization across unseen domains while boosting performance and halving computational overhead.

  • Takeaways & Limitations

    GenCanvas’s primitive library theoretically supports arbitrary combinations, but unconstrained tool invocation requires additional workflow design.

Abstract

from arXiv · show

The rapid evolution of text-to-image (T2I) generation models has effectively solved the foundational challenge of raw pixel synthesis, shifting the community's focus toward fulfilling increasingly intricate user requests. While recent agentic image generation workflows enhance static inference with advanced capabilities like external knowledge retrieval and iterative reasoning, they mostly operate in isolated silos with fixed ``one-size-fits-all" topologies. This inevitably leads to severe compute-mismatch, where simple queries are forced through computationally heavy pipelines. To bridge this gap, we present GenRouter, the first unified workflow routing framework for agentic image generation. We first formulate GenCanvas, standardizing diverse agentic pipelines into a universal set of foundational primitives and executable templates. Operating over this unified space, GenRouter adaptively routes heterogeneous prompts to their optimal workflows via (i) demand profiling, (ii) experience matching, and (iii) Pareto filtering. Extensive experiments across diverse benchmarks demonstrate that GenRouter achieves superior visual alignment while reducing execution costs by over 95% and latency by 65% compared to heavyweight static pipelines. Furthermore, the system continuously self-evolves via accumulated experience, enabling robust zero-shot generalization that boosts performance and halves computational overhead.

1. Introduction

GenRouter addresses the compute mismatch of fixed agentic image-generation pipelines by unifying workflows in GenCanvas and dynamically routing heterogeneous prompts to suitable plans and generators. Experiments show improved visual alignment, substantially lower cost and latency, and continued gains through accumulated experience.

  • Motivation: Existing test-time refinement and rewriting strategies remain fragile for multi-constraint tasks, motivating agentic workflows with retrieval, reasoning, and skill invocation.The introduction frames heterogeneous user requests as exceeding what static inference can reliably handle.
  • GenCanvas: GenCanvas standardizes agentic image generation as reusable primitives composed into scalable workflow templates.Its primitives include search, reason, verify, and sketch, supporting light and more elaborate workflows.
  • GenRouter: GenRouter dynamically pairs prompts with workflow templates and backend image generators to mitigate compute mismatch.The router uses demand profiling, historical experience matching, and Pareto filtering to select plans with suitable utility and cost.
  • Empirical validation: Over 95% execution-cost reduction and 65% latency reduction are achieved versus heavyweight static pipelines such as GEMS, while visual alignment improves.These results come from dynamically routing prompts across GenCanvas.
  • Empirical validation: Continuous self-evolution through accumulated experience boosts performance and halves computational overhead.GenRouter refines routing precision through a continuous execution-distillation loop.

2. Related Work

Prior agentic image-generation methods evolved from lightweight prompt manipulation toward tool use, memory, orchestration, and iterative repair for complex requests. Existing routing largely selects models or scales static pipelines, whereas GenRouter routes across workflow templates and multimodal generators for heterogeneous requests.

  • Agentic Image Generation: Agentic image generation progressed from prompt expansion, chain-of-thought reasoning, and heuristic rewriting toward systems supporting intricate, multi-constraint tasks.Early integrations were effective for standard queries but struggled with complex requests.
  • Agentic Image Generation: Recent systems add explicit tool use, persistent memory, and orchestration, including multimodal retrieval, executable spatial code, structured skill commitments, and iterative repair.Examples include Gen-Searcher, Mind-Brush, GenClaw, GEMS, and SCOPE.
  • Agentic System Routing: Existing agent-routing frameworks use learning-based or experience-based paradigms, but prior work focuses predominantly on model-level selection, especially for language models.Learning-based routing trains predictive offline policies and can struggle with shifting task distributions.
  • Agentic System Routing: GenRouter introduces the first workflow-routing framework for agentic image generation, navigating a joint space of workflow templates and multimodal generators rather than only allocating backends.RouteT2I dispatches between edge and cloud generators but merely scales raw model capabilities within a static pipeline.

3. Preliminary

The preliminary formulation represents agentic image generation as executable plans built from foundational primitives, then defines workflow routing as selecting the best plan for each prompt. It frames fixed workflows as compute-mismatched constraints and positions GenCanvas and GenRouter as adaptive alternatives.

  • Formulation of Agentic Generation: Agentic image generation extends frozen-backend text-to-image inference with primitives such as search, reasoning, sketching, and verification.Standard generation maps a textual prompt x to an image y through a frozen backend g; agentic generation introduces the primitive space Π.
  • Objective of Workflow Routing: Workflow routing selects an optimal plan from the combinatorial repository P = W×G for each user prompt.The objective is to dynamically allocate the optimal plan according to overall utility.
  • Objective of Workflow Routing: The routing utility balances visual quality, execution cost, and latency through trade-off coefficients.The formulation denotes these factors by S, C, and L, respectively, with λ_c and λ_l regulating the trade-offs.
  • Limitations of Static Workflows: Existing agentic frameworks are static one-size-fits-all instantiations with |P| = 1, causing severe compute-mismatch across prompts.Examples include consistently enforcing a fixed search or reasoning trajectory for every prompt.
  • Adaptive Workflow Routing: GenCanvas structures the full plan space P, enabling GenRouter to route on-the-fly and invoke compute-intensive primitives only when prompt complexity requires them.This contrasts with static workflows whose decision space is artificially constrained to a single plan.

4. GenCanvas: A Unified Agentic Generation Workflow Space

GenCanvas unifies agentic image generation by decomposing generation into modular primitives and organizing their combinations into reliable workflow templates. Its modular implementation and standardized interfaces support extensible workflow construction and rigorous evaluation.

  • Primitive Library: GenCanvas standardizes complex generation as a library Π of atomic cognitive and operational primitives, including retrieval, reasoning, and spatial layout compilation.These primitives abstract underlying model mechanics and provide modular building blocks for diverse agentic workflows.
  • Workflow Templates: GenCanvas bounds execution as P = W × G by decoupling workflow topology from terminal generators and predefining reliable templates.This design addresses instability and redundant overhead from unconstrained primitive combinations.
  • Workflow Templates: The template space covers semantic alignment, external grounding, structural reasoning, and iterative refinement for progressively more demanding generation requirements.The nine structured templates include direct or rewritten generation, retrieval or reference grounding, reasoning or sketch planning, and verification-driven refinement.
  • Framework Infrastructure: GenCanvas formalizes diverse generative strategies into a robust standardized infrastructure, with configurations detailed in Appendix §A.The framework is also described as an extensible open-source codebase for constructing and evaluating agentic image-generation workflows.
  • Evaluation: Standardized input-output interfaces let GenCanvas evaluate mainstream suites and downstream benchmarks while tracking execution latency and token consumption.Supported examples include GenEval, DPG-Bench, WISE, LongText-Bench, SpatialGenEval, and ArtiMuse.

5. GenRouter: A Self-Evolving Agentic Image Workflow Router

GenRouter adaptively selects workflow-generator plans by profiling prompt demands, matching candidates to execution experience, and Pareto-filtering quality, cost, and latency trade-offs. Its dual-memory architecture enables self-evolving routing from signature-based priors to empirical deployment feedback.

  • Routing objective: GenRouter routes each prompt to a workflow-generator plan p=(w,g), balancing visual quality against computational efficiency while avoiding fixed-pipeline compute mismatch.Candidate plans are evaluated under modular, fixed auxiliary backends within each routing configuration.
  • Demand profiling: A lightweight profiler extracts a seven-dimensional intent signature covering semantic, factual, reference, logical, compositional, critique, and layout demands.Each axis takes a value from 0 to 5, with scores ≥3 marking high-need thresholds.
  • Candidate construction: Capability compatibility and signature gating prune invalid or unnecessarily heavy workflows, activating advanced templates only when prompt demands justify them.For example, a workflow requiring visual conditioning is invalid without that capability, while heavyweight templates are gated by z(x).
  • Experience matching: GenRouter combines trajectory memory from exact-plan historical executions with route memory’s bucket-level statistics, then confidence-weights these estimates for quality, cost, and latency.When empirical records are unavailable, deterministic threshold priors derived from the task signature provide cold-start routing.
  • Pareto filtering: Pareto filtering removes plans dominated across quality, cost, and latency dimensions before selecting the highest-utility non-dominated plan.This prevents scalarized utility from selecting strictly inferior configurations because of linear weighting artifacts.
  • Self-evolution: Demand profiling, memory-guided matching, and Pareto filtering form a self-evolving loop that refines routing from initial priors using realized deployment outcomes.The system accumulates empirical records and adapts without manual retraining.

6. Experiments

GenRouter is evaluated against unified static baselines across mainstream and downstream benchmarks using performance, exact token/API cost, and end-to-end latency. Results show stronger visual alignment with substantially lower overhead, demand-sensitive workflow selection, and self-evolution through accumulated experience.

  • Evaluation setup: Experiments benchmark GenRouter against direct generators and Mind-Brush, SCOPE, and GEMS while unifying their underlying LLM/MLLM engines.The evaluation spans WISE, DPG-Bench, OneIG-Bench, GenEval2, LongText, SpatialGenEval, and ArtiMuse, measuring benchmark performance, exact token/API consumption, and end-to-end latency.
  • RQ1: Quality–cost–latency trade-off: 71.3% performance is achieved while execution cost falls by over 95% ($2.97 vs. $59.70) and latency by 65% (4.68h vs. 13.62h) versus GEMS.The comparison uses average results across five benchmarks and reports GenRouter as outperforming static pipelines while requiring a fraction of their computational overhead.
  • RQ1: Quality–cost–latency trade-off: Dynamic routing mitigates visual failure modes by dispatching task-specific templates, including wSketchGen for multi-object layouts and wSkillGen for text rendering.Static pipelines may under-reason on complex spatial constraints or over-complicate simple queries; the combined framework also shows versatility across artistic styles, long-tail entities, and intricate semantic demands.
  • RQ2: Routing behavior: 68.83% of DPG-Bench routes use wRewriteGen and 21.03% use wSkillGen, whereas OneIG prompts more often trigger demanding wHybridGen and wReasonGen templates.The reported OneIG routing shares are 18.93% and 10.61% for wHybridGen, and 28.48% for wReasonGen on OneIG-CN, linking routing distributions to heterogeneous task demands.
  • RQ3: Self-evolution and generalization: 73.5 to 75.2 performance follows accumulation from three benchmarks, while cost and latency drop by 8… on the unseen mixed set.The study also evaluates zero-shot transfer to DPG-Bench using experience distilled solely from WISE; the passages attribute generalization to dual-memory routing priors without manual retraining.

7. Conclusion

GenRouter is presented as a unified workflow-routing framework for agentic image generation, supported by GenCanvas, a standardized infrastructure of generative primitives and modular templates. It dynamically assigns heterogeneous prompts to optimal execution trajectories, addressing system fragmentation and compute-mismatch in fixed one-size-fits-all pipelines.

  • Framework: GenRouter is introduced as the first unified workflow routing framework for agentic image generation.The framework is presented alongside GenCanvas.
  • Framework: GenCanvas standardizes generative primitives and modular templates as infrastructure for the framework.
  • Routing: Dynamic assignment of heterogeneous prompts to optimal execution trajectories mitigates system fragmentation and compute-mismatch in one-size-fits-all agentic pipelines.

A. GenCanvas Implementation … A.4. Showcase

GenCanvas unifies agentic image-generation workflows through standardized, observable primitives and modular executable topologies. Its backend-agnostic architecture supports extensible evaluation and routing, while demonstrations show how different workflows and dispatched primitives address complex generative intents.

  • A.1. Formal Definition of Primitives: GenCanvas represents workflows as directed compositions of primitives with unified traces logging backends, tokens, monetary cost, and latency under strict JSON contracts.These interfaces decouple execution logic from underlying LLMs/MLLMs and make operations observable and trackable.
  • A.1. Formal Definition of Primitives: Its primitives decompose prompts, resolve unknowns through search and reasoning, retrieve skills, construct sketches, verify outputs, and refine or rewrite prompts.Verification compares generated images with decomposition-derived checklists, while refinement targets failed requirements and preserves passed ones.
  • A.2. Topological Configurations of Workflow: GenCanvas implements modular Python workflow classes that compose primitives into directed topologies independently of generator backends.This modularity supports reliable decomposition of complex cognitive tasks into manageable, constrained atomic operations.
  • A.2. Topological Configurations of Workflow: Iterative Refinement invokes decomposition and rewriting, then repeatedly generates, verifies, and refines outputs within a predefined max_iter loop.Failed constraints trigger updates based on attempt history and verification feedback.
  • A.2. Topological Configurations of Workflow: Structural Reasoning separates deterministic spatial-layout construction through executable sketches from subsequent photorealistic synthesis focused on style, texture, lighting, and realism.The rendered sketch serves as a strict structural reference for the image generator.
  • A.3. Extensibility and Architecture: GenCanvas supports rapid prototyping by allowing new primitives, topologies, and backends, while abstract protocols and a Registry pattern enable provider swaps without changing workflow logic.Concrete models are configured through YAML, and primitives interact with standardized interfaces such as LLMBackend and GeneratorBackend.
  • A.3. Extensibility and Architecture: Its evaluation scaffold aggregates PrimitiveTrace records into unified workflow outputs containing quality score, monetary cost, and end-to-end latency.Each primitive logs token usage, API pricing, and execution latency for standardized accounting across workflows.
  • A.4. Showcase: Workflow demonstrations show that increasing cognitive intervention can substantially change final-image structure, factual accuracy, and semantic alignment, while case studies trace GenRouter’s primitive dispatch.Examples include factual retrieval via πsearch, structural code rendering via πsketch, and iterative constraint enforcement via πverify.

B. GenRouter Implementation … C. Experimental Details

GenRouter initializes empirical dual-memory baselines through exhaustive cold-start exploration, batched evaluation, and periodic Pareto-based memory distillation. It profiles prompts with a lightweight LLM into seven task dimensions and summarizes routing in Algorithm 1.

  • B.1. Cold Start and Experience Distillation: GenRouter uses a cold-start phase, isolated from evaluation, to construct empirical baselines for its dual-memory system.The initialization bridges deterministic priors and environment-specific performance.
  • B.1. Cold Start and Experience Distillation: N=10 diverse calibration prompts seed exhaustive execution of every valid workflow-generator candidate for unbiased trajectory collection.A demand profiler first extracts each prompt’s task signature to construct compatible candidate plans.
  • B.1. Cold Start and Experience Distillation: Every 50 executions, accumulated outputs are evaluated with official benchmark metrics and combined with token consumption C and execution time L into scalarized utility.The targeted scorer backends include WISE [20] and DPG-Bench [16].
  • B.1. Cold Start and Experience Distillation: Every 50 records, evaluated prompt-plan outcomes enter trajectory memory M_traj while distilled task-bucket statistics update route memory M_route and recalculate Pareto-optimal plans.Updated aggregates include mean score, cost, and latency.
  • B.1. Cold Start and Experience Distillation: The evaluation-distillation loop runs during both cold start and online deployment, enabling GenRouter to autonomously self-evolve.This continuous loop maintains the system’s evolving experience memories.
  • B.2. More Details of Demand Profiling: A lightweight Qwen3.5-4B [36] demand profiler maps each incoming prompt into a 7-dimensional task signature z(x).The profiler analyzes the prompt, explains its scoring rationale, and outputs the signature as JSON.
  • B.2. More Details of Demand Profiling: The JSON signature assigns numeric scores from 0 through 5 to semantic articulation, factual grounding, visual referencing, logical deduction, compositional heuristics, evaluative critique, and spatial layout.Each field requires a concise explanation grounded in the user prompt.
  • B.3. Algorithm Workflow: Algorithm 1 summarizes GenRouter’s overall dynamic routing workflow.The provided passage identifies the algorithm as the paper’s workflow summary.

C.1. Evaluation Details … D.2. Component Ablation of GenRouter

The evaluation standardizes routing overhead measurements and tests GenRouter across heterogeneous prompts and workflow baselines. Ablations show that bounded templates and all three routing components are necessary for stable, efficient performance.

  • C.1. Evaluation Details: Evaluation measures benchmark performance, routing-and-primitive execution cost, and latency, excluding image-generator computation.The excluded overhead includes LLM reasoning and search APIs.
  • C.1. Evaluation Details: The mixed test set aggregates prompts from nine benchmark distributions to broaden coverage of primitive demands and generative scenarios.Heterogeneous datasets use distinct scoring scales and emphasize different generative capabilities.
  • C.2. Baseline Details: All baseline workflows use the Kimi K2.5 LLM/MLLM backbone, eliminating performance variation from proprietary backbones.Kimi K2.5 is the default backbone in GEMS.
  • C.2. Baseline Details: GEMS, SCOPE, and Mind-Brush represent iterative refinement, specification-guided orchestration, and external-grounding workflows within GenCanvas templates.Their mappings are respectively wVerifyGen/wSkillGen, wHybridGen, and wSearchGen/wRefGen.
  • D.1. Workflow vs. Primitive Routing: Primitive Routing achieves 65.00 performance with $2.03 cost and 2.91h latency, versus GenRouter’s 73.52 performance.Unconstrained access to raw primitives causes execution instability and redundant tool invocations.
  • D.2. Component Ablation of GenRouter: Removing Demand Profiling lowers performance to 72.54, while disabling Utility Matching raises cost to $5.33 and latency to 7.13h.The ablations support explicit cognitive-signature extraction and empirical-memory matching.

D.3. Utility Analysis · D.4. Dual-Memory Experience Analysis · E. Exhibition Board

GenRouter’s utility analysis identifies λc=5.0 and λl=0.0006 as effective defaults for balancing quality, cost, and latency. Dual-memory ablations show that both trajectory and route memories improve performance, while exhibition figures provide additional GenCanvas demonstrations.

  • D.3. Utility Analysis: Increasing λc from 1.0 to 5.0 reduces execution cost from 1.56 to 1.37 with negligible visual-performance change from 73.56 to 73.52.The λc=10.0 setting degrades performance to 73.00 with diminishing cost-savings returns.
  • D.3. Utility Analysis: λc=5.0 is adopted as the default because it maintains high generation quality while bounding API expenses.An overly aggressive λc=10.0 forces overly simplistic workflows.
  • D.3. Utility Analysis: λl=0.0003 produces lower performance of 73.26 and higher execution overhead, whereas λl=0.0006 achieves the best Pareto-optimal balance.Increasing λl to 0.0010 marginally reduces latency from 1.76 to 1.74 hours but slightly compromises performance.
  • D.4. Dual-Memory Experience Analysis: Ablating Mtraj and Mroute on the mixed test set quantitatively evaluates the dual-memory matching mechanism.The results are reported in Table 6.
  • D.4. Dual-Memory Experience Analysis: Compared with the static generator’s baseline performance of 62.51, Mtraj-only retrieval raises performance to 72.18 at cost 1.29 and latency 1.71h.The static generator has zero additional framework cost and latency.
  • D.4. Dual-Memory Experience Analysis: Mroute-only achieves performance 72.15 at cost 1.13 and latency 1.57h, while full GenRouter reaches the highest performance of 73.52.The route memory provides a computationally efficient prior by smoothing noisy execution traces.
  • E. Exhibition Board: Figures 13 and 14 provide additional comparison results demonstrating GenRouter within GenCanvas.These figures constitute the exhibition-board results for the framework.
Loading 2608.16721v1…