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:47-60) when a model IS loaded and not loading, but the active model lacks hasAudioInput. The message names the offending model via its display name, externalModelLabel(checkpoint) for external:: ids (issue #8405), or the raw checkpoint string. It fires at file-pick time, mirroring the image adapter gate, and is accompanied by a toast.
Source
Thrown at scripts/diffusion_bench.py:172
# ── load + generate ────────────────────────────────────────────────────────
def _wait_for_load(backend: Any, timeout_s: int = 2400) -> None:
deadline = time.time() + timeout_s
last = None
while time.time() < deadline:
p = backend.load_progress()
phase = p.get("phase")
if phase != last:
last = phase
frac = p.get("fraction") or 0.0
bt = (p.get("bytes_total") or 0) / 1e9
print(f" load phase={phase} frac={frac:.3f} total={bt:.2f}GB", flush = True)
if phase == "ready":
return
if phase == "error":
raise RuntimeError(f"load error: {p.get('error')}")
time.sleep(2)
raise TimeoutError(f"model load did not reach ready within {timeout_s}s")
def _generate_once(backend: Any, args: argparse.Namespace) -> Any:
"""One generation at the fixed seed; returns the first PIL image."""
result = backend.generate(
prompt = args.prompt,
width = args.width,
height = args.height,
steps = args.steps,
guidance = args.guidance,
seed = args.seed,
batch_size = args.batch_size,
)
images = result["images"]
return images[0]
View on GitHub (pinned to 203007d190)
Solutions
- Load a model that accepts audio input (e.g. an audio-capable multimodal model) before attaching audio files.
- If using an external provider, pick a model known to accept audio (e.g. a provider model with an audio tier); verify its capability metadata in the models list.
- Remove the audio attachment and send the message as text-only if audio is not essential.
- As a developer adding provider models, ensure the model registry entry sets hasAudioInput so the gate can recognize it.
Defensive patterns
Strategy: validation
Validate before calling
function modelAcceptsAudio(state: { params: { checkpoint: string }; models: Array<{id: string; hasAudioInput?: boolean}>; modelLoading: boolean }): boolean {
const m = state.models.find((x) => x.id === state.params.checkpoint);
return !!state.params.checkpoint && !state.modelLoading && !!m?.hasAudioInput;
} Try / catch
try {
await adapter.add({ file });
} catch (error) {
// adapter already toasts; swallow to avoid a double toast
if (!(error instanceof Error && /cannot accept audio/.test(error.message))) throw error;
} Prevention
- Hide or disable the audio attach affordance when the active model lacks hasAudioInput.
- Check useChatRuntimeStore.getState().models for hasAudioInput before showing the audio picker entry.
- Ensure external provider model metadata sets audio capabilities so the gate is accurate.
When it happens
Trigger: User opens the 'Add photos & files' picker and selects an audio file while the loaded checkpoint is a text/vision-only model or an external provider model whose registry entry lacks audio input capability. The check is activeModel?.hasAudioInput === undefined/false — including external models that have no row in state.models at all.
Common situations: Loading a small local LLM (no audio tower) and trying to attach a voice memo; switching to an OpenAI-compatible provider whose model metadata does not advertise audio; using a Whisper-typed LoRA where the base checkpoint id resolves to a non-audio row.
Related errors
- model load did not reach ready within {timeout_s}s
- load error: {p.get('error')}
- 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/6c5cad7bdb2ea0a4.
Report an issue: GitHub.