-
Notifications
You must be signed in to change notification settings - Fork 227
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
[Safetensors parser] Support optional file path #563
Conversation
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.
What happens if the safetensors index file is inside a folder?
Should we use the folder as the "base" path for the other files?
Co-authored-by: Eliott C. <[email protected]>
cc: @apolinario for the upcoming moon support |
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.
lgtm with a few suggestions!
Co-authored-by: Julien Chaumond <[email protected]>
Looks good, just this question:
(if relevant) |
yes valid question from @coyotte508 actually (read too fast initially) IIRC @Narsil the (we can fix this in a later PR though i guess – and add a test from a real model) |
merging this PR |
Note that for diffusion, the situation is a bit tricky as we have non-diffusers See https://huggingface.co/stabilityai/sdxl-turbo/tree/main
|
@osanseviero yes. So this PR should work, no? |
Yes, this PR is good, but we might need to make some distinction for diffusers in the UI between these two types of safetensors models. |
I think that task is for the moon |
Yes, this indeed is for moon |
Let's open an issue so we don't forget this, ok? |
@osanseviero for diffusers on the main model page i think we will still only parse a file |
Before
Safetensors parser was in assumption that safetensors files are strictly named
model.safetensors
, which is not the case always.This PR
Support optional file names so that other names like
llama3.safetensors
would still work