Skip to content

Studio: Show Run button for downloaded non-GGUF models in the Model Hub - #7001

Merged
oobabooga merged 8 commits into
unslothai:mainfrom
oobabooga:worktree-hub-nongguf-run
Jul 13, 2026
Merged

oobabooga merged 8 commits into
unslothai:mainfrom
oobabooga:worktree-hub-nongguf-run

Conversation

@oobabooga

@oobabooga oobabooga commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

Downloaded non-GGUF models (safetensors, MLX, adapters, checkpoints) got no Run button in the Model Hub. Reported on Discord for MLX on Mac, but it affects every non-GGUF format on every OS. The model still loads from the main chat dropdown, so this was purely a Hub-UI gap, not a loader gap.

Problem

#6152 turned the post-download Run button on for GGUF, but non-GGUF cards stayed behind HUB_POST_DOWNLOAD_ACTIONS_VISIBLE, which is still false because it also gates the not-yet-shipped New Chat / Train pickers. So a downloaded non-GGUF card showed no Run button while GGUF showed one.

Fix

Give non-GGUF Run its own flag (HUB_NON_GGUF_RUN_ACTIONS_VISIBLE = true), like the GGUF one, keeping New Chat / Train hidden until those pickers ship. Run wires to the existing load handlers; no backend change.

What changes in the UI:

  • A downloaded safetensors model, adapter, or checkpoint shows a Run button in the Hub. Clicking it loads the model into chat, same as the dropdown.
  • Models the machine can't actually run don't get a live button: unsupported formats (e.g. MLX on a non-Mac, including untagged mlx-community repos) and any non-GGUF model on a host with no GPU or usable MLX show a disabled state instead, with a "GGUF-only device" chip explaining the host case.
  • GGUF cards are unchanged.

Verification

Ran main and the PR side by side. A downloaded safetensors model shows no Run on main and a working Run on the PR: it loads and chat works. GGUF cards are identical on both. mlx-community repos show the "May not be supported" chip on a CUDA host. Typecheck green.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new feature flag, HUB_NON_GGUF_RUN_ACTIONS_VISIBLE, to decouple the post-download Run CTA for non-GGUF models from the HUB_POST_DOWNLOAD_ACTIONS_VISIBLE flag. This allows running non-GGUF models independently of the Hub-aware chat/train pickers. The review feedback points out a visual inconsistency in LocalOnDeviceCard where a vertical divider is still gated by HUB_POST_DOWNLOAD_ACTIONS_VISIBLE instead of runActionsVisible, preventing it from rendering when only the Run button is visible. It is recommended to update this condition to ensure consistency with SafetensorsDownloadCard.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 412 to +414
const runActionsVisible = isGguf
? HUB_GGUF_RUN_ACTIONS_VISIBLE
: HUB_POST_DOWNLOAD_ACTIONS_VISIBLE;
: HUB_NON_GGUF_RUN_ACTIONS_VISIBLE;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

With runActionsVisible now decoupled from HUB_POST_DOWNLOAD_ACTIONS_VISIBLE for non-GGUF models, there is a visual inconsistency in LocalOnDeviceCard.

The vertical divider separating the metadata/path buttons from the action buttons (around line 560) is still gated by HUB_POST_DOWNLOAD_ACTIONS_VISIBLE:

{onTrain && HUB_POST_DOWNLOAD_ACTIONS_VISIBLE && (
  <div
    aria-hidden="true"
    className="ml-1 mr-0 h-5 w-px shrink-0 bg-foreground/[0.06] ..."
  />
)}

Because HUB_POST_DOWNLOAD_ACTIONS_VISIBLE is false, this divider is never rendered when only the Run button is visible (which affects both GGUF and non-GGUF models). This differs from SafetensorsDownloadCard, which correctly displays the divider when runActionsVisible is true.

To fix this visual bug and ensure consistency, the divider in LocalOnDeviceCard should be updated to key off runActionsVisible instead:

{runActionsVisible && (
  <div
    aria-hidden="true"
    className="ml-1 mr-0 h-5 w-px shrink-0 bg-foreground/[0.06] opacity-100 transition-opacity duration-150 group-hover/dl:opacity-0 dark:bg-white/[0.04]"
  />
)}

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.

Not fixing: the GGUF Run CTA already omits this divider before its button (gguf-download-card.tsx, {!isGgufRunCta && <CardDivider />}), so no divider before Run is the shipped design intent, not a bug. Keying it off runActionsVisible instead would newly add a divider before the GGUF on-device Run button, which is the wrong direction.

@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: 35b07b7aaf

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

// Hub-aware chat/train pickers (GGUF already ships it), so it enables
// independently of HUB_POST_DOWNLOAD_ACTIONS_VISIBLE, which still gates the
// New Chat / Train pickers.
export const HUB_NON_GGUF_RUN_ACTIONS_VISIBLE = 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.

P2 Badge Gate non-GGUF Run on support status

When this flag is true, both non-GGUF cards show Run based only on canRun, but canRunModel is derived from runtimeCapabilities.canChat and does not include the existing unsupported-format classification. In a downloaded MLX-format safetensors repo on a non-Mac device, classifyUnslothSupport marks MLX unsupported while inventory still reports safetensors can_chat, so this exposes a Run button for a model the inspector says is only safe to download, leading users into a load path we already classify as unsupported. Please fold the support status into the non-GGUF Run gate or the canRun prop.

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.

Confirmed and fixed in 1b030fa: canRunModel only checked runtimeCapabilities.canChat, which defaults true for safetensors regardless of classifyUnslothSupport. Now non-GGUF also requires unslothSupport.status !== "unsupported", so an unsupported-format repo (e.g. MLX on non-Mac) falls back to the existing disabled Run state instead of exposing an enabled button.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

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

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 1b030fa967

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

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: e8d5e0a925

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

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0e511cac1

ℹ️ 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 thread studio/frontend/src/features/hub/catalog/model-inspector.tsx Outdated
Comment thread studio/frontend/src/features/hub/catalog/model-inspector.tsx Outdated
Comment thread studio/frontend/src/features/hub/catalog/model-inspector.tsx Outdated
@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: a530a2fd84

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

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.

1 participant