unslothai/unsloth · warning · SttModelIdError

Another dictation model ('{self._model_id}') is still downlo

Error message

Another dictation model ('{self._model_id}') is still downloading; wait for it to finish.

What it means

Raised when a download is requested for model B while the download thread for a different model A is still running. The manager is single-flight: only one dictation model download at a time, so any second, different model_id is rejected with the id of the in-flight download.

Source

Thrown at studio/backend/core/inference/stt_sidecar.py:803

    def start(
        self,
        model_id: str,
        hf_token: Optional[str] = None,
        revision: Optional[str] = None,
    ) -> None:
        model_id = resolve_model_id(model_id)
        hub_cache = _capture_stt_hub_cache()
        with self._lock:
            if self._thread is not None and self._thread.is_alive():
                if self._model_id == model_id:
                    # Joining a cancelling run would silently download nothing.
                    if not self._cancelled:
                        return
                    raise SttModelIdError(
                        f"'{model_id}' is still cancelling; try again in a moment."
                    )
                raise SttModelIdError(
                    f"Another dictation model ('{self._model_id}') is still "
                    "downloading; wait for it to finish."
                )
            self._model_id = model_id
            self._repo = resolve_model_repo(model_id)
            self._revision = None
            self._hub_cache = hub_cache
            self._error = None
            self._total_bytes = None
            self._selected_files = ()
            self._complete = False
            self._cancelled = False
            self._process = None
            thread = threading.Thread(
                target = self._run,
                args = (self._repo, hf_token, revision),
                daemon = True,
            )

View on GitHub (pinned to 203007d190)

Solutions

  1. Wait for the in-flight download of the model named in the message to finish, then retry.
  2. Cancel the current download first, then wait for its cancel to complete (avoiding error 400), then start the new one.
  3. Serialize downloads through a single queue/UI affordance so only one model download can be requested at a time.

Example fix

// before
start_download("whisper-base");
start_download("whisper-large-v3");  // SttModelIdError
// after
await download_complete_or_cancelled();
start_download("whisper-large-v3");
Defensive patterns

Strategy: validation

Validate before calling

with downloader._lock:
    active = downloader._model_id if (downloader._thread and downloader._thread.is_alive()) else None
if active is not None and active != wanted:
    notify_user_or_wait(active)

Type guard

def other_download_active(d, model_id: str) -> bool:
    with d._lock:
        return (d._thread is not None and d._thread.is_alive()
                and d._model_id != model_id)

Try / catch

try:
    downloader.download(model_id)
except SttModelIdError as e:
    # e names the in-flight model; surface a 'wait or cancel' choice
    handle_choice(e)

Prevention

When it happens

Trigger: Calling download('whisper-large-v3') while download('whisper-base') is still in progress (self._thread alive, self._model_id != requested model_id). Note: re-requesting the SAME id returns silently; only a different id raises.

Common situations: A Settings page letting the user pick another Voice model while one is downloading; background prefetch code racing with a user-initiated download; retry logic that switches model ids on failure.

Related errors


AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15). Data as JSON: /api/errors/6595e1316b412a7f. Report an issue: GitHub.