h-Flow: Flexible Flow-based Image Editing via Doob's h-Transform
2026-07-12 • Computer Vision and Pattern Recognition
Computer Vision and Pattern Recognition
AI summaryⓘ
The authors introduce h-Flow, a new method for editing images that uses pre-trained text-to-image models without needing extra training or complex adjustments. Their approach is based on a math concept called Doob's h-Transform, which helps balance keeping the image similar to the original while also matching the new text prompt. They created ways to separate image reconstruction from changes guided by the text, giving more control over the editing process. Experiments show that h-Flow works well and is flexible across different editing tasks.
text-to-image modelsimage editingDoob's h-Transformstochastic differential equations (SDE)reconstruction guidancesemantic editingvelocity orthogonal decompositionconditional generationflow-based models
Authors
Zehui Guo, Zhen Wang, Junwei Shu, Yang Li, Changbo Wang, Long Chen
Abstract
Editing images with pre-trained text-to-image flow models typically requires carefully balancing target alignment with the desired prompt and source consistency with the original image. Existing approaches either rely on inversion-based pipelines or heuristic source-to-target trajectory constructions, which often depend on architecture-specific designs or are sensitive to hyperparameters. In this paper, we propose h-Flow, a training-free and theoretically grounded flow-based editing framework. Inspired by Doob's $h$-Transform, we reformulate image editing as conditional generation under multiple terminal events corresponding to source consistency and target alignment. We first extend the classical $h$-Transform from SDE-based models to the deterministic RF framework by constructing an equivalent SDE with identical marginals. Within this formulation, we design dedicated $h$-functions for source consistency and target alignment, yielding closed-form reconstruction guidance and velocity-based semantic editing signals. We further introduce a velocity orthogonal decomposition to decouple reconstruction and editing directions, enabling a controllable trade-off between the two objectives. Extensive experiments demonstrate that h-Flow achieves effective, robust, and flexible editing across diverse scenarios. The code will be released soon.