Manuscript Offprint

arXiv:2610.17882

Diagnose-to-Generate: Eliminating Structural Distortions in Flow Models via Patch-Level Grounded Alignment

Yifan Li, Lishuai Gao, Tong Zhang, Qilong Huang, Chen Zhao, Zhuoliang Kang, Jie Hu, Yujie Zhong, Fenghe Tang, S Kevin Zhou, Xiaoming Wei

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Yifan Li ∗^{*}

University of Science and Technology

of China

Hefei, AnHui Province, China

liyifancqu@163.com

Qilong Huang

Meituan Inc.

Beijing, China

huangqilonghql@gmail.com

Jie Hu

Meituan Inc.

Beijing, China

hujiemr@163.com

Lishuai Gao ⊗^{\otimes}

Meituan Inc.

Beijing, China

gaolishuai0425@163.com

Chen Zhao

Meituan Inc.

Beijing, China

2518628273@qq.com

Yujie Zhong

Meituan Inc.

Beijing, China

jaszhong@hotmail.com

Tong Zhang

Meituan Inc.

Beijing, China

zhangtong65@meituan.com

Zhuoliang Kang

Meituan Inc.

Beijing, China

kangzhuoliang@meituan.com

Fenghe Tang

University of Science and Technology

of China

Hefei, AnHui Province, China

fhtan9@mail.ustc.edu.cn

S Kevin Zhou

University of Science and Technology

of China

Hefei, AnHui Province, China

s.kevin.zhou@gmail.com

Abstract

Flow-based image generators achieve strong semantic synthesis but still produce localized structural distortions, such as malformed hands and limbs. Existing post-training methods typically optimize global scalar rewards, which provide weak spatial credit assignment and may alter well-formed regions while correcting local defects. We present Diagnose-to-Generate (D2G), a grounded alignment framework that separates visual diagnosis from generative optimization. We construct Achilles-600K, a region-annotated dataset for structural anomalies, and train ARGUS through supervised cold-start and Region-Aware Group Relative Policy Optimization to predict anomaly categories and bounding boxes. These diagnoses are converted into confidence-weighted spatial rewards for our Patch-level Flow-GRPO. We further identify that global stochastic exploration can shift semantic regions across group rollouts, making patch-wise relative advantages spatially inconsistent. Our Trajectory-Preserving Stochastic Sampling (TPSS) anchors early denoising with deterministic ODE trajectories and introduces stochasticity only at later steps, thereby limiting intra-group spatial drift while retaining local exploration. Experiments on FLUX.1-dev

Xiaoming Wei

Meituan Inc.

Beijing, China

weixiaoming@meituan.com

and SD3.5 show improved structural fidelity with preserved FID and CLIP scores. Consistent gains under HumanRefiner, zero-shot GPT-4.1, and blinded human evaluation further demonstrate that the improvements extend beyond the training reward model.

CCS Concepts

• Computing methodologies → Computer vision problems; Reinforcement learning; Neural networks.

References (40)