Skip to content

Conversation

@sayakpaul
Copy link
Member

Should be useful to the community.

@sayakpaul sayakpaul marked this pull request as ready for review February 28, 2023 15:47
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 28, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Left some suggestions

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool!


![edit-instruction](https://huggingface.co/datasets/diffusers/docs-images/resolve/main/evaluation_diffusion_models/edit-instruction.png)

One strategy to evaluate such a model is to measure the consistency of the change between the two images (in [CLIP](https://huggingface.co/docs/transformers/model_doc/clip) space) with the change between the two image captions (as shown in [CLIP-Guided Domain Adaptation of Image Generators](https://arxiv.org/abs/2108.00946)). This is referred to as the "**CLIP directional similarity**".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Maybe we can draw parallels with "guidance scale" here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the following?

One could consider this measure to be orthogonal to the use of guidance_scale in the DiffusionPipeline. The higher the guidance_scale, the more constrained the generation becomes on the input text prompt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that the method looks similar to the use of guidance scale to encourage the model to go in a direction that improves caption-image similarity. But reading the full post again is going to be more confusing than clarifying, so I'd just leave it as it is now :)

@pcuenca
Copy link
Member

pcuenca commented Mar 1, 2023

Maybe also mention that our training scripts have built-in tensorboard and W&B logging, so we recommend you check both qualitative and quantitative measures while training.

@sayakpaul
Copy link
Member Author

@pcuenca thanks so much for your comments! I addressed all of them except for #2516 (comment). Let me know your thoughts on the latest changes.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! thank you so much for adding this! I learnt a lot from it

@sayakpaul
Copy link
Member Author

Thanks for all the reviews. I have addressed all of them. I figured that the readers of the doc might want to do hands-on with the content presented in it. So, worked on huggingface/notebooks#336 as well.

@williamberman @pcuenca could you do one final pass and comment?

Copy link
Contributor

@williamberman williamberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! I like it a lot, I think it's a great introduction to evaluation methods.


![edit-instruction](https://huggingface.co/datasets/diffusers/docs-images/resolve/main/evaluation_diffusion_models/edit-instruction.png)

One strategy to evaluate such a model is to measure the consistency of the change between the two images (in [CLIP](https://huggingface.co/docs/transformers/model_doc/clip) space) with the change between the two image captions (as shown in [CLIP-Guided Domain Adaptation of Image Generators](https://arxiv.org/abs/2108.00946)). This is referred to as the "**CLIP directional similarity**".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that the method looks similar to the use of guidance scale to encourage the model to go in a direction that improves caption-image similarity. But reading the full post again is going to be more confusing than clarifying, so I'd just leave it as it is now :)

sayakpaul added a commit to huggingface/notebooks that referenced this pull request Mar 15, 2023
@sayakpaul sayakpaul merged commit c9477bf into main Mar 15, 2023
@sayakpaul sayakpaul deleted the docs/evaluation-diffusion-models branch March 15, 2023 11:35
sayakpaul added a commit to huggingface/notebooks that referenced this pull request Mar 15, 2023
w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
…gingface#2516)

* add a documentation page for evaluating diffuion models.

* fix: checkpoint link.

* Apply suggestions from code review

Co-authored-by: Patrick von Platen <[email protected]>
Co-authored-by: Kashif Rasul <[email protected]>

* formatting fixes.

* formatting fixes.

* link to partiprompts dataset on hub.

* reflect on Pedro's comments.

Co-authored-by: Pedro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pedro Cuenca <[email protected]>

* reflect on Pedro's comments.

Co-authored-by: Pedro <[email protected]>

* update mention of FID.

* Apply suggestions from code review

Co-authored-by: Will Berman <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>

* minor nit.

* finish edges and add colab notebook.

* Apply suggestions from code review

Co-authored-by: Pedro Cuenca <[email protected]>

* run formatting.

* additional feedback.

---------

Co-authored-by: Patrick von Platen <[email protected]>
Co-authored-by: Kashif Rasul <[email protected]>
Co-authored-by: Pedro <[email protected]>
Co-authored-by: Will Berman <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…gingface#2516)

* add a documentation page for evaluating diffuion models.

* fix: checkpoint link.

* Apply suggestions from code review

Co-authored-by: Patrick von Platen <[email protected]>
Co-authored-by: Kashif Rasul <[email protected]>

* formatting fixes.

* formatting fixes.

* link to partiprompts dataset on hub.

* reflect on Pedro's comments.

Co-authored-by: Pedro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pedro Cuenca <[email protected]>

* reflect on Pedro's comments.

Co-authored-by: Pedro <[email protected]>

* update mention of FID.

* Apply suggestions from code review

Co-authored-by: Will Berman <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>

* minor nit.

* finish edges and add colab notebook.

* Apply suggestions from code review

Co-authored-by: Pedro Cuenca <[email protected]>

* run formatting.

* additional feedback.

---------

Co-authored-by: Patrick von Platen <[email protected]>
Co-authored-by: Kashif Rasul <[email protected]>
Co-authored-by: Pedro <[email protected]>
Co-authored-by: Will Berman <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>
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.

9 participants