-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Examples] Computing FID in unconditional image generation #9245
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Would it not make sense to default to clean-fid
instead?
if global_step % args.checkpointing_steps == 0: | ||
if accelerator.is_main_process: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe both of these could be clubbed together?
Yes, it's a great idea to include clean FID. We could also add an option for |
@@ -618,6 +647,41 @@ def transform_images(examples): | |||
save_path = os.path.join(args.output_dir, f"checkpoint-{global_step}") | |||
accelerator.save_state(save_path) | |||
logger.info(f"Saved state to {save_path}") | |||
|
|||
# Compute FID | |||
if args.compute_fid: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because of this line, it's better to keep them separate
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
@alirezadizaji gentle ping regarding the open comments. |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
What does this PR do?
Since sometimes there's a need for quantitative assessment of image generation, this PR brings an example of FID computation, particularly for unconditional image generation. Using it is quite straightforward: simply by passing the
--compute_fid
argument in CLI, now it's possible to log the FID score in the tracker.Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.