Nemotron-Labs-VisualCreation: Pixel as Code for Agentic Visual Creation

媒体报道 Hugging Face Papers 原文语言:中文

NVIDIA 发布 Nemotron‑Labs‑VisualCreation 框架,采用 Pixel as Code 将离散视觉令牌与结构化代码结合,实现高效图像生成与可编辑文档,性能在多项基准上接…

全文

Nemotron-Labs-VisualCreation: Pixel as Code for Agentic Visual Creation

NVIDIA

Abstract

Visual creation demands expressive imagery together with precise control over text, layout, and structure. We introduce Nemotron-Labs-VisualCreation, an agentic framework that connects these capabilities through Pixel as Code. Raster images are represented by learned discrete visual tokens, while structured artifacts use explicit programs. A shared generation-and-rendering interface connects these representations to visual feedback across images, vector graphics, webpages, and documents. A Nemotron-native harness coordinates planning and raster candidate selection, with targeted repair for editable structured and hybrid artifacts. To support this interface, we develop Nemotron-Labs-Image-Tokenizer, the autoregressive raster generator Nemotron-Labs-Image-30B-A3B, and the structured-code model family Nemotron-Labs-VisionCode. On approximately 178K images spanning six visual domains, our tokenizer improves reconstruction PSNR from 26.08 to 29.57 dB over Emu3.5 IBQ. It also provides 7.13×7.13\times faster encoding and 10.93×10.93\times faster decoding at batch size one on A100. In standalone evaluation, one Nemotron-Labs-VisionCode variant surpasses Kimi K3.1 Pro on the aggregate across Chart2Code, MMSVG, Design2Code, and Image2Struct. At the system level, the Nemotron-native configuration raises GenEval2 Soft-TIFA GM from 31.71 to 52.56 using the same raster generator. With our best setting, Nemotron-Labs-VisualCreation achieves performance competitive with GPT Image 2 and Nano Banana Pro across most benchmarks with available comparisons.

https://huggingface.co/nvidia/Nemotron-Labs-Image-30B-A3B

\abscontent

Figure 1: Pixel as Code at a glance. Learned visual tokens and explicit programs provide complementary representations for raster images and editable structured artifacts. Their renderers connect both representations to visual outputs that agents can inspect. Hybrid artifacts combine raster assets with structured layouts. Representations are schematic; thumbnails show representative system outputs. Figure 5 details the route-specific generation, selection, and repair workflows.

Figure 2: Raster image generation examples from Nemotron-Labs-VisualCreation. The examples span illustrated infographics, text-rich compositions, portraits, stylized typography, and product imagery, illustrating diverse visual styles and content requirements.
Figure 2: Raster image generation examples from Nemotron-Labs-VisualCreation. The examples span illustrated infographics, text-rich compositions, portraits, stylized typography, and product imagery, illustrating diverse visual styles and content requirements.

Figure 2: Raster image generation examples from Nemotron-Labs-VisualCreation. The examples span illustrated infographics, text-rich compositions, portraits, stylized typography, and product imagery, illustrating diverse visual styles and content requirements.

Figure 3: Raster image generation examples from Nemotron-Labs-VisualCreation, spanning natural landscapes, wildlife, and portraiture. The examples showcase fine visual detail, diverse lighting conditions, and a range of textures and compositions.
Figure 3: Raster image generation examples from Nemotron-Labs-VisualCreation, spanning natural landscapes, wildlife, and portraiture. The examples showcase fine visual detail, diverse lighting conditions, and a range of textures and compositions.

Figure 3: Raster image generation examples from Nemotron-Labs-VisualCreation, spanning natural landscapes, wildlife, and portraiture. The examples showcase fine visual detail, diverse lighting conditions, and a range of textures and compositions.

Figure 4: Editable structured artifacts created by Nemotron-Labs-VisualCreation, including webpages, mobile interfaces, vector icon systems, presentation slides, scientific figures, and charts. The framework combines generated visual assets with explicit representations to compose text, graphics, and layouts that can be rendered and further edited.
Figure 4: Editable structured artifacts created by Nemotron-Labs-VisualCreation, including webpages, mobile interfaces, vector icon systems, presentation slides, scientific figures, and charts. The framework combines generated visual assets with explicit representations to compose text, graphics, and layouts that can be rendered and further edited.

Figure 4: Editable structured artifacts created by Nemotron-Labs-VisualCreation, including webpages, mobile interfaces, vector icon systems, presentation slides, scientific figures, and charts. The framework combines generated visual assets with explicit representations to compose text, graphics, and layouts that can be rendered and further edited.

1 Introduction

Visual creation spans photographs, illustrations, charts, webpages, posters, scientific figures, and slides. A single request may demand expressive imagery, exact wording, factual accuracy, spatial relationships, and an editable deliverable. Meeting these needs calls for both expressive synthesis and explicit control over content and structure, coordinated through representation, rendering, and visual inspection.

