{"record":{"id":"3e704aff77e8dcb6","repo":"unslothai/unsloth","slug":"load-error-p-get-error-3e704a","errorCode":null,"errorMessage":"load error: {p.get('error')}","messagePattern":"load error: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"warning","filePath":"scripts/diffusion_quality.py","lineNumber":187,"sourceCode":"\ndef _cuda_reset_peak() -> None:\n    try:\n        import torch\n        if torch.cuda.is_available():\n            torch.cuda.reset_peak_memory_stats()\n            torch.cuda.synchronize()\n    except Exception:\n        pass\n\n\ndef _wait_for_load(backend: Any, timeout_s: int = 3600) -> None:\n    deadline = time.time() + timeout_s\n    while time.time() < deadline:\n        p = backend.load_progress()\n        if p.get(\"phase\") == \"ready\":\n            return\n        if p.get(\"phase\") == \"error\":\n            raise RuntimeError(f\"load error: {p.get('error')}\")\n        time.sleep(2)\n    raise TimeoutError(\"model load did not reach ready\")\n\n\ndef _hf_file_size_mib(repo: str, filename: str) -> Optional[int]:\n    # Local paths: stat directly, since the Hub lookup returns None and _recommend would drop them.\n    try:\n        local = Path(repo).expanduser()\n        if local.is_dir():\n            f = local / filename\n            if f.is_file():\n                return int(f.stat().st_size // (1024 * 1024))\n        elif local.is_file():\n            return int(local.stat().st_size // (1024 * 1024))\n    except Exception:\n        pass\n    try:\n        from huggingface_hub import HfApi","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/scripts/diffusion_quality.py#L169-L205","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"function canAttachAudio(adapter: AudioAttachmentAdapter, state: { pendingAudioBase64?: unknown }): boolean {\n  return adapter.attachmentIds.size === 0 && !state.pendingAudioBase64;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await adapter.add({ file });\n} catch (error) {\n  if (error instanceof Error && error.message === 'Only one audio file can be attached per message.') {\n    // prompt user to remove the existing attachment first\n  } else throw error;\n}","preventionTips":["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."],"tags":["audio","attachments","validation","frontend"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}