unslothai/unsloth · warning · SttModelIdError

'{model_id}' is still cancelling; try again in a moment.

Error message

'{model_id}' is still cancelling; try again in a moment.

What it means

Raised by the GGUF model downloader when a download thread for the SAME model is alive and its cancelled flag is set — the previous run is tearing down (stopping its subprocess, clearing state) and re-entering ensure() for that model right now would join a dying run and silently download nothing. The lock-protected state machine rejects the call until the cancellation finishes. It is a transient 'try again' condition, exposed as SttModelIdError.

Source

Thrown at studio/backend/core/inference/stt_ggml_sidecar.py:548

                revision = revision,
            )
        except Exception:
            return None

    def start(
        self,
        model_id: str,
        hf_token: Optional[str] = None,
    ) -> None:
        model_id = resolve_ggml_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 GGUF dictation model ('{self._model_id}') is still "
                    "downloading; wait for it to finish."
                )
            self._model_id = model_id
            self._error = None
            self._total_bytes = None
            self._etag = None
            self._revision = None
            self._hub_cache = hub_cache
            self._cancelled = False
            self._process = None
            thread = threading.Thread(
                target = self._run,
                args = (model_id, hf_token),
                daemon = True,

View on GitHub (pinned to 203007d190)

Solutions

  1. Wait a moment and call ensure() again — cancellation completion clears the flag and a fresh download starts.
  2. In retry loops, add a short backoff after a cancelled download instead of immediate retry.
  3. Do not treat this as a bad model id; the id matched — only the timing is wrong.

Example fix

# before
try:
    downloader.ensure(model_id)
except SttModelIdError:
    raise
# after
for _ in range(10):
    try:
        downloader.ensure(model_id); break
    except SttModelIdError as e:
        if "still cancelling" not in str(e): raise
        time.sleep(0.5)
Defensive patterns

Strategy: retry

Try / catch

import time
for attempt in range(20):
    try:
        downloader.ensure(model_id); break
    except SttModelIdError as e:
        if "still cancelling" not in str(e):
            raise
        time.sleep(0.5)

Prevention

When it happens

Trigger: Cancelling a model download and immediately calling ensure(model) again for the same model id before the cancellation path completes.

Common situations: UI 'Cancel' followed instantly by 'Retry' on the same model; automated retry logic that does not wait for cancel to settle.

Related errors


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