diffusers
f6e1c4d1 - [tests] guard peft imports in test_lora_loader_utils (#14434)

Commit
5 days ago
[tests] guard peft imports in test_lora_loader_utils (#14434) The Hub staging-tests job runs `pytest -m "is_staging_test" tests`, which imports every test module at collection time, but that job doesn't install peft. The top-level `from peft import ...` added in #14385 therefore breaks collection with exit code 2 on every PR. Guard the imports behind `is_peft_available()` (as `tests/lora/utils.py` already does) and mark the one test that needs them with `require_peft_backend`. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
Parents
Loading