Guidance methods are essential tools for steering the generation process in diffusion models, improving the generalizability of stochastic robotic controllers and enabling high-quality controlled image synthesis. Despite strong parallels between flow-matching and diffusion, integrating guidance into flow-matching models remains quite challenging. Recent work has proposed general guidance frameworks for flow-matching, however, they are direct adaptations of diffusion guidance methods and can prove unstable. In this work, we conduct a theoretical analysis of guidance in flow-matching and show that a naive translation of diffusion-based guidance to flow-matching breaks the coupling distribution used during training, resulting in weaker control over sampling accuracy. Building on this insight, we propose Coupled Guidance, a flow-matching-specific guidance mechanism derived from a geometric perspective that leverages the coupling structure inherent to flow-matching training. To validate the effectiveness of our approach, we conduct extensive experimentation on a custom robotic collision avoidance task using ManiSkill3, four robotic dexterous manipulation tasks from the Adroit benchmark, and three image generation tasks, namely inpainting, super-resolution, and deblurring, using the ImageNet-128 and CelebA-HQ-256 datasets. Our findings show that our framework improves sample quality and guidance stability across all tasks, without imposing any additional overhead.
Figures & tables
Figure 1: Qualitative examples of image reconstructions for noiseless inpainting, deblurring, and super-resolution, comparing naive Π GDM , Π GDM + , and our coupled guidance method.
Table 2
α\β
-1
0
1
0
73
21
17
1
81
77
36
Table 2: Collision avoidance success rates (%) for all (α,β) couples, over 256 environment seeds.
Figure 2: Experimental setups for robotics tasks. From left to right: Maniskill PickCube, Adroit Door, Hammer, Relocate, and Pen.
Figure 3: Performance of Π GDM on Adroit tasks given different sparsity cutoffs. Runs using coupled guidance are used directly without a unit guidance scale s=1 . The blue lines each represent the performance of naive guidance for different guidance scalings s .
Figure 4: LPIPS scores for Π GDM , (first row) and Π GDM + (second row) on super-resolution
Figure 5: Evolution of ∂x1/∂xt ’s contribution to the guidance norm for the CelebA-HQ-256 superresolution task through the Π GDM inference process.
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6: Sparsity tests for all Adroit tasks using Π GDM + : the cutoff represents the proportion of guided coordinates. Different shades of blue represent different tunings of the guidance scale for the naive guidance runs ( β=1 )
Figure 7: Sparsity tests for all Adroit tasks using Π GDM : the cutoffs represent the proportion of guided coordinates. Different shades of blue represent different tunings of the guidance scale for the naive guidance runs ( β=1 )
Naive
Coupled
Task
Metric
PiGDM
PiGDM+
PiGDM
PiGDM+
Inpainting
FID ↓
54.3
7.5
20.7
7.5
LPIPS ↓
0.184
0.041
0.100
0.041
PSNR ↑
20.5
29.3
30.1
29.1
SSIM ↑
0.873
0.953
0.927
0.953
Deblurring
FID ↓
54.0
22.7
33.0
22.7
Appendix
Table 3: Comparison of naive vs. coupled guidance across methods and tasks on CelebA-HQ-256.
Naive
Coupled
Task
Metric
Π GDM
Π GDM+
Π GDM
Π GDM+
Inpainting
FID ↓
13.0
10.5
8.8
11.3
LPIPS ↓
0.106
0.086
0.092
0.088
PSNR ↑
20.4
20.5
23.4
20.6
SSIM ↑
0.907
0.911
0.908
0.909
Deblurring
FID ↓
58.6
1.6
16.6
1.2
Appendix
Table 4: Comparison of naive vs. coupled guidance across methods and tasks on ImageNet (CFM).
Figure 8: Sample fidelity using different tuning scales and β values for deblurring, superresolution and inpainting (left to right). First row shows the LPIPS scores for Π GDM , second row shows the performance of Π GDM +
Figure 9: Sample fidelity using different tuning scales and β values for deblurring, superresolution and inpainting (left to right). First row shows the PSNR scores for Π GDM , second row shows the performance of Π GDM +
Figure 10: Sample fidelity using different tuning scales and β values for deblurring, superresolution and inpainting (left to right). First row shows the SSIM scores for Π GDM , second row shows the performance of Π GDM +
Figure 11: Sample fidelity using different tuning scales and β values for deblurring, superresolution and inpainting (left to right). First row shows the FID scores for Π GDM , second row shows the performance of Π GDM +
Figure 12: x1 predictions using Π GDM for the first 10 steps of deblurring showing the convergence of the guided process for β∈[1,0.75,0.5,0.25,0] (from top to bottom)
Figure 13: x1 predictions using Π GDM for the first 10 steps of inpainting showing the convergence of the guided process for β∈[1,0.75,0.5,0.25,0] (from top to bottom)
Figure 14: x1 predictions using Π GDM for the first 10 steps of superresolution showing the convergence of the guided process for β∈[1,0.75,0.5,0.25,0] (from top to bottom)
Figure 15: x1 predictions using Π GDM + for the first 10 steps of deblurring showing the convergence of the guided process for β∈[1,0.75,0.5,0.25,0] (from top to bottom)
Figure 16: x1 predictions using Π GDM + for the first 10 steps of inpainting showing the convergence of the guided process for β∈[1,0.75,0.5,0.25,0] (from top to bottom)
Figure 17: x1 predictions using Π GDM + for the first 10 steps of superresolution showing the convergence of the guided process for β∈[1,0.75,0.5,0.25,0] (from top to bottom)
Figure 18: Final samples for deblurring using Π GDM with β∈[1,0.75,0.5,0.25,0] (from left to right)
Figure 19: Final samples for inpainting using Π GDM with β∈[1,0.75,0.5,0.25,0] (from left to right)
Figure 20: Final samples for superresolution using Π GDM with β∈[1,0.75,0.5,0.25,0] (from left to right)
Figure 21: Final samples for deblurring using Π GDM + with β∈[1,0.75,0.5,0.25,0] (from left to right)
Figure 22: Final samples for inpainting using Π GDM + with β∈[1,0.75,0.5,0.25,0] (from left to right)
Figure 23: Final samples for superresolution using Π GDM + with β∈[1,0.75,0.5,0.25,0] (from left to right)
Inference-time guided sampling steers state-of-the-art diffusion and flow models without fine-tuning by interpreting the generation process as a controllable trajectory. This provides a simple and flexible way to inject external constraints (e.g., cost functions or pre-trained verifiers) for controlled generation. However, existing methods often fail when composing multiple constraints simultaneously, which leads to deviations from the true data manifold. In this work, we identify root causes of this off-manifold drift and find that the approximation error scales severely with gradient misalignment. Building on these findings, we propose Conflict-Aware Additive Guidance (gcar), a lightweight and learnable method, which actively rectifies off-manifold drift by dynamically detecting and resolving gradient conflicts. We validate gcar across diverse domains, ranging from synthetic datasets and image editing to generative decision-making for planning and control. Our results demonstrate that gcar effectively rectifies off-manifold drift, surpassing baselines in generation fidelity while using light compute. Code is available at https://github.com/yuxuehui/CAR-guidance.
Xuehui Yu, Fucheng Cai, Meiyi Wang +2
Smart Systems Institute, National University of Singapore, Singapore · Faculty of Computing, Harbin Institute of Technology, Harbin, China · School of Computing, National University of Singapore, Singapore
Pretrained generative models, such as diffusion and flow matching models, have demonstrated exceptional capabilities in synthesizing high-quality data. However, steering their generative trajectories to satisfy strict constraints--such as identity preservation in image editing or obstacle avoidance in robotics--remains fundamentally challenging. While recent training-free guidance methods enforce path-safety, they rely heavily on min-norm controllers that only account for immediate constraint satisfaction. These myopic approaches often yield suboptimal trajectories that hover dangerously close to the boundary, severely restricting the model's ability to optimize toward its target. In this paper, we propose AegisFlow, a training-free, non-myopic path-safe guidance framework that recasts guided generation as a safety-critical optimal control problem with global scope. By integrating a time-varying barrier function directly into the global cost functional, AegisFlow naturally enforces constraints along the entire generative path. To compute the global optimal control, we derive a tractable, mathematically grounded approximation of the Hamilton-Jacobi-Bellman (HJB) equation. Comprehensive experiments demonstrate that AegisFlow outperforms state-of-the-art methods across text-guided image manipulation and robotic planning, establishing a significantly better trade-off between target alignment and constraint satisfaction. Code is available at https://github.com/LiuKunpeng03/AegisFlow.
Kunpeng Liu, Boshi Zhang, Keyou You
Department of Automation and BNRist, Tsinghua University, Beijing, China
Despite the remarkable success of sampling-based generative models such as flow matching, they can still produce samples of inconsistent or degraded quality. To assess sample reliability and improve sample fidelity, we propose uncertainty-aware flow matching (UA-Flow), a lightweight extension of flow matching that predicts the velocity field together with heteroscedastic uncertainty. UA-Flow estimates spatially localized sample uncertainty by propagating velocity uncertainty through the flow dynamics. The resulting estimates serve as reliability signals that reflect data-manifold support for each generated sample or region. We further use them to steer generation via uncertainty-aware guidance (UG) and uncertainty-aware classifier-free guidance (UCFG). Experiments on ImageNet and CIFAR-10 show that UA-Flow's uncertainty tracks sample fidelity more consistently than element-wise baselines and that these signals also carry information about data-manifold support. On ImageNet, UG increases precision at the cost of recall and improves FID, while UCFG maintains lower FID than CFG at large guidance scales.