Recent work provides complementary foundations. Edify Image (NVIDIA et al., 2024), Sana (Xie et al., 2024), and PixelDiT2 (Yu et al., 2026) explore representations and architectures for image synthesis, while Cosmos 3 (NVIDIA, 2026a) integrates multimodal understanding and generation. Agentic image creation (Li et al., 2026b) and scene-generation systems (Xia et al., 2026; Ling et al., 2026) investigate planning, tool use, and visual assessment. These directions motivate a common interface for coordinating learned visual generation and explicit artifact structure.

We introduce Pixel as Code, a shared interface in which generators predict discrete representations and renderers produce visual outputs for inspection (Figure 1). Learned visual tokens capture raster appearance and are decoded into pixels. Explicit programs—including SVG, HTML/CSS, plotting code, and document markup—expose content, geometry, and layout for direct editing through their respective rendering backends. Hybrid artifacts combine these complementary representations, for example by embedding a generated image within an editable webpage.

Building on this interface, we present Nemotron-Labs-VisualCreation. Its harness coordinates semantic planning, raster generation, and visual selection. Structured and hybrid requests additionally establish a layout contract and produce editable representations. For browser-based artifacts, visual audits assign failures to causal owners for targeted repair and checkpoint selection; native formats use their corresponding generation and review workflows. Figures 2 and 4 illustrate representative outputs.

Our contributions span the creation interface, its learned components, and their evaluation:

A shared interface for agentic visual creation. We formulate Pixel as Code around a common generate representation →\rightarrow render →\rightarrow inspect interface and describe how a Nemotron-native harness coordinates planning, generation, visual selection, and route-specific refinement. The browser-based workflow makes rendered feedback actionable through a resolved layout contract, explicit repair ownership, and checkpoint retention (Section 2).

Complementary models for raster and structured generation. We develop Nemotron-Labs-Image-Tokenizer as the discrete raster interface, adapt Nemotron 3 Nano into the autoregressive generator Nemotron-Labs-Image-30B-A3B through multistage mid-training and reinforcement learning, and develop Nemotron-Labs-VisionCode as a family of specialized models for explicit programs and markup. Sections 4 and 5 describe the data and training, with coding variants introduced in Section 5.3.

Evaluation from reconstruction to complete creation systems. We assess tokenizer reconstruction across six visual domains, raster generation across five capability categories, and structured code generation across five tasks. One Nemotron-Labs-VisionCode variant leads the task-balanced aggregate among models evaluated on all five tasks: Chart2Code, MMSVG image-to-SVG and text-to-SVG, Design2Code, and Image2Struct. It surpasses Kimi K3.1 Pro (Moonshot AI, 2026) with fewer total and active parameters (Section 6.3). At the system level, the Nemotron-native configuration raises GenEval2 Soft-TIFA GM from 31.71 to 52.56 and WISE Verified from 46.30 to 88.60 with the same raster generator. With our best setting, the framework is competitive with GPT Image 2 and Nano Banana Pro across most benchmarks with available comparisons.

2 Overall Framework

Nemotron-Labs-VisualCreation turns a user request and optional references into raster images or editable structured artifacts. Routing selects the artifact family, target surface, representation, and visual-asset policy. Direct raster requests use candidate generation and visual selection. Structured and hybrid requests additionally establish a layout contract, generate executable representations, and support targeted repair before checkpoint selection. The shared Pixel as Code interface connects these routes through generation, rendering, and visual inspection. Figure 5 shows their control flow and model assignments; Section 3 describes the components and rendering backends.

Figure 5: Route-specific control flow in the Nemotron-native creation harness. Ultra denotes Nemotron 3 Ultra, Super-VL denotes Nemotron-3.5-Super-VL, and Image denotes Nemotron-Labs-Image-30B-A3B. Direct raster outputs use visual candidate selection. Browser artifacts use the Dual Coder and a bounded repair loop; repairs may update assets, the plan, or code according to the diagnosed cause. Native formats use their own generation and review workflows. Nemotron-Labs-VisionCode is evaluated separately in Section 6.3.

2.1 Pixel as Code: Discrete Representations and Renderers

Let qq denote the user request, vv optional reference material, and rr the chosen representation. Visual creation produces a discrete representation crc_{r} and a rendered view I^\hat{I}:

cr∼Gr(⋅∣q,v),I^=Rr(cr),c_{r}\sim G_{r}(\,\cdot\mid q,v),\qquad\hat{I}=R_{r}(c_{r}), (1)

where GrG_{r} generates the representation and RrR_{r} renders it (Figure 6). Here, code refers to either learned discrete visual tokens or an explicit artifact representation. This abstraction does not require all representations to share a vocabulary or renderer. Instead, it exposes a common interface through which an artifact can be executed, rendered, visually inspected, and, when its representation is editable, revised.

