Closed
Description
Describe the bug
There may be multiple reasons for the Exception: Error while deserializing header: HeaderTooLarge
error message when loading a LoRA, but one of them is caused by passing in /pytorch_lora_weights.bin
instead of just the root directory.
Suggestion: add a check to make certain the user only passes in a directory OR drop the filename part. Also, the LoRA docs currently do not show a full path example which is probably why I hit this.
Reproduction
Example:
# Add LoRA
bad_path = "/some_lora_dir/pytorch_lora_weights.bin"
pipe.load_lora_weights(lora_path) # Error while deserializing header: HeaderTooLarge
lora_path = = "/some_lora_dir"
pipe.load_lora_weights(good_path) # works fine
Logs
No response
System Info
Doesn't matter