Skip to content

Conversation

@dg845
Copy link
Collaborator

@dg845 dg845 commented Jan 10, 2026

What does this PR do?

This PR adds the supports_text_encoder_loras flag to PeftLoraLoaderMixinTests, which if set to False will skip the following text encoder LoRA tests (following #12933):

  1. test_simple_inference_with_text_lora
  2. test_simple_inference_with_text_lora_and_scale
  3. test_simple_inference_with_text_lora_fused
  4. test_simple_inference_with_text_lora_save_load
  5. test_simple_inference_with_partial_text_lora
  6. test_simple_inference_save_pretrained_with_text_lora

support_text_encoder_loras is then used in the PeftLoraLoaderMixinTests subclasses to skip these tests for LoRA loaders which don't support text encoder LoRAs. Note that previously most test classes did not skip test_simple_inference_save_pretrained_with_text_lora, which means that this test will now be skipped instead of running and passing as it did previously.

This PR also makes the following changes to LoraBaseMixin subclasses (from #12933 (comment)):

  1. In load_lora_weights, makes the invalid LoRA format error message more informative by describing the valid checkpoint format.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sayakpaul

@dg845 dg845 requested a review from sayakpaul January 10, 2026 07:14
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants