Skip to content

Studio: add MiniMax H3 reference generation - #8305

Merged
danielhanchen merged 10 commits into
unslothai:h3-video-lorafrom
oobabooga:pr8244-ref2va
Aug 10, 2026
Merged

danielhanchen merged 10 commits into
unslothai:h3-video-lorafrom
oobabooga:pr8244-ref2va

Conversation

@oobabooga

@oobabooga oobabooga commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Completes MiniMax H3 Ref2VA integration in Studio's Video tab.

Users can provide reference pictures, videos, and audio tracks through either the official BF16 Diffusers model or a quantized stable-diffusion.cpp model. The existing text, first-frame, and last-frame workflow remains available separately.

This stacks on #8244

The branch starts at the current #8244 head because it carries the MiniMax H3 Ref2VA backend execution, conditioning, and staged-download paths that this PR exposes. The new work is limited to the model picker, H3 mode selection, GGUF variant identity and labels, and their regression coverage.

What changed

  • Ask whether the official BF16 model should load the Text and frames or References denoiser before downloading it.
  • Download transformer/ for Text and frames or transformer_ref/ for References while reusing the shared text encoder and VAEs.
  • Preserve that choice through staged downloads, model loading, and Reapply.
  • Add separate MiniMax H3 GGUF picker rows for Text and frames and References.
  • Source the Ref2VA GGUFs from leejet/MiniMax-H3-GGUF and show only the matching partition under each row.
  • Give each GGUF a clear task, quantization, and Full or Pruned label.

GGUF variant fix

MiniMax H3 repositories can publish FL2VA and Ref2VA checkpoints, plus Full and Pruned builds, at the same quantization. The GGUF lister previously keyed these files only by quantization, so distinct checkpoints collapsed into one row and the loader could not identify every published file.

MiniMax H3 variants now use the complete checkpoint family as their key. On the tested repository this exposes all five loadable denoisers instead of two:

  • Text and frames, Q4_K_M, Full
  • Text and frames, Q4_K_M, Pruned
  • References, Q4_K_M, Full
  • References, Q4_K_M, Pruned
  • References, Q2_K_M, Pruned

Testing

  • All 1,494 frontend tests passed.
  • Focused video, Model Hub, and GGUF backend suites passed 134 tests.
  • Frontend type checking, catalog checks, production build, and git diff --check passed.

Runtime validation

Ran Studio on an NVIDIA B200 and exercised both Ref2VA engines with a real reference image.

  • Diffusers selected and loaded transformer_ref, then generated a 960x544, 124-frame H.264/AAC MP4 with synchronized audio.
  • stable-diffusion.cpp downloaded and loaded minimax_h3_ref2va_pruned-Q4_K_M.gguf, then generated the same playable 960x544, 124-frame output format.
  • Chromium verified the separate GGUF rows, all three Ref2VA variants, the BF16 mode dialog, reference upload controls, and an actual frontend-submitted generation.

Screenshot

The Ref2VA interface with a picture, video, replacement video soundtrack, standalone audio reference, and generated output:

ref2va-reference-ui

@oobabooga
oobabooga marked this pull request as ready for review August 10, 2026 05:54
@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb0107fa6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const d = defaultsFor(spec.filename ? `${id}/${spec.filename}` : id);
setSteps(d.steps);
setGuidance(d.guidance);
if (id.toLowerCase() === H3_BF16_REPO.toLowerCase() && spec.kind === "pipeline") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prompt for the H3 task on routed pipeline picks

When the cached official BF16 model is selected from the chat picker, it arrives through the routeSearch.model effect, which calls loadOrStage directly at line 1887. Because the new task dialog is opened only in this handleModelSelect branch, that route silently loads the default FL2VA denoiser and offers no way to choose References, potentially staging tens of gigabytes of the wrong partition. Apply the H3 interception to routed pipeline picks as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and it is the likelier route for the BF16 model, not an edge case. The chat picker cannot load a diffusion model, so a pick there navigates to /video?model=... (pickers.tsx onSelect -> diffusionRouteSearch), and only cached/local repos reach that branch at all, which is exactly the "cached official BF16" case.

Traced at head: loadSpecFor("MiniMaxAI/MiniMax-H3", VIDEO_CATALOG) returns the bf16Pipeline artifact, so diffusionRoutePick yields kind: "pipeline" with no filename, the routedLabel and kind === "gguf" early returns are both skipped, and it fell through to the bare loadOrStage(pick.repoId, pick.opts, false, token). With h3_task unset, _base_repo_files picks h3_denoiser = "transformer/", so the stage pulls the 66.28 GB FL2VA partition and References is unreachable from that route.

Fixed in fac4a888f. Both entry points now go through one isH3PipelinePick(repoId, kind) predicate, and the routed branch sets pendingH3Load instead of loading, with isDownloaded: false to match what that branch already passed. Regression test in studio/frontend/tests/video-download-plan-payload.test.ts asserts the interception sits before the unconditional loadOrStage and that both call sites use the shared predicate; it fails against the previous head.

One thing I did not widen: the group alias Comfy-Org/MiniMax-H3 still bypasses the dialog, because artifactForRepoId indexes artifact ids only and never aliases, so loadSpecFor returns null for it and the pick lands on the generic pipeline path. That is pre-existing and not what this item is about, so I left it alone.

Where this sits relative to the open catalog keying question: outside it. This is the BF16 pipeline repo and the task dialog, not the GGUF rows, so it is unaffected by whichever of the two shapes you pick.

