arXiv:2603.13547cs.CV2026-03

让文生图模型精准理解颜色数值代码,实现精确配色控制。

NumColor: Precise Numeric Color Control in Text-to-Image Generation

  • 通过颜色令牌聚合与可学习颜色嵌入库,突破分词对颜色代码的破坏。
  • 在五个模型上颜色准确率提升4-9倍,色彩和谐度提高10-30倍。
  • 零样本迁移至多个主流文生图模型,适合需要精确配色的设计场景。

文生图扩散模型在自然语言描述生成图像方面表现优异,但无法正确解析十六进制颜色码(如#FF5733)和RGB值(rgb(255,87,51))。这一缺陷源于子词分词机制,将颜色代码拆分为语义无关的片段,导致文本编码器无法映射出连贯的颜色表示。本文提出NumColor,可在多个扩散架构中实现精确的数值颜色控制。NumColor包含两个组件:颜色令牌聚合器(检测颜色规范,不受分词影响),以及包含6,707个可学习嵌入的ColorBook,这些嵌入在感知均匀的CIE Lab空间中映射到文本编码器的嵌入空间。引入方向对齐与插值一致性两种辅助损失,强化Lab空间与嵌入空间间的几何对应关系,实现平滑颜色插值。为训练ColorBook,构建了50万张合成图像的数据集NumColor-Data,具有明确的颜色-像素对应关系,避免了照片数据集中的标注模糊性。尽管仅在FLUX上训练,NumColor可零样本迁移至SD3、SD3.5、PixArt-α和PixArt-Σ,无需模型特定调整。在五个模型上,数值颜色准确率提升4-9倍,同时在GenColorBench基准上色彩和谐度提升10-30倍。

原文摘要 · Abstract (English)

Text-to-image diffusion models excel at generating images from natural language descriptions, yet fail to interpret numerical colors such as hex codes (#FF5733) and RGB values (rgb(255,87,51)). This limitation stems from subword tokenization, which fragments color codes into semantically meaningless tokens that text encoders cannot map to coherent color representations. We present NumColor, that enables precise numerical color control across multiple diffusion architectures. NumColor comprises two components: a Color Token Aggregator that detects color specifications regardless of tokenization, and a ColorBook containing 6,707 learnable embeddings that map colors to embedding space of text encoder in perceptually uniform CIE Lab space. We introduce two auxiliary losses, directional alignment and interpolation consistency, to enforce geometric correspondence between Lab and embedding spaces, enabling smooth color interpolation. To train the ColorBook, we construct NumColor-Data, a synthetic dataset of 500K rendered images with unambiguous color-to-pixel correspondence, eliminating the annotation ambiguity inherent in photographic datasets. Although trained solely on FLUX, NumColor transfers zero-shot to SD3, SD3.5, PixArt-α, and PixArt-Σ without model-specific adaptation. NumColor improves numerical color accuracy by 4-9x across five models, while simultaneously improving color harmony scores by 10-30x on GenColorBench benchmark.

文生图颜色控制扩散模型精确生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。