-
Notifications
You must be signed in to change notification settings - Fork 6.7k
image generation main process checks #2631
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
image generation main process checks #2631
Conversation
| if accelerator.is_main_process: | ||
| for tracker in accelerator.trackers: | ||
| if tracker.name == "tensorboard": | ||
| np_images = np.stack([np.asarray(img) for img in images]) | ||
| tracker.writer.add_images("validation", np_images, epoch, dataformats="NHWC") | ||
| if tracker.name == "wandb": | ||
| tracker.log( | ||
| { | ||
| "validation": [ | ||
| wandb.Image(image, caption=f"{i}: {args.validation_prompt}") | ||
| for i, image in enumerate(images) | ||
| ] | ||
| } | ||
| ) | ||
| for tracker in accelerator.trackers: | ||
| if tracker.name == "tensorboard": | ||
| np_images = np.stack([np.asarray(img) for img in images]) | ||
| tracker.writer.add_images("validation", np_images, epoch, dataformats="NHWC") | ||
| if tracker.name == "wandb": | ||
| tracker.log( | ||
| { | ||
| "validation": [ | ||
| wandb.Image(image, caption=f"{i}: {args.validation_prompt}") | ||
| for i, image in enumerate(images) | ||
| ] | ||
| } |
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.
this is already gated on if this is the main process on line 779 https://github.com/huggingface/diffusers/pull/2631/files#diff-911b29c0306dfe271bf7f6c3070c94623b2141e3f02a37c2f28cb726bba5ee3eL779
|
The documentation is not available anymore as the PR was closed or merged. |
yiyixuxu
left a comment
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.
Thanks!
patrickvonplaten
left a comment
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.
Thanks a lot!
|
I'd like to review this today for my own understanding. But feel free to merge if need be before that. |
sayakpaul
left a comment
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.
Thanks for streamlining this!
pcuenca
left a comment
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.
Awesome, thanks!
No description provided.