Comment on lines +2373 to +2374
if path.rsplit("/", 1)[-1].lower().startswith(("minimax_h3_fl2va", "minimax_h3_ref2va")):
return _gguf_variant_family(path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve H3 stem keys in the loader lister

For root-level H3 filenames this branch returns a full stem such as minimax_h3_ref2va_pruned-Q4_K_M, but _qualified_variant_name immediately converts every slashless key back to the bare quant label. Consequently list_gguf_variants still groups all Q4 FL2VA/Ref2VA and Full/Pruned files into one entry, and consumers such as the remote VRAM preflight cannot find a selected full-stem variant. The new H3 keys need to remain qualified even though they contain no directory slash.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed on the mechanism, with one correction on the consequence.

Reproduced against head:

minimax_h3_fl2va-Q4_K_M.gguf         key=minimax_h3_fl2va-Q4_K_M         qualified=Q4_K_M
minimax_h3_fl2va_pruned-Q4_K_M.gguf  key=minimax_h3_fl2va_pruned-Q4_K_M  qualified=Q4_K_M
minimax_h3_ref2va-Q4_K_M.gguf        key=minimax_h3_ref2va-Q4_K_M        qualified=Q4_K_M
minimax_h3_ref2va_pruned-Q4_K_M.gguf key=minimax_h3_ref2va_pruned-Q4_K_M qualified=Q4_K_M

hub rows:          5  (one per checkpoint)
model_config rows: ['Q4_K_M', 'Q2_K_M']

So return key if "/" in key else label does fold them back, exactly as you describe, and test_local_lister_matches_the_remote_shape only holds today because its corpus is LTX.

The correction is the consumer. The remote VRAM preflight is routes/inference.py::_estimate_gguf_required_gb, which reads config.gguf_hf_repo / config.gguf_variant off a llama.cpp ModelConfig; the other caller of model_config.list_gguf_variants is ModelConfig.from_identifier, also llama.cpp. H3 GGUFs load through core/inference/video.py by filename, and every loader-side resolver that does key matching (_find_local_gguf_by_variant, routes/models.py::_delete_gguf_variant_files, _main_variant_rank) reads _gguf_variant_key, which agrees with the hub copy. So at head this is drift in the advertised name, not a live misload.

Still worth closing, because it is the same root cause as the pin item: the codebase spells "qualified key" as "the key contains a slash", and this PR introduces the first qualified key that has no slash. Patch I verified locally and did NOT push, since it should land as one predicate together with the pin thread and that shape is your call:

_H3_DENOISER_PARTITIONS = ("minimax_h3_fl2va", "minimax_h3_ref2va")


def _is_h3_denoiser_filename(filename: str) -> bool:
    return filename.replace("\\", "/").rsplit("/", 1)[-1].lower().startswith(
        _H3_DENOISER_PARTITIONS
    )

used both in the branch you added at line 2373 and in _qualified_variant_name:

    return key if ("/" in key or _is_h3_denoiser_filename(filename)) else label

With that applied the mirror lister returns the same five rows the hub does, and tests/test_gguf_variant_rows.py tests/test_local_model_format.py tests/test_offline_gguf_cache_fallback.py tests/test_gguf_variant_preflight.py tests/test_mtp_drafter_companion.py tests/test_resolve_quant_gguf.py stay green (422 passed). The root_rows filter in from_identifier is unaffected: an H3 stem has no slash either way, so those rows stay root rows.

Relative to the open catalog keying question: independent. Both shapes keep the backend stem keys, so this needs doing whether you go two rows or one.

{expanderOpen && (
<GgufVariantExpander
repoId={c.repo_id}
filenamePrefix={curatedGgufFilenamePrefix(c.repo_id)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not hide cached partitions from On Device rows

The leejet/MiniMax-H3-GGUF repository explicitly contains both FL2VA and Ref2VA files, but applying the curated Ref2VA prefix to this On Device expander filters an existing FL2VA download out of its own cache row. Such a variant can be downloaded through the Hub or predate this catalog entry, and it then cannot be loaded, pinned, updated, or deleted from the model picker; the artifact filter should be limited to browse/recommended menus or the cached variants should be represented separately.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, and it is worse than the repo you cite. curatedGgufFilenamePrefix is keyed on repo id alone, so it applies to whichever expander mounts, and the published listings both hold both partitions:

unsloth/MiniMax-H3-GGUF   8 fl2va + 6 ref2va   prefix minimax_h3_fl2va   -> hides its 6 Ref2VA files
leejet/MiniMax-H3-GGUF    2 fl2va + 3 ref2va   prefix minimax_h3_ref2va  -> hides its 2 FL2VA files

so the official repo's own On Device row hides the Ref2VA quants this PR exists to make loadable, once they are on disk.

Confirmed the reachability too: the On Device expander at pickers.tsx:3751 is the only place that offers per-variant load, pin, update and delete for a downloaded GGUF repo, and it is now filtered. One escape exists, renderSoleQuantGgufRow: readSoleQuant calls the listing unfiltered, so a repo holding exactly one complete quant still renders a loadable chip row even when the prefix does not match it. That escape closes as soon as a second file is cached, which is the normal state once someone has both partitions, and it is itself an inconsistency worth noting (the collapsed row can advertise a quant the expanded row would hide).

I have NOT pushed a fix for this one, because the narrow version of it is a partial answer to the catalog keying question that is still open above. If ggufFilenamePrefix goes away entirely, this item dies with it and there is nothing to do. If instead the catalog grows two rows keyed on (repoId, prefix), then simply dropping filenamePrefix at the On Device call site is not right either: the two curated rows would both want the cached row, and the On Device section has to either split per partition or stay unfiltered by design. Either way the decision is upstream of the fix, so I left it to you.

Comment on lines +382 to +383
if path.rsplit("/", 1)[-1].lower().startswith(_H3_DENOISER_PARTITIONS):
return _unknown_gguf_variant_key(path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Migrate existing H3 quant pins to the new keys

Existing H3 pins are persisted as exact repoId::quant strings, so a previously pinned Q4_K_M entry no longer matches any variant after this branch changes every H3 row to a full-stem key. The pinned-row validation compares those strings exactly and therefore silently removes the pin even when its checkpoint remains downloaded. Migrate legacy H3 bare-quant pins to the checkpoint family that the old grouping selected, or retain a compatibility alias during pin validation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genuine, and the blast radius is larger than the pin row. Reproduced against the real published listing of unsloth/MiniMax-H3-GGUF:

plan keys after this branch: minimax_h3_fl2va_pruned-q2_k ... minimax_h3_ref2va_pruned-q8_0
legacy 'UD-Q2_K_XL' -> None
legacy 'UD-Q3_K_XL' -> None
legacy 'Q8_0'       -> None

UD-Q2_K_XL matters most: it exists exactly once in that repo, so it is unambiguous and the back-compat path was built for precisely this case. It resolves to nothing only because every legacy alias fallback is gated on "/" in key:

  • hub/utils/gguf_plan.py::plan_for_variant, whose own docstring is this migration ("Every stored pin and every explicit repo:Q4_K_M then missed the plan map and the worker exited with No GGUF shards matching variant")
  • hub/services/models/deletion.py:228
  • routes/models.py::_variant_keys_match
  • core/inference/openai_auto_download.py:766

and gguf_variant_key's docstring promises the opposite ("byte-identical to the historical key there and every stored pin, manifest and marker keeps resolving"). The new H3 keys are the first qualified keys with no slash, so they fall outside all four.

The frontend half is as you say: pinnedQuantValidation compares pinKey(repoId, variant.quant) against the stored string exactly, so a pre-existing unsloth/MiniMax-H3-GGUF::Q4_K matches no row and the pinned entry stops rendering. To be precise about the wording, the pin is not deleted from localStorage, it is hidden, and re-pinning writes a second key beside the dead one, which is arguably worse than dropping it.

Backend half I verified locally, one line, not pushed:

    matches = [key for key in plans if key != wanted and bare_quant_alias(key).lower() == wanted]

That is a no-op for every slashless bare-quant key (its alias is itself, so the exact lookup already answered) and it restores the unambiguous cases while correctly leaving genuinely ambiguous ones alone:

legacy 'UD-Q2_K_XL' -> minimax_h3_fl2va_pruned-UD-Q2_K_XL.gguf
legacy 'Q2_K'       -> minimax_h3_fl2va_pruned-Q2_K.gguf
legacy 'Q8_0'       -> None   (two partitions ship it; the bare name really does not name one)

tests/test_gguf_variant_rows.py tests/test_gguf_variants_local_resolution.py tests/test_cached_gguf_routes.py and hub/tests stay green with it (255 + 431 passed).

I stopped there rather than pushing, for two reasons. The same change wants making at all four gates behind one shared "is this key qualified" predicate rather than one site at a time, which is the same predicate the _qualified_variant_name thread needs. And the frontend pin question is a product call I should not make for you: a legacy Q4_K pin is genuinely ambiguous between the two partitions, so "migrate to the family the old grouping selected" means the lexicographically first file, which after this PR silently means FL2VA. Dropping such a pin may well be better than resurrecting it onto a partition the user never chose. Your call.

Relative to the open catalog keying question: independent of it. This is caused by gguf_variant_key, not by the catalog, so it needs handling whether you go two rows or delete ggufFilenamePrefix.

@danielhanchen danielhanchen self-assigned this Aug 10, 2026
@danielhanchen

Copy link
Copy Markdown
Member

Read this end to end and ran it locally. The Ref2VA wiring is right and the variant-key fix is a real defect fix, not just a labelling change. Two things before it lands, one of them structural.

Tests, run separately

studio/backend/tests/ and studio/backend/hub/tests/ have to be separate pytest invocations (combined they emit phantom failures from the shared conftest; I got 7 that way and 0 when split):

tests/test_gguf_variant_rows.py        71 passed
hub/tests/test_model_services.py      263 passed

I also ran the real published unsloth/MiniMax-H3-GGUF filenames through the new gguf_variant_key, including the dynamic lanes the PR's fixtures do not cover, and the keys stay distinct:

minimax_h3_fl2va_pruned-Q2_K.gguf          -> minimax_h3_fl2va_pruned-Q2_K
minimax_h3_fl2va_pruned-UD-Q2_K_XL.gguf    -> minimax_h3_fl2va_pruned-UD-Q2_K_XL
minimax_h3_fl2va_pruned-UD-Q3_K_XL.gguf    -> minimax_h3_fl2va_pruned-UD-Q3_K_XL
qwen3vl_32b_minimax_h3-Q4_K_M.gguf         -> Q4_K_M   (companion, filtered out upstream)

1. The References row points at a third-party repo we deliberately stopped pointing at

leejet/MiniMax-H3-GGUF is added to VIDEO_CATALOG as a first-class curated row. The comment three lines above _H3_BUNDLE_REPOS in hub/utils/gguf.py records why that repo is in the bundle set at all:

The Unsloth mirror carries the Qwen3-VL text-encoder quants beside the denoisers, so it needs the same filtering as the community repack it replaced

So the catalog is re-adding the repo the mirror programme took out. Everything a user downloads from a curated row should come from a repo we control: we cannot guarantee a third-party repo's files stay put, stay named the same, or stay up, and a curated row makes Studio's model list depend on that.

The reason the PR had to reach for it is legitimate, and it is a gap on our side rather than anything wrong here. unsloth/MiniMax-H3-GGUF currently ships FL2VA only:

unsloth/MiniMax-H3-GGUF   8 x minimax_h3_fl2va_pruned-*  + 2 qwen3vl companions
leejet/MiniMax-H3-GGUF    3 x minimax_h3_ref2va-*        + 2 fl2va + 2 companions

The fix is on us, not on this PR: unsloth/MiniMax-H3 already mirrors transformer_ref/ (all 14 shards), so we can build the Ref2VA ladder from our own mirror with the same pipeline that produced the FL2VA one. I am starting that now and will post here when the files are up.

2. ggufFilenamePrefix is keyed by repo, so it cannot survive that fix

This is the part worth settling before merge, because it is the thing that breaks the moment item 1 is done.

artifactForRepoId resolves through indexFor, which builds

artifactById.set(artifact.repoId.toLowerCase(), artifact);

a plain Map keyed on the repo id, last write wins and no warning. Two artifacts with the same repoId collapse to one. So today the design works only because the two partitions happen to live in two different repos. Once Ref2VA is published into unsloth/MiniMax-H3-GGUF, "Text and frames" and "References" both want repoId: "unsloth/MiniMax-H3-GGUF" with different prefixes, and the catalog cannot express that: one row silently disappears and curatedGgufFilenamePrefix returns whichever artifact was registered last for every caller.

That also means the current shape encodes "a repo has at most one partition" in three places (artifactById, curatedGgufFilenamePrefix, curatedDisplayNameFor), all of which are correct today and all of which are wrong the day after.

Worth making the artifact key (repoId, ggufFilenamePrefix) now rather than after the mirror lands. Concretely: key artifactById on repoId + "#" + (ggufFilenamePrefix ?? ""), have artifactForRepoId keep its current single-argument behaviour for the unprefixed case, and add an overload the picker uses when it already knows which partition's row it is rendering. Happy to take that on if you would rather not.

A cheap guard regardless of which way this goes: indexFor should throw on a duplicate repoId + prefix pair rather than overwrite. A silently dropped catalog row is the sort of thing that only surfaces as a user asking where a model went.

3. Minor: the partition tuple is duplicated

hub/utils/gguf.py has _H3_DENOISER_PARTITIONS = ("minimax_h3_fl2va", "minimax_h3_ref2va"); utils/models/model_config.py:2373 repeats the same literal inline. test_h3_variant_keys_match_the_loader_copy pins five filenames, so it catches the two implementations disagreeing on those, but not the tuples themselves diverging. If a third partition is ever released and only one side learns about it, the picker and the loader disagree about what a row is and the test stays green. Either import the constant or drive the test off it.

What is right

  • Keying H3 rows on the whole checkpoint family rather than the bare quant is the correct fix, and it is a real defect: minimax_h3_fl2va_pruned-Q4_K_M and minimax_h3_ref2va_pruned-Q4_K_M are different checkpoints that the loader routes differently, and collapsing them meant the row could not name the file a load would open.
  • Routing h3_task through the download plan as well as the load is the right seam. Staging the download for the wrong denoiser and then loading the other one is exactly the kind of bug that shows up as a mysterious 20 GB re-download.
  • Reapply carrying h3Task is easy to miss and is covered.
  • setPendingH3Load(null) on !active, and the pickGuard.holds(pending.token) recheck in chooseH3Task, both matter: the dialog outlives the pick that opened it.

I will hold off on before/after screenshots until we settle item 2, since the composite would photograph the leejet row and that row should not be what ships.

@danielhanchen

Copy link
Copy Markdown
Member

Item 1 is done from our side. The Ref2VA ladder is now published in the public unsloth/MiniMax-H3-GGUF, so the References row no longer needs to point anywhere else.

File Size
minimax_h3_ref2va_pruned-Q2_K.gguf 6.22 GiB
minimax_h3_ref2va_pruned-Q3_K.gguf 8.12 GiB
minimax_h3_ref2va_pruned-Q4_K.gguf 10.60 GiB
minimax_h3_ref2va_pruned-Q5_0.gguf 12.94 GiB
minimax_h3_ref2va_pruned-Q6_K.gguf 15.42 GiB
minimax_h3_ref2va_pruned-Q8_0.gguf 19.94 GiB

That is six rungs against the three the community repo has, and it matches the FL2VA ladder already in the repo rung for rung, so the two partitions compare directly.

How they were built

Source is Comfy-Org's diffusion_models/minimax_h3_ref2va_pruned_bf16.safetensors, the exact analogue of the FL2VA source the published ladder came from. Same converter, same pin:

sd-cli --mode convert --type <T> \
  --tensor-type-rules '(^|\.)(video_patch_proj|audio_patch_proj)\.weight$=f32'

build_cuda_normfix, not stock. Stock sd-cli quantizes H3's 105 [5376] 1-D norm scales and destroys the output. The patch-embedder pin is there because H3 spells its input embedders differently from every other architecture, so the by-name refusal never matches them: their inner dims (96, 32) dodge the 256-wide K-quant block by accident up to q6_K, but 96 % 32 == 0, so a q8_0 rung does quantize them, at about 4x the output error of a whole MLP fc2 at q4_K to save 1 MB.

Verified, not just built

Tensor table against the published FL2VA Q4_K, which is the strongest check available without a reference render:

tensors   fl2va 532   ref2va 532      names differing: 0
types     fl2va {F32: 10, F16: 102, BF16: 211, Q4_K: 209}
          ref2va {F32: 10, F16: 102, BF16: 211, Q4_K: 209}

Identical allocation, so the norm fix and the embedder pin both took.

Then an actual load and denoise of minimax_h3_ref2va_pruned-Q4_K.gguf on a B200, 640x384, 25 frames, 4 steps, seed 1234, Q2_K_M Qwen3-VL encoder on CPU:

returncode 0   17.3 s   peak 16.83 GiB   produced_output true

The frame is coherent (subject, snow, depth), not the noise a crushed norm produces. Driven without references, since that path is what this harness has, so it says the checkpoint is well formed and loads under the same runtime Studio uses; it does not score reference fidelity.

What is left on this PR

Only item 2, and it is now the blocking one rather than a forecast. Both partitions live in unsloth/MiniMax-H3-GGUF, so "Text and frames" and "References" both want repoId: "unsloth/MiniMax-H3-GGUF", and indexFor keys artifactById on the repo id alone with last write wins. As written, one of the two rows silently disappears.

Smallest change that fits the existing shape:

const artifactKey = (repoId: string, prefix?: string) =>
  `${repoId.trim().toLowerCase()}#${prefix ?? ""}`;

with artifactForRepoId(repoId) keeping today's single-argument behaviour by resolving the unprefixed key first and falling back to the sole prefixed entry when there is exactly one, plus an explicit two-argument lookup for the picker, which already knows which partition's row it is rendering (curatedGgufFilenamePrefix is called from the same place). indexFor should throw on a duplicate key rather than overwrite, since a silently dropped catalog row surfaces only as a user asking where a model went.

Happy to push that onto this branch if you would rather not take it on. Once it is in I will shoot the before/after pair, which at that point photographs two unsloth/* rows and is worth having on the PR.

@danielhanchen

Copy link
Copy Markdown
Member

One more option on item 2, cheaper than the keying change I described, which I only saw after the Ref2VA files went up: you may not need ggufFilenamePrefix at all.

Now that both partitions are in one repo, the backend already lists them together, _is_selectable_repo_gguf already drops the Qwen companions, and this PR's _apply_gguf_display_labels already names the partition on every row. So one catalog entry for unsloth/MiniMax-H3-GGUF with no prefix gives a self-describing menu. Run against the real published listing:

selectable 14 of 16
  Text & frames · Q2_K · Pruned            <- minimax_h3_fl2va_pruned-Q2_K.gguf
  Text & frames · Q3_K · Pruned            <- minimax_h3_fl2va_pruned-Q3_K.gguf
  Text & frames · Q4_K · Pruned            <- minimax_h3_fl2va_pruned-Q4_K.gguf
  Text & frames · Q5_0 · Pruned            <- minimax_h3_fl2va_pruned-Q5_0.gguf
  Text & frames · Q6_K · Pruned            <- minimax_h3_fl2va_pruned-Q6_K.gguf
  Text & frames · Q8_0 · Pruned            <- minimax_h3_fl2va_pruned-Q8_0.gguf
  Text & frames · UD-Q2_K_XL · Pruned      <- minimax_h3_fl2va_pruned-UD-Q2_K_XL.gguf
  Text & frames · UD-Q3_K_XL · Pruned      <- minimax_h3_fl2va_pruned-UD-Q3_K_XL.gguf
  References · Q2_K · Pruned               <- minimax_h3_ref2va_pruned-Q2_K.gguf
  References · Q3_K · Pruned               <- minimax_h3_ref2va_pruned-Q3_K.gguf
  References · Q4_K · Pruned               <- minimax_h3_ref2va_pruned-Q4_K.gguf
  References · Q5_0 · Pruned               <- minimax_h3_ref2va_pruned-Q5_0.gguf
  References · Q6_K · Pruned               <- minimax_h3_ref2va_pruned-Q6_K.gguf
  References · Q8_0 · Pruned               <- minimax_h3_ref2va_pruned-Q8_0.gguf

Both partitions have the same parameter count, so the row's size chip is unaffected, and the two dynamic lanes label correctly rather than falling into the token or 'GGUF' branch.

The real trade is discoverability against machinery. Two rows put "References" in the model list where someone browsing will see it; one row puts it fourteen labels deep behind an expander, but needs no new key, no duplicate-repoId hazard, and deletes ggufFilenamePrefix, the curatedGgufFilenamePrefix callback and the client-side filter. Your call, you have thought about the picker UX more than I have. If you want the two rows I will do the keying change; if you want the one row it is a deletion.

Either way the indexFor guard is worth having on its own: a duplicate repoId currently overwrites in silence, and that is a hazard whether or not this PR trips it.

One thing this PR gets right that I want on the record

load_pipeline refusing an explicit transformer_quant on a Ref2VA modular load, with the reason spelled out:

the two partitions share module shapes and the same base model, so a Ref2VA load would install one, pass every metadata check, and have load_components skip the real Ref2VA transformer

That is exactly right, and the shared-shape detail is what makes it dangerous: the failure is a silent wrong-partition generation, not an error. Refusing until a matching checkpoint exists is the correct interim behaviour.

The consequence is that References on the diffusers path is dense bf16 only, with no int8 or fp8 rung. Closing that means building Ref2VA prequant artifacts and giving prequant_variant_repos a way to see the partition, since it is keyed on (base_repo, scheme) and both partitions share a base. Same "partition is a key axis nothing is keyed on" shape as item 2. I will take that on as a follow-up rather than grow this PR; the GGUF path already covers References at every rung, so nobody is blocked in the meantime.

@danielhanchen

Copy link
Copy Markdown
Member

The two red jobs are inherited from the stale base, not from anything in this PR.

(Python 3.12)  failure    14m28s
(Python 3.13)  cancelled  15m11s

gh pr checks prints both as fail, which is misleading here: only 3.12 actually failed. Its four failures are:

test_diffusion_h3_trainer.py::test_the_h3_latent_cache_is_size_gated_like_the_image_trainers
test_diffusion_h3_trainer.py::test_the_h3_latent_cache_gate_honours_the_explicit_override
  ModuleNotFoundError: No module named 'diffusers'

test_diffusion_training.py::test_route_start_refuses_a_diffusers_whose_lazy_submodule_cannot_import
test_diffusion_training.py::test_route_start_refuses_training_when_diffusers_is_absent
  assert "No module named 'diffusers'" in 'Training the DiT families needs a GPU: ...'

Those are the diffusers-import preflight tests that only pass on a GPU host, fixed on main by #8281 (f7ea9fab6). h3-video-lora, which this branch starts from, is ten commits behind and does not have it:

$ git log --oneline origin/h3-video-lora..origin/main
84801896e ... (#8302)
b9c733a6c ... (#8301)
a0af5e53b ... (#8300)
c82836d0a ... (#8304)
a43c81d52 ... (#8262)
54462b80c ... (#8279)
aab5c2c98 ... (#8271)
f7ea9fab6 Fix main: the two diffusers-import preflight tests only pass on a GPU host (#8281)
871e4ab3e ... (#8292)
a1fc4d42f ... (#8176)

The 3.13 cancellation is the other half of the same commit: #8281 also raised the backend job cap from 15 to 30 minutes, and 3.13 was killed at 15m11s. On #8267 the identical pair cleared the moment the base carried #8281, and that PR's whole Python matrix then passed with 3.10 taking 19m23s, three times over the old cap.

So both go green once main reaches #8244 and this branch picks it up. Nothing to change here.

Worth noting for whoever merges #8244 first: studio/frontend/tests/video-download-plan-payload.test.ts is edited by this PR and also by #8289, which adds companion_bytes to the same download-plan payload. Small file, textual conflict rather than a semantic one, but it will need a hand.

A MiniMax H3 pick made in the chat picker arrives on the video page as ?model=,
and that effect called loadOrStage directly. Only the direct-pick branch opened
the task dialog, so the routed path staged the default fl2va denoiser, 66 GB,
with no way to ask for References. Both branches now share one predicate.
@danielhanchen

Copy link
Copy Markdown
Member

On the catalog keying question, a recommendation with the listing behind it

unsloth/MiniMax-H3-GGUF holds three groups of GGUF, not two:

prefix count what it is
minimax_h3_fl2va_pruned- 8 keyframe and text-only denoiser (Q2_K, Q3_K, Q4_K, Q5_0, Q6_K, Q8_0, UD-Q2_K_XL, UD-Q3_K_XL)
minimax_h3_ref2va_pruned- 6 reference denoiser (Q2_K, Q3_K, Q4_K, Q5_0, Q6_K, Q8_0)
qwen3vl_32b_minimax_h3- 2 the Qwen3-VL conditioner (Q2_K_M, Q4_K_M)

curatedGgufFilenamePrefix keys on repo id alone, so exactly one of those three can be visible at a time. Whichever it names, the other two are hidden from the repo's own On Device row, which is the only per-variant surface for load, pin, update and delete. That is not a corner case here: it is the default state of the official repo.

So I would key on (repoId, prefix) and let the repo produce two denoiser rows, rather than delete ggufFilenamePrefix and put all fourteen in one list.

Three reasons:

  1. The two partitions are not interchangeable. load_components(workflow="ref2va") opens transformer_ref/; fl2va opens transformer/. Seeding the wrong one passes every metadata check and generates from the wrong denoiser rather than failing, which is exactly why video.py currently refuses a quantized reference pick outright. A flat list makes the filename the only thing standing between a user and that outcome.
  2. We already set this precedent. Studio: stop a multi-checkpoint GGUF repo collapsing into one row per quant #8222 was "stop a multi-checkpoint GGUF repo collapsing into one row per quant", and it settled that a repo publishing several checkpoints gets several rows. This repo publishes two denoisers. Same shape, same answer.
  3. One row cannot carry two default picks. The default resolver picks one quant per row. With fourteen mixed entries it has to pick a partition on the user's behalf, and the task the user wants is not knowable at that point.

The cost is real and worth naming: indexFor keys artifactById on repoId alone and is last-write-wins, so two catalog artifacts sharing a repoId collapse silently today. That guard is worth adding either way and I would take it as a precondition of the two-row shape rather than an argument against it. Left unfixed, the second row disappears with no error.

The third group is a separate question and I would leave it alone in this PR: the conditioner GGUFs are not denoisers and do not belong in a denoiser picker, so the prefix filter hiding them is correct behaviour that happens to be produced by the wrong mechanism.

Happy to be overruled on this. I have not implemented either shape, and the three review items triaged earlier today were left unpushed for exactly this reason: item 3 dies entirely if ggufFilenamePrefix goes away, and needs a different fix if the catalog grows two rows.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fac4a888ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1922 to +1926
void loadOrStage(
pending.repoId,
{ ...pending.opts, h3Task: task },
pending.isDownloaded,
pending.token,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Re-plan cached H3 picks before switching tasks

When an On Device MiniMax H3 cache contains only one denoiser partition, meta.isDownloaded is still true for the repository, and forwarding it here makes loadOrStage immediately bypass /video/download-plan. Choosing the other task then lets Diffusers fetch the missing transformer/ or transformer_ref/ shards—about 66 GB—inline during model loading, outside the download manager's disk preflight, progress, and cancellation. Cached H3 task choices need a partition-aware availability check or must always run the staged plan, which can reuse the shared cached blobs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real at the commit you reviewed, and closed at the current head by the base merge rather than by intent, so it is worth spelling out.

At fac4a88 loadOrStage took isDownloaded and short-circuited on if (isDownloaded !== false) return handleLoadRef.current(...). A curated H3 artifact reports isDownloaded for the repository, so the partition dialog handed that straight back and the plan never ran: choosing the other task left Diffusers to pull the missing transformer/ or transformer_ref/ shards inline, outside the disk preflight, the progress and the cancel. Exactly as described.

Merging 8244 replaced that signature with source, and the short-circuit is now if (source !== "hub") return handleLoadRef.current(...). localModelMeta is the only thing that emits "local"; a downloaded curated artifact is still source "hub" with isDownloaded set beside it. So a cached H3 pick runs the cache-aware plan again, and a fully cached one comes back with no entries and costs nothing.

I have not left that resting on a merge nobody was watching. video-h3-task-dialog.test.ts pins the three parts: the bypass is keyed on source, the old isDownloaded form is gone, and chooseH3Task re-enters loadOrStage with the chosen task rather than calling handleLoad directly, so the plan decision is made again with the partition in hand. That matters now, because the sibling item about on-device pipelines is fixed in 6ba9aae and those picks arrive as source "local" - correctly skipping a Hub plan, since their weights are the directory own, but it is the kind of change that could have quietly reopened this.

Comment on lines 691 to 693
return kind === "pipeline" && repoId.toLowerCase() === H3_BF16_REPO.toLowerCase();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Offer the H3 task choice for local pipelines

When the official MiniMax H3 pipeline is added as an on-device directory such as /models/MiniMax-H3, it reaches the generic local-pipeline branch rather than the curated artifact branch, and this exact Hub-ID predicate never recognizes it. The backend supports loading on-device H3 modular pipelines, but an omitted h3_task defaults them to FL2VA, so the local copy can never load its transformer_ref partition or expose reference generation even when those weights are present. Detect local H3 pipeline picks and route them through the same task dialog.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. isH3PipelinePick compared against the Hub id, which a directory like /models/MiniMax-H3 never equals, so the pick fell to the generic local-pipeline branch and loaded with no h3_task at all. The backend defaults that to fl2va, so the transformer_ref partition was unreachable with the weights sitting on disk, and reference generation could not be reached from an on-device copy.

Fixed in 6ba9aae: the predicate keeps the Hub-id equality and adds a final-path-segment match against the repo name, the same way a local checkpoint family is read off its filename elsewhere, and the generic branch consults it before loading. Trailing slashes and Windows separators are normalised first.

A local pick then arrives at the dialog with source "local", which correctly skips the Hub download plan since its weights are the directory own. Worth noting because it is adjacent to the cached-partition item above: that bypass is keyed on source, not on a downloaded flag, so this does not reopen it.

video-h3-task-dialog.test.ts asserts the predicate is no longer a Hub-id equality test and that the local-pipeline branch intercepts exactly once. Mutation checked: removing the interception fails that assertion.

# Conflicts:
#	studio/frontend/src/features/video/video-page.tsx
The base now calls getVideoDownloadPlan earlier for the row-sizing footprint probe, and
that call only ever runs for a named GGUF file, where the partition is the filename
rather than a task flag. Finding the plan by the first occurrence in the file therefore
read the wrong call and the H3 task assertion no longer described the staging path.
Slice loadOrStage first, then find the plan inside it.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 174f9320bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)
: normalized.variants,
);
setDefaultVariant(normalized.defaultVariant);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute the default after filtering variants

When filenamePrefix selects the Ref2VA subset, this still stores the repository-wide default, which pick_best_gguf normally chooses from the lexicographically earlier FL2VA files. On hosts where the device budget is unavailable, effectiveRecommended returns that now-hidden key, so no visible Ref2VA row is recommended and the sorter instead puts the largest file first. Derive the default from the filtered variants, or clear it when it is not present in that subset.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. defaultVariant is a QUANT key that pick_best_gguf chose across the whole repo, and it never saw the prefix subset: H3 lists 6 ref2va quants against 8 fl2va ones, so the chosen key can simply be absent from the filtered rows. effectiveRecommended budget-unavailable branch returns it unchecked, so nothing visible reads as recommended and sortedVariants falls through to largest first.

6ba9aae takes the second of your two options and clears it, keeping it only when the filtered subset actually contains that quant. An unfiltered listing is untouched. I deliberately did not synthesise a replacement from the subset: choosing a recommended quant is pick_best_gguf job, it weighs things the picker does not have, and inventing one here would be a different recommendation rule living in two places.

gguf-variant-default-subset.test.ts covers both halves and also pins the consuming branch, so the fix cannot be quietly undone by a change on the reading side. Mutation checked: restoring the unconditional setDefaultVariant fails.

Comment on lines +1979 to +1981
if (!active) {
pickGuard.release();
setPendingH3Load(null);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Roll back the deferred pick when hiding the page

If the page becomes inactive while the H3 task dialog is open—for example through browser navigation or another application navigation trigger—this clears the dialog without taking its cancellation path. A direct H3 pick has already replaced the quant, steps, and guidance and stored their rollback in quantRevert, so returning to Video leaves controls describing H3 even though the previous model is still resident, and the stale rollback can also affect the next pick. Cancel or abandon the pending choice before clearing it here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. The hide effect released the guard and cleared the dialog, but not through the cancellation path, and those are not the same thing. The pick that opened the dialog had already replaced the quant label, steps and guidance and parked their rollback in quantRevert, and the load it was deferring never ran. So returning to Video found the controls describing H3 over whatever model was still resident, and the stale rollback was left for the next pick to inherit.

6ba9aae routes it through the same ending as Cancel by calling abandonPick, guarded on there actually being a pending pick inside the setPendingH3Load updater so hiding an idle page reverts nothing. abandonPick had to move above the effect to avoid a temporal dead zone in the deps array.

video-h3-task-dialog.test.ts asserts the hide path calls abandonPick and that it is guarded. Mutation checked: restoring the bare setPendingH3Load(null) fails. Frontend typecheck clean, 1570 pass.

@danielhanchen

Copy link
Copy Markdown
Member

The base moved under this PR, so I have merged it forward

This PR is stacked on h3-video-lora (#8244), not on main. I merged main into h3-video-lora earlier today (d7c5dab8c), and that is what put this branch into a conflicting state. My doing, so I reconciled it here rather than handing it back to you. It is a merge of origin/h3-video-lora INTO pr8244-ref2va, never a rebase, so your commits keep their SHAs.

The PR now reports MERGEABLE.

What actually conflicted

One file, studio/frontend/src/features/video/video-page.tsx, in 7 hunks. Everything else merged cleanly, including model_config.py, hub/utils/gguf.py, model-catalog.ts, model-catalog.check.ts, pickers.tsx and video-download-plan-payload.test.ts.

It was not really a textual clash. Both branches refactored the same two functions:

  • This PR introduced VideoLoadOptions carrying h3Task, so handleLoad and loadOrStage take opts: VideoLoadOptions and forward h3_task to both the load request and the download-plan request.
  • h3-video-lora introduced VideoLoadAdvanced / currentLoadAdvanced(kind), so the five Advanced controls are resolved once and pinned across preflight, staging and load, and it replaced loadOrStage's third parameter.

The union is right in every hunk.

# Where Resolution
1 handleLoad signature (repoId, opts: VideoLoadOptions, pinned?: VideoLoadAdvanced)
2 lastLoad.current { repoId, ...opts }, alongside the base branch's const advanced = pinned ?? currentLoadAdvanced(opts.kind)
3 loadVideoModel payload the five advanced.* fields, plus h3_task: opts.h3Task
4 pendingStagedLoad ref opts: VideoLoadOptions and advanced: VideoLoadAdvanced
5 loadOrStage signature (repoId, opts: VideoLoadOptions, source = "hub", token?)
6 getVideoDownloadPlan payload advanced.transformer_quant / advanced.memory_mode, plus h3_task: opts.h3Task
7 routed ?model= branch the H3 interception kept, with the trailing call as loadOrStage(pick.repoId, pick.opts, "hub", token)

The three things worth being explicit about:

  • lastLoad.current keeps h3Task. It is { repoId, ...opts } and handleReapply passes h3Task: l.h3Task, so Reapply reloads the same partition instead of dropping back to the default denoiser.
  • The task dialog still intercepts both entry points, handleModelSelect and the routed routeSearch.model path, through the one isH3PipelinePick predicate. That is the P1 fix fac4a888f landed and nothing in the merge weakened it.
  • The download-plan request still carries h3_task, which is what stops it staging the wrong 66.28 GB partition.

The part that changes behaviour, not just text: isDownloaded to source

On h3-video-lora, loadOrStage's third parameter is no longer isDownloaded?: boolean. It is source: ModelSelectorChangeMeta["source"] = "hub", with an early if (source !== "hub") return handleLoadRef.current(repoId, opts). isDownloaded is gone, not renamed: the parameter now says where the pick came from, and the Hub download plan runs for every hub pick rather than only an undownloaded one.

Those call sites sit outside the conflict regions, so git flagged none of them and the file still parsed. Converted by hand:

  1. type PendingH3Load: field isDownloaded?: boolean became source: ModelSelectorChangeMeta["source"].
  2. chooseH3Task: forwards pending.source instead of pending.isDownloaded.
  3. handleModelSelect, curated pipeline branch: setPendingH3Load({ ..., source: meta.source }) instead of isDownloaded: meta.isDownloaded.
  4. routed ?model= branch: setPendingH3Load({ ..., source: "hub" }) instead of isDownloaded: false.
  5. duplicate type VideoLoadRequest import: both branches added it to the same import list at different positions, so the textual auto-merge emitted it twice. The typecheck caught that one.

On why PendingH3Load carries source rather than keeping a downloaded flag: the dialog exists purely to defer a pick, so it must hand on exactly what its caller would have passed inline. source is what decides whether the pick is preflighted against the Hub plan or loaded straight off disk, and a dialog holding a pick must not silently change that. A downloaded flag had nothing left to bind to.

One extra line the merge forced

h3-video-lora gave every optimistic pick a rollback: each branch of handleModelSelect snapshots a PickRevert into quantRevert.current and then either loads with a .then rollback or calls abandonPick(). The task dialog returns early out of the middle of the branch that snapshots it, so the two ways out of the dialog now carry that branch's two endings: chooseH3Task reverts if the load never starts, and cancelH3TaskChoice calls abandonPick(). Without it, cancelling the dialog left the selector showing no quant and H3's step and guidance recipe over the model that was still resident. Happy to drop this bit if you would rather keep the merge purely mechanical.

One test fix

video-download-plan-payload.test.ts found the staging plan with source.indexOf("await getVideoDownloadPlan({"). h3-video-lora added an earlier call in resolveDownloadFootprint, which sizes a named GGUF file for the picker row and has no task to send, so that lookup started reading the wrong call. The test now slices loadOrStage first and finds the plan inside it.

Verification

  • npm run typecheck in studio/frontend: clean, exit 0. That is the real proof the signature reconciliation is complete, since it is what catches the out-of-band call sites.
  • npm test: 1565 passed, 0 failed.
  • npm run build, npm run i18n:check:strict: clean.
  • studio/backend/tests/ and studio/backend/hub/tests/, run separately and compared as FAILED sets against the base branch rather than as counts:
head 174f9320b   5 failed, 20953 passed, 87 skipped, 15 errors   hub: 480 passed
base 405cffdfb   5 failed, 20951 passed, 87 skipped, 15 errors   hub: 479 passed

Identical FAILED sets (test_kv_cache_estimation, three in test_mcp_stdio_improvements, test_studio_api::test_help_output), all pre-existing on the base. The head simply passes two more backend tests and one more hub test, which are this PR's own.

Not touched

I deliberately left the open catalog-keying question alone (two rows keyed on (repoId, prefix) versus one row with ggufFilenamePrefix deleted), along with the three items triaged earlier today. Those are still yours to call.

…n hide

Three things the review found on the picker side of reference generation.

An on-device copy of the pipeline reaches the generic local-pipeline branch, which a
Hub-id equality test never recognises, so an omitted h3_task pinned it to fl2va and its
transformer_ref partition was unreachable with the weights sitting on disk. Match on the
final path segment, the way a local checkpoint's family is read off its filename
elsewhere, and consult it from that branch too.

Hiding the page cleared the dialog without taking its cancellation path. The pick that
opened it had already replaced the quant label, steps and guidance and parked their
rollback, and the load it was deferring never ran, so returning to Video found controls
describing H3 over whatever model was still resident, plus a stale rollback for the next
pick to trip over. Take the same ending as Cancel, guarded on there being a pending pick
so hiding an idle page reverts nothing.

And defaultVariant is a quant key chosen across the whole repo, which a filenamePrefix
subset need not contain: H3 offers 6 ref2va quants against 8 fl2va ones. Stored
unchanged, the budget-unavailable branch of the recommendation returned a key with no
visible row, so nothing read as recommended and the sorter fell through to largest
first. Drop it when the prefix filters it out; an unfiltered listing is untouched.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 6ba9aaed26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

Base merged forward again, and the full suite on the merged head

h3-video-lora moved twice under this PR while the review round was in flight (the #8329 conflict resolution plus a formatting pass), so I merged it in again. Clean merge, no conflicts. Head is now 2c0214019.

Full run on the merged head, backend and hub as separate invocations, plus typecheck and the frontend suite:

suite result
studio/backend/tests 10 failed, 21182 passed, 87 skipped, 15 errors (852.55s)
studio/backend/hub/tests 480 passed
tsc --noEmit clean
studio/frontend 1582 passed, 0 failed

Nine of the ten are the set the base carries, none of them in video: test_kv_cache_estimation, three in test_mcp_stdio_improvements, three in test_research_runs_storage, test_studio_api::test_help_output, test_text_io_encoding. The 15 errors are test_studio_api server-start failures, also on the base.

The tenth, test_local_llama_cpp_link.py::test_orphan_cleanup_kills_under_real_root, is not on the base list. It is a flake from my own box: I had two full suites running at once, and that test scans and kills processes under a root. Re-run on its own at the same commit it passes:

tests/test_local_llama_cpp_link.py::test_orphan_cleanup_kills_under_real_root
1 passed, 16 warnings in 7.97s

Nothing in this PR touches llama.cpp linking.

On the red checks

All of them are cancelled, not failure. The org queue mass-cancelled at 12:00 across every branch including main, and the affected runs refuse both retry endpoints, so they can only clear on a push. This push should produce a fresh set. Independent validation is also running on a staging repo so the result does not depend on the org queue clearing.

@danielhanchen
danielhanchen merged commit dbdd33f into unslothai:h3-video-lora Aug 10, 2026
35 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants