{"id":261,"date":"2025-03-14T20:58:41","date_gmt":"2025-03-14T12:58:41","guid":{"rendered":"https:\/\/www.toothlessos.xyz\/?p=261"},"modified":"2025-03-14T20:58:43","modified_gmt":"2025-03-14T12:58:43","slug":"decoding-diffusion-on-the-perspective-of-rectified-flow","status":"publish","type":"post","link":"https:\/\/www.toothlessos.xyz\/index.php\/2025\/03\/14\/decoding-diffusion-on-the-perspective-of-rectified-flow\/","title":{"rendered":"Decoding Diffusion: On the perspective of Rectified Flow."},"content":{"rendered":"\n<p>Modern diffusion models, like Stable Diffusion 3 and flux, have changed their basic model structure to flow-based models. Understanding flows is crucial and yet challenging. In this article, we try to decode flow-based diffusion modes with Rectified Flow, one of the most elegant solutions. Note that this article aims to explain the concepts from a relatively high level, and detailed proofs can be found in the <a href=\"https:\/\/www.cs.utexas.edu\/~lqiang\/rectflow\/html\/intro.html\" title=\"\">original paper<\/a>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Problem<\/h1>\n\n\n\n<p>Given distribution <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-3b084b4d4b4b9396efe69a0cd5a0ba10_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#112;&#105;&#95;&#48;&#44;&#32;&#92;&#112;&#105;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"42\" style=\"vertical-align: -4px;\"\/>, want to find a transfer map <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-f9ed275b0bf1633b7ee83b78fcc28273_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/> such that:<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-036a08f44ddc16976d966d35d71b80d3_l3.png\" height=\"19\" width=\"272\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#90;&#95;&#49;&#32;&#61;&#32;&#84;&#40;&#90;&#95;&#48;&#41;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#49;&#44;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#119;&#104;&#101;&#114;&#101;&#32;&#125;&#32;&#90;&#95;&#48;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#48;&#46;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p>Example: <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-69a8431ee7ff03ec15f414943ba4bf51_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#112;&#105;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: -3px;\"\/> is a Gaussian, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-d30352eb8fb0be71633a3047e19e5a57_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#112;&#105;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"16\" style=\"vertical-align: -3px;\"\/> is the target distribution.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"630\" src=\"http:\/\/38.246.252.17:8080\/wp-content\/uploads\/2025\/03\/scratch-14-1024x630.jpeg\" alt=\"\" class=\"wp-image-265\" srcset=\"https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-14-1024x630.jpeg 1024w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-14-300x185.jpeg 300w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-14-768x473.jpeg 768w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-14-1536x946.jpeg 1536w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-14.jpeg 1720w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Math <\/h1>\n\n\n\n<p><em><strong>(In understandable language)<\/strong><\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Vector field<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-cab43c4125055127cad36315fe65a865_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;&#40;&#120;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"37\" style=\"vertical-align: -5px;\"\/>: A vector field defined in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-f9868b4451c5811a288f7fdd10be5558_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#97;&#116;&#104;&#98;&#98;&#123;&#82;&#125;&#94;&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"21\" style=\"vertical-align: 0px;\"\/> that indicates the direction and magnitude at each point <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-ede05c264bba0eda080918aaa09c4658_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/>.<\/li>\n\n\n\n<li><strong>Velocity field<\/strong> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-ddae8b4838e070fbcd8e9242438fdde8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#118;&#40;&#120;&#44;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"46\" style=\"vertical-align: -5px;\"\/>: A special type of vector field that indicates the rate of change and tangent direction of each point <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-ede05c264bba0eda080918aaa09c4658_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#120;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/>. Here, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-b4e3cbf5d4c5c6d9b702dd139f14c147_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/> represents the time step.<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">Method:<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Rectified Flow<\/h2>\n\n\n\n<p>We learn <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-f9ed275b0bf1633b7ee83b78fcc28273_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/> implicitly by constructing an Ordinary Differential Equation(ODE):<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-c99a978234c780163efa9c6eed8aeafe_l3.png\" height=\"36\" width=\"305\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#90;&#95;&#116;&#32;&#61;&#32;&#118;&#40;&#90;&#95;&#116;&#44;&#32;&#116;&#41;&#44;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#90;&#95;&#48;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#48;&#44;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#92;&#102;&#111;&#114;&#97;&#108;&#108;&#32;&#116;&#32;&#92;&#105;&#110;&#32;&#91;&#48;&#44;&#49;&#93;&#46;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p>Intuitively, the best way to get <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-6226b34569d7d55bd64e6f80529e96d9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#90;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"17\" style=\"vertical-align: -3px;\"\/> from <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-393f5ad83b9a7da8b47acdc7119eeb43_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#90;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"18\" style=\"vertical-align: -3px;\"\/> is to have a &#8220;straight&#8221; flow.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"465\" src=\"http:\/\/38.246.252.17:8080\/wp-content\/uploads\/2025\/03\/scratch-15-1024x465.jpeg\" alt=\"\" class=\"wp-image-267\" srcset=\"https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-15-1024x465.jpeg 1024w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-15-300x136.jpeg 300w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-15-768x348.jpeg 768w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-15-1536x697.jpeg 1536w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/scratch-15.jpeg 1964w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>So we need to find an ODE to match the linear interpolation of points from <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-69a8431ee7ff03ec15f414943ba4bf51_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#112;&#105;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"17\" style=\"vertical-align: -3px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-d30352eb8fb0be71633a3047e19e5a57_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#112;&#105;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"16\" style=\"vertical-align: -3px;\"\/>.<\/p>\n\n\n\n<p>Observe <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-77efdf7039e4db191a978f2bb18f735b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#95;&#48;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"63\" style=\"vertical-align: -3px;\"\/>, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-e52752bd55fa598d87e9fbbf6fa6e435_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#95;&#49;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"62\" style=\"vertical-align: -3px;\"\/>. Let <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-e7ff213ae3ac7102ea50143656c95eb4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#95;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"20\" style=\"vertical-align: -3px;\"\/> for <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-71cb59b47162bcfb713d829c70c6278a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;&#32;&#92;&#105;&#110;&#32;&#91;&#48;&#44;&#49;&#93;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"62\" style=\"vertical-align: -5px;\"\/> be the linear interpolation of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-451209c728f2696c4f1d6415233754c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"21\" style=\"vertical-align: -3px;\"\/> and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-fbc579503a1fbbbd71d78e240a71eee9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"22\" style=\"vertical-align: -3px;\"\/>:<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-76848afcbd53128f97ea31a470e96856_l3.png\" height=\"19\" width=\"261\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#88;&#95;&#116;&#32;&#61;&#32;&#116;&#32;&#88;&#95;&#49;&#32;&#43;&#32;&#40;&#49;&#45;&#116;&#41;&#32;&#88;&#95;&#48;&#44;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#116;&#32;&#92;&#105;&#110;&#32;&#91;&#48;&#44;&#49;&#93;&#46;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p>We can have a trivial ODE:<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-e9e3275cee61cfba791cf00ccd32972b_l3.png\" height=\"36\" width=\"231\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#88;&#95;&#116;&#32;&#61;&#32;&#88;&#95;&#49;&#32;&#45;&#32;&#88;&#95;&#48;&#44;&#32;&#92;&#113;&#117;&#97;&#100;&#32;&#92;&#102;&#111;&#114;&#97;&#108;&#108;&#32;&#116;&#32;&#92;&#105;&#110;&#32;&#91;&#48;&#44;&#49;&#93;&#46;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>Note that this ODE is not causal or forward simulatable<\/em>, as we need to know <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-451209c728f2696c4f1d6415233754c9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#88;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"21\" style=\"vertical-align: -3px;\"\/> when <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-ea0cb4d5ee957d38b80b2ea41ad1605b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;&#32;&#60;&#32;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"38\" style=\"vertical-align: -2px;\"\/> in order to calculate <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-36e6f50f2f2c382dd6781265dbc325f4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#88;&#95;&#49;&#32;&#45;&#32;&#88;&#95;&#48;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"78\" style=\"vertical-align: -5px;\"\/>.<\/li>\n<\/ul>\n\n\n\n<p>So we want our ODE <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-6304061f8fe5fd4cedfa3e4e67dcdb8d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#116;&#125;&#32;&#90;&#95;&#116;&#32;&#61;&#32;&#118;&#40;&#90;&#95;&#116;&#44;&#32;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"109\" style=\"vertical-align: -6px;\"\/> to be as close as possible to the trivial ODE.<\/p>\n\n\n\n<p>A simple way is to optimize <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-ef71511c70f0e4b25cc6bd69f3bc20c2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#118;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> by minimizing:<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 44px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-2e01c614663f7477a0a2cf72de9fd63d_l3.png\" height=\"44\" width=\"359\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#109;&#105;&#110;&#95;&#118;&#32;&#92;&#109;&#97;&#116;&#104;&#98;&#98;&#123;&#69;&#125;&#95;&#123;&#88;&#95;&#48;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#48;&#44;&#32;&#88;&#95;&#49;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#49;&#125;&#32;&#92;&#105;&#110;&#116;&#95;&#48;&#94;&#49;&#32;&#124;&#32;&#40;&#88;&#95;&#49;&#32;&#45;&#32;&#88;&#95;&#48;&#41;&#32;&#45;&#32;&#118;&#40;&#88;&#95;&#116;&#44;&#32;&#116;&#41;&#32;&#124;&#94;&#50;&#32;&#100;&#116;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><br><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-5e4cb076e7acbb2ee0829e7a28378902_l3.png\" height=\"19\" width=\"215\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#119;&#104;&#101;&#114;&#101;&#32;&#88;&#95;&#116;&#32;&#61;&#32;&#116;&#32;&#88;&#95;&#49;&#32;&#43;&#32;&#40;&#49;&#45;&#116;&#41;&#32;&#88;&#95;&#48;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p>And <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-ef71511c70f0e4b25cc6bd69f3bc20c2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#118;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> can simply be a neural network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reflow: Straight Flows<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"436\" src=\"http:\/\/38.246.252.17:8080\/wp-content\/uploads\/2025\/03\/Pasted-image-20250313142318-1-1024x436.png\" alt=\"\" class=\"wp-image-263\" srcset=\"https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/Pasted-image-20250313142318-1-1024x436.png 1024w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/Pasted-image-20250313142318-1-300x128.png 300w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/Pasted-image-20250313142318-1-768x327.png 768w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/Pasted-image-20250313142318-1-1536x654.png 1536w, https:\/\/www.toothlessos.xyz\/wp-content\/uploads\/2025\/03\/Pasted-image-20250313142318-1-2048x871.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The method above gives us the flow (b). In order to get flow (c), we can do:<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 44px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-1e1a02a06e663f08ee204be114ae36d3_l3.png\" height=\"44\" width=\"379\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#92;&#109;&#105;&#110;&#32;&#92;&#105;&#110;&#116;&#95;&#48;&#94;&#49;&#32;&#92;&#109;&#97;&#116;&#104;&#98;&#98;&#123;&#69;&#125;&#95;&#123;&#88;&#95;&#48;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#48;&#44;&#32;&#88;&#95;&#49;&#32;&#92;&#115;&#105;&#109;&#32;&#92;&#112;&#105;&#95;&#49;&#125;&#32;&#124;&#32;&#40;&#88;&#95;&#49;&#32;&#45;&#32;&#88;&#95;&#48;&#41;&#32;&#45;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#70;&#108;&#111;&#119;&#125;&#95;&#49;&#32;&#40;&#88;&#95;&#116;&#41;&#32;&#124;&#94;&#50;&#32;&#100;&#116;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p> <p class=\"ql-center-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.toothlessos.xyz\/wp-content\/ql-cache\/quicklatex.com-5e4cb076e7acbb2ee0829e7a28378902_l3.png\" height=\"19\" width=\"215\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#119;&#104;&#101;&#114;&#101;&#32;&#88;&#95;&#116;&#32;&#61;&#32;&#116;&#32;&#88;&#95;&#49;&#32;&#43;&#32;&#40;&#49;&#45;&#116;&#41;&#32;&#88;&#95;&#48;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p>We call it 2-rectified flow.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Note that we can do such a process multiple times.<\/li>\n\n\n\n<li>Always remember the Reflow process can speed up the generate process, and will not improve the generation performance.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Modern diffusion models, like Stable Diffusion 3 and fl [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[31,32,20],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-ml","tag-diffusion","tag-flow","tag-machine-learning"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":8,"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/posts\/261\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.toothlessos.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}