unslothai/unsloth · warning · RuntimeError
load error: {p.get('error')}
Error message
load error: {p.get('error')} What it means
Thrown by AudioAttachmentAdapter.add (audio-attachment-adapter.ts:66-70) when an audio attachment is already pending for this message — either this adapter instance holds an attachment id (attachmentIds.size > 0, populated at add() and cleared in send()/remove()) or the runtime store already has state.pendingAudioBase64. The backend speech pipeline accepts a single audio part per message, so a second pick is rejected at attach time.
Source
Thrown at scripts/diffusion_quality.py:187
def _cuda_reset_peak() -> None:
try:
import torch
if torch.cuda.is_available():
torch.cuda.reset_peak_memory_stats()
torch.cuda.synchronize()
except Exception:
pass
def _wait_for_load(backend: Any, timeout_s: int = 3600) -> None:
deadline = time.time() + timeout_s
while time.time() < deadline:
p = backend.load_progress()
if p.get("phase") == "ready":
return
if p.get("phase") == "error":
raise RuntimeError(f"load error: {p.get('error')}")
time.sleep(2)
raise TimeoutError("model load did not reach ready")
def _hf_file_size_mib(repo: str, filename: str) -> Optional[int]:
# Local paths: stat directly, since the Hub lookup returns None and _recommend would drop them.
try:
local = Path(repo).expanduser()
if local.is_dir():
f = local / filename
if f.is_file():
return int(f.stat().st_size // (1024 * 1024))
elif local.is_file():
return int(local.stat().st_size // (1024 * 1024))
except Exception:
pass
try:
from huggingface_hub import HfApiView on GitHub (pinned to 203007d190)
Solutions
- Remove the existing audio attachment (X button on the chip) before attaching a different file.
- Merge clips in an external editor first if both are needed, keeping the result under 25MB.
- Send the first audio in its own message, then attach the second in the next message.
- If no audio chip is visible but the error still fires, stale pendingAudioBase64 is set — reload the composer/thread to clear it.
Defensive patterns
Strategy: validation
Validate before calling
function canAttachAudio(adapter: AudioAttachmentAdapter, state: { pendingAudioBase64?: unknown }): boolean {
return adapter.attachmentIds.size === 0 && !state.pendingAudioBase64;
} Try / catch
try {
await adapter.add({ file });
} catch (error) {
if (error instanceof Error && error.message === 'Only one audio file can be attached per message.') {
// prompt user to remove the existing attachment first
} else throw error;
} Prevention
- Disable the audio option in the file picker menu while an audio attachment is already pending.
- Clear pendingAudioBase64 when the composer resets or the thread switches.
- Combine multiple clips externally rather than relying on multi-attach.
When it happens
Trigger: Adding a second audio file through the file picker while the first is still attached (not yet sent or removed). Both a fresh adapter id and a pending base64 payload from a partially-composed message trigger it — including after a send was cancelled mid-flight leaving pendingAudioBase64 set.
Common situations: User picks two clips back-to-back intending to combine them; a previous attachment was never removed after an aborted send; stale pendingAudioBase64 after switching threads without clearing composer state.
Related errors
- load error: {p.get('error')}
- model load did not reach ready within {timeout_s}s
- model load did not reach ready
- unknown family '{name}'
- Refused notebook fetch from {host!r}: not in allowlist {sort
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/3e704aff77e8dcb6.
Report an issue: GitHub.