For the raster image route, the image tokenizer provides both the discrete representation and the rendering interface. Its encoder EE maps an image II to discrete visual tokens 𝐳=E⁡(I)\mathbf{z}=E(I), while its decoder DD reconstructs a raster image I^=D⁡(𝐳)\hat{I}=D(\mathbf{z}). This separation between discrete representation learning and generation builds on vector-quantized autoencoders (van den Oord et al., 2017; Esser et al., 2021); HART (Tang et al., 2025) further studies hybrid discrete and continuous visual representations. Nemotron-Labs-Image-30B-A3B serves as the raster image generator: it autoregressively predicts discrete visual tokens, and the tokenizer decoder acts as their learned renderer. Encoding supplies representations for reference images and training targets, whereas decoding converts generated codes into visible pixels. For a direct raster request, the rendered candidates are final artifact candidates.

For structured routes, the generated representation explicitly exposes content, geometry, and layout through formats such as SVG, HTML/CSS/JavaScript, presentation objects, document structures, or plotting programs. Corresponding SVG engines, browsers, office renderers, plotting runtimes, and document compilers convert these representations into visual evidence. Because the source representation remains accessible, localized edits can be applied after visual inspection. A hybrid route additionally embeds one or more generated raster assets within a structured artifact while preserving text, shapes, layout, and interactions in an editable representation. For browser-based artifacts, the Nemotron-native configuration assigns code generation to a Dual Coder composed of Nemotron 3 Ultra (Blakeman et al., 2026) and Nemotron-3.5-Super-VL. Native presentation, document, and SVG outputs use format-specific generators and renderers. We separately train Nemotron-Labs-VisionCode for this interface (Section 5.3) and evaluate the models in standalone tests (Section 6.3).

Figure 6: The representation–renderer interface underlying the creation harness. Learned visual tokens, SVG, and HTML/CSS are discrete representations with corresponding rendering backends. All routes support visual inspection; the dashed return path denotes revision of editable structured and hybrid artifacts. Direct raster outputs use candidate selection, as shown in Figure 5.

2.2 Agentic Creation Loop

Prior agentic scene-generation systems combine planning with visual feedback: SAGE (Xia et al., 2026) coordinates generation tools and critics, and Scenethesis (Ling et al., 2026) integrates language-based planning, visual layout refinement, and scene judging. Our harness makes this feedback operational through a resolved layout contract, renderer-grounded evidence, a root-cause report, and explicit repair ownership (Figure 5).

Routing and structured planning. Nemotron-3.5-Super-VL classifies each request as a natural image, structured canvas, interactive interface, multi-page document, or visual series. It jointly determines the target surface, output representation, canvas count, rendering backend, and whether generated raster assets are absent, optional, or required. Search and reference retrieval are invoked conditionally, only when external factual or visual grounding materially affects the request. Nemotron 3 Ultra then produces a semantic artifact plan. For structured and hybrid routes, this plan is resolved into a layout contract that specifies the layout mode, ordered regions, normalized bounds, component ownership, and rendering constraints.

Direct raster creation. Natural-image requests bypass structured code generation. Nemotron-Labs-Image-30B-A3B produces multiple raster candidates from the planned visual brief, optional references, and a supported aspect ratio. Acting as the multimodal judge, Nemotron-3.5-Super-VL compares the rendered candidates against the original request and retains the strongest image. This route therefore uses semantic planning and visual selection, but does not invoke the structured artifact repair loop described below.

Structured and hybrid artifact creation. Structured artifacts use explicit code or native document representations, while hybrid artifacts additionally request raster assets from Nemotron-Labs-Image-30B-A3B. In the browser-based Dual Coder configuration, Nemotron 3 Ultra and Nemotron-3.5-Super-VL independently instantiate the same frozen plan and asset manifest. Native presentation, document, and SVG routes use their corresponding format-specific generation workflows. Each candidate is executed or rendered and visually inspected before an eligible candidate is retained as the initial artifact checkpoint C0C_{0}. Raster generation supplies requested image content, whereas the structured representation determines how assets, text, shapes, and interactions are composed into an editable artifact.

(a) Layout repair resolves text–image overlap and restores the visual hierarchy.
(a) Layout repair resolves text–image overlap and restores the visual hierarchy.

(a) Layout repair resolves text–image overlap and restores the visual hierarchy.

(b) Asset and layout repair restores the missing visual and relocates the workflow steps.
(b) Asset and layout repair restores the missing visual and relocates the workflow steps.

(b) Asset and layout repair restores the missing visual and relocates the workflow steps.

(c) Code and content repair restores the chart marks, labels, values, and legend.
(c) Code and content repair restores the chart marks, labels, values, and legend.

(c) Code and content repair restores the chart marks, labels, values, and legend.

Figure 7: Representative examples of self-correction. Red annotations identify issues in the initial renderings, while green annotations highlight the corresponding repairs.

Evidence-grounded visual audit and targeted repair. For browser-based artifacts, the audit combines deterministic renderer evidence with a multimodal review against the frozen request and acceptance checklist. Renderer evidence identifies failures such as execution errors, missing regions, clipping, overlap, out-of-bounds geometry, and broken interactions. Nemotron-3.5-Super-VL evaluates the visible artifact and proposes a diagnosis code, causal evidence, a confidence score, and an owner within the rendered structure. Before automatic repair is applied, the harness validates this proposal against stable artifact selectors. Native formats use their own rendering, inspection, and review workflows.

