-
Notifications
You must be signed in to change notification settings - Fork 6k
Add paint by example #1533
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
Add paint by example #1533
Conversation
The documentation is not available anymore as the PR was closed or merged. |
…/diffusers into add_paint_by_example
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py
Outdated
Show resolved
Hide resolved
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py
Outdated
Show resolved
Hide resolved
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.
Very very cool!
Question: should we place the folder inside pipelines/stable_diffusion
so it's a bit more visible?
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
Outdated
Show resolved
Hide resolved
src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Pedro Cuenca <[email protected]>
@@ -302,7 +302,7 @@ def test_attention_slicing_forward_pass(self): | |||
output_with_slicing = pipe(**inputs)[0] | |||
|
|||
max_diff = np.abs(output_with_slicing - output_without_slicing).max() | |||
self.assertLess(max_diff, 1e-5, "Attention slicing should not affect the inference results") | |||
self.assertLess(max_diff, 1e-3, "Attention slicing should not affect the inference results") |
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.
attention slicing forces different batch size matrix multiplication - there is no way we can guarantee a 1e-5 diff only IMO
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.
cc @anton-l
New paper -> new folder IMO |
* add paint by example * mkae loading possibel * up * Update src/diffusers/models/attention.py * up * finalize weight structure * make example work * make it work * up * up * fix * del * add * update * Apply suggestions from code review * correct transformer 2d * finish * up * up * up * up * fix * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * Apply suggestions from code review * up * finish Co-authored-by: Pedro Cuenca <[email protected]>
* add paint by example * mkae loading possibel * up * Update src/diffusers/models/attention.py * up * finalize weight structure * make example work * make it work * up * up * fix * del * add * update * Apply suggestions from code review * correct transformer 2d * finish * up * up * up * up * fix * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * Apply suggestions from code review * up * finish Co-authored-by: Pedro Cuenca <[email protected]>
@patrickvonplaten hello, how to convert diffuser's model to original paintbyexample model type. I find there is no scripts for doing this |
* add paint by example * mkae loading possibel * up * Update src/diffusers/models/attention.py * up * finalize weight structure * make example work * make it work * up * up * fix * del * add * update * Apply suggestions from code review * correct transformer 2d * finish * up * up * up * up * fix * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * Apply suggestions from code review * up * finish Co-authored-by: Pedro Cuenca <[email protected]>
This PR adds https://github.com/Fantasy-Studio/Paint-by-Example
Conversion script works:
Test weights are uploaded
Check with authors: @Fantasy-Studio