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

Update evaluation and inference code to handle other precisions and models #179

Merged
merged 8 commits into from
Nov 14, 2024

Conversation

coryMosaicML
Copy link
Collaborator

Currently inference and eval code assumes amp_fp16 at inference which is no longer correct for some models. This PR makes this somewhat configurable, and fixes some precision bugs during inference associated with the the t5 text encoder.

Changes:

  • Update clean_fid_eval.py and evaluate.py to run using the image dataset, which allows the same dataset config to be used regardless of the model type. Note this is a config breaking change.
  • Add support for multiple remotes in the image dataset
  • Add option to specify precision in generate_geneval_images.py
  • Add a dtype option to the generic ModelInference class
  • Disable autocast in precomputed_text_latent_diffusion.py for the computation of text embeddings at inference, and also fix a minor sequence length bug.

@coryMosaicML coryMosaicML merged commit ba8ca02 into mosaicml:main Nov 14, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants