본문 바로가기

AI/Paper - Theory

[Rectified Flow 간단한 설명] - Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow

반응형

*Rectified flow를 위한 간단한 리뷰 글입니다! 궁금하신 점은 댓글로 남겨주세요!

 

Rectified flow: https://arxiv.org/abs/2209.03003

 

Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow

We present rectified flow, a surprisingly simple approach to learning (neural) ordinary differential equation (ODE) models to transport between two empirically observed distributions π_0 and π_1, hence providing a unified solution to generative modeling

arxiv.org


Contents

1. Simple Introduction

2. What is Rectified Flow

3. WAN2.1 / FLUX


Simple Introduction

Rectified flow 설명

요즘 diffusion 모델들이 엄청나게 유명하다는 것은 AI, 특히 비전을 공부하는 사람이면 누구나 알 것이다!

하지만 diffusion에서 DDIM based와 Flow based로 나누어지게 되는데, 요즘 나오는 생성 AI는 전부 rectified flow 기반이다.

 

Rectified flow는, (제 생각에는) 선형 흐름과 가까운 의미로 noise 확산 과정을 선형식으로 표현하여 보다 결정적이고 직선적인 path를 통해 diffusion-denoising 과정을 학습하겠다는 관점에서 나왔습니다! 또한 기존 DDIM과는 다르게 noise를 예측한다는 개념보다 velocity를 예측한다고 표현을 합니다!

 

Rectified flow에 대해서 간단하게 알아보러 가시죠!


What is Rectified Flow

rectified flow 수식

더보기

간단하게 rectified flow를 설명하면, 선형식으로 noise를 설명하는 것입니다!

 

X0가 noise, X1이 latent image, sigma가 [0,1] 사이의 값이라고 설정해봅시다!

그렇다면 rectified flow에서의 t 시점의 noise latent X_t는 아래의 수식으로 표현이 됩니다!

X_t = (1-sigma) * X1 + sigma * X0 

 

Rectified flow의 특이한 점은 noise X0를 직접 예측하는 것이 아니라 velocity라는 것을 예측하게 됩니다.

Velocity: X0 - X1 # 즉 X0와 X1 사이의 velocity vector를 예측 (즉, 방향성을 예측하는 것!)

 

그렇다면 velocity를 통해서 어떻게 latent X1으로 복원할까요?

우리는 X0가 velocity + X1으로 표현되는 것을 알고 있으므로, 위에 X_t 수식에 넣으면 아래와 같이 표현이 됩니다!

X1 = X_t - sigma * velocity

 

이것이 rectified flow가 기존 diffusion과의 다른 점 입니다!

*ChatGPT Rectified Flow Velocity 예측 설명: Retified flow target 설명

*좀 더 자세한 Rectified Flow 설명글: https://ostin.tistory.com/225


FLUX / WAN2.1 / 2.2

WAN2.1 (video generation AI): https://github.com/Wan-Video/Wan2.1

 

GitHub - Wan-Video/Wan2.1: Wan: Open and Advanced Large-Scale Video Generative Models

Wan: Open and Advanced Large-Scale Video Generative Models - Wan-Video/Wan2.1

github.com

WAN2.2 (video generation AI): https://github.com/Wan-Video/Wan2.2

 

GitHub - Wan-Video/Wan2.2: Wan: Open and Advanced Large-Scale Video Generative Models

Wan: Open and Advanced Large-Scale Video Generative Models - Wan-Video/Wan2.2

github.com

 

 

FLUX: https://huggingface.co/black-forest-labs/FLUX.1-dev

 

black-forest-labs/FLUX.1-dev · Hugging Face

FLUX.1 [dev] is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions. For more information, please read our blog post. Key Features Cutting-edge output quality, second only to our state-of-the-art model FLUX

huggingface.co


- 2025.08.15 Kyujinpy 작성.

반응형