sd-scripts
sd-scripts copied to clipboard
Oversight when loading model
If you are using a custom amount of tokens rather then the default in clip, then it errors out with a size mismatch. Is there a reason to set the config manually rather then using the one inside of the checkpoint? I mean its stored in the checkpoint in order to be universal, so the program reading the model doesn't have to know it before hand.
Line 1047 to 1073 in model_util.py.
Current fix im using is to just manually change it to match my own config.
On a similar note. It would be nice have the option of adding tokens here, as i feel like its useful for everyone. Its rather simple. My code is just 4 lines: loading as diffusers, adding tokens, saving, and converting back to checkpoint. There might be a batter way, but its simple, and works.