The browser-based repair workflow distinguishes the visible diagnosis from the underlying repair target. Diagnosis codes cover component rendering, collision, containment, spatial density, typography, color contrast, layout structure, content fidelity, visual-asset quality, and interaction behavior. Repair targets identify the responsible layer: visual plan, asset, layout, code, interaction, or content. Findings associated with the same causal owner are grouped into a root-cause tree, allowing the harness to repair a shared cause while freezing unaffected pages or regions. Asset-related findings can trigger raster regeneration; planning or layout findings can trigger a localized replan; and code, interaction, or content findings are assigned to the structured generation path. Every resulting candidate is executed, rendered, audited, and compared with the retained checkpoint. The numbers of accepted repair rounds and total attempted repair cycles are bounded separately.

Checkpoint retention and output selection. For exposition, let Ct=(Pt,At,ct,I^t)C_{t}=(P_{t},A_{t},c_{t},\hat{I}_{t}) denote the artifact state after round tt, comprising its plan, assets, explicit representation, and rendered view. This tuple is a conceptual summary; the implementation additionally retains the frozen checklist, deterministic inspection results, multimodal review, and repair-validation records. Best-candidate retention can be expressed as

C0⋆=C0,Ct⋆=Select⁡(q,Ct−1⋆,Ct).C^{\star}_{0}=C_{0},\qquad C^{\star}_{t}=\operatorname{Select}\!\left(q,C^{\star}_{t-1},C_{t}\right). (2)

For ordinary browser-based requests, the selection operator first applies deterministic fatal-render guards and then performs a blind pairwise comparison between an eligible candidate and the incumbent using the same frozen request checklist. A tie or an insufficient-confidence decision retains the earlier incumbent. Native-format routes retain the strongest rendered candidate according to their format-specific inspection and judging criteria. The loop terminates when the audit passes, no eligible improvement is found, or the configured repair budget is exhausted. The retained checkpoint provides the editable artifact together with its rendered preview.

Implementation details. Before generation, the browser-based workflow freezes the request checklist and resolved layout contract. A candidate passes only when both deterministic rendering checks and the multimodal visual audit pass. The default harness configuration generates up to four candidates for each raster-generation job. The browser-based repair loop permits up to three accepted repairs within eight attempted repair cycles and retains the incumbent when pairwise selection returns a tie or confidence below 0.750.75. Model and renderer assignments are summarized in Section 3. The routing and review prompt contracts, retrieval policies, machine-readable schemas, and harness control limits are documented in Appendix B.

Qualitative self-correction examples. Figure 7 shows three representative before-and-after repairs. In the furniture landing page, the agent resolves text–image overlap and restores the content hierarchy. In the FrostLine landing page, it restores the missing visual asset and reorganizes the hero and workflow sections. In the city-population chart, it recovers all 20 bars together with their values, city labels, and legend entries. These examples show how the agent translates rendered feedback into targeted edits while preserving the unaffected parts of the design.

3 System Components

The framework combines planning, discrete representation generation, rendering, and visual inspection. We describe these component responsibilities below. Section 4 presents data for both generation routes, and Section 5 describes training for the image tokenizer, raster image generator, and structured code generator.

3.1 Planning and Tool Coordination

Nemotron-3.5-Super-VL (NVIDIA, 2026b) first performs artifact routing, and Nemotron 3 Ultra (Blakeman et al., 2026) serves as the planner. Ultra turns the request and any retrieved context into a semantic plan. Structured and hybrid routes additionally resolve a layout contract with ordered regions, normalized bounds, component ownership, and rendering constraints. During repair, Ultra receives issues assigned to plan revision and updates the affected specification. Harness services supply search and reference retrieval when external grounding is needed. The shared interface in Equation 1 lets planning coordinate raster assets and explicit code within the same artifact.

3.2 Discrete Representation Generators

3.2.1 Raster Image Generator

Nemotron-Labs-Image-30B-A3B is an autoregressive raster image generator. Given text and optional source or reference images, it predicts a discrete visual-token sequence that the tokenizer decoder renders into a raster image. Training includes text-to-image generation and text-and-image-conditioned generation (TI2I) with flexible aspect ratios. TI2I covers image editing, multi-turn generation, and synthesis from one or more visual references.

The generator is initialized from Nemotron 3 Nano 30B-A3B and retains its hybrid Mamba2–Transformer MoE architecture and attention configuration (NVIDIA, 2025c; Dao and Gu, 2024). Text prompts, reference images, and target images are represented as discrete tokens within a unified causal sequence. Section 5.2 describes its multistage mid-training and reinforcement learning.

3.2.2 Structured Code Generator

The multimodal-coding component generates representations with explicit content and structure: plotting programs for charts, SVG from images or text, HTML/CSS from visual designs, edits to existing webpage code, and document markup. These outputs are interpreted by the corresponding rendering backends described below.

