unslothai/unsloth · error · ValueError

transformer_quant '{requested_scheme}' is unavailable for '{

Error message

transformer_quant '{requested_scheme}' is unavailable for '{fam.name}'{task_label}: its Modular Diffusers workflow builds the denoiser itself, so only schemes with a hosted pre-quantized checkpoint can be applied and the dense weights cannot be quantized in place. {hint}

What it means

Raised when a load request asks for a transformer_quant scheme (e.g. fp8, int8) that has no hosted pre-quantized checkpoint for the requested family — and, when an explicit h3 task partition was named, for that partition. For Modular Diffusers families (like MiniMax-H3) the denoiser is constructed by the workflow itself, so the dense weights cannot be quantized in place; only schemes with a hosted pre-quantized repo listed in the family's prequant tables are loadable. The message includes the scheme, family, task label, and a hint listing the actually-available schemes (or telling you to leave transformer_quant unset).

Source

Thrown at studio/backend/core/inference/video.py:1153

                # every metadata check, and have load_components skip the real denoiser,
                # generating from the wrong partition instead of failing. A pair with no hosted
                # checkpoint is refused here; there is no in-place quantise seam to fall back on,
                # because the workflow's own component loader builds the denoiser and letting the
                # request through would download ~98.7 GB of dense weights and then silently
                # ignore it.
                if not video_family_prequant_available(
                    fam, requested_scheme, task = h3_task, base_repo = quant_base
                ):
                    available = video_family_prequant_schemes(fam, task = h3_task)
                    hint = (
                        f"Use one of: {', '.join(available)}."
                        if available
                        else "Leave transformer_quant unset for this model."
                    )
                    # Name the partition when one was asked for, so "fp8 is unavailable" does not
                    # read as a claim about the whole family when it is only true of this task.
                    task_label = f" {h3_task}" if h3_task else ""
                    raise ValueError(
                        f"transformer_quant '{requested_scheme}' is unavailable for "
                        f"'{fam.name}'{task_label}: its Modular Diffusers workflow builds the "
                        f"denoiser itself, so only schemes with a hosted pre-quantized checkpoint "
                        f"can be applied and the dense weights cannot be quantized in place. "
                        f"{hint}"
                    )
        from .video_minimax_h3 import is_h3_native, validate_h3_transformer_filename

        if is_h3_native(fam, kind):
            validate_h3_transformer_filename(gguf_filename or "")
            # The GGUF filename and explicit task must name the same partition.
            picked = h3_transformer_task(gguf_filename or "")
            if h3_task and h3_task != picked:
                raise ValueError(
                    f"'{Path(gguf_filename or '').name}' is the {picked} partition, but the "
                    f"load asked for {h3_task}. Pick the matching checkpoint."
                )
        else:

View on GitHub (pinned to 203007d190)

Solutions

  1. Read the hint in the message: it lists schemes that ARE available for that family/task — switch transformer_quant to one of them.
  2. If the list is empty, remove transformer_quant entirely and load dense bf16.
  3. If you need that specific scheme, pick a different family or base_repo whose prequant tables host it (check video_family_prequant_schemes(fam, task=...)).
  4. If you believe the scheme should exist, update Studio / the family tables so prequant_repos or prequant_variant_repos includes the checkpoint.

Example fix

# before
load_video_model(repo_id=..., model_kind='pipeline', transformer_quant='int8')

# after (use a scheme the family actually hosts)
avail = video_family_prequant_schemes(fam, task='video')
load_video_model(repo_id=..., model_kind='pipeline', transformer_quant=avail[0] if avail else None)
Defensive patterns

Strategy: validation

Validate before calling

from core.inference.video_families import video_family_prequant_schemes, video_family_prequant_available

available = video_family_prequant_schemes(fam, task=h3_task)
if transformer_quant and transformer_quant not in available:
    transformer_quant = available[0] if available else None  # or surface to the user

Type guard

def quant_ok(fam, scheme: str | None, task: str | None) -> bool:
    return scheme is None or video_family_prequant_available(fam, scheme, task=task)

Try / catch

try:
    load(...)
except ValueError as e:
    if 'transformer_quant' in str(e) and 'unavailable' in str(e):
        # strip the quant option and retry dense, or prompt the user
        load(..., transformer_quant=None)
    else:
        raise

Prevention

When it happens

Trigger: Calling the video load API with transformer_quant set to a scheme for which video_family_prequant_available(fam, scheme, task=h3_task, base_repo=quant_base) returns False — e.g. requesting 'int8' on a family whose prequant_repos only hosts 'fp8', or requesting a valid scheme but for an h3 task partition (video/audio/text) that lacks its own (scheme, task, filename) row in prequant_filenames.

Common situations: UI or config carries a transformer_quant default from another family; a user copies a quant setting that worked for a non-modular family; a new scheme is requested after a Studio update changed the hosted checkpoint tables; an explicit task is combined with a scheme that only ships for a different partition.

Related errors


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