Closed RobertBiehl closed 1 year ago
Adding tf function decorators to the encode_text and encode_image functions will make them get stored in the saved clip model, might want to add that. For the encode_image function, it doesn't do a lot but the encode_text function has some extra functionality.
Otherwise looks great, thanks for the quick fix!
Adding tf function decorators to the encode_text and encode_image functions will make them get stored in the saved clip model, might want to add that. For the encode_image function, it doesn't do a lot but the encode_text function has some extra functionality.
will add that when I'm back
@isaacgerg this should also solve your issues
@Leterax adding the signatures breaks conversion because the keras weight paths change. So I might have to change some things to make it work. But I'll try it in a followup PR I guess.
@Leterax adding the signatures breaks conversion because the keras weight paths change. So I might have to change some things to make it work. But I'll try it in a followup PR I guess.
ok signatures for encode_text are in after all.
Text encoder model is also now saved with all the logic of encode_text, not just the transformer backbone
Fixes torch version compatibility Similar to fix in #5, but moving to int32 for text encoding, instead of int64. Should be compatible to torch 1.7.1 but increasing requirements due to known vulnerability below torch==1.13.1
text_output parameter should now work as expected (it was incorrectly exporting the visual model before)