-
Notifications
You must be signed in to change notification settings - Fork 278
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 HF Auth mixin to Stable Diffusion #1763
Conversation
6f182e1
to
80d36d2
Compare
Looks like it is also needed to setup the env value in the Docker run command so that the Docker container can access to it: https://github.com/pytorch/benchmark/blob/main/.github/workflows/pr-a10g.yml#L38 Use |
… into msaroufim/authsd
The last part that's tripping me up is how to make |
Thanks @xuzhao9 for offline help, the example error was fixed locally I had to run |
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.
Nice to see the CI is green on this PR. Great job!
@msaroufim has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@msaroufim merged this pull request in 411e388. |
Right now stale diffusion and lit-llama are not actually running in CI because they get rate limited by huggingface. since we've now added an auth token as a github secret we can move stable diffusion out of canary and do things like include it in blueberries dashboard
We also added some nice errors so people running in torchbench locally know they will need to have a token to run these models
Anyways auth is a mixin which seems like the right abstraction
Some relevant details about the model
Torchbench has a function
get_module()
that has the intent of testing ann.Module
on an actualtorch.Tensor
Unfortunately a
StableDiffusionPipeline
is not annn.Module
it's a composition of a tokenizer and 3 seperatenn.Modules
an encoder, vae and unet.text_encoder
Text encoder outputs a
BaseModelOutputWithPooling
which has multiple nn modules https://gist.github.com/msaroufim/51f0038863c5cce4cc3045e4d9f9c399vae
Same problem for vae
https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/vae.py#L27
unet
Unet unfortunately does not have a tensor input
For VAE and encoder the test failure is particularly helpful