Skip to content

Studio: add MiniMax H3 video generation - #7989

Merged
danielhanchen merged 71 commits into
unslothai:mainfrom
oobabooga:feat/minimax-h3-video
Aug 9, 2026
Merged

danielhanchen merged 71 commits into
unslothai:mainfrom
oobabooga:feat/minimax-h3-video

Conversation

@oobabooga

Copy link
Copy Markdown
Member

Adds MiniMax H3 text-to-video generation with synchronized audio to Studio's Video tab.

Users can select either:

Studio automatically downloads every required component, generates the video and audio, and saves a gallery-compatible MP4.

What changed

  • Add MiniMax H3 to the Video model picker with official BF16 and GGUF artifacts.
  • Support its official resolutions, 5 to 14.4 second durations, and 17k + 5 frame lattice.
  • Hide guidance and negative-prompt controls because H3 does not use CFG.
  • Load BF16 through the official Modular Diffusers t2va workflow.
  • Run GGUF through stable-diffusion.cpp vid_gen, including progress, cancellation, audio, and MP4 conversion.
  • Show the active Diffusers or stable-diffusion.cpp engine in the UI.
  • Pin the merged Diffusers commit and stable-diffusion.cpp master-812-ea7f0c8 until packaged releases include the required support.

Memory routing

The BF16 components total about 145 GB, but Diffusers runs them with component-level CPU offload. Measurements showed that the upstream 12 GB reserve could retain too many weights on large GPUs and OOM at longer durations. This PR uses a 40 GB reserve and checks available VRAM and system RAM before generation.

Scenario Measured result Preflight estimate
960x544, 124 frames 70 GB OOM, 72 GB passed 73.7 GB
1344x768, 124 frames 72 GB OOM, 76 GB passed 78.7 GB
1344x768, 345 frames 96 GB passed 97.0 GB
150 GB cap, 345 frames 12 GB reserve OOM; 40 GB reserve passed at 98.3 GB peak 97.0 GB
Default workload host RAM 145.2 GB at a 126 GB VRAM cap; 80.2 GB at 132 GB Tiered

The picker selects BF16 when either measured tier fits:

  • 74 GiB GPU with 140 GiB available system RAM.
  • 123 GiB GPU with 80 GiB available system RAM.

Other configurations default to GGUF. The existing 70% routing rule remains unchanged for every other model.

Boundaries

  • This exposes text-to-video only. H3's first-frame, last-frame, and reference-video workflows are not included.
  • The native Auto mode currently uses --offload-to-cpu. Wiring stable-diffusion.cpp's newer --auto-fit, --max-vram, and --stream-layers controls is left for a follow-up.
  • Python 3.10+ moves to Transformers 5.5 and Hugging Face Hub 1.23+ for the merged Diffusers implementation. Python 3.9 keeps its existing compatible versions.

Validation

Complete 30-step generations were run on an NVIDIA B200 through both the official BF16 Diffusers pipeline and a Q4_K_M stable-diffusion.cpp CUDA build. Both produced coherent, playable H.264/AAC MP4 files with audio.

  • Focused video backend, route, gallery, family, and native argument suites: 224 passed.
  • Transformers routing and MLX repair suites: 300 passed.
  • Studio dependency CLI tests: 13 passed.
  • Model catalog checks, frontend type checking, dependency resolution, Ruff, and git diff --check passed.

@oobabooga
oobabooga marked this pull request as draft August 6, 2026 04:34

@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: e51e2bb672

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

