Skip to content

Fix hardcoded absolute import in peft_lora.py causing 'No module named pipelines' error #545

@livepeer-tessa

Description

@livepeer-tessa

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_key

This 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_key

Or 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions