Skip to content

Clarify training setup feedback and the music entry flow - #15535

Merged
danielhanchen merged 4 commits into
mainfrom
fix/media-training-ux
Oct 28, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
fix/media-training-ux

Conversation

@Imagineer99

@Imagineer99 Imagineer99 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Starting image training currently says “Training started” while setup is still running, and an unknown-duration loading bar sweeps without representing measured progress. This keeps the progress track stationary until counts are available, shows an activity indicator and elapsed time, and labels the initial action “Preparing training…”. Existing preparation counts and training-step progress remain intact.

Also aligns the loss and gradient-norm chart cards, and adds a simple music empty state with a working “Choose music model” action. Once the model is ready, the guidance points to the description/lyrics inputs and Generate.

This is the first of two scoped changes. It builds on the preparation and shared-download-manager work already on main; measured loading counters follow separately. Download readiness/preflight is follow-up work.

Validation:

  • Frontend production build and TypeScript passed.
  • 14 existing training-progress tests passed.
  • Full-page Playwright checks passed for starting, unknown-duration loading, preparation, populated chart alignment, and the music chooser. Fresh comparisons use current main as the baseline.
  • Screenshots use controlled API states; no new full-model training run is claimed.

Before / after

Two isolated Studio installs, merge base 4611107c9 vs head 8beea59ce. The training states come from a stubbed /api/train/diffusion/status (model loading, then stopped); no model or GPU involved.

Image training while the model is still loading: the sweeping bar becomes a stationary track with a spinner and an elapsed timer.

Loading state before and after

Stopped run: the heading still reads "Stopped" (the title is now capitalized in the progress helper instead of via CSS).

Stopped state before and after

Music with no model loaded: a titled empty state with a "Choose music model" action.

Music empty state before and after

Clicking "Choose music model" opens the model selector.

Music model selector opened from the empty state

danielhanchen added a commit that referenced this pull request Oct 27, 2026
…n buttons (#15550)

Two checks in
`tests/studio/test_desktop_reliability_frontend_contract.py` fail on
main since #15520 (`Repo tests (CPU, studio)`, e.g. job 122142458511 on
#15535):

```
test_compact_media_link_keeps_accessible_name_and_truncation
    assert 'cn("min-w-0 truncate", labelClassName)' in '... type="button" aria-label={label} onClick={go} className={cn( ...'
test_images_header_tracks_preview_and_preserves_titlebar_controls
    assert 'labelClassName="hidden @[50rem]:inline"' in ' className="pointer-events-none relative z-40 grid h-[48px] ...'
```

## Cause

#15520 turned the Images and Video header links into icon buttons, a
deliberate redesign covered by its own `media-header-links.test.ts`.
`MediaPageLink` gained an `iconOnly` branch ahead of the labelled one,
and the Images header now renders `<LibraryPageLink tab="images"
iconOnly={true} />` and `<SiblingMediaPageLink to="/video" />` instead
of passing `labelClassName` / `arrowClassName`.

- The first test read only the first `<button` in the component, which
is now the icon button, so it no longer saw the labelled link it checks
(whose `cn("min-w-0 truncate", labelClassName)` is unchanged).
- The second test asserted the old props on the Images header. What they
guaranteed, the name and arrow showing only on a wide header, now lives
inside `SiblingMediaPageLink` (`iconArrow`).

The product is right; the tests pinned the old markup.

## Change

- The media link test now checks both buttons: each keeps
`aria-label={label}`, the labelled link keeps `cn("min-w-0 truncate",
labelClassName)` and `arrowClassName`, and the icon button's `iconArrow`
label truncates and stays `hidden` until `@[50rem]`, with
`SiblingMediaPageLink` setting `iconArrow={true}`.
- The Images header test asserts the two header links it now renders, in
place of the removed props.

## Verification (local)

- `tests/studio/test_desktop_reliability_frontend_contract.py`: main 2
failed, 41 passed; this branch 43 passed.
- Sabotage, each fails one of the two tests: making the sibling label
always visible, dropping the icon button's `aria-label`, dropping
`min-w-0` from the labelled link, dropping `iconArrow={true}` from
`SiblingMediaPageLink`, and removing `<SiblingMediaPageLink to="/video"
/>` from the Images header.

Test-only change; no UI difference.
@danielhanchen danielhanchen self-assigned this Oct 28, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T06:30:10.856363Z
We couldn’t complete this review. Comment @codex review to try again.
8beea59 Draft marked ready
ℹ️ 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

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 002877ce72

ℹ️ 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 marked this pull request as ready for review October 28, 2026 06:30
@danielhanchen
danielhanchen self-requested a review as a code owner October 28, 2026 06:30
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 28, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 28, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 28, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 28, 2026
@danielhanchen
danielhanchen merged commit db182c4 into main Oct 28, 2026
14 of 51 checks passed
@danielhanchen
danielhanchen deleted the fix/media-training-ux branch October 28, 2026 07:54
danielhanchen added a commit to Etherll/unsloth that referenced this pull request Oct 30, 2026
…ing (unslothai#15536)

Image training can spend a long time loading weights or converting them
to 4-bit without reporting how much work is complete. This adds scoped
loader observers in the training worker and carries successful
tensor/component/shard counts through the service and HTTP status schema
to the existing progress UI. Conversion is credited only after it
succeeds; the text explains that cached downloaded weights can still be
converted in memory on each run.

This PR targets main and is independent of unslothai#15535. Either PR can be
reviewed and merged first.

The existing shared download manager remains responsible for HTTP/XET
transfers. Active downloads suppress retained loading counts, and
preparation, training, cancellation/error/completion clear them. The
observers restore library hooks on exit and fall back to ordinary
waiting feedback for unsupported loader API shapes.

Validation on the independent branch:
- 229 backend tests passed: service, measured loading, shared downloads
and DiT trainer coverage. Includes a real tiny sharded model load with
exact weight preservation, failed-conversion accounting, hook
restoration, HTTP schema preservation and terminal cleanup.
- Frontend production build and 17 progress-state tests passed without
unslothai#15535.
- Fresh full-page Playwright main-versus-head comparison verified
measured 4-bit loading at 28/62 tensors. Screenshots use controlled API
events.
- Python lint and repository-pinned formatting passed before the clean
rebase.

No new full-size FLUX training run is claimed. Basic UI/music
refinements, download readiness/preflight and reusable quantized weights
are outside this PR.


### UI before / after

Both builds were served the same mid-load status (4-bit conversion, 28
of 62 weight tensors). Main shows the generic loading card with an
elapsed timer and an empty bar; this branch shows the conversion stage,
the measured count and 45%.

![Image training load progress, before and
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/15536/pr15536_load_progress-a5409a8367c6.png)

---------

Co-authored-by: Daniel Han <[email protected]>
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