Skip to content

Studio: fetch every video component from unsloth repos - #14003

Merged
danielhanchen merged 38 commits into
mainfrom
studio-video-unsloth-mirrors
Oct 18, 2026
Merged

danielhanchen merged 38 commits into
mainfrom
studio-video-unsloth-mirrors

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Studio: fetch every video component from unsloth repos

Each video family in Studio is identified by a vendor base (Wan-AI, Lightricks, MiniMaxAI). Until now, everything a video load needs came straight from that vendor repo: transformer, text encoder, tokenizer, VAE, audio VAE, connectors, latent upsampler and scheduler. GGUF and FP8 picks were no exception, because their companions come from the base. LTX-2.5 was the worst case. Both Lightricks/LTX-2.5-Diffusers and Lightricks/LTX-2.5 are gated, so every LTX-2.5 load needed a Hub login that had accepted the terms.

This PR reuses the image side's mirror mechanism (_GATED_MIRROR_PAIRS / _UNGATED_MIRROR_PAIRS, prefer_ungated_mirror). No new repos are created. The official files Studio loads are carried byte-identical, at their upstream paths, by the model's existing unsloth repo: its -FP8 repo, or -GGUF when there is no -FP8. That includes the bf16 transformer, so bf16 pipeline loads also stay inside unsloth/*. FLUX.3 already does the same thing with unsloth/flux-3-image-klein-FP8.

Pairs

Upstream Carried by Files added Licence
Wan-AI/Wan2.2-TI2V-5B-Diffusers unsloth/Wan2.2-TI2V-5B-FP8 Diffusers folders, 34.2 GB Apache 2.0; LICENSE added
Wan-AI/Wan2.2-T2V-A14B-Diffusers unsloth/Wan2.2-T2V-A14B-FP8 Diffusers folders, both experts, 126.2 GB Apache 2.0; LICENSE added
Lightricks/LTX-2 unsloth/LTX-2-FP8 Diffusers folders, 93.1 GB (one text encoder shard set) LTX-2 Community License; NOTICE added
Lightricks/LTX-2.3 unsloth/LTX-2.3-FP8 bf16 dev / distilled / distilled-1.1 single files, 138.5 GB LTX-2 Community License; NOTICE added
Lightricks/LTX-2.5-Diffusers (gated) unsloth/LTX-2.5-FP8 Diffusers pack Studio loads, 71.1 GB LTX-2.x Community License; NOTICE added
Lightricks/LTX-2.5 (gated) unsloth/LTX-2.5-GGUF text encoder, VAEs, latent upsampler, bf16 DiTs, 113.1 GB LTX-2.x Community License; NOTICE added
MiniMaxAI/MiniMax-H3 unsloth/MiniMax-H3 already a complete copy see open point below
  • Every added file was checked against the upstream revision by LFS sha256 or git blob id.
  • Every file already in a target repo was checked unchanged. The one exception is .gitattributes, where the Hub appends LFS rules for the new files.
  • The NOTICE added to the LTX repos gives the notice required by Section 3.1: LTX and its Derivatives are subject to Section 4 and Attachment A.
  • The selectors that list files for a load skip each carrier repo's own checkpoints (.pt, root .safetensors, .gguf, samples/). Each repo can therefore stand in for the base.

Studio changes

  • diffusion_families._VIDEO_MIRROR_PAIRS (gated and ungated halves) feeds the same mirror_repo / canonical_base / upstream_is_gated lookups. It is kept out of _MIRROR_PAIRS, which hub/utils/companion_assets reads as the image companion table, so nothing on the image side changes.
  • Every video fetch site now goes through _video_fetch_repo:
    • the scoped base prefetch, including the LTX-2.5 shard index reads
    • download_plan and the size estimate. Listings and sizes are read from the carrier repo, and the staged entry names the repo the load actually reads.
    • from_pretrained and the single-file config
    • the LTX-2.3 assembly (scheduler, Gemma3 text encoder and tokenizer from LTX-2)
    • LTX-2.5: the text encoder worker, the latent upsampler and the single-file companions
    • the MiniMax-H3 modular pipeline and its hosted conditioner / denoiser configs
    • TE / DiT prequant seeding, checkpoint picks, the MoE partner expert
    • the in-flight delete guard and the progress cache scan
  • Each video load records one fetch plan up front: per role (checkpoint, base) the repo, the commit, and each file's blob key and size. Every Hub read of the load goes to that repo and commit: downloads, listings, assembly, the base config reads (including the LTX-2.5 encoder worker) and the progress bar. A main that moves mid-load or a partial cache cannot mix revisions or mis-report progress. A test records every Hub call of a load and checks it against the plan.
  • The upstream id remains the logical identity: picker, status(), saved configs and the prequant tables all use it. _prequant_base_key, is_ltx25_single_file_base and the LTX-2.3 official-file check map a carrier repo id back to its upstream.
  • A GGUF picked from unsloth/LTX-2.5-GGUF keeps the Diffusers pack as its base. That repo also carries the split release's files now, but ltx25_default_base checks the pick's own id without mapping it back.
  • The opt-outs are the same as on the image side: UNSLOTH_DIFFUSION_NO_MIRROR, local paths, and an upstream cache that already holds the files being fetched.
  • No video load reads from a Comfy or third-party repack any more, even when the bytes are already cached. H3_LEGACY_COMPONENT_REPO, H3_LEGACY_TE_QUANT_REPO and the MiniMax-H3 and Wan2.2-TI2V-5B rows of _SD_CPP_LEGACY_SOURCES are removed. An install that cached the H3 VAEs or the conditioner under Comfy-Org/MiniMax-H3 fetches them once from unsloth/*.

MiniMax-H3 native files

The sd.cpp path's two VAEs and the hosted int8 ConvRot conditioner used to be copies of files from the Comfy-Org repack. They were rebuilt from the official MiniMaxAI weights in unsloth/MiniMax-H3:

  • the VAEs by converting the diffusers layout to the sd.cpp layout
  • the conditioner with Studio's own quantize_convrot_int8_weight

All three rebuilt files are byte-identical to the files already hosted, so they were added beside the originals rather than replacing them:

  • vae/official/minimax_h3_video_vae_fp16.safetensors and vae/official/minimax_h3_audio_vae_fp32.safetensors in unsloth/MiniMax-H3-GGUF
  • text_encoders/official/qwen3vl_32b_minimax_h3_int8_convrot.safetensors in unsloth/MiniMax-H3-FP8

This build reads those paths. Released builds keep reading the originals, which are unchanged. Encoded through Studio's loader on 16 prompts, the conditioner scores cosine 0.99985 mean (0.99830 min) against the dense bf16 encoder, identical to the hosted file. The A/A floor is exactly zero, since repeated runs are bitwise deterministic.

Not covered

  • HunyuanVideo-1.5 (hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v and -720p_t2v) is not mirrored. The Tencent Hunyuan Community License "DOES NOT APPLY IN THE EUROPEAN UNION, UNITED KINGDOM AND SOUTH KOREA AND IS EXPRESSLY LIMITED TO THE TERRITORY", and a public Hub repo cannot honour that. HunyuanImage-2.1 has no mirror for the same reason.
  • Wan2.1-T2V-1.3B and Wan2.1-T2V-14B have no unsloth repo to carry their files, so they still load from Wan-AI/* (ungated, Apache 2.0).
  • These ids are the only allowlist entries in the new test.

Tests

New tests/test_video_unsloth_mirrors.py:

  • every pair round-trips through mirror_repo / canonical_base / prefer_ungated_mirror
  • a walk over the video family table and the module-level repo constants fails on any fetch id that does not resolve to unsloth/*, apart from the allowlist; the allowlist is also checked for exactness
  • the prefetch and download-plan paths list and pull only from the carrier repo, never its own FP8 checkpoints or samples
  • checkpoint picks and the delete guard land on the carrier repo
  • the prequant tables are unchanged when the id is a carrier repo
  • the LTX-2.5 GGUF pick keeps the Diffusers base
  • no H3 or Wan fetch reads a Comfy or QuantStack repack, even when one is cached

All of these fail on main. The existing plan / load tests in test_video_backend.py and test_video_routes.py are written against the upstream ids their fake Hub serves. They pin UNSLOTH_DIFFUSION_NO_MIRROR=1, as the image offline-load tests already do. The tests that pinned the removed Comfy legacy reuse are gone.

Video families named vendor bases (Wan-AI, Lightricks, MiniMaxAI) and every
component fetch went straight to them. Add _VIDEO_MIRROR_PAIRS beside the
image mirror table (kept out of _MIRROR_PAIRS, which is the image companion
table) so mirror_repo / canonical_base / prefer_ungated_mirror answer for video
ids, and route the video fetch sites through it: the scoped base prefetch, the
download plan and size estimate (listed from the mirror, staged under the repo
the load reads), the from_pretrained / single-file / LTX-2.3 / LTX-2.5 / H3
modular assemblies, checkpoint picks from a mirrored repo, and the in-flight
delete guard and progress scan. The upstream id stays the logical identity;
prequant variant keys and the LTX-2.5 single-file check fold a mirror back
onto it. HunyuanVideo-1.5 stays on hunyuanvideo-community: its licence
excludes the EU, UK and South Korea.
No separate unsloth/<vendor-name> repos: the official files Studio loads
are carried byte-identical, at upstream paths, by the model's existing
unsloth repo. Wan2.2-TI2V-5B and Wan2.2-T2V-A14B, LTX-2, LTX-2.3 and the
LTX-2.5 Diffusers pack map to their -FP8 repos, the split LTX-2.5 release
to unsloth/LTX-2.5-GGUF, and MiniMax-H3 to the existing unsloth/MiniMax-H3.
Wan2.1 has no unsloth repo yet and HunyuanVideo-1.5 stays licence-blocked.

A GGUF picked from unsloth/LTX-2.5-GGUF keeps the Diffusers base
(ltx25_default_base no longer folds the mirror), and the LTX-2.3 official
file check accepts unsloth/LTX-2.3-FP8.

Drop every Comfy / third-party repack read from the video path:
H3_LEGACY_COMPONENT_REPO, H3_LEGACY_TE_QUANT_REPO and the MiniMax-H3 and
Wan2.2-TI2V-5B rows of _SD_CPP_LEGACY_SOURCES. An install that cached the
H3 VAEs or conditioner under Comfy-Org/MiniMax-H3 now fetches them once from
unsloth/*.
vae/official/ in unsloth/MiniMax-H3-GGUF holds the video (fp16) and audio
(fp32) VAEs rebuilt from the official MiniMaxAI weights in sd.cpp layout.
They are byte-identical to the vae/ copies that came from the Comfy-Org
repack, which stay for released builds.
text_encoders/official/ in unsloth/MiniMax-H3-FP8 holds the int8 ConvRot
Qwen3-VL-32B conditioner rebuilt from the official MiniMaxAI text_encoder
with Studio's quantize_convrot_int8_weight. It is byte-identical to the
text_encoders/ copy from the Comfy-Org repack, which stays for released
builds.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-16T12:56:23.384597Z b450ca4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-18T21:57:45.276498Z 84d8df9 New commits
🔒 Security Review ⚠️ Failed 2026-10-16T12:56:28.166380Z b450ca4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

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: eeb7e2b0f0

ℹ️ 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 thread studio/backend/core/inference/video.py Outdated
base = repo_id if kind == "pipeline" else resolve_video_base_repo(fam, base_repo, repo_id)
# Where the base's components are FETCHED from when no staged snapshot dir covers them: its unsloth mirror.
# ``base`` stays the upstream id every table below is keyed on.
fetch_base = _video_fetch_repo(base, hf_token) or base

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 Preserve the exact-file mirror choice during assembly

When an upstream repo has any cached weight but not the complete component set, _predownload_base correctly downloads the required files into the mirror after checking the exact filenames, but this second call omits files and switches fetch_base back to the partially cached upstream. This breaks the LTX-2.3 path in particular because it deliberately discards _base_local_dir and resolves every component through fetch_base, causing redundant upstream downloads or an offline failure despite the complete mirror snapshot just having been staged. Carry the predownload repo choice forward, or repeat the exact-file completeness check here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. With a partial upstream cache the exact-name check in _predownload_base picked the mirror, but assembly re-decided without the names and went back to the upstream; LTX-2.3 was hit hardest since it resolves every component through fetch_base. Fixed in 6152487: _predownload_base records its choice, _run_load passes it on as _base_fetch_repo, and load_pipeline and the H3 modular loader use it ahead of the default. Test: test_assembly_reads_the_repo_the_predownload_staged.

Comment thread studio/backend/core/inference/video.py Outdated
Comment on lines +6476 to +6480
downloaded = sum(
self._cache_bytes(rid)
for rid in dict.fromkeys(
_video_repo_aliases(loading.repo_id) + _video_repo_aliases(loading.base_repo)
)

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 Count only cache aliases used by the active load

When both sides of a mirror pair have cache entries, summing every alias counts blobs that the active load is not reading. For example, a partial upstream LTX cache plus a download into its mirror can make downloaded reach expected_bytes immediately, so the progress endpoint reports finalizing while large mirror shards are still downloading. Track the selected fetch repo for each entry rather than adding both complete cache directories.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. Summing both sides of a pair counted a partial upstream cache the load never reads, so the bar could show finalizing while mirror shards were still downloading. Fixed in 6152487: each fetch site records the repo it chose in _VideoLoadingState.fetch_repos and load_progress counts only that side, using the default choice until one is recorded. The delete-cached guard still claims both sides. Test: test_progress_counts_only_the_side_the_load_fetches.

Comment thread studio/backend/core/inference/video.py Outdated
Comment on lines 5695 to 5697
if base and not Path(base).expanduser().exists():
info = api.model_info(base, files_metadata = True)
info = api.model_info(_video_listing_repo(base), files_metadata = True)
total += sum(

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 Fetch LTX-2.5 shard indexes from the listing mirror

Although the LTX-2.5 base listing is now read from _video_listing_repo(base), the resulting info is still passed to _ltx25_plan_shards with the original base; that helper downloads every shard index from this argument. For Lightricks/LTX-2.5-Diffusers, the download estimate therefore still contacts the gated upstream, commonly gets a 401 and falls back to heuristic shard selection, contradicting the authentication-free mirror path used by the actual predownload. Pass the same listing repo to the shard-index helper, as download_plan already does.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The estimate read the listing from the mirror but still fetched the shard indexes from the gated upstream. Fixed in 6152487: it now passes _video_listing_repo(base) to _ltx25_plan_shards, as download_plan already does. Test: test_ltx25_estimate_reads_shard_indexes_from_the_listing_mirror.

…ly and progress

- carry the predownload's exact-name mirror choice into assembly (LTX-2.3 reads every component through it)
- load_progress counts only the side of each mirror pair the load fetches from
- UNSLOTH_DIFFUSION_NO_MIRROR folds base components only, an explicit checkpoint pick stays in its repo
- LTX-2.5 estimate reads shard indexes from the listing mirror

[skip ci]
@danielhanchen

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: 6152487b5f

ℹ️ 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 thread studio/backend/core/inference/video.py Outdated
or _video_fetch_repo(rid, checkpoint = is_checkpoint)
or rid,
)
downloaded = sum(self._cache_bytes(rid) for rid in dict.fromkeys(reading.values()))

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 Restrict progress bytes to the planned file set

Even after selecting only one mirror alias, _cache_bytes still totals every blob in that repository. The new carrier repositories deliberately contain their own root FP8/GGUF checkpoints that _base_download_files excludes from expected_bytes; if one of those artifacts is already cached, its multi-GB size is nevertheless added to downloaded, so the endpoint can report finalizing while required base shards are still downloading. Progress must count the selected entry's required files rather than the entire carrier cache.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. Picking one side of the pair still counted the carrier repo's own cached root checkpoints, which the estimate excludes. Fixed in d60eece: the estimate returns the names it summed, _run_load stores them on the loading state, and load_progress counts only those snapshot entries plus in-flight .incomplete blobs. Tests: test_progress_counts_only_planned_files_of_a_carrier_repo, test_estimate_reports_the_planned_names.

… and the planned files

- name-less fetch choice (assembly, offline loads, progress) prefers the more complete cached snapshot, upstream on a tie
- named fetch choices reuse an upstream complete under either cache root, as the reuse_other_cache_root fetch does
- load_progress counts only the planned file names plus in-flight blobs, not a carrier repo's own root checkpoints
- the H3 staging index read goes through the same mirror as the base pull

[skip ci]
@danielhanchen

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: d60eece021

ℹ️ 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 thread studio/backend/core/inference/video.py Outdated
with self._lock:
recorded = getattr(self._loading, "fetch_repos", None)
if isinstance(recorded, dict):
recorded[_video_fetch_key(logical)] = fetched

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 Track checkpoint and base fetch sides separately

When a user selects a root checkpoint from a carrier repo whose mirrored upstream is also its companion base—for example, an FP8 checkpoint in unsloth/Wan2.2-TI2V-5B-FP8 with base Wan-AI/Wan2.2-TI2V-5B-Diffusers—both fetches collapse to the same canonical key here. If the base is complete upstream, _predownload_base overwrites the checkpoint's mirror choice, while fetch_files still unions the checkpoint and base names; load_progress() then scans only the upstream cache and cannot see the selected checkpoint in the carrier cache, so it remains in downloading until the load abruptly becomes ready. Key the recorded choices by fetch entry or physical repository rather than only by canonical mirror pair.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. Keying by mirror pair merged a carrier checkpoint with the base it mirrors, so the base's choice overwrote the checkpoint's. Fixed in f1e8813: fetch choices and planned names are recorded per role (checkpoint / base), each role is counted against the repo it actually reads, and roles sharing a repo are scanned once. The pick and its partner expert now share one choice settled on both names. Test: test_progress_tracks_a_carrier_checkpoint_and_its_mirrored_base_separately.

Comment thread studio/backend/core/inference/video.py Outdated
Comment on lines +6591 to +6598
for name in files:
for rev in revisions:
entry = rev / name
try:
blob = os.path.realpath(entry)
if entry.is_file() and blob not in seen:
seen.add(blob)
total += os.path.getsize(blob)

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 Count only the active snapshot revision

When the cache retains multiple revisions of a repository and a planned filename changed between them, this loop adds the blobs from every revision. For a checkpoint-only load, an old cached checkpoint with the same name can therefore satisfy expected_bytes before the new revision has downloaded at all; for a base load, superseded shards similarly make the progress endpoint enter finalizing early. Restrict the scan to the revision selected for this load (ideally the listing SHA or the current ref) rather than all snapshot directories.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The scan added blobs from every cached revision, so a superseded file with the same name could fill the bar early. Fixed in f1e8813: planned names are read from one revision only, the commit the plan was sized from when the fetch repo is the listing, otherwise the one refs/main points to. Test: test_progress_reads_only_the_active_revision.

@danielhanchen

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: f1e8813a1d

ℹ️ 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 thread studio/backend/core/inference/video.py Outdated
Comment on lines +6633 to +6637
blobs = folder / "blobs"
if blobs.is_dir():
for blob in blobs.glob("*.incomplete"):
try:
total += blob.stat().st_size

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 Exclude unrelated incomplete blobs from progress

When a carrier repo contains a stale or concurrent partial download, the new planned-name filter still adds every *.incomplete blob in that repo, regardless of the planned filenames or pinned revision. Because these carrier repos also host their own multi-GB FP8/GGUF checkpoints, an abandoned checkpoint download can make a base load reach expected_bytes and report finalizing while required base shards are still downloading. Count only incomplete blobs associated with the active fetch, or omit unidentifiable partial blobs from the planned-file total.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. Any partial download in the repo counted, including an abandoned pull of a carrier's own checkpoint. Fixed in 8e7740c: the estimate records the planned files' blob keys (LFS sha256, else git blob id), and progress counts an in-flight .incomplete blob only when its key is one of them; partials that cannot be identified are never counted. Tests: test_progress_skips_incomplete_blobs_of_unplanned_files, test_estimate_records_the_planned_blob_keys.

Comment thread studio/backend/core/inference/video.py Outdated
if fam is not None and fam.name == "ltx-2.5" and not ltx_file:
from .video_ltx25 import LTX25_SINGLE_FILE_REPO, is_ltx25_single_file_base
if is_ltx25_single_file_base(repo_id):
if is_ltx25_single_file_base(repo_id, fold_mirror = False):

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 pipeline loads of the LTX-2.5 carrier

When unsloth/LTX-2.5-GGUF is requested as a pipeline without a selected DiT file, disabling mirror folding here prevents this guard from recognizing it as the carrier for the split single-file release. That repository has no pipeline model_index.json, so predownload can stage its large companion set before from_pretrained() fails during assembly. Mirror folding only needs to be disabled in ltx25_default_base() for an actual GGUF pick; this no-file pipeline check should treat the carrier like Lightricks/LTX-2.5 and reject it immediately.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The guard compared names without folding the mirror, so the carrier slipped past it and staged its companions before failing in assembly. Fixed in 8e7740c: the no-file pipeline check treats unsloth/LTX-2.5-GGUF like Lightricks/LTX-2.5 and refuses it up front; ltx25_default_base still skips the folding, so a GGUF pick from the carrier keeps the Diffusers base. Test: test_a_pipeline_load_of_the_ltx25_carrier_is_refused.

pre-commit-ci Bot and others added 2 commits October 16, 2026 14:41
…ly planned partials, refuse the LTX-2.5 carrier as a pipeline

- modular H3 specs naming either side of the base's mirror pair load from the repo the base was staged from
- progress counts an in-flight .incomplete blob only when its key is one of the planned files' blob keys
- a pipeline load of unsloth/LTX-2.5-GGUF is refused like Lightricks/LTX-2.5 (no model_index.json)

[skip ci]
@danielhanchen

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: 8e7740c1c5

ℹ️ 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 thread studio/backend/core/inference/video.py Outdated
Comment on lines +1648 to +1649
if _upstream_is_cached(repo_id, tuple(files), other_root = True):
return 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 Scan the fallback cache root used by fetches

When the user changes the cache folder and a complete upstream snapshot exists only in Hugging Face's import-time cache root, this branch selects the upstream because subsequent fetches use reuse_other_cache_root=True. However, _cache_bytes scans only hub_cache_dir(), so none of those planned bytes are counted and progress remains at downloading—often zero bytes—until the load abruptly becomes ready. Progress should scan the same fallback root or record the paths actually resolved by the fetches.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The fetch choice reuses an upstream that is complete in the fallback cache root, but progress only scanned the live root. Fixed in f6769ab: progress now reads the load's fetch plan and counts each planned file by blob key in both roots. Test: test_progress_reads_the_fallback_cache_root.

Comment thread studio/backend/core/inference/video.py Outdated
Comment on lines +5877 to +5878
getattr(info, "sha", None),
_planned_etags(info, names),

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 Pin fetches to the revision used for progress

When main moves between model_info() and the multi-file predownload, this records the old listing SHA, but _predownload_base downloads each file without a revision, so the files can land under the newer SHA. _cache_bytes then scans only the old snapshot and uses etags from the old commit, leaving progress in downloading after the required files finish; pass this SHA through to the downloads or record the revision they actually resolved.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The estimate recorded the listing commit but the downloads were not pinned to it. Fixed in f6769ab: the load records one fetch plan per role (repo, pinned commit, blob key and size per file) at estimate time; the checkpoint fetch and the base predownload, including its listing and shard-index reads, use that repo and commit, and progress counts the same blob keys, so a moving main cannot split them. Tests: test_predownload_follows_the_plan_repo_and_revision, test_estimate_settles_one_plan_per_role, test_progress_without_a_blob_key_reads_the_pinned_revision.

Comment thread studio/backend/core/inference/video.py Outdated
Comment on lines +6649 to +6652
with self._lock:
recorded = getattr(self._loading, "fetch_repos", None)
if isinstance(recorded, dict):
recorded[role] = fetched

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 Scope fetch-repo updates to the active load

When a load is superseded while its metadata or predownload work is in flight, the old worker can call this method after _loading has already been replaced by the new load's state. Because the update is not checked against a load token or the state object that initiated it, the stale worker records its checkpoint/base repo in the new load and load_progress() scans the wrong cache until another update happens, or permanently if the stale call arrives last. Pass the originating token/state into this method and ignore updates for a different active load.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. A superseded worker could record its fetch repo on the next load's state. Fixed in f6769ab: fetch sites no longer write load state at all; the plan is written once per estimate by the worker that owns the load, under its token check, and progress reads only that. Test: test_a_superseded_worker_cannot_rewrite_the_active_plan.

…d the progress bar

The estimate settles, per role (checkpoint / base), the repo to fetch, the commit to pin (the listing's, when that
repo is the listing) and every file's blob key and size. _run_load stores it under its load-token check; the checkpoint
fetch and the base predownload read repo + revision from it; load_progress reads only it, counting each planned file
by blob key (complete or in flight) in the plan repo across both cache roots. Removes the per-site fetch-repo updates,
the snapshot-revision scan and the incomplete-blob guesswork.

[skip ci]
@danielhanchen

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: f6769ab5aa

ℹ️ 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 thread studio/backend/core/inference/video.py Outdated
Comment on lines 9890 to 9893
_video_fetch_repo(repo_id, hf_token, files = (gguf_filename or "",), checkpoint = True),
gguf_filename or "",
hf_token,
reuse_other_cache_root = True,

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 Reuse the pinned checkpoint during assembly

When main advances after _estimate_download_bytes() and the first _run_load checkpoint download, load_pipeline() resolves the same checkpoint again through this helper without the plan's revision, so it can download and load the newer checkpoint while progress and the companion plan remain pinned to the older commit. This can silently run different weights than the estimated artifact, including separately re-resolving a MoE partner. Fresh evidence beyond the prior fix is this second assembly-time lookup, which still has no revision parameter even though the earlier prefetch is now pinned.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. Assembly resolved the checkpoint and its partner again from main. Fixed in a6b7b82: load_pipeline gets the plan's checkpoint (repo, revision) and both resolvers download exactly that; re-plans made after the checkpoint fetch keep the entry it was fetched under. Tests: test_assembly_opens_the_pinned_checkpoint_and_partner, test_every_hub_call_of_a_load_matches_its_plan.

pre-commit-ci Bot and others added 2 commits October 16, 2026 15:41
- assembly re-opens the checkpoint (and its MoE partner) at the plan's repo + revision
- the base plan is settled again when an encoder fetch skips a different set than planned; re-plans keep the
  checkpoint entry it was fetched under
- the base revision reaches every hub-id base read: pipeline from_pretrained, the LTX-2.3 assembly, the H3 modular
  index and the redirected load_components specs
- the cached-snapshot completeness score requires weights beside a model config
- invariant test: a load touches the Hub only at the (repo, revision) pairs its plan names

[skip ci]

@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: 196a3b1917

ℹ️ 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 +6853 to +6856
**(
{"revision": revision}
if revision and (fetch_repo or "").lower() == listing.lower()
else {}

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 List dense top-ups from the selected base revision

When the base plan reuses an older cached upstream snapshot, fetch_repo and revision identify that upstream commit, but this branch still lists the mirror's current head. If a pre-cast injection then fails and the mirror has renamed or reshared a component since the cached revision, the top-up derives current mirror filenames and requests them from the older upstream commit; the pull falls back to the original sparse snapshot, and the subsequent local from_pretrained() fails because the dense weights were never restored. The expanded file list must come from the selected upstream revision, or from a retained matching listing revision.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Keeping the top-up on the plan here: it is the one place the load's progress, cancel and disk preflight are accounted for, and the listing deliberately never asks the gated vendor repo, so the cached upstream's own commit cannot be listed for an anonymous load. The case needs the mirror to have renamed or resharded a component since the cached upstream revision, and then the pinned pull of the missing name fails and the load reports it, rather than assembling a mixed snapshot.

pre-commit-ci Bot and others added 2 commits October 18, 2026 19:55
… it reads

A GGUF or single-file pick brings its own denoiser, so the offline choice
between an upstream and its mirror no longer counts the transformer
folders the pick replaces.

[skip ci]
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
# Conflicts:
#	studio/backend/core/inference/video.py

[skip ci]
chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

# Conflicts:
#	studio/backend/core/inference/diffusion_families.py

[skip ci]
…s and stale H3 indexes; read the hosted LTX-2.5 encoder at its own ref

[skip ci]
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 5b9b98acb9

ℹ️ 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
danielhanchen merged commit 3111a2c into main Oct 18, 2026
@danielhanchen
danielhanchen deleted the studio-video-unsloth-mirrors branch October 18, 2026 22:04
sbabamohamad added a commit to sbabamohamad/unsloth that referenced this pull request Oct 21, 2026
Adds nvidia/Cosmos3-Nano and nvidia/Cosmos3-Edge to the Video page through diffusers'
Cosmos3OmniPipeline (diffusers >= 0.40.0): text-to-video, and image-to-video from a first
frame, following the layout of the Wan2.1 families (unslothai#13376) and the image-to-video path
of unslothai#13378.

Cosmos3 differs from the other video families in three ways the generic path did not
handle, and each gets the smallest change that fits:

- Its transformer is also its text model, so the pipeline has a tokenizer and no text
  encoder. A family whose bf16 component table prices the text encoder at 0.0 is now read
  as having none: sizing requires only transformer and vae, a cached snapshot without a
  text_encoder/ folder counts as complete, and an explicit text_encoder_quant is refused
  with the reason (relates to unslothai#14000).
- Each card samples with scheduler and call settings that its shipped configs do not hold.
  New VideoFamily fields scheduler_overrides and call_kwargs carry them; a scheduler that
  rejects an override keeps its config.
- The pipeline takes the first frame through its own image= argument and crops it itself
  (i2v_fits_first_frame = False; same pipeline class for both modes).

Fidelity, measured against the plain diffusers pipeline at the cards' settings, seed 0,
with Studio's own encoder on both sides: every frame identical for Nano (189 of 189, four
clips) and Edge (121 of 121, four clips). Three settings were needed to get there and are
set on both rows:
- cudnn.benchmark off: two server processes otherwise rendered one Edge seed 55 dB (t2v)
  and 30 dB (i2v) apart.
- The VAE encoder stays on the stock kernels: Edge image-to-video at the default speed was
  29.5 dB from the card's output through the fused encoder, 51.8 dB with the stock one.
- Cosmos3 decodes untiled when it fits, on every speed tier, with tiled decode as the
  out-of-memory fallback: the stock 16x tiles leave a 4-latent edge tile at 480 / 832 px
  and a faint seam. The seam is recorded as a strict expected failure in the tile-geometry
  test so a fix forces the entry out.

Also in this commit: the local layout check reads a diffusers-library *Tokenizer component
as a model, so Nano's sound_tokenizer/ no longer makes a complete local folder look broken;
the download planner recognises the text_tokenizer/-without-text_encoder/ listing as
Cosmos3's; the Reasoner, Policy, Sim, Transfer and FP8 builds are refused by name with the
repo to load instead; Cosmos3-Super gets no family; the Hub catalog reads Cosmos3 pipelines
as "Video gen"; a renamed local Cosmos3 folder is refused by the trainer instead of falling
to the SDXL path; and the guardrail opt-out is passed through when the cosmos_guardrail
package is absent.

Components are fetched from the nvidia repos: no unsloth-hosted copies exist, both repos
are public and ungated (OpenMDW-1.1), and the allowlist gains the same two lines Wan2.1
has (relates to unslothai#14003). Quantized Cosmos3 checkpoints are a follow-up (unslothai#12851): diffusers
has no single-file converter for Cosmos3OmniTransformer, so a quant needs a hosted source
and a key-map loader.

Tests: family registry and freeze fixtures, component sizing, flow-shift and scheduler
overrides, the i2v class invariant, refusals, local-folder detection, routes, mirrors,
and opt-in GPU checks that render both models and compare against the diffusers output.
danielhanchen added a commit that referenced this pull request Oct 26, 2026
Adds `nvidia/Cosmos3-Nano` and `nvidia/Cosmos3-Edge` as Studio video
families, following #13376 and #13378: text-to-video and image-to-video
through diffusers' `Cosmos3OmniPipeline` (diffusers >= 0.41.0: 0.40.0
resolves a group-offloaded transformer's device as the CPU).

**What's different about Cosmos3**
- Its transformer is also the text model, so the pipeline has a
tokenizer and no text encoder. A family whose bf16 component table
prices the text encoder at 0.0 is now read as having none: sizing needs
only transformer and VAE, a snapshot without `text_encoder/` counts as
complete, and an explicit `text_encoder_quant` is refused with the
reason (relates to #14000).
- Each card samples with scheduler and call settings its shipped configs
don't hold. New `VideoFamily` fields `scheduler_overrides` and
`call_kwargs` carry them.
- The pipeline takes the first frame through its own `image=` and crops
it itself.
- Components come from the nvidia repos: no unsloth-hosted copies exist,
both are public and ungated (OpenMDW-1.1), allowlist gains the same two
lines Wan2.1 has (relates to #14003).

**Fidelity**: Studio output is frame-for-frame identical to the plain
diffusers pipeline for both models (Nano 189/189 frames, Edge 121/121,
four clips each, seed 0). Three settings were needed: `cudnn.benchmark`
off, the VAE encoder on stock kernels, and untiled decode when it fits,
including at speed off and under model / group / streaming offload (the
stock 16x tiles leave a 4-latent edge tile at 480/832 px). When untiled
does not fit, and on CPU / MPS, the tiled decode uses per-canvas strides
that keep every edge tile at 8 or more latents (stock strides wherever
they already do).

**Also in this PR** (separate commits, can be split out; the root-index
prefetch fix moved to #15184)
- The latest-transformers offer in the UI covers the `cosmos3` /
`cosmos3_edge` model types (the `unsloth run` prompt for it is left to a
separate PR).
- Frontend: picker rows, Hub "Video gen" label, page defaults; bundle
budget raised by the bytes the rows add.

**Tests**: backend and frontend suites show no new failures against main
(same failing ids on both trees, all environment-related); typecheck
clean. Real-weight renders were checked against plain diffusers outside
the test suite (Edge on a B200: bit-identical, t2v and i2v; Edge on a
T4: valid fp32 output).

**Not in this PR**: training support, and quantized Cosmos3 checkpoints
(#12851); diffusers has no single-file converter for
`Cosmos3OmniTransformer`, so a quant needs a hosted source and a key-map
loader.

`cosmos_guardrail` is not required: Nano's `model_index.json` enables
the safety checker by default, so the load either passes the opt-out or
refuses with a message naming the package. Edge ships with it off.



**Download and offload**: a Nano download skips `sound_tokenizer/` (1.99
GB, passed as None), a local Nano folder without `sound_tokenizer/` or
`vision_encoder/` validates, and under `low_vram` the VAE goes back to
the CPU after the conditioning encode for both t2v and i2v (real Edge:
VAE on `cuda:0` at every transformer step before, `cpu` after).

## Screenshots

Video page model picker on the merge base (left) and this branch
(right): the branch lists Cosmos3 Edge after the HunyuanVideo rows.

![Video picker before and after: Cosmos3 Edge row
appears](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/14554/pr14554_pair_00-cbaced2e803a.png)

The Hub pair below is harness state, not this PR: the two sides read the
live Hub listing at different times, so the trending rows differ (the
masked shot is otherwise identical). macOS and Windows legs: 41 of 41
steps identical.

<!-- studio-regress:start -->
### Studio UI regression check
Base `c9e5d4ab0` vs head `4aa1f7b91`. Functional: **NO_REGRESSION**, UI
coverage 89%, 1 visual change(s), 0 text-only change(s). Only steps
whose screenshots differ are shown.

**crawl/r_hub**: masks cover 37% of the shot | reproduced on confirm
(VISUAL_DIFF)
Facts: `missing`: {'before': ['button:DeepSeek-V#.#-Flash-#-GGUF',
'button:Model hub', 'button:NVIDIA-Nemotron-#.#-Super-VL-#B-A#B-GGUF',
'button:Qwen#.#-#B-A#B-GGUF', 'button:Search', 'button:Show workflows',
'button:gemma-#-#B-A#B-it-GGUF'], 'after': ['button:Filters',
'button:MiniMax-H#-GGUF',
'button:NVIDIA-Nemotron-#.#-Super-VL-#B-A#B-GGUF', 'button:Show
workflows']}

![crawl/r_hub](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/14554/crawl_r_hub-aa425f260167.png)
<!-- studio-regress:end -->

---------

Co-authored-by: Daniel Han <[email protected]>
danielhanchen added a commit to LeoBorcherding/unsloth that referenced this pull request Oct 27, 2026
…ow to fix it (unslothai#15547)

Replaces unslothai#14698 with a much smaller change.

## Problem

Users who installed MiniMax-H3 before unslothai#14003 have the VAEs cached under
the old names. Since unslothai#14003 the native H3 load looks them up under
`vae/official/...`, so a cache-only load fails with huggingface_hub's
bare `LocalEntryNotFoundError`. That message does not say which file is
missing or how to recover.

Cache-only loads are offline hosts and API-triggered auto-switch loads
(`media_auto_switch.py` loads with `local_files_only = not
user_initiated`, passed through `routes/video.py`). A single online,
user-started load fixes the cache.

## Fix

In the native H3 download loop (`_run_load_h3_native`), when the load is
cache-only and the fetch fails with a local cache miss (detected with
the existing `VideoBackend._te_fetch_miss`), raise a clear error
instead:

```
MiniMax-H3 needs its video VAE (vae/official/minimax_h3_video_vae_fp16.safetensors) from unsloth/MiniMax-H3-GGUF, and it is not in the local Hugging Face cache. This load may only use cached files (offline, or a load Studio started on its own), so it could not download it. Load MiniMax-H3 once while online (or reconnect) so Studio can fetch it; after that it loads offline.
```

The component name comes from the same file to role map
`h3_download_error` already uses (now a small shared helper). The
original exception is kept as `__cause__`. The load worker stores
`str(exc)` as the load progress error, so this text is what the UI and
API show.

Not changed: the unslothai#14003 policy (no reuse of old names or Comfy-cached
bytes, no hashing, no snapshot scans), online loads, and every other
error, which still goes through `h3_download_error` as before.

## Tests

New tests in `studio/backend/tests/test_sd_cpp_h3_matrix.py` drive
`_run_load_h3_native` with the video VAE fetch failing:

- cache-only load, `LocalEntryNotFoundError`: raises the new message
naming the file, and the text survives the load worker's error handling
unchanged (fails on main, passes here)
- online load, `LocalEntryNotFoundError`: the same exception object
propagates
- cache-only load, unrelated `OSError`: the same exception object
propagates

`pytest -n 4` over `test_sd_cpp_h3_matrix.py`, `test_video_backend.py`,
`test_video_offline_load.py`,
`test_h3_native_{server,resident,memory_fit,nonfinite}.py`:

| | failed | passed |
|---|---|---|
| main + new tests | 1
(`test_h3_cache_only_load_names_the_missing_vae_and_the_fix`) | 890 |
| this branch | 0 | 891 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant