-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add vae_roundtrip.py example #7104
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 vae_roundtrip.py example #7104
Conversation
|
why do we need this? cc @sayakpaul |
|
You dont need it. If you think this is not a worthwhile example script, we can just close the ticket. I just submitted this because it took me a while to figure out how to use the VAE due to its non-tensor return values. And I already wrote the script in the first place to evaluate how good/bad the standard SD VAEs are with heavily aliased images. |
You can mitigate that by specifying I am okay accommodating this script under the |
|
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. |
Sure why not. Alternatively there is also |
|
|
cfca374 to
12522a6
Compare
|
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. |
|
Will merge after the CI is green. Sorry for the delay. |
|
We need to make sure the code quality test passes. |
|
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. |
|
@asomoza WDYT about this example? |
|
I like the idea but maybe focus it to a more practical use case? This is used a lot to store the embeddings of the images, so probably a But I also think it's fine as an example if people struggle on how to do this, since we now have the community scripts, maybe this can be simplified and put there? |
Yes exactly. I wouldn't mind having it under @thomaseding, apologies for the delay on our side. Could you maybe fix the styling problems so that we can merge this? |
|
I can't figure out why the style linter is complaining about unsorted imports. Anyway I fixed a scaling bug and also added TAESD support. |
|
You can either search for the solutions and use them for the codes provided there "F403", for example. Or you can do "no qa" like done here: diffusers/benchmarks/base_classes.py Line 24 in 7bfc1ee
|
254d680 to
90cd240
Compare
|
@asomoza could you give this a final review and merge? |
|
Thanks a lot! |
* Add vae_roundtrip.py example * Add cuda support to vae_roundtrip * Move vae_roundtrip.py into research_projects/vae * Fix channel scaling in vae roundrip and also support taesd. * Apply ruff --fix for CI gatekeep check --------- Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
What does this PR do?
Adds
examples/inference/vae_roundtrip.pyto demonstrate VAE inference without any other models or pipelines.Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
This just introduces a new demo example file. No need to update documents or update tests.