For browser-based artifacts, the Dual Coder combines Nemotron 3 Ultra and Nemotron-3.5-Super-VL for code generation and code or layout repair. The two models independently materialize the same frozen plan and asset manifest, then revise the code when visual diagnosis assigns an issue to this component. Native presentation, document, and SVG routes use format-specific generation workflows.

Nemotron-Labs-VisionCode is the model family we train and evaluate for the same structured-code interface. Its multimodal-coding supervision covers the explicit representations and editing operations needed by these tasks (Section 4.3). Section 5.3 introduces the model variants and their base models. Section 6.3 reports their standalone execution and quality results against reference models. These measurements evaluate the trained coding models; the Dual Coder is a separate harness-level model assignment.

3.3 Rendering Backends

3.3.1 Learned Image Renderer: Tokenizer Decoder

The dedicated image tokenizer, Nemotron-Labs-Image-Tokenizer, has approximately 642M parameters and uses a fixed Leech-lattice codebook (Zhao et al., 2024; Zhao et al., 2025b). Its encoder discretizes a raster image into a compact visual-token sequence; its decoder is the learned image renderer that converts predicted tokens back to pixels. This separates prediction of the discrete representation from its visual realization.

The encoder and decoder follow a vision-transformer design (Dosovitskiy et al., 2021), each with 24 layers, a hidden width of 1,024, 16 attention heads, and an MLP ratio of 4. The tokenizer uses 16×1616\times 16 patches and 24-dimensional quantized embeddings with L2 normalization. Its codebook contains 196,560 normalized Leech-lattice vectors and remains fixed during training. Rotary position embeddings (Su et al., 2021) use a base of 10,000. The decoder uses an output FFN with a configured dimension of 3,072 and clamps reconstructed values to [−1,1][-1,1]. Table 1 summarizes the architecture and image interface; Section 5.1 describes the training objectives and optimization schedule.

Table 1: Nemotron-Labs-Image-Tokenizer architecture. The encoder produces discrete visual codes and the decoder renders them into raster images.

Hyperparameter Value

Transformer architecture

Implementation class VITVQModel

Parameters Approximately 642M

Encoder / decoder layers 24 / 24

Hidden width / attention heads 1,024 / 16

MLP ratio 4

Decoder output FFN Enabled; output FFN dimension 3,072

RoPE θ\theta / dropout 10,000 / 0

Discrete representation

Patch size 16×1616\times 16

Quantized embedding dimension 24

Codebook Normalized Leech lattice; 196,560 entries

Codebook weights / L2 normalization Frozen / enabled

Image interface

Encode / decode resize None / none

Zero-mean input Enabled

Output clamp [−1,1][-1,1]

Section 6.1 evaluates the reconstruction quality, single-image latency, and encoding/decoding throughput of this learned raster interface.

3.3.2 Structured Rendering Backends

SVG engines render vector markup (W3C, 2018), browser engines render HTML/CSS/JavaScript (WHATWG, 2026), and office renderers, plotting runtimes, or document compilers render their respective representations. These backends play the same interface role as the tokenizer decoder: they map generated discrete representations to visual outputs that can be inspected. Their source representations also expose elements such as shapes, text, and layout for targeted edits. The harness executes and renders revised representations after repair and preserves artifact checkpoints for subsequent comparison.

3.4 Multimodal Perception and Evaluation

Nemotron-3.5-Super-VL provides visual assessment and candidate selection in addition to its routing and coding roles. Direct raster requests use it to select an image. In the browser-based repair loop, its audit evaluates the rendered artifact against the frozen request checklist; the root-cause tree groups issues by causal owner for assignment to the responsible component; and pairwise selection identifies the artifact state to retain. Deterministic rendering checks and validation of artifact selectors supplement the multimodal review. Native formats use their own inspection and judging workflows. These responsibilities share rendered visual evidence but follow the route-specific control flow in Section 2.2.

4 Training Data

The data pipeline follows the three trainable components of the framework: the image tokenizer learns the discrete raster representation and its renderer; Nemotron-Labs-Image-30B-A3B learns to predict visual tokens from conditioning inputs; and Nemotron-Labs-VisionCode learns to generate explicit programs and markup. We describe the data for each component in this order, following the representation–renderer interface of Section 2.

4.1 Image Tokenizer Data

We curate an approximately 200M-image pool from the NVCLIP image corpus (NVIDIA, n.d.) through clustering, deduplication, and filtering using SigLIP 2 (Tschannen et al., 2025), DINOv2 (Oquab et al., 2023), and SSCD (Pizzi et al., 2022). We train the tokenizer on approximately 153M images from this pool.

Images provide reconstruction targets for learning the encoder and decoder described in Section 3.3.1. The resulting encoder supplies discrete visual tokens for raster image generation, while the decoder renders predicted tokens back into images. Section 5.1 details the reconstruction, perceptual, distillation, and adversarial objectives.

4.2 Raster Image Generation Data

