In src/providers/local.ts, if embed() is called twice simultaneously before initialization completes, this.initPromise is set but this.pipeline is still null. The second call may race with the first, potentially creating duplicate pipelines or accessing null.
Suggested fix: Use a proper mutex/lock pattern or ensure initPromise is always awaited before accessing this.pipeline.