Skip to content

studio: make media family overrides structural - #10150

Merged
danielhanchen merged 75 commits into
unslothai:mainfrom
Imagineer99:fix/family-override-artifact-contract
Oct 1, 2026
Merged

danielhanchen merged 75 commits into
unslothai:mainfrom
Imagineer99:fix/family-override-artifact-contract

Conversation

@Imagineer99

@Imagineer99 Imagineer99 commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Attribution

This replacement carries forward @karan68's original proposal and implementation from #8622. Karan is credited as a co-author on the commit, and I am requesting their review here so the contribution remains visible and connected to the final fix.

Supersedes #8622. Fixes #8618.

Why replace the original branch

The original PR proved the product direction, but repeated review rounds exposed a deeper classification problem: filename/signature heuristics could admit text encoders and dtype shards as standalone diffusion checkpoints, while still hiding opaque custom pipeline folders.

This rebuild starts from current main and makes the exception structural instead of heuristic.

What changed

  • Adds registry-backed Family controls to Images and Video; the UI cannot drift from the backend family registry.
  • Pins family_override through download planning, staging, loading, resolved status, and Reapply.
  • Adds an explicit artifact_kind contract to local and cached inventory rows.
  • Allows an unknown-task row through only when the user selected a non-Auto family and the scanner positively identified a Diffusers pipeline root via its root pipeline index.
  • Keeps Transformers directories, adapters, loose encoders, dtype shards, GGUFs, and generic checkpoints outside that exception.
  • Preserves the existing non-GGUF trust boundary for remote repositories.

Verification

  • 57 focused backend tests passed.
  • 6,420 frontend tests passed.
  • Frontend production build passed on both the merge-base and replacement commit.
  • TypeScript application and test typechecks passed.
  • Ruff, Python compilation, and git diff whitespace checks passed.

Co-authored-by: karan yadav [email protected]

UI evidence

Merge base e22e297 (BEFORE) vs head f68e29a (AFTER), two isolated Studio installs, nothing loaded. The Family select sits under Advanced; its options come from each page's status supported_families.

Images: AFTER lists Auto plus 14 image families; BEFORE has no Family control.

Images Family select, BEFORE vs AFTER

Video: AFTER lists Auto plus 6 video families; BEFORE has no Family control.

Video Family select, BEFORE vs AFTER

UI evidence (head fefacf1e2)

Merge base ffd71a91c (BEFORE) vs head fefacf1e2 (AFTER), two isolated Studio installs, nothing loaded, Advanced open, Family list expanded.

Images: AFTER lists Auto (detect) plus 14 image families, read from /api/inference/images/status supported_families; BEFORE has no Family control.

Images Family list, BEFORE vs AFTER

Video: AFTER lists Auto (detect) plus 6 video families (MiniMax-H3, LTX-2, Wan2.2 TI2V 5B, Wan2.2 T2V A14B, HunyuanVideo 1.5 480p and 720p); BEFORE has no Family control.

Video Family list, BEFORE vs AFTER

Expose registry-backed family controls for image and video loads, preserve the override through planning and resolved status, and allow only positively identified Diffusers pipeline roots to bypass opaque task detection.

Co-authored-by: karan yadav <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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 ✅ Completed 2026-09-14T16:47:44.092406Z 8746284 New commits
ℹ️ 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[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 29, 2026
from_pretrained prefers safetensors, so a component holding a complete
safetensors checkpoint plus a .bin index whose shards were never downloaded
still loads; the completeness check now judges the format the loader opens.
…live selection

Recalling an auto-detected model applied whatever Family was selected in
Advanced at the time, so a remembered Z-Image could be loaded through the
Qwen-Image loader. The remembered row already carries the family its load
engaged.
…ad staging from its helper

The load preflight now admits only a manifest whose declared components are on
disk, so a bare {} model_index.json no longer reaches the load owner checks.
The plan-entry mapping moved into diffusion-pipeline-load-target.ts.
@shimmyshimmer

shimmyshimmer commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Review record for #10150, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#260.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1: reviewed mirror a6941c9a5 (no equivalent commit found on this PR)

chatgpt-codex-connector[bot] (on the mirror)

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: a6941c9a54

No triage reaction was recorded on the mirror

Verdict

The round converged at mirror a6941c9a5 (no equivalent commit found on this PR).

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

…installed diffusers

The CPU runner has no diffusers, so find_spec returned None and the selector
correctly listed nothing; the test now declares diffusers installed but unimported.
# Conflicts:
#	studio/frontend/src/features/video/video-page.tsx
…n the local pipeline check

LTX-2's Gemma3 tokenizer_config.json is 1.1 MB, over the 1 MiB manifest cap, so a complete local LTX-2 was refused as a pipeline and as a local base_repo. A transformers component also no longer lets a stale diffusion_pytorch_model index veto its model shards.
On Metal the device probe allocates and syncs, which every video status poll repeated just to pick the Family list.
…ndex

Transformers opens model.safetensors before model.safetensors.index.json, so a leftover index must not reject a complete encoder.
# Conflicts:
#	studio/backend/core/inference/video.py
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.

[Feature] [Bug] Allow users to specify family_name overrides for image models and similar through the UI.

3 participants