The raster image data pipeline combines text-to-image generation (T2I) with text-and-image-conditioned generation (TI2I). T2I conditions on a textual description; TI2I additionally conditions on one or more source or reference images. TI2I covers image editing, generation from visual references, and multi-turn generation using preceding visual context. Both task families use the image tokenizer to convert target images into the discrete visual codes predicted by the generator introduced in Section 3.2.1.

4.2.1 Text-to-Image Data

Data Collection. The web-scale portion of our text-to-image collection contains approximately 326M image–text pairs. It combines GPIC (Chandrasegaran et al., 2026), Conceptual 12M (CC12M) (Changpinyo et al., 2021), CommonCatalog CC-BY and CommonCatalog CC-BY-SA (Gokaslan et al., 2023), Megalith (madebyollin, n.d.), and WIT (Srinivasan et al., 2021). Together, these collections provide broad coverage of visual concepts, web photographs, encyclopedic imagery, and visual content embedded in documents.

We supplement these sources with approximately 48M synthetic images generated with Z-Image (Z-Image Team, 2025), bringing the text-to-image collection to approximately 374M examples for mid-training.

Data Annotation and Filtering. We annotate images using Qwen3.5-27B, Qwen3.5-397B-A17B, and Qwen3.5-4B (Qwen Team, 2026). We remove watermarked and low-quality images, and use Qwen3.5-397B-A17B to filter out captions that do not align with the image content.

4.2.2 Data Across Training Stages

The raster generator uses arbitrary-resolution mid-training with progressively increasing maximum image areas of 2562256^{2}, 5122512^{2}, and 102421024^{2} pixels, allowing variable aspect ratios within each stage (Section 5.2.1). Reinforcement learning uses a prompt collection that is refreshed to emphasize harder semantic constraints and a broader distribution of resolutions and aspect ratios, as described in Section 5.2.2.

4.3 Structured Code Generation Data

The multimodal-coding mixture contains approximately 4.7M effective training examples, including configured sampling repetitions. It covers visual reconstruction, text-conditioned program generation, editing, and code understanding across several artifact types.

Vector-graphics and visual-program examples support SVG generation, editing, and understanding (Wang et al., 2025a; Zhao et al., 2025a; Rodriguez et al., 2025). Web examples connect rendered pages to their source code and provide generation and editing supervision (Yun et al., 2024; Sun et al., 2025). Chart and visualization examples cover plotting code, structured chart representations, and program understanding (Xu et al., 2025b; Ni et al., 2025b; Ni et al., 2025a).

The mixture also includes formula transcription (Blecher, 2025), table-to-LaTeX conversion, and CAD-related supervision (Niu et al., 2025a), supplemented by teacher-generated chain-of-thought examples and direct ground-truth anchors. Together, these task groups connect visual appearance and user intent to the explicit representations predicted by Nemotron-Labs-VisionCode; Section 5.3 describes their use in supervised adaptation.

5 Training

Training is organized around three components of the Pixel as Code framework. The image tokenizer learns a discrete visual representation and its decoder. The raster image generator, Nemotron-Labs-Image-30B-A3B, learns to predict visual tokens, and the structured code generator, Nemotron-Labs-VisionCode, learns to produce explicit programs and markup from the multimodal-coding mixture in Section 4.3. We describe their training separately in Sections 5.1, 5.2, and 5.3, following the component definitions in Section 3.

5.1 Image Tokenizer Training

The image tokenizer learns a discrete visual representation and its rendering interface from the NVCLIP images described in Section 4.1, using the architecture in Table 1. Training spans 670K steps and combines pixel reconstruction, perceptual supervision, feature distillation, and adversarial learning. The codebook remains fixed, while the encoder is frozen after 480K steps. The decoder continues to learn to reconstruct images from the resulting discrete codes.

Visual compression determines both reconstruction fidelity and the sequence budget for generation. Cosmos (NVIDIA, 2025a) develops visual tokenizers for world modeling, DC-AE (Chen et al., 2024a) studies deep compression for high-resolution diffusion, and DC-AR (Wu et al., 2025a) uses a deep-compression hybrid tokenizer for masked autoregressive generation. In our tokenizer, the 16×1616\times 16 patch size represents a 256×256256\times 256 image with 256 tokens, compared with 1,024 tokens for 8×88\times 8 patches. In our tokenizer study, this setting enables 4×4\times more samples per node. This trade-off connects the fidelity of the learned renderer to the sequence budget of the raster image generator.

Reconstruction. We use an L1 reconstruction loss with weight 1.0 and an LPIPS perceptual loss (Zhang et al., 2018) with weight 0.1.

Decoder feature distillation. We use DINOv2 ViT-L (Oquab et al., 2023) as the distillation teacher. Student features are taken from the third decoder block, projected through an MLP, and aligned to the teacher’s spatial grid using two-dimensional adaptive average pooling. Both student and teacher features are L2-normalized independently at each token. For the resulting NN aligned token pairs (si,ti)(s_{i},t_{i}), the distillation loss is the negative mean cosine similarity,

