Skip to content

[Feature] Unsloth Studio / Desktop: Export page splits LLM, Diffusion LoRA and Q4NX into tabs - #17717

Merged
danielhanchen merged 6 commits into
unslothai:mainfrom
LeoBorcherding:studio/export-tabs
Nov 17, 2026
Merged

danielhanchen merged 6 commits into
unslothai:mainfrom
LeoBorcherding:studio/export-tabs

Conversation

@LeoBorcherding

@LeoBorcherding LeoBorcherding commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

The Export page stacked its flows as cards (Source, Export method, "Export an image LoRA", "Convert a GGUF to Q4NX (AMD NPU)"), so the image LoRA and Q4NX flows sat below the whole LLM form. This puts each flow behind its own tab under the page header.

What changed

  • A tab bar under the "Export" title, using the app's existing Tabs component (components/ui/tabs.tsx):
    1. LLM: the existing Source + Export method flow and its summary card.
    2. Diffusion LoRA: the image LoRA export card.
    3. Convert to Q4NX: main's Q4NX model-picker card, next to its own Export summary card (model, GGUF file, quant, original model, save directory, estimated size, NPU memory, quick guide). No Export button there: the card converts with its own Convert button. The tab only shows when main's gate passes (a supported AMD NPU with FastFlowLM ready); a stale q4nx selection falls back to LLM.
  • Subtitle is now "Export models and adapters for deployment, or convert GGUFs for AMD NPUs".
  • Card contents are as main has them. Each flow is a real tab panel (TabsContent, forceMount), hidden while inactive rather than unmounted, so a running export or conversion keeps its state when you switch tabs.
  • An ?imageLora= deep link from a finished training run opens on the Diffusion LoRA tab. Starting the guided tour switches to the LLM tab, since the tour only walks that flow.
  • New exportTabs i18n keys in en.ts and every overlay (npm run i18n:check:strict passes).

Merge of main

Merged main at d2d8823325 (the NPU phase PRs had landed and the page conflicted). Main's Q4NX picker card (#17515) and the NPU-and-FastFlowLM gate (#17522) are kept as is. Main switched one shared summary card between the LLM flow and the Q4NX card by tracking which card you last clicked; with tabs that tracking has nothing to do, so it's dropped and the Q4NX tab renders its own summary from the card's onSummary. The loading and error fallback that rendered both extra cards above the LLM form is gone too, since each card now lives in its own tab regardless of checkpoint state. tests/export-q4nx-npu-gate.test.ts now counts the gated Q4NX tab trigger and panel instead of two <Q4nxConvertCard> sites.

Tests

All at 5b74aa2973. Codex: "Didn't find any major issues" at this commit on the mirror, LeoBorcherding#886 (comment).

  • tsc -b: clean
  • tsc -p tsconfig.test.json --noEmit: clean
  • npm run i18n:check:strict: all overlays pass
  • tests/export-page-tabs.test.ts (tab fallback without an NPU, one trigger and one panel per tab, each card rendered once, image LoRA deep link opens its tab)
  • Export page tests (tests/export-*.test.ts, image-lora-export-handoff, finetune-export-branches, reload-snapshot, chat-only-full-install): 123/123 pass
  • Full frontend suite (npm test): 16456 pass, 0 fail, 1 skipped

Tested on a Strix Halo NPU

Machine AMD DevLab runner X2-LA03-S04-D04: Ryzen AI MAX+ 395, Radeon 8060S, XDNA2 NPU, 124 GiB
OS / kernel Ubuntu 24.04, 7.0.0-43-generic
NPU driver amdxdna 2.25.260102.56, NPU firmware 1.1.2.65
Runtime FastFlowLM 1.0.12, Lemonade 2026.44.1 (installed by Unsloth Studio)
Commit 5b74aa2973, installed with install.sh --local
Run oobabooga/unsloth run 43897124471

What ran, headless Chromium at 1440x1000, mint theme, glass on, light mode, no chats:

  1. LLM tab with unsloth/Qwen3-0.6B picked from the Hugging Face source and GGUF Q4_K_M selected: summary reads Ready, ~343 MB.
  2. Diffusion LoRA tab as it shows on a box with no image LoRAs.
  3. A real conversion through the Q4NX card: unsloth/Qwen3-0.6B-GGUF, file Qwen3-0.6B-Q4_1.gguf, original model Qwen/Qwen3-0.6B. It finished in under 30 s and wrote q4nx/Qwen3-0.6B-Q4_1-q4nx (model.q4nx, tokenizer.json, tokenizer_config.json).
  4. The converted model.q4nx is byte-identical to FastFlowLM's own published Qwen3-0.6B-NPU2/model.q4nx (both sha256 db8dec4d…53fa667, 683,820,832 bytes). Unsloth Studio only loads NPU models from FastFlowLM's catalog, so the job copied the converted files into that catalog folder (a no-op, same bytes), loaded qwen3-0.6b-FLM on the NPU from Unsloth Studio, and asked one question from the chat page with temperature forced to 0 (the UI's 0.6 rewritten on the request). Reply: "The capital of France is Paris.", 112.6 tok/s. The folder's hash was unchanged after the chat.

Not covered here: Q4_0 conversion (still broken on main), Q4_K_M re-quantization, Windows, and the NVIDIA path (the tab is hidden there by main's gate, which the unit test covers).

Screenshots

LLM, Hugging Face model picked
LLM tab

Diffusion LoRA
Diffusion LoRA tab

Convert to Q4NX, nothing picked
Convert to Q4NX tab

Convert to Q4NX, Q4_1 picked, convert settings open
Q4NX convert settings

Converting
Q4NX converting

Done
Q4NX done

The result loaded on the NPU and chatting (temperature 0)
Chat on the NPU

Before / after on a host without an AMD NPU

Main at the merge base (d2d8823325) vs this PR (729950ad5f), two isolated Studio installs, Chromium at 1440x1000. No NPU on this host, so the Q4NX tab and the AMD NPU subtitle clause stay hidden on both sides.

LLM flow: the page now opens on the LLM tab, with "LLM" and "Diffusion LoRA" as the only tabs.

Export page, LLM tab

Image LoRA flow: stacked under the LLM form before, its own tab after.

Export page, Diffusion LoRA tab

Main's Q4NX picker card and its summary now live in the Q4NX tab, which
gets its own Export summary card, so the click-tracking that switched the
shared summary between flows is dropped. The NPU gate test counts the
gated Q4NX tab trigger and panel.
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T16:58:17.566632Z 1765889 Manual request
ℹ️ 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

Copy link
Copy Markdown

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

Reviewed commit: 5b74aa2973

ℹ️ 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 self-assigned this Nov 17, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 729950ad5f

ℹ️ 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 pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 17, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 17, 2026
# Conflicts:
#	studio/frontend/src/features/export/export-page.tsx

[skip ci]
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 176588901c

ℹ️ 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 6aaff3c into unslothai:main Nov 17, 2026
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.

2 participants