scope: "video",
aliases: ["Comfy-Org/MiniMax-H3"],
artifacts: [
bf16Pipeline("MiniMaxAI/MiniMax-H3", 145, {

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 Mark the H3 BF16 artifact as gated

MiniMaxAI/MiniMax-H3 is a gated Hugging Face repo, but this catalog entry is not marked gated. On high-memory hosts a bare MiniMax H3 click can therefore auto-select the BF16 artifact before it is downloaded, instead of falling through to the open GGUF fallback, so users without accepted Hub access get a failed staged download/load. Mark this artifact gated like the other gated Hub repos so default routing stays on GGUF unless the BF16 repo is already present.

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.

MiniMaxAI/MiniMax-H3 is not gated on the Hub. The models API returns gated: false both anonymously and with a token, and an unauthenticated resolve of model_index.json returns 200, where FLUX.1-dev, which we do mark gated, returns gated: auto. Marking it gated would wrongly push every host onto the GGUF fallback.

@danielhanchen

Copy link
Copy Markdown
Member

Nice work, and the measured memory table is exactly the kind of evidence that makes a routing threshold reviewable. I have been looking at MiniMax-H3 support from the model side, so a few notes from that angle. Two are about the dependency changes rather than the H3 code.

1. The diffusers git pin in pyproject.toml will break the next PyPI release

huggingfacenotorch = [
    "diffusers @ git+https://github.com/huggingface/diffusers.git@f53d5520... ; python_version >= '3.10'",
]

PyPI rejects any PEP 508 direct reference in uploaded metadata with 400 Invalid value for requires_dist. Error: Can't have direct dependency. Two things make this easy to miss:

Confirmed the requirement parses as a direct reference:

>>> Requirement("diffusers @ git+https://github.com/huggingface/diffusers.git@f53d... ; python_version >= '3.10'").url
'git+https://github.com/huggingface/diffusers.git@f53d552036a0d1bd5570782a39cd40cfabf112bc'

The same line in requirements/base.txt, extras-no-deps.txt and no-torch-runtime.txt is fine, because a requirements file never enters package metadata. It is only the pyproject.toml copy that is a problem. Keeping diffusers>=0.39.0 in pyproject.toml and letting the requirements files carry the pin would keep releases working, at the cost of pip install unsloth[huggingfacenotorch] alone not getting H3.

2. huggingface-hub>=1.23.0 for all of Python 3.10+ is a large blast radius

Going from ==0.36.2 to the 1.x line for the entire Studio install is much wider than H3. It is not a drop-in: on 1.x HfHubHTTPError.__init__ makes response a required keyword-only argument and dereferences it unguarded, where 0.36.2 guards it with if response is not None. I hit this on #7870 and had to build the error through __new__ because no constructor call works on both majors.

That is one known divergence in error construction alone. The validation listed covers the video backend, routes, gallery, families, native args, transformers routing and MLX repair. Has the full studio/backend/tests/ and studio/backend/hub/tests/ run under hub 1.x? The download, cache-scan and inventory paths are where I would expect surprises.

3. Worth splitting

The H3 support itself is self-contained and reads well. The dependency floor moves (hub 1.x, transformers 5.5 default, the diffusers git pin) affect every user, including ones who never open the Video tab. Landing those separately would let the H3 work merge on its own schedule rather than waiting on a stack-wide upgrade.

None of this is a blocker on the feature. Happy to help with the hub 1.x sweep if that is useful.

@oobabooga

Copy link
Copy Markdown
Member Author

Thanks, I addressed the findings in 645be0c.

The Diffusers Git reference is now limited to Studio's installer requirements. The published extra uses diffusers>=0.39.0, so the wheel contains no VCS dependency. I built and inspected the wheel, and twine check passed.

For the Hub upgrade, all 173 Hub tests passed on versions 0.36.2, 1.23.0, and 1.26.1. The broad backend suite on 1.26.1 completed with 16,710 passed and 68 skipped.

I also ran real generations through VideoBackend:

Backend Input Result Peak VRAM
stable-diffusion.cpp master-812-ea7f0c8, CUDA 960x544, 124 frames, 1 step Valid H.264 and AAC output 18,382 MiB
Diffusers merged H3 commit 960x544, 124 frames, 2 steps Valid H.264 and AAC output 140,788 MiB

The runtime findings were addressed as well: Metal text-encoder handling, Torch-free native generation, XPU-to-Vulkan mapping, the install kill switch, and FL2VA GGUF filtering. I did not mark the official model as gated because the Hub reports gated=false, and the full model downloaded without authentication during testing.

@oobabooga
oobabooga marked this pull request as ready for review August 6, 2026 15:27
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen

Copy link
Copy Markdown
Member

Measured this on a CUDA build of sd.cpp at the same commit the PR targets (master-813-bfbef5b, built locally with -DSD_CUDA=ON), using fl2va_pruned-Q4_K_M plus the Q2_K_M Qwen3-VL encoder, at 640x384 / 25 frames / 4 steps. Peak VRAM is sampled per-PID every 250 ms across the whole run, and a run only counts if it actually wrote a video.

The native path fits well under 24 GB

Placement Peak VRAM Wall Output
everything resident 29.41 GiB 22 s ok
--backend te=cpu 16.87 GiB 27 s ok
--offload-to-cpu 13.14 GiB 37 s ok
--backend te=cpu,vae=cpu --vae-tiling - - abort

The buffer split from the verbose log explains it: text encoder 12,844 MB, diffusion model 10,976 MB, video VAE 4,637 MB, audio VAE 248 MB. The encoder is the largest single consumer and it runs once up front, so moving it off the GPU is most of the win.

So H3 comfortably clears both 24 GB and 32 GB on the native route. That is worth stating in the PR, because the Diffusers gate at H3_DIFFUSERS_VRAM_BASE_GB = 68.5 currently reads as though H3 needs a 96 GB card.

low_vram aborts the generation

low_vram maps to policy model, and offload_flags("model", ...) emits --vae-on-cpu. The H3 video VAE cannot run on the CPU backend:

ggml/src/ggml-cpu/ops.cpp:6321: GGML_ASSERT(src0->type == GGML_TYPE_F16) failed
  ggml_compute_forward_im2col

Reproduced with exactly the flags the mapping produces:

sd-cli --mode vid_gen --diffusion-model minimax_h3_fl2va_pruned-Q4_K_M.gguf \
  --llm qwen3vl_32b_minimax_h3-Q2_K_M.gguf --vae minimax_h3_video_vae_fp16.safetensors \
  --audio-vae minimax_h3_audio_vae_fp32.safetensors \
  --offload-to-cpu --clip-on-cpu --vae-on-cpu --diffusion-fa --vae-tiling
-> exit 134 (SIGABRT), no output

This is the mode a 24 GB user would pick, and it is the one mode that fails. auto and balanced both map to group, which emits only --offload-to-cpu --diffusion-fa and lands at 13.14 GiB, so the fix is simply to not send the VAE to the CPU for this family rather than to add a new tier.

The Linux prebuilt has no CUDA backend

install_sd_cpp_prebuilt.py defaults to auto, which on Linux selects the asset with no accelerator marker, and its comment says "GPU hosts run diffusers, so only CPU/Apple assets are needed". That assumption does not hold for H3: the Diffusers path is gated off at 68.5 GB on exactly the hosts that would need the native path.

Upstream master-813-bfbef5b also ships no Linux CUDA asset at all, only rocm, vulkan and plain CPU, so accelerator="cuda" finds nothing to install and falls through. I hit this first hand: my initial run took 20 minutes and allocated zero VRAM before aborting in the CPU im2col path.

As it stands a Linux NVIDIA user gets the Diffusers path refused and the native path on CPU. Worth deciding whether Studio publishes a CUDA sd.cpp asset to its own mirror, or whether the H3 native route should require one and say so.

Happy to push any of these as commits if that is easier than reworking them yourself.

@danielhanchen

Copy link
Copy Markdown
Member

I spent some time measuring H3 on this branch to answer "what card does this actually need", and turned up a few things worth folding in. All numbers are from a real vid_gen run at 640x384, 25 frames, 4 steps, cfg 1.0, seed 1234, --rng cpu, with per-PID VRAM sampled every 250ms.

It fits in 24 GB, and the current gate says otherwise

Peak VRAM with the text encoder on CPU:

denoiser peak VRAM
Q4_K 16.87 GiB
Q5_0 19.20 GiB
Q6_K 21.68 GiB
Q8_0 26.20 GiB

With --offload-to-cpu the same model peaks at 13.14 GiB. So Q6_K is a 24 GB card and Q8_0 is a 32 GB card, and offload puts it well inside 16 GB. The Diffusers-side gate reads as needing far more than that, which will turn away users whose cards are fine on the native path.

--vae-on-cpu aborts H3

offload_flags emits --vae-on-cpu unconditionally for the model and sequential policies, which is what Studio's low_vram maps to. On H3 that dies:

ggml/src/ggml-cpu/ops.cpp:6321: GGML_ASSERT(src0->type == GGML_TYPE_F16) failed

deterministically, SIGABRT, exit 134. So low_vram is the one mode that cannot run H3, which is unfortunate given it is the mode a small-card user would reach for.

Bisecting the flags:

command result
--vae-on-cpu with --audio-vae abort
--vae-on-cpu without --audio-vae succeeds, video in 95.87s
--vae-on-cpu with an fp16-converted audio VAE abort

The trigger is the audio VAE, not the video VAE (which is entirely F16). ggml_conv_1d hardcodes an F16 im2col destination (ggml/src/ggml.c:4489) and ggml_compute_forward_im2col_f16 then asserts the kernel is F16, while audio_conv_weight_type (src/model/vae/ltx_audio_vae.hpp:259) maps only BF16 to F16 and lets F32 through. Converting the audio VAE checkpoint to fp16 does not help, so the type is imposed inside stable-diffusion.cpp rather than by the file. That means it cannot be fixed by shipping a different checkpoint: --vae-on-cpu needs to not be emitted for this family.

The Linux and Windows prebuilts are CPU-only

The published assets are:

sd-...-bin-Darwin-macOS-arm64.zip
sd-...-bin-Darwin-macOS-x86_64.zip
sd-...-bin-Linux-Ubuntu-22.04-x86_64.zip
sd-...-bin-Linux-Ubuntu-24.04-aarch64.zip
sd-...-bin-win-cpu-x64.zip

There is no CUDA variant. On the same generation the prebuilt took about 20 minutes and allocated no VRAM, while a local -DSD_CUDA=ON build did it in 17 seconds on the GPU. So NVIDIA users on Linux and Windows get the CPU path today, which I suspect is not the intent for a video model.

Careful which GGUFs this points at

Worth knowing before wiring up quantized rungs: stable-diffusion.cpp's converter has no rule sparing 1-D norm weights. They survive a blanket --type only when their length does not divide the quant block size (q_norm and k_norm are [128], and 128 % 256 != 0) or when a FLUX-era name rule happens to match (final_layer.).

H3's per-block norms are [5376], and 5376 % 256 == 0, so a blanket build crushes 106 norm scales to 4-bit. The result loads and renders a valid video, so a "does it run" check passes it, but scored against a bf16 render of the same prompt and seed:

build PSNR SSIM LPIPS
Q4_K, blanket --type 9.87 0.074 0.981
Q4_K, norms held at bf16 21.52 0.838 0.299

SSIM 0.074 is essentially uncorrelated with the reference. --tensor-type-rules 'norm[0-9]*\.weight$=bf16,condition_proj\.weight$=bf16' fixes it for about 56 MiB, and built that way Q4_K reproduces the community Q4_K_M tensor layout exactly, 0 of 532 tensors differing. So the published Q4_K_M is fine; it is other rungs that need care.

int8_convrot and fp8_scaled are not options here

Comfy-Org publish both for this checkpoint, but neither loads in stable-diffusion.cpp. fp8_scaled is 200 F8_E4M3 weights plus 350 weight_scale/input_scale tensors, and while F8_E4M3 is read it is upconverted to F16 at load (f8_e4m3_to_f16_vec), so there is no VRAM saving, and nothing in src/model/ ever reads those scales. int8_convrot has zero occurrences of convrot anywhere in the tree. GGUF is the only quantization route on this path.

Mirror

MiniMaxAI/MiniMax-H3 is now mirrored at unsloth/MiniMax-H3, a complete byte-identical copy including the upstream LICENSE, if it helps to fetch from there.

Happy to send patches for the --vae-on-cpu and VRAM-gate pieces if that is useful.

low_vram maps to the `model` policy, and offload_flags emits --vae-on-cpu for it
unconditionally. On H3 that kills the process:

    ggml/src/ggml-cpu/ops.cpp:6321: GGML_ASSERT(src0->type == GGML_TYPE_F16) failed

deterministically, SIGABRT, exit 134. Bisected on the flags: --vae-on-cpu with
--audio-vae aborts, the same command without --audio-vae renders in 95.87s, and an
fp16-converted audio VAE aborts too. So the trigger is the audio VAE, not the video
one, and the F32 type is imposed inside stable-diffusion.cpp rather than by the
file: ggml_conv_1d hardcodes an F16 im2col destination (ggml/src/ggml.c),
ggml_compute_forward_im2col_f16 then asserts the KERNEL is F16, and
audio_conv_weight_type (src/model/vae/ltx_audio_vae.hpp) maps only BF16 to F16 and
lets F32 through. It cannot be fixed by shipping a different checkpoint.

low_vram is the one mode a small-card user reaches for, so this drops the flag
rather than the mode. offload_flags takes vae_on_cpu, defaulting True so no other
family changes, and the H3 native path passes False. --offload-to-cpu and
--clip-on-cpu still apply, which is where the saving actually is: the denoiser
dominates, and with --offload-to-cpu the whole model peaks at 13.14 GiB.
@danielhanchen

Copy link
Copy Markdown
Member

Sent the --vae-on-cpu fix as a PR into this branch rather than leaving it as a note: oobabooga#117. It adds a vae_on_cpu parameter to offload_flags, defaulting True so no other family changes, and passes False from the H3 native path.

It drops the flag rather than the mode, since --offload-to-cpu and --clip-on-cpu are where the saving actually is. Two tests: one on offload_flags itself, and a source-level one asserting the H3 call site passes the opt-out, since reproducing the abort needs a built sd-cli plus the weights. 122 passed across test_video_backend.py and test_sd_cpp_args.py.

Merge it or take the diff, whichever you prefer. The memory-gate numbers from my earlier comment are still worth folding in separately: Q6_K peaks at 21.68 GiB and Q8_0 at 26.20 GiB, so 24 GB and 32 GB cards respectively, and 13.14 GiB with --offload-to-cpu.

danielhanchen and others added 2 commits August 7, 2026 19:57
Two conflicts, both mechanical:

- transformers_version.py: main reworded the comment under
  TRANSFORMERS_DEFAULT_VERSION while this branch changed the value.
  Kept both.
- test_video_backend.py: both sides appended a new test at the end of
  the file. Kept both.

Main also added test_curated_gguf_repos_are_unsloth_mirrors, which
requires every curated video gguf_repo to be an unsloth mirror so a
one-click pick cannot 404 when a community repack is renamed. H3 was
pointing at leejet/MiniMax-H3-GGUF, so it now points at
unsloth/MiniMax-H3-GGUF instead.

NOTE: unsloth/MiniMax-H3-GGUF is still private. It has to be made
public before this merges, or the pick will 401.
@danielhanchen

Copy link
Copy Markdown
Member

Merged main in to clear the conflict. Two hunks, both mechanical: transformers_version.py (main reworded the comment under TRANSFORMERS_DEFAULT_VERSION while this branch changed the value, kept both) and test_video_backend.py (both sides appended a test at the end, kept both).

One thing worth flagging, since it changes a model pointer on your branch. Main has since added test_curated_gguf_repos_are_unsloth_mirrors, which requires every curated video gguf_repo to live under unsloth/ so a one-click pick cannot 404 if a community repack gets renamed. H3 was on leejet/MiniMax-H3-GGUF, so it now points at unsloth/MiniMax-H3-GGUF.

That repo is still private, so it has to be flipped public before this merges or the GGUF pick will 401. No CI check reads it, so nothing goes red in the meantime.

The mirror is not a straight repack. It carries six uniform rungs plus two mixed-precision ones, all built with the 1-D norm scales held at bf16. That last part matters more than it sounds: H3's per-block norms are [5376] and 5376 % 256 == 0, so a blanket --type quantizes 106 norm scales and takes a Q4_K build from PSNR 21.52 / SSIM 0.838 down to 9.87 / 0.074. It still renders a valid-looking video, so a smoke test passes it.

On measured prompt adherence the pick to default to is UD-Q2_K_XL at 7.51 GiB on disk and 13.46 GiB peak, indistinguishable from Q4_K over 25 paired renders while being 3.41 GiB lighter, which is what gets H3 onto a 16 GB card.

Local runs: studio/backend/tests/ 18044 passed, 24 failed, and all 24 fail or error identically on main in this environment (test_studio_api needs a server it cannot start, plus the mcp-stdio / research-runs set). studio/backend/hub/tests/ 265 passed. Before the pointer fix there was one genuinely new failure, the curated-mirror test above; it passes now.

Main added test_curated_gguf_repos_are_unsloth_mirrors, which requires
every curated video gguf_repo to live under unsloth/ so a one-click pick
cannot 404 when a community repack is renamed or taken down. H3 was the
one family still on a community repo.

This was meant to be part of the merge commit but was left in the
worktree, so CI on that commit still saw the old value.

unsloth/MiniMax-H3-GGUF is still private and has to be made public
before this merges, or the pick will 401. No CI check reads it.
@danielhanchen

Copy link
Copy Markdown
Member

Correction to my last comment: the gguf_repo change was not actually in that merge commit. I edited the file but the change stayed in the worktree rather than the index, so git commit on the merge did not pick it up, and CI on that commit still saw leejet/MiniMax-H3-GGUF and failed test_curated_gguf_repos_are_unsloth_mirrors. Pushed properly now in 66db1c03c, and verified against the remote rather than my local tree this time.

On the rest of that red run, having checked each against main:

  • Repo tests (CPU): 3 failures, test_terminal_update_holds_the_gate_through_environment_mutation and the two test_desktop_reliability_frontend_contract titlebar tests. All three fail identically on main at 1229fc55a, and none of them touch files this branch modifies.
  • (Python 3.10-3.13): 5 failures, 4 in test_research_runs_hardening (a ("report", "", "stop", None) vs ("report", "", "stop") arity change) which also fail on main, plus the curated-mirror one, which is the one now fixed.

So the only genuine failure on this branch was the pointer, and the --vae-on-cpu and cfg-scale fixes are unaffected.

danielhanchen and others added 3 commits August 7, 2026 20:30
H3 is distilled and CFG-free: its empty unconditional prompt encodes to
zero tokens, and the transposed tensor that produces trips
GGML_ASSERT(!ggml_is_transposed(a)) in ggml.c. SIGABRT, exit 134.
Measured: cfg 1.0 renders, cfg 1.5 and cfg 4.0 both abort. sd.cpp
defaults cfg-scale to 7.0, so this is a crash a plausible refactor
reintroduces by forwarding guidance the way every other family does.

The native path already hardcodes 1.0 and the family sets
supports_cfg = False, but nothing held either in place. supports_cfg
only gates the diffusers path; the native path builds its own params.

Checked the test fails when cfg_scale is changed to forward guidance,
so it is not passing vacuously.
The macos-15-intel leg fails deterministically, not flakily:

  process didn't exit successfully: `/usr/bin/git init` (exit status: 1)
  --- stderr
  xcode-select: note: No developer tools were found, requesting install.

That runner has no Xcode, so /usr/bin/git is the developer-tools shim and
exits 1 for everything. uv needs a working git to resolve a git+https
dependency, so the diffusers pin this branch added cannot install there
at all. Main is unaffected because it depends on plain diffusers.

GitHub serves the same commit as a source archive, which uv installs with
no git involved. Verified by stubbing git to fail exactly the way the
macOS shim does: the git+ form reproduces the CI error, the archive form
installs diffusers 0.40.0.dev0 from the same SHA with
MiniMaxH3Transformer3DModel present and exported.

Also drops a full clone of diffusers from every install.
@danielhanchen

Copy link
Copy Markdown
Member

The mac macos-15-intel / mask / file failure was not flaky, it was deterministic and this branch caused it:

process didn't exit successfully: `/usr/bin/git init` (exit status: 1)
--- stderr
xcode-select: note: No developer tools were found, requesting install.

That runner has no Xcode, so /usr/bin/git is the developer-tools shim and exits 1 for everything. uv needs a working git to resolve a git+https:// dependency, so the diffusers pin this branch adds cannot install there at all. Main is unaffected because it depends on plain diffusers. It failed on all three runs on that leg while the other mac legs recovered, which is what pointed at it being real rather than transient.

Fixed in 3782f7cca by pinning the same commit as a GitHub source archive, which uv installs with no git involved:

diffusers @ https://github.com/huggingface/diffusers/archive/f53d552036a0d1bd5570782a39cd40cfabf112bc.zip

Verified by stubbing git to fail exactly the way the macOS shim does. The git+ form reproduces the CI error verbatim; the archive form installs diffusers==0.40.0.dev0 from the same SHA, with MiniMaxH3Transformer3DModel present and exported. tests/studio/install/ is 1681 passed, 2 skipped. It also drops a full clone of diffusers from every install.

Separately, the two quant repos this work produced are no longer weight-space-only. Dequantizing the stored values back to bf16 and rendering them, which is what a weight-only quant path does anyway, over 5 held-out prompts x 2 seeds against a bf16 render of the same prompt and seed:

LPIPS vs bf16 PSNR SSIM CLIP vs bf16
int8 0.0943 31.31 0.8945 -0.0013
fp8 e4m3 0.1437 28.26 0.8707 +0.0005

Both hold prompt adherence at bf16 level. int8 is clearly ahead on fidelity, winning 9 of the 10 cells, which matches the weight-space prediction that it beat fp8 on all 200 tensors. e4m3 spends 4 bits on an exponent that a per-output-channel scale has already made redundant.

With the archive pin the macOS leg gets past `git init` and installs, but
then trips the nobuild guard:

  built from source: diffusers -- these must resolve to wheels on a clean machine

There is no wheel to resolve to. MiniMax-H3 support is not in any
diffusers release, so this branch has to pin a commit, and neither a git
URL nor a source archive can produce a wheel from an index.

Added to the same allowlist that already carries triton-kernels for the
same reason. Checked against the bar the comment there sets: diffusers
builds with plain setuptools, declares no ext_modules, and its tree has
zero .c/.cpp/.pyx/.rs/.cu files and no shipped binaries, so the PEP 517
build is a pure-Python copy step and needs no toolchain. The separate
compiler-invocation check in both scripts is untouched and still fires if
one is ever needed.

Verified the allowlist logic still rejects a non-allowlisted source build
(a log building both diffusers and numpy reports only numpy).

Remove this entry once a diffusers release carries H3 and the requirement
goes back to a version specifier. Noted in both scripts.
@danielhanchen

Copy link
Copy Markdown
Member

Follow-on to the archive pin. With git init no longer failing, the macOS leg got as far as installing and then hit the next guard, on three legs at once (macos-15-intel, macos-15 --no-torch, windows-latest):

built from source: diffusers -- these must resolve to wheels on a clean machine

There is no wheel to resolve to. MiniMax-H3 is not in any diffusers release, so this branch has to pin a commit, and neither a git URL nor a source archive can produce one from an index. The two forms differ in whether the install works at all, not in whether it is a source build, so both changes were needed.

Fixed in 99c343123 by adding diffusers to the same allowlist that already carries triton-kernels for the same reason, in both clean-machine-assert.sh and assert-nobuild.ps1.

I checked it against the bar the comment in that script sets, rather than just adding the name. diffusers builds with plain setuptools, declares no ext_modules, and its tree has zero .c / .cpp / .pyx / .rs / .cu files and no shipped binaries, so the PEP 517 build is a pure-Python copy step that needs no toolchain. That is the property the guard is really protecting, and the separate compiler-invocation check in both scripts is untouched and still fires if a toolchain is ever pulled in.

Also verified the guard still bites: a log building both diffusers and numpy reports only numpy as bad.

Both scripts carry a note to remove the entry once a diffusers release ships H3 and the requirement goes back to a version specifier, so this does not quietly become permanent.

`pip scan-packages :: hf-stack` fails on this branch with 1 unbaselined
CRITICAL:

  C2 polling/beaconing loop detected
  Package: huggingface-hub
  File:    huggingface_hub/utils/_http.py
  L461:    while True:

This is on us, not upstream drift. Main pins huggingface-hub==0.36.2;
this branch needs >=1.23.0,<2.0 because diffusers at the pinned commit
requires it, so the resolved version moves 0.36.2 -> 1.27.0.

The baseline already carries this exact file and check at L462 and L298,
from earlier versions. It did not carry over because the key hashes the
matched code, not the line number, and the surrounding code changed
across the major version. That is the guard behaving correctly: changed
code in a baselined file reopens for review rather than staying
suppressed.

Reviewed it rather than just re-suppressing. L461 is the retry loop in
`http_backoff`: bounded by `nb_tries > max_retries`, the URL comes from
the caller, there is no hardcoded endpoint and nothing is exfiltrated.
Same benign construct as the entries it replaces.

Entry generated with the scanner's own _evidence_hash rather than
hand-written, and inserted beside its siblings so the diff stays 8 lines.
Verified: with the baseline the scan is exit 0 with 4 suppressed, without
it exit 1, so the guard still bites.
@danielhanchen

Copy link
Copy Markdown
Member

pip scan-packages :: hf-stack was failing with one unbaselined CRITICAL, and it is this branch's doing rather than upstream drift:

C2 polling/beaconing loop detected
Package: huggingface-hub
File:    huggingface_hub/utils/_http.py
L461:    while True:

Main pins huggingface-hub==0.36.2. This branch needs >=1.23.0,<2.0 because diffusers at the pinned commit requires it, so the resolved version moves 0.36.2 to 1.27.0.

The baseline already carries this exact file and check at L462 and L298 from earlier versions. It did not carry over because the key hashes the matched code rather than the line number, and the surrounding code changed across the major version. That is the guard working as intended: changed code in a baselined file reopens for review instead of staying quietly suppressed.

So I reviewed it rather than just re-suppressing. L461 is the retry loop in http_backoff: bounded by nb_tries > max_retries, the URL comes from the caller, no hardcoded endpoint, nothing exfiltrated. Same benign construct as the entries it replaces. Baselined in ca72834ba, entry generated with the scanner's own _evidence_hash rather than hand-written, inserted beside its siblings so the diff is 8 lines. Verified with the baseline the scan is exit 0 with 4 suppressed, and without it exit 1, so the guard still bites.

On the rest of the last run, checked against main at 1229fc55a:

  • (Python 3.10/3.12/3.13): down to the 4 pre-existing test_research_runs_hardening failures, 17944 passed. The curated-mirror failure is gone, so the gguf_repo fix landed.
  • Repo tests (CPU): the same 3 failures (test_terminal_update_holds_the_gate_through_environment_mutation and the two test_desktop_reliability_frontend_contract titlebar tests), all of which reproduce identically on main and touch no file this branch modifies.

Separately, a measurement that may be worth acting on in the family config. H3 is distilled and default_steps is 30, and steps are by far the largest speed lever on this model. On UD-Q2_K_XL, 5 held-out prompts x 2 seeds, adherence paired against the 30-step render:

steps wall speedup CLIP vs 30 t LPIPS vs 30 spread (sd)
4 17.0s 3.25x -0.0082 -0.67 0.4322 0.0386
8 22.9s 2.41x -0.0071 -0.80 0.2795 0.0282
16 34.9s 1.58x -0.0035 -1.16 0.1247 0.0094
30 55.1s 1.00x ref ref

16 steps is a near-equivalence with power behind it: -0.0035 where the test resolves +-0.0060, for 1.58x. 4 and 8 are not resolvable either, but at n = 10 the test only resolves +-0.024 there, and the spread across prompts is four times wider at 4 steps than at 16, so few-step sampling is inconsistent rather than uniformly worse. I have not changed default_steps, because this was measured at 640x384 / 25 frames and the Studio default is 1344x768 / 124 frames, where step requirements generally grow.

…iable

`mac macos-15 / trace / file` fails on this branch and passes on main. uv
reports:

  No solution found when resolving dependencies:
  Because you require huggingface-hub>=0.34.0,<1.0 and
  huggingface-hub>=1.23.0,<2.0, your requirements are unsatisfiable.

This branch moved base.txt, no-torch-runtime.txt, studio.txt and
constraints.txt to hub >=1.23.0,<2.0, because diffusers at the pinned
commit requires it, but left the flat <1.0 cap in
overrides-darwin-arm64.txt. That file is macOS-arm only, which is why
only the mac legs see it and Linux and Windows stayed green.

The failure then presents as something else entirely: uv gives up, the
installer falls back to pip, and the clean-machine trace fails on
"installer invoked toolchain: rustc" rather than on the resolution.

The cap's own comment explains it exists so the resolver can never pair
hub 1.x with a pinned transformers 4.57.6 / hub 0.36.2 stack. That is
still true below python 3.10 and still capped there. At 3.10 and above
this branch is on transformers 5.5.0 and hub 1.x, so the premise is gone,
and mlx-audio's own >=1.0 floor is satisfied by the 1.x window anyway.

Checked by collecting every hub specifier that applies per Python version
across all five files: py3.9 resolves to 0.36.2 as intended, py3.13 to
1.23.0/1.27.0. Before this change py3.13 resolved to nothing.
danielhanchen and others added 9 commits August 9, 2026 13:06
Keep both sides of every conflict: the video status gains main's gguf_variant
alongside this branch's engine field, the studio extra keeps main's urllib3 pin
next to the branch's huggingface-hub markers so it still mirrors
requirements/studio.txt, and the prequant, transformer-quant and video-backend
test modules keep both new blocks.
video.py only branches on H3_TASK_REFERENCES; the keyframe constant is read
from video_minimax_h3 directly by the tests that need it. The hoisted-import
safety net in Source lint flags the unused name as a blocker.
The plan already drops the dense transformer shards whenever a hosted
pre-quantized checkpoint covers them, but nothing put that checkpoint back:
an int8 or fp8 H3 stage skipped 66.3 GB of base shards and added none of the
20.25 GB artifact the load actually opens. The byte total under-reported the
stage by the size of the checkpoint, the disk preflight cleared a volume that
could not hold it, and an offline stage completed without the one file the
load needs.

_denoiser_prequant_hub_files mirrors the pre-cast encoder helper: it resolves
the family's hosted checkpoint, confirms the file really exists on the Hub,
and prefers the repo-root name over the legacy scheme name in the same order
the load tries them. An unreachable repo is logged and yields no files, so a
gated or renamed artifact keeps the dense shards instead of sinking the plan.

The progress-bar estimate is deliberately left alone: it counts cached bytes
for the checkpoint and base repos only, so adding a third repo there would
leave the bar permanently short of 100 percent.
The bundle-repo filter accepted only minimax_h3_fl2va*, so every published
minimax_h3_ref2va* quant was hidden from the variant listing. The loader
disagrees: validate_h3_transformer_filename accepts either partition, on the
grounds that which one is picked IS the task, and h3_transformer_task routes
Ref2VA to the reference-video workflow this PR adds. The community bundle repo
publishes three Ref2VA quants today, so the reference path was unreachable from
the remote catalog.

Accept both prefixes from one shared tuple and keep excluding the Qwen3-VL
encoder and VAE companions, which are never picks for either partition. The
filter test asserted the old behaviour and is updated with it.
The reference-video decoder already selects, resizes and refuses incrementally
because the encoded size says nothing about the decoded size. The audio decoder
did not: it appended every resampled block to a list and then allocated a second
full buffer in np.concatenate, with no duration or sample cap.

The route accepts 32 MiB of encoded audio, which is over half an hour of
compressed stereo. That lands as roughly 1.9 GB of float32 and doubles again in
the concatenate, and up to three references are accepted per request, so an
ordinary long music or podcast file picked by mistake could exhaust the host
before the background job even started.

H3's reference window is 15 seconds, so anything past it is unusable rather than
merely large. Refuse it while decoding, with the same shape of message the video
guard uses, instead of decoding it first.
…denoiser

The hosted pre-quantized checkpoints are FL2VA (keyframe) denoisers. Ref2VA
shares their module shapes and the same base model, so resolve_prequant_source
handed one back for a reference load, it passed every metadata check, and
seeding it made load_components skip the real Ref2VA transformer. The request
then generated from the wrong partition rather than failing, which is the worst
of the three outcomes.

The route accepts h3_task, so this was reachable from the public API even though
the picker does not expose the choice yet. validate_load_request now refuses the
pairing with a message naming the workable alternatives, in the same place it
already refuses a scheme with no hosted checkpoint, and the modular loader drops
to the released components if a direct call reaches it. Nothing changes for
keyframe loads, which are what the checkpoints are.
The plan-unchanged sweep from main walks every family and asserts the dense
budget plan_diffusion_memory received. MiniMax-H3 is the first modular-workflow
family to reach that list, and load_pipeline dispatches to the workflow's own
loader before the planner runs: each component is built by its own
from_pretrained, so there is no single dense pipeline to budget and no plan call
to assert on. Skip it the way the sweep already skips wan2.2-t2v-a14b.

@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: 0aab0f4d19

ℹ️ 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 reader = new FileReader();
reader.onload = () => onChange(typeof reader.result === "string" ? reader.result : null);
reader.onerror = () => toast.error("Could not read the image");
reader.readAsDataURL(file);

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 Reject oversized image files before reading them

When a user selects a large first/last frame or reference picture, this reads the entire file into a base64 data URL before the backend's 32 MiB field limit or 4096-pixel image guard can reject it. A sufficiently large image can therefore allocate several copies in the browser/webview and freeze or exhaust the frontend; check file.size against the request cap before calling readAsDataURL().

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.

Not introduced here. The same readFile with no size check is in images-page.tsx at the merge base, and image-dropzone.tsx is a verbatim extraction of it. FileReader is asynchronous and does not block the main thread, so the freeze is speculative. The video reference picker is a different matter and is being fixed: its backend caps are ~72 MiB video and ~24 MiB audio, which a 15 s 4K clip clears easily.

Comment on lines +413 to +415
for flag in list(extra_args or []):
if flag not in cmd:
cmd.append(flag)

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 complete video extra-argument sequences

When a caller uses generate_video(extra_args=...) to override an existing option, token-wise deduplication drops the option name but retains its value; for example, ['--rng', 'cuda'] becomes a trailing bare cuda because --rng already appears in cmd. This can make sd-cli reject the command and also prevents the normal last-wins override behavior, so append the argument sequence intact rather than deduplicating individual tokens.

Useful? React with 👍 / 👎.

Comment on lines +2603 to +2611
if device != "cpu":
manager.enable_auto_cpu_offload(
# Measured H3 activations need substantially more than the
# official 12 GB example at 10-15 seconds. Forty GB also keeps
# very large GPUs from retaining both 66 GB components and OOMing
# while smaller caps succeed by offloading one of them.
device = device,
memory_reserve_margin = "40GB",
)

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 Honor explicit H3 memory modes

When a CUDA user explicitly selects memory_mode="fast" for the Diffusers H3 artifact, this unconditionally enables ComponentsManager CPU offload and commits offload_policy="model"; balanced and low_vram take the identical path as well. The resolved-record helper also treats this explicit request as applied, so the UI can keep showing Fast while a much slower offloaded build is running. Map the requested modes to distinct placement policies, or reject/mark unsupported modes instead of silently ignoring them.

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.

A modular_workflow family always uses ComponentsManager auto CPU offload, and the code says why: refusing these picks would 409 a combination that loads. Honoring fast, that is no offload, would OOM, since the 40 GB reserve margin exists to stop a large GPU retaining both 66 GB components. Both suggested remedies are worse than the status quo. The residue is the over-optimistic record, and that is being fixed for text_encoder_quant in the same dict.

Comment on lines +3096 to +3097
if not fam.supports_cfg:
pass

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 Reject unsupported CFG inputs for H3

When a direct /video/generate caller supplies guidance or negative_prompt for MiniMax-H3, the request schema accepts them but this supports_cfg=false branch omits them from the Diffusers call, while the native command also stays fixed at CFG 1.0. The completed gallery record nevertheless persists the requested guidance and negative prompt, so its recipe claims settings that did not produce the clip; reject these explicit inputs or persist the fixed values actually used.

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.

Taking the record half of this. guidance is resolved before the supports_cfg branch, so a caller sending 7.0 gets 7.0 written into the sidecar while Diffusers received no guidance kwarg and the native path hardcodes cfg_scale=1.0: a recipe that cannot reproduce its own clip. Clamping to the family default after resolution fixes it without rejecting anything. One correction: negative_prompt is not dropped by that branch, it is applied unconditionally outside the guard. Only guidance is.

transformer_quant_engaged or "off",
transformer_quant_reason,
),
"text_encoder_quant": (None, "off", "released bfloat16 components"),

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 Refuse unsupported H3 text-encoder quantization

When a Diffusers H3 load explicitly requests a supported text_encoder_quant, validation and the precision preflight accept it, but the modular dispatch never forwards that option and this record unconditionally reports the released dense encoder. The load therefore materializes the roughly 66.8 GB Qwen companion at dense precision despite the explicit contract, potentially turning a planned quantized load into an OOM; either implement this mode for the modular workflow or reject it before teardown and download.

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.

Taking the record half of this, not the refusal. Because the first tuple element is None the resolved record takes the left-to-backend path and stamps source auto with requested null, so a declined request is erased instead of showing as fell-back. Passing the request through fixes that. A 409 is the wrong remedy: the frontend never sends this field for video, so it would only break a stale selection that loads fine today.

@danielhanchen

Copy link
Copy Markdown
Member

End to end confirmation on this branch, from two isolated Studio installs at merge base eb892d671 vs head 0aab0f4d1, driven with Playwright under separate UNSLOTH_STUDIO_HOMEs.

Before and after

The base refuses MiniMax-H3 outright:

'MiniMaxAI/MiniMax-H3' is not a supported text-to-video model. Supported families: ltx-2, wan2.2-ti2v-5b, wan2.2-t2v-a14b, hunyuanvideo-1.5, hunyuanvideo-1.5-720p.

The head plans a 72.43 GiB load and offers it in the video picker:

It generates, on all three artifacts

960x544, 124 frames, 24 fps, 8 steps, seed 11, prompt "a red panda stepping along a mossy log in a misty forest, cinematic":

build load generate notes
pre-quantized int8 30 s 51 s 71.2 GB peak, measured by sampling free VRAM across the run
pre-quantized fp8 30 s 40 s
GGUF UD-Q2_K_XL, sd.cpp 10 s 410 s engine=sd_cpp, dtype=Q2_K_XL

All three produce a real 5.17 s clip with a stereo AAC track, so the synchronized audio path works too. Frame 40 of the int8 run:

And the page itself, with three clips in the gallery and the Audio badge:

Three things worth fixing or noting

1. A 401 on the pre-quant repo degrades to a dense bf16 load that reports success. With no valid token the loader logs video.denoiser_prequant_unavailable then transformer_quant=off, and /video/load still returns loaded with transformer_quant: null. A user who asked for int8 gets the dense build, on a host that may not fit it, with nothing in the UI saying so. A refusal, or at minimum a surfaced warning, would be better than a silent downgrade.

2. The video page header names the picker variant, not the engaged build. In the screenshot above the header reads MiniMax H3 (BF16 (official)) while the loaded-models row correctly reads Video · minimax-h3 · INT8 · cuda, and status reports transformer_quant=int8. This is the same class of defect #8241 just fixed for images; the video header has not had the equivalent treatment.

3. Two request contracts are easy to trip and are only discoverable by failing. Resolution must be one of eight fixed sizes, and frame count must satisfy k * 17 + 5 between 124 and 345. Both return a clear 422, which is good, but neither is visible before you send the request.

One correction to something I said earlier in this thread: an int8 generation failure I hit first time round was GPU contention on a shared card, not an int8 defect. Re-run alone it completes in 51 s at a 71.2 GB peak.

@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: 183b7e9034

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +251 to +252
if not binary or sd_cpp_supports_minimax_h3(binary):
return binary

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 Reject unpatched upstream sd.cpp for H3

When the mirror-only pinned sd.cpp release cannot serve a host, the installer falls back to upstream latest, and this H3 gate accepts any binary whose help lists --ref-video. The installer itself warns that such an upstream fallback lacks the MiniMax-H3 patchset and can abort or render broken H3 output, so Studio can mark native H3 as ready after downloading the bundle even though the selected binary is known unsafe for H3. For this H3-specific ensure path, require the patched mirror build or a verified patch marker instead of treating the H3 option as sufficient.

Useful? React with 👍 / 👎.

@danielhanchen

Copy link
Copy Markdown
Member

Merge-order note, since this PR and #8208 both edit the same DEFAULT_TAG line in studio/install_sd_cpp_prebuilt.py.

This branch pins master-813-bfbef5b-u0665242. That release publishes Darwin arm64 and x86_64, Linux 22.04 x86_64, Linux 24.04 aarch64 and win-cpu, and no CUDA asset, so on a Linux CUDA host the installer lands the CPU build. #8208 pins master-813-bfbef5b-u13b9d92, which adds Linux-Ubuntu-22.04-x86_64-cuda12.zip. Both are built on the same upstream base, so the H3 cfg-scale and norm-quantization fixes are in either one.

The consequence is that whichever of the two merges second wins that line. If this one lands after #8208 it drags the pin back to the CPU-only build and quietly undoes it, and no test would catch that because the tag is just a string. Either land #8208 last, or keep u13b9d92 when resolving the conflict.

Measured here on a B200, same prompt, seed and settings at 960x544 / 124 frames: the GGUF path through the CPU sd-cli generates in 410 s, against 51 s for int8 and 40 s for fp8 on the diffusers path. The binary that produced the 410 s figure was sd-master-813-bfbef5b-u0665242-bin-Linux-Ubuntu-22.04-x86_64, so that number is a CPU number rather than a property of the GGUF path.

danielhanchen and others added 5 commits August 9, 2026 16:53
A half-specified width/height is long-standing, documented API behaviour: the backend
resolves the missing axis from the family's default preset, in both
validate_video_request_shape and _resolve_keyframes. Applying the new paired-axes rule
as an unconditional request validator rejected those calls with a 422 before family
validation ever ran, breaking existing LTX, Wan, Hunyuan and prompt-only H3 clients.

The rule still holds where it means something: with a keyframe present the canvas is
matched to the source aspect whenever either axis is missing, so the axis the caller
sent would be silently discarded.
# Conflicts:
#	studio/backend/core/inference/sd_cpp_backend.py
#	studio/install_sd_cpp_prebuilt.py
The merge with main brings in the accelerator-aware installer, whose fallback
translates a mirror-only -u<id> pin back to the upstream release it was built
from instead of skipping the upstream attempt. That is strictly better: skipping
kept the round trip cheap but dropped the pin entirely on every host the mirror
does not build, leaving them on upstream latest.

test_a_mirror_only_pin_is_never_requested_upstream asserted the old shape, that
the fallback settled for upstream latest. It now pins the new one: never the
literal -u<id> string, the translated release instead, and no latest attempt at
all because the translated pin succeeds.
@danielhanchen
danielhanchen merged commit 495ba21 into unslothai:main Aug 9, 2026
20 of 97 checks passed

@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: fe66e51122

ℹ️ 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".

"""Hide auxiliary GGUFs from repos that bundle several model roles."""
if is_h3_bundle_repo(repo_id):
name = Path(filename).name.lower()
return name.startswith(_H3_DENOISER_PARTITIONS) and name.endswith(".gguf")

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 Keep H3 partitions separate in variant aggregation

When FL2VA and Ref2VA publish the same quant label (the repository tests show both with Q4_K_M and Q2_K_M), accepting both prefixes here still does not expose both choices: list_gguf_variants() aggregates quant_totals and quant_first_file solely by extract_quant_label() at lines 625-640, and the local-cache path uses the same scheme. The two partitions therefore collapse into one row with their sizes summed and whichever filename appears first—normally FL2VA—winning, so overlapping Ref2VA variants remain unselectable. Fresh evidence beyond the earlier prefix-filter finding is this downstream quant-key collision; include the H3 partition in the aggregation/variant identity.

Useful? React with 👍 / 👎.

@danielhanchen

Copy link
Copy Markdown
Member

Correction to my earlier note on this PR, plus the completed measurement.

I said the 410 s GGUF figure was a CPU number. That was wrong. I checked the wrong Studio home: an older one from the previous day that held the CPU build. The home that actually produced the clip installed sd-master-813-bfbef5b-u13b9d92-bin-Linux-Ubuntu-22.04-x86_64-cuda12 at 15:27 and generated at 15:43, so the 410 s run was already on the CUDA binary.

The controlled benchmark, both binaries, identical raw sd-cli arguments, 960x544 / 124 frames / 8 steps / cfg 1.0 / seed 11, one B200:

build generate wall
u13b9d92 cuda12 173.84 s 177 s
u0665242 CPU 4778.05 s 4782 s

That is 27.5x, not the 2.4x the earlier comparison implied. The CPU build takes almost 80 minutes for a 5.17 s clip.

Studio own 410 s figure sits between the two because it runs the same CUDA binary under the group offload policy, so roughly 2.4x of raw CUDA is the cost of offloading rather than a property of the GGUF path.

The direction of the earlier conclusion is unchanged and the magnitude is larger: the CUDA asset matters a great deal on Linux, and the merged DEFAULT_TAG must stay master-813-bfbef5b-u13b9d92, since u0665242 publishes no CUDA asset at all and silently lands the 80 minute build.

I opened frame 40 of the CUDA render and confirmed it is the same red panda scene at the same seed, so the speedup is real rather than a truncated run.

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