Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] The inference speed of MAR and MAR-Diffusion #60

Open
EPIC-Lab-sjtu opened this issue Oct 14, 2024 · 1 comment
Open

[Question] The inference speed of MAR and MAR-Diffusion #60

EPIC-Lab-sjtu opened this issue Oct 14, 2024 · 1 comment

Comments

@EPIC-Lab-sjtu
Copy link

Thank you for your most valuable contribution in the paper! Currently, our lab are trying to follow this work, but find some problems in the inference costs of MAR and MAR-Diffusion Models.

  1. We find that in the inference period, the MLP for diffusion tasks about 70% inference costs, much more than the encoder and the decoder. This may suggest that MAR-Diffusion should have much more computation costs (at least 2 times more) compared with the MAR in the same model size.
  2. However, we find that in Figure 6 of the paper, the computation costs of MAR-Diffusion are just slightly higher than MAR (it seems that there are only 10% inference cost improvements), which conflicts with the first observation.

Hence, we are curious about why this happens, why the inference costs of MAR-Diffusion are similar to MAR when the additional computation of MAR-Diffusion (i.e., the diffusion MLP with 100 steps) are much more than the original encoder-decoder costs.

Thanks for your reading!

@LTH14
Copy link
Owner

LTH14 commented Oct 14, 2024

Thank you for your interest! We tested the inference speed using a batch size of 256, generating 256 images simultaneously. In this case, the MLP component accounts for only 10-20% of the inference time.

On the other hand, with a smaller batch size, the small MLP in DiffLoss cannot utilize the GPU optimally. In this scenario, the MLP occupies a larger portion of the inference time.

In terms of FLOPs, the MLP's inference FLOPs is ~10% of the encode-decoder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant