OmniHarness: Harnessing Generalizable Visual Generation via Symbolic Policy Learning
Organizations: Beihang University · The Chinese University of Hong Kong · National University of Singapore
Abstract
Unified multimodal large language models (MLLMs) and multi-agent systems have advanced visual generation. However, three limitations remain. (1) Existing methods often distill task-specific experience with limited generalizability. (2) Reflection is often deferred until task completion. (3) Knowledge is often acquired only in response to downstream task demands. To address these limitations, we introduce OmniHarness, a framework for generalizable visual generation via symbolic policy learning. OmniHarness abstracts verified executions into symbolic policies for visual generation task families, capturing shared procedures and applicability conditions while removing instance-specific inputs. The harness instantiates, adapts, and composes these policies for new tasks. Intermediate verification guides refinement and failure recovery during execution. Through self-directed inquiry, OmniHarness autonomously generates and executes practice tasks near its capability limits before downstream objectives are specified. Execution feedback continually refines the policies while model parameters remain fixed. Experiments across six benchmarks, three MLLM backbones, and three visual agent frameworks demonstrate strong performance and continual capability expansion. On ComfyBench's Creative tasks, OmniHarness achieves a 95.0% resolve rate, exceeding the strongest baseline by 27.5 percentage points. Frozen policy snapshots improve existing visual agent systems through plug-and-play reuse.
Figures & tables
| Agent | Vanilla | Complex | Creative | Total | ||||
|---|---|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | Pass | Res. | |
| GPT-4o + Zero-shot | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| GPT-4o + Few-shot [ 3 ] | 32.0 32.0 | 27.0 27.0 | 16.7 16.7 | 8.3 8.3 | 7.5 7.5 | 0.0 0.0 | 22.5 22.5 | 16.0 16.0 |
| GPT-4o + CoT [ 53 ] | 44.0 44.0 | 29.0 29.0 | 11.7 11.7 | 8.3 8.3 | 12.5 12.5 | 0.0 0.0 | 28.0 28.0 | 17.0 17.0 |
| GPT-4o + CoT-SC [ 51 ] | 45.0 45.0 | 34.0 34.0 | 11.7 11.7 | 5.0 5.0 | 15.0 15.0 | 0.0 0.0 | 29.0 29.0 | 18.5 18.5 |
| Claude-3.5-Sonnet + RAG [ 29 ] | 27.0 27.0 | 13.0 13.0 | 23.0 23.0 | 6.7 6.7 | 7.5 7.5 | 0.0 0.0 | 22.0 22.0 | 8.5 8.5 |
| Method | Single Obj. | Two Obj. | Counting | Colors | Position | Attr. Bind. | Overall |
|---|---|---|---|---|---|---|---|
| Frozen Text-Encoder Mapping Methods | |||||||
| SDv1.5 [ 45 ] | 0.97 | 0.38 | 0.35 | 0.76 | 0.04 | 0.06 | 0.43 |
| SDv2.1 [ 45 ] | 0.98 0.01 | 0.51 0.13 | 0.44 0.09 | 0.85 0.09 | 0.07 0.03 | 0.17 0.11 | 0.50 0.07 |
| SD-XL [ 43 ] | 0.98 0.01 | 0.74 0.36 | 0.39 0.04 | 0.85 0.09 | 0.15 0.11 | 0.23 0.17 | 0.55 0.12 |
| DALL-E 2 [ 44 ] | 0.94 0.03 | 0.66 0.28 | 0.49 0.14 | 0.77 0.01 | 0.10 0.06 | 0.19 0.13 | 0.52 0.09 |
| SD3-Medium [ 12 ] | 0.99 0.02 | 0.94 0.56 | 0.72 0.37 | 0.89 0.13 | 0.33 0.29 | 0.60 0.54 | 0.74 0.31 |
| Method | Object | Attribute | Count | Position | Verb | Overall |
|---|---|---|---|---|---|---|
| Stable Diffusion Model Series | ||||||
| SD 2.1 [ 45 ] | 55.1 | 30.4 | 22.3 | 11.7 | 17.8 | 27.46 |
| SDXL [ 43 ] | 74.1 19.0 | 42.4 12.0 | 28.7 6.4 | 16.0 4.3 | 28.9 11.1 | 38.02 10.56 |
| SD3 [ 12 ] | 87.0 31.9 | 65.5 35.1 | 49.9 27.6 | 41.0 29.3 | 46.7 28.9 | 58.02 30.56 |
| SD3.5-Large [ 12 ] | 91.6 36.5 | 70.3 39.9 | 52.2 29.9 | 39.5 27.8 | 55.6 37.8 | 61.84 34.38 |
| State-of-the-Art Text-to-Image Models | ||||||
| Method | Cultural | Time | Space | Biology | Physics | Chemistry | Overall |
|---|---|---|---|---|---|---|---|
| Dedicated T2I Models | |||||||
| SDv1.5 [ 45 ] | 0.34 | 0.35 | 0.32 | 0.28 | 0.29 | 0.21 | 0.32 |
| SDv2.1 [ 45 ] | 0.30 0.04 | 0.38 0.03 | 0.35 0.03 | 0.33 0.05 | 0.34 0.05 | 0.21 0.00 | 0.32 0.00 |
| SD-XL [ 43 ] | 0.43 0.09 | 0.48 0.13 | 0.47 0.15 | 0.44 0.16 | 0.45 0.16 | 0.27 0.06 | 0.43 0.11 |
| SD3-Medium [ 12 ] | 0.42 0.08 | 0.44 0.09 | 0.48 0.16 | 0.39 0.11 | 0.47 0.18 | 0.29 0.08 | 0.42 0.10 |
| SD3.5-Medium [ 12 ] | 0.43 0.09 | 0.50 0.15 | 0.52 0.20 | 0.41 0.13 | 0.53 0.24 | 0.33 0.12 | 0.45 0.13 |
| Method | Understanding Scenarios | Reasoning Scenarios | ||||||
|---|---|---|---|---|---|---|---|---|
| PSNR | SSIM | LPIPS | CLIP | PSNR | SSIM | LPIPS | CLIP | |
| InstructPix2Pix [ 2 ] | 21.58 | 0.72 | 0.09 | 22.76 | 24.23 | 0.71 | 0.08 | 19.41 |
| MagicBrush [ 70 ] | 18.12 3.46 | 0.68 0.04 | 0.14 0.05 | 22.62 0.14 | 22.10 2.13 | 0.69 0.01 | 0.11 0.03 | 19.76 0.34 |
| InstructDiffusion [ 16 ] | 23.26 1.68 | 0.74 0.02 | 0.07 0.02 | 23.08 0.32 | 21.45 2.78 | 0.67 0.04 | 0.12 0.03 | 19.52 0.11 |
| SmartEdit-7B [ 23 ] | 22.05 0.47 | 0.73 0.01 | 0.09 0.00 | 23.61 0.85 | 25.26 1.02 | 0.74 0.04 | 0.06 0.03 | 20.95 1.54 |
| SmartEdit-13B [ 23 ] | 23.60 2.02 | 0.75 0.03 | 0.07 0.02 | 23.54 0.77 | 25.76 1.52 | 0.75 0.04 | 0.05 0.03 | 20.78 1.36 |
| Agent | Vanilla | Complex | Creative | Total | ||||
|---|---|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | Pass | Res. | |
| w/o Self-Directed Inquiry | 100.0 0.0 | 96.0 1.0 | 100.0 0.0 | 81.7 1.6 | 100.0 0.0 | 72.5 22.5 | 100.0 0.0 | 87.0 5.5 |
| w/o Online Policy Updates | 100.0 0.0 | 96.0 1.0 | 100.0 0.0 | 76.7 6.6 | 100.0 0.0 | 87.5 7.5 | 100.0 0.0 | 88.5 4.0 |
| OmniHarness | 100.0 | 97.0 | 100.0 | 83.3 | 100.0 | 95.0 | 100.0 | 92.5 |
| Agent | Creative T2I | Creative I2I | Creative Total | |||
|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | |
| w/o Capability Novelty | 100.0 0.0 | 66.7 16.6 | 100.0 0.0 | 86.7 6.6 | 100.0 0.0 | 87.5 7.5 |
| w/o Competence Frontier | 100.0 0.0 | 83.3 0.0 | 100.0 0.0 | 80.0 13.3 | 100.0 0.0 | 85.0 10.0 |
| OmniHarness | 100.0 | 83.3 | 100.0 | 93.3 | 100.0 | 95.0 |
| Agent | Complex T2I | Complex I2I | Complex Total | |||
|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | |
| w/o Planning | 80.0 20.0 | 40.0 50.0 | 87.0 13.0 | 56.5 34.8 | 86.7 13.3 | 55.0 28.3 |
| w/o Intermediate Verification | 70.0 30.0 | 60.0 30.0 | 73.9 26.1 | 69.6 21.7 | 75.0 25.0 | 68.3 15.0 |
| w/o Localized Recovery | 90.0 10.0 | 80.0 10.0 | 95.7 4.3 | 82.6 8.7 | 93.3 6.7 | 76.7 6.6 |
| OmniHarness | 100.0 | 90.0 | 100.0 | 91.3 | 100.0 | 83.3 |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| Modality | Capability Category | Description |
|---|---|---|
| Text-to-Image (T2I) | Photorealistic Generation | Generates realistic people, animals, objects, and indoor and outdoor scenes. |
| Futuristic & Fantasy Generation | Generates science-fiction, futuristic, and fantasy scenes, objects, and concepts. | |
| Illustration & Comic Generation | Generates illustrations, cartoons, comics, and multi-panel visual narratives. | |
| Poster & Graphic Design | Generates posters, covers, advertisements, and other graphic compositions with specified layouts. | |
| In-Image Text Generation | Renders specified text with correct content, legibility, appearance, and placement. | |
| Position-Constrained Generation | Places objects or visual elements in specified image regions or locations. |
| Field | Description |
|---|---|
| Modality | Specifies whether the workflow supports T2I or I2I generation. |
| Capability Categories | Records the capabilities in supported by the workflow. |
| Workflow Template | Stores a reusable ComfyUI graph with node types, shared parameters, connections, and execution settings. Instance-specific inputs are removed and supplied when the policy is instantiated for a new task. |
| Workflow Name | Provides a unique identifier for indexing, retrieval, and invocation. |
| Workflow Description | Summarizes the shared procedure and the task family it supports. |
| Preconditions | Specifies required input modalities, image properties, task conditions, available models, and execution resources. |
| Entry Type | Field | Description |
|---|---|---|
| Execution Failure Record | Task | Stores the description , modality , required capabilities , and source image when applicable. |
| Failure Context | Records the input conditions and generation constraints under which the failure occurred. | |
| Failed Workflow | Stores the failed task’s ComfyUI workflow, including nodes, parameters, connections, and execution settings. | |
| Failure Evidence | Preserves execution status, intermediate and final outputs, source images when applicable, execution feedback, and verifier results. | |
| Corrective Strategies | Root Cause | Identifies the workflow or generation factor responsible for the failure. |
| Workflow Antipattern | Describes workflow structures, node configurations, parameter settings, or generation strategies to avoid. |
| Field | Description |
|---|---|
| Modality Coverage | Counts stored T2I and I2I workflows to identify imbalances in modality coverage. |
| Capability Coverage | Counts workflows associated with each capability in to identify gaps in workflow coverage. |
| Reliability Distribution | Counts Provisional , Validated , and Suspended workflows in . |
| Source Image Pool | Contains all original ComfyBench images for I2I practice. Video inputs are excluded. |
| Source Image Metadata | Records image file names, resolutions, and formats to support image selection and task generation. |
| Agent | Vanilla | Complex | Creative | Total | ||||
| Pass | Res. | Pass | Res. | Pass | Res. | Pass | Res. | |
| GPT-4o + ComfyAgent [ 65 ] | 67.0 | 46.0 | 48.3 | 21.7 | 40.0 | 15.0 | 56.0 | 32.5 |
| GPT-4o + ComfyMind [ 18 ] | 100.0 | 92.0 | 100.0 | 85.0 | 100.0 | 57.5 | 100.0 | 83.0 |
| Gemini-2.5-Flash + SymbOmni [ 37 ] | 100.0 | 95.0 | 100.0 | 83.3 | 100.0 | 67.5 | 100.0 | 86.0 |
| Gemini-2.5-Flash + OmniHarness | 100.0 | 96.0 | 100.0 | 81.7 | 100.0 | 87.5 | 100.0 | 90.0 |
| GPT-4o + OmniHarness | 100.0 | 95.0 | 100.0 | 76.7 | 100.0 | 95.0 | 100.0 | 89.5 |
| Agent | Vanilla | Complex | Creative | Total | ||||
|---|---|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | Pass | Res. | |
| OmniHarness with | 100.0 | 97.0 | 100.0 | 83.3 | 100.0 | 95.0 | 100.0 | 92.5 |
| OmniHarness with | 100.0 | 97.0 | 100.0 | 83.3 | 100.0 | 90.0 | 100.0 | 91.5 |
| Method | Factual | Conceptual | Procedural | Overall |
|---|---|---|---|---|
| Closed-Source Models | ||||
| GPT-Image-1 | 79.80 | 81.37 | 78.32 | 80.09 |
| Gemini 2.0 Flash Experimental | 65.26 | 59.65 | 62.90 | 62.41 |
| Doubao | 63.30 | 62.23 | 54.17 | 60.70 |
| Open-Source Models | ||||
| BAGEL-Think [ 10 ] | 55.77 | 59.44 | 39.26 | 53.36 |
| Agent | Vanilla | Complex | Creative | Total | ||||
|---|---|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | Pass | Res. | |
| ComfyAgent [ 65 ] | 67.0 | 46.0 | 48.3 | 21.7 | 40.0 | 15.0 | 56.0 | 32.5 |
| ComfyMind [ 18 ] | 100.0 | 92.0 | 100.0 | 85.0 | 100.0 | 57.5 | 100.0 | 83.0 |
| SymbOmni [ 37 ] | 100.0 | 95.0 | 100.0 | 83.3 | 100.0 | 67.5 | 100.0 | 86.0 |
| ComfyAgent [ 65 ] + | 87.0 | 69.0 | 73.3 | 46.7 | 67.5 | 42.5 | 79.0 | 57.0 |
| ComfyMind [ 18 ] + | 100.0 | 94.0 | 100.0 | 86.7 | 100.0 | 75.0 | 100.0 | 88.0 |
| Agent | T2V | I2V | V2V | Total | ||||
|---|---|---|---|---|---|---|---|---|
| Pass | Res. | Pass | Res. | Pass | Res. | Pass | Res. | |
| GPT-4o + ComfyAgent [ 65 ] | 68.4 | 47.4 | 48.0 | 20.0 | 40.0 | 13.3 | 56.4 | 32.1 |
| GPT-4o + ComfyMind [ 18 ] | 100.0 | 71.1 | 100.0 | 76.0 | 100.0 | 53.3 | 100.0 | 69.2 |
| Gemini-2.5-Flash + SymbOmni [ 37 ] | 100.0 | 81.6 | 100.0 | 88.0 | 100.0 | 66.7 | 100.0 | 80.8 |
| GPT-4o + OmniHarness | 100.0 | 84.2 | 100.0 | 92.0 | 100.0 | 80.0 | 100.0 | 85.9 |
LLM Agent Harnesses
LLM agent harnesses are the software and runtime systems that organize an agent’s tools, context, state, execution, and safeguards.
See all 389 papers