facebookresearch / facebookresearch/flow_matching

The scale of timesteps in the text modeling examples

Open
#17 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
373
PR merge metrics
No merged PRs in 30d

Description

Hi! Really enjoying the code and the paper. These are the most comprehensive resources on flow matching.

I noticed that [the text modeling example](https://github.com/facebookresearch/flow_matching/blob/main/examples/text/model/transformer.py) might contain a subpar encoding of timesteps. In short, it uses the default `max_period` parameter from the GLIDE repository, which is a diffusion model with discrete timesteps in the range {0, 1, 2, ...}. However, as I understand correctly, in your example, all timesteps are sampled from the [0, 1] time horizon. See [the similar issue](https://github.com/willisma/SiT/issues/24) that I've opened in the SiT repository. I think the most elegant solution is to rescale the timesteps similar to how [Flux](https://github.com/black-forest-labs/flux/blob/main/src/flux/modules/layers.py#L28) handles them.

Let me know if I am misunderstanding something, as I am just on my way of learning the flow matching framework.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.