ℒdistill=−1N∑i=1Ncos(si,ti),λdistill=0.1.\mathcal{L}_{\mathrm{distill}}=-\frac{1}{N}\sum_{i=1}^{N}\cos(s_{i},t_{i}),\qquad\lambda_{\mathrm{distill}}=0.1. (3)

This auxiliary supervision acts on the learned decoder and supports arbitrary image resolutions through spatial feature alignment.

Adversarial training. An unconditional PatchGAN discriminator (Isola et al., 2017) operates on RGB images with three layers, a base width of 64, 4×44\times 4 kernels, and batch normalization (Ioffe and Szegedy, 2015). It uses the pad_max mode for arbitrary resolutions, with blur downsampling and ActNorm disabled. The GAN objective is softplus, with a configured discriminator weight of 0.5 and adaptive discriminator weighting disabled. Adversarial training starts at step 0. R1 regularization (Mescheder et al., 2018) uses γ=10\gamma=10 and is evaluated once every 16 steps with lazy regularization (Karras et al., 2020). On regularization steps, the R1 penalty is multiplied by (γ/2)×16=80(\gamma/2)\times 16=80, giving a time-averaged coefficient of γ/2=5\gamma/2=5. Table 2 collects these loss settings and the training configuration.

Quantizer training. We keep the codebook fixed throughout training and use a straight-through estimator (Bengio et al., 2013; van den Oord et al., 2017) to propagate gradients through discrete quantization. The training objective does not include a commitment loss.

Variable-resolution token packing. Each image is represented as a sequence of 16×1616\times 16 patches. We pack sequences of different lengths into a batch while preserving image boundaries, so images retain their individual spatial resolutions without padding every sequence to a common length. Replicate padding only aligns each image to the patch grid. Batches are formed under a per-rank pixel budget of approximately 2.62M; their image count therefore varies with resolution. Table 2 summarizes the packing configuration.

Table 2: Image tokenizer training configuration through 670K steps. AdamW optimizes both the tokenizer autoencoder and the discriminator; Table 3 gives the effective learning rates.

Hyperparameter Value

Reconstruction and distillation

Pixel reconstruction / weight Mean absolute RGB error in [−1,1][-1,1] / 1.0

Perceptual loss / weight LPIPS / 0.1

Distillation teacher / weight DINOv2 ViT-L / 0.1

Distillation objective Negative mean cosine similarity

Distillation attachment Decoder block 3, followed by an MLP

Feature alignment 2D adaptive average pooling to the teacher grid

Feature normalization Tokenwise L2 normalization on both sides

Arbitrary-resolution distillation Enabled

Commitment loss Not used

Quantization gradients / codebook Straight-through estimator / fixed

Adversarial training

Discriminator Unconditional PatchGAN; 3 input channels

Layers / base width / kernel size 3 / 64 / 4×44\times 4

Normalization Batch normalization; ActNorm disabled

Blur downsampling Disabled

Arbitrary-resolution mode pad_max

GAN objective / start step Softplus / 0

Discriminator weight / adaptive weighting 0.5 / disabled

R1 γ\gamma / frequency 10 / every 16 steps (lazy regularization)

R1 multiplier 80 when evaluated; time-averaged coefficient 5

Data and token packing

Training corpus NVCLIP (Section 4.1)

Curated image pool Approximately 200M images

Images used in training Approximately 153M

Clustering, deduplication, and filtering SigLIP 2, DINOv2, and SSCD

Batch construction Variable-resolution token packing

min_pixels / max_pixels 256 / 1,638,400

Size divisor / padding mode 16 / replicate

Pixel budget per rank per batch 2,621,440

Optimization

Autoencoder / discriminator optimizer AdamW / AdamW

Base learning rate 4×10−74\times 10^{-7}

World size / nominal batch size 32 / 8

Scaled base learning rate 1.024×10−41.024\times 10^{-4}

Weight decay 10−410^{-4}

AdamW β1,β2\beta_{1},\beta_{2} / ϵ\epsilon (0.9,0.99)(0.9,0.99) / 10−810^{-8}

Precision / automatic mixed precision BF16 / enabled

Gradient checkpointing Enabled

Encoder freezing After 480K steps

Training duration 670K steps

Optimization and learning-rate schedule. Both the tokenizer autoencoder and the discriminator use AdamW (Loshchilov and Hutter, 2019) with weight decay 10−410^{-4}, β1=0.9\beta_{1}=0.9, β2=0.99\beta_{2}=0.99, and ϵ=10−8\epsilon=10^{-8}. Training uses BF16 automatic mixed precision and gradient checkpointing (Chen et al., 2016). The configuration’s base learning rate is 4×10−74\times 10^{-7}, scaled by a world size of 32 and a nominal batch size of 8:

η⁡(t)=ηbase​W​Bnom​m​(t)=(4×10−7)×32×8×m⁡(t)=1.024×10−4​m​(t),\eta(t)=\eta_{\mathrm{base}}\,W\,B_{\mathrm{nom}}\,m(t)=(4\times 10^{-7})\times 32\times 8\times m(t)=1.024\times 10^{-4}\,m(t), (4)

