unslothai/unsloth · error · ValueError

'{Path(gguf_filename or '').name}' is the {picked} partition

Error message

'{Path(gguf_filename or '').name}' is the {picked} partition, but the load asked for {h3_task}. Pick the matching checkpoint.

What it means

Raised for native MiniMax-H3 loads when the GGUF checkpoint filename and the explicitly requested task partition disagree. The filename itself encodes which partition it is (h3_transformer_task(gguf_filename) derives it), and the loader would silently build the wrong pipeline if the two diverged, so the mismatch is rejected up front with both values named.

Source

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

                    )
                    # 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:
            # Refuse a too-old diffusers here rather than deep in the load.
            from .diffusion_families import assert_pipeline_class_available
            assert_pipeline_class_available(fam.pipeline_class, fam.name)
            if fam.modular_workflow:
                import diffusers
                if not hasattr(diffusers, fam.transformer_class):
                    raise ValueError(
                        "MiniMax-H3 needs the Diffusers revision bundled with this Studio "
                        "version. Reinstall Studio dependencies and retry."
                    )
        if kind != "gguf" and not _is_trusted_video_repo(repo_id):
            raise ValueError(
                f"Non-GGUF video loads are limited to unsloth/* repos, the official "
                f"family base repos, and local paths; '{repo_id}' is neither."

View on GitHub (pinned to 203007d190)

Solutions

  1. Set h3_task to the partition the file actually is (the message names it: 'picked'), or pick the GGUF file matching the requested h3_task.
  2. Simplest: omit h3_task and let the filename determine the partition.
  3. If driving a UI, clear/derive the task field whenever gguf_filename changes.

Example fix

# before
load(repo_id='minimax-h3', model_kind='gguf',
     gguf_filename='H3-video-Q4_K_M.gguf', h3_task='audio')

# after
load(repo_id='minimax-h3', model_kind='gguf',
     gguf_filename='H3-video-Q4_K_M.gguf', h3_task='video')  # or omit h3_task
Defensive patterns

Strategy: validation

Validate before calling

from core.inference.video_minimax_h3 import h3_transformer_task

picked = h3_transformer_task(gguf_filename or '')
if h3_task and h3_task != picked:
    h3_task = picked  # or reject before calling the API

Type guard

def task_matches_file(gguf_filename: str, h3_task: str | None) -> bool:
    return not h3_task or h3_task == h3_transformer_task(gguf_filename or '')

Try / catch

try:
    load(...)
except ValueError as e:
    if 'partition' in str(e):
        # message names the file's real partition; re-issue with that task or the matching file
        raise
    raise

Prevention

When it happens

Trigger: Calling load with model_kind='gguf' on an h3-native family where gguf_filename resolves to one partition (e.g. the 'video' transformer file) while the h3_task parameter says another (e.g. 'audio'), i.e. h3_task and h3_transformer_task(gguf_filename) are both set and differ.

Common situations: A saved preset pairs a filename from an older UI selection with a newly added task field; hand-written config reuses one GGUF name across task changes; the frontend defaults h3_task and the user swaps the checkpoint without the task following.

Related errors


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