You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed something when loading checkpoints other than the pretrained ones and wanted to understand what the intended behavior was. For example, loading and saving a B32 pretrained checkpoint like the following;
However, when using an architecture that does not share the same defaults results in different behavior. For example, running the above for a SigLip model;
Is this intended behavior? I understand you can pass through the parameters for the preprocess explicitly but I had expected the preprocess to inherit defaults from the architecture since these seem to be already used for loading pretrained. For example -
@jn2clark there are no defaults for the architecture, the arch config covers only the model. The preprocess cfg (mean/std) are part of the pretrained mappings and there is one per pretrained weight instance, which could have many for one arch, they can also be specified in the HF hub config which includes both the preproces and arch config.
So, without adding functionality to pass a file containing preprocess config (or the full HF hub like config with both) separately or in a folder with the checkpoint, you can't easily pass those around locally without using the args.
I have thought about this a little be in context of #883 (that solution doesn't work) but could add support for saving/loading folder w/ the full config + checkpoint.
Hi,
I noticed something when loading checkpoints other than the pretrained ones and wanted to understand what the intended behavior was. For example, loading and saving a B32 pretrained checkpoint like the following;
results in the prepocess having the same configurations across both methods. It looks like
However, when using an architecture that does not share the same defaults results in different behavior. For example, running the above for a SigLip model;
results in the preprocess for loading the saved checkpoint to use default settings rather than the settings for the SigLip architecture.
Is this intended behavior? I understand you can pass through the parameters for the preprocess explicitly but I had expected the preprocess to inherit defaults from the architecture since these seem to be already used for loading pretrained. For example -
open_clip/src/open_clip/pretrained.py
Line 42 in fc5a37b
Thanks!
The text was updated successfully, but these errors were encountered: