Skip to content
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

Allowing decoder only definition #617

Open
nh2liu opened this issue Dec 29, 2022 · 2 comments · May be fixed by #744
Open

Allowing decoder only definition #617

nh2liu opened this issue Dec 29, 2022 · 2 comments · May be fixed by #744

Comments

@nh2liu
Copy link

nh2liu commented Dec 29, 2022

🚀 Feature

Allow only a decoder config to be defined.

Motivation

I want to define only a decoder and pass in a memory vector from another source.

Pitch

I tried this change locally and it allows me to do what I want it to do: main...nh2liu:xformers:patch-1

Not sure if this has extending implications because it seems this code has been around for a while but the comments # If decoder: either use the encoder ouput, or just decode, both options are possible indicate that this may be a bug.

Alternatives

  • NOOP encoder will also allow this functionality.
@danthe3rd
Copy link
Contributor

cc @blefaudeux @fmassa maybe?

@blefaudeux
Copy link
Contributor

@danthe3rd thanks for the ping ! @nh2liu makes a lot of sense, thanks for the patch ! I would just alter it a tiny bit: only clone the input if there are no encoders, else you'll incur a useless memcopy. Other than that looks great to me, and I would add this configuration (decoder only) to the existing unit test to make sure that this is nailed ? Just my two cents !

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 a pull request may close this issue.

3 participants