where m⁡(t)m(t) is the stage multiplier in Table 3. The nominal batch size is a learning-rate scaling parameter, distinct from the number of images in each packed batch. The multiplier decreases from 1.0 to 0.6 at 300K steps and to 0.36 at 480K steps. The last stage freezes the encoder and uses a learning rate of 3.6864×10−53.6864\times 10^{-5} through 670K steps.

Table 3: Tokenizer learning-rate stages. The multiplier scales the base rate after world-size and nominal-batch-size scaling. The codebook is frozen throughout training.

Training steps Multiplier m⁡(t)m(t) Learning rate η⁡(t)\eta(t) Encoder

0–300K 1.0 1.024×10−41.024\times 10^{-4} Trainable

300K–480K 0.6 6.144×10−56.144\times 10^{-5} Trainable

480K–670K 0.36 3.6864×10−53.6864\times 10^{-5} Frozen

Section 6.1 evaluates reconstruction quality, single-image latency, and encoding/decoding throughput. Appendix C provides domain-level reconstruction results and an ImageNet any-resolution comparison with an encoding-scale ablation.

5.2 Raster Image Generator Training

The raster generator adapts a language-pretrained backbone through multistage autoregressive mid-training, followed by on-policy reinforcement learning. Mid-training teaches visual-token prediction with progressively increasing pixel budgets; reinforcement learning optimizes the rendered outputs for semantic alignment and perceptual quality. Table 4 summarizes the stage-wise configuration. Sections 5.2.1 and 5.2.2 describe these two parts of training.

5.2.1 Multi-Stage Mid-Training

We continue training the language-pretrained backbone to autoregressively predict target-image tokens from text and optional source or reference images. All three stages use 90% T2I and 10% TI2I data (Section 4.2), covering text-to-image generation, editing, and reference-conditioned synthesis. The maximum image area increases through 2562256^{2}, 5122512^{2}, and 102421024^{2} pixels, with variable aspect ratios; the corresponding training durations are 35K, 90K, and 70K steps. Table 4 lists the optimization settings.

Configuration Mid-Training Stage 1 Mid-Training Stage 2 Mid-Training Stage 3 Reinforcement Learning

Maximum image pixels 2562256^{2} 5122512^{2} 102421024^{2} –

Optimization

LR scheduler Constant Constant Constant Constant

Learning rate (Muon) 1×10−31\times 10^{-3} 1×10−31\times 10^{-3} 1×10−31\times 10^{-3} –

Learning rate (Adam) 1×10−41\times 10^{-4} 1×10−41\times 10^{-4} 1×10−41\times 10^{-4} 2×10−62\times 10^{-6}

Optimizer (Muon) μ=0.95\mu=0.95, Polar Express, spectral-norm LR adjustment –

Optimizer (Adam) β1=0.9,β2=0.95,ϵ=10−8\beta_{1}=0.9,\ \beta_{2}=0.95,\ \epsilon=10^{-8} β1=0.9,β2=0.98,ϵ=10−8\beta_{1}=0.9,\ \beta_{2}=0.98,\ \epsilon=10^{-8}

Weight decay 0.01 0.01 0.01 0.0

Gradient norm clip 1.0 1.0 1.0 1.0

EMA ratio 0.9999 0.9999 0.9999 –

Training steps 35K 90K 70K 200 rollout iterations

Warmup steps 500 500 500 0

Sequence length 81920 81920 81920 8192

Prompts per rollout – – – 48

Candidates per prompt – – – 32

Trajectories per update – – – 768

Training data mixture

T2I data 0.9 0.9 0.9 1.0

TI2I data 0.1 0.1 0.1 0.0

Table 4: Raster image generator training configurations. For Nemotron-Labs-Image-30B-A3B, we report three arbitrary-resolution mid-training stages with increasing

原文配图

Figure 8: Selected examples from the mid-trained generator, the RL-aligned policy, and the complete agentic creation system for the same user requests. These examples illustrate visual text rendering, surface detail, and counting. The columns compare complete configurations; the agentic workflow includes planning, external information, generation, and selection.
Figure 8: Selected examples from the mid-trained generator, the RL-aligned policy, and the complete agentic creation system for the same user requests. These examples illustrate visual text rendering, surface detail, and counting. The columns compare complete configurations; the agentic workflow includes planning, external information, generation, and selection.
Figure 8: Selected examples from the mid-trained generator, the RL-aligned policy, and the complete agentic creation system for the same user requests. These examples illustrate visual text rendering, surface detail, and counting. The columns compare complete configurations; the agentic workflow includes planning, external information, generation, and selection.
Figure 8: Selected examples from the mid-trained generator, the RL-aligned policy, and the complete agentic creation system for the same user requests. These examples illustrate visual text rendering, surface detail, and counting. The columns compare complete configurations; the agentic workflow includes planning, external information, generation, and selection.

正文以来源语言显示。

参考来源

← 返回每日AI报告