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

Add optional return for hidden states[SDXL compatibility] #657

Closed
wants to merge 0 commits into from

Conversation

nbardy
Copy link

@nbardy nbardy commented Oct 6, 2023

Certain downstream tasks require operating on hidden states.

Most notably SDXL is conditioned on these.

This is currently a draft, but I’d like to upstream this after it’s finished. Will be aiming to get the tests working in a few days.

Wanted to open up discussion about the TransformerOutput class mostly.

Would be nice to have something standardized to return from CLIP’s with optional.

@nbardy nbardy changed the title Add Add optional return for hidden states[SDXL compatibility] Oct 6, 2023
@rwightman
Copy link
Collaborator

@nbardy so I understand the goals here, and it certainly makes it more HF transformers like w/ the output class, but there's a big problem in that it completely breaks compat for any existing users of OpenCLIP that are using either the tuple or dict outputs.

This could be achieved as an addon to the dict output (leaving tuple output for basic use), which would maintain compatiblity...

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.

None yet

2 participants