-
Notifications
You must be signed in to change notification settings - Fork 48
Fix hardcoded absolute import in peft_lora.py causing 'No module named pipelines' error #545
Copy link
Copy link
Closed
Description
Description
LoRA loading fails with ModuleNotFoundError: No module named 'pipelines' when loading adapters via PeftLoRAStrategy.load_adapter().
Error from Grafana logs (Feb 26, 2026)
scope.core.pipelines.wan2_1.lora.strategies.peft_lora - ERROR - StreamDiffusionV2Pipeline.__init__: Failed to load LoRA: No module named 'pipelines'
scope.server.pipeline_manager - ERROR - Failed to load pipeline streamdiffusionv2: StreamDiffusionV2Pipeline.__init__: LoRA loading failed: No module named 'pipelines'
Root Cause
In src/scope/core/pipelines/wan2_1/lora/strategies/peft_lora.py line 414:
from pipelines.wan2_1.lora.utils import find_lora_pair, normalize_lora_keyThis uses a hardcoded absolute import path pipelines.wan2_1.lora.utils that doesn't exist. The module is scope.core.pipelines.wan2_1.lora.utils.
The file already imports other functions from the same module correctly using relative imports at line 7:
from ..utils import (
load_lora_weights,
parse_lora_weights,
sanitize_adapter_name,
standardize_lora_for_peft,
)Fix
Change line 414 to use the same relative import pattern:
from ..utils import find_lora_pair, normalize_lora_keyOr better yet, add these to the existing import block at the top of the file.
Impact
- Pipeline: streamdiffusionv2
- Severity: High - prevents LoRA loading entirely
- Frequency: Multiple occurrences (6+ failures in 12h monitoring window)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels