Skip to content

Peaks computation loads entire WAVs into RAM #286

Closed

Description

@thcp

Location: collect.py:198
Severity: HIGH

sf.read() materializes the full file: a 20-minute stereo stem is ~420 MB of float32, done for up to 8 files back-to-back — right after Demucs has already stressed memory. On an 8 GB Mac Mini this is a plausible contributor to the failure reported.
Stream with sf.blocks() (fixed 1500-bucket min/max fold) — constant ~few-MB memory, same output.

From the health report. Part of #274 (Phase 3 — Performance).

Activity

  1. added a commit that references this issue on Jul 17, 2026
    6eb1741
  2. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

performanceSpeed, memory, and resource efficiency

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions