Skip to content

Unsloth Studio: Cosmos3 256p, NVIDIA's frame ranges and a per-model frame-rate picker - #16737

Merged
danielhanchen merged 26 commits into
unslothai:mainfrom
LeoBorcherding:cosmos3-nvidia-settings
Nov 10, 2026
Merged

danielhanchen merged 26 commits into
unslothai:mainfrom
LeoBorcherding:cosmos3-nvidia-settings

Conversation

@LeoBorcherding

@LeoBorcherding LeoBorcherding commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

#16741 (Nano video continuation) is stacked on this PR. Merge this one first.

Lets Unsloth Studio's Cosmos3 Edge and Nano families take the generation settings NVIDIA's model cards list, so the release doc can quote NVIDIA's numbers and Unsloth Studio accepts them.

UI: the Video page on a Colab G4, main 590119de67 (BEFORE) vs this branch (AFTER), light and dark theme set from Settings, driven with headless Chromium. Shots at a012d267c0 unless labelled; the two commits after it touch only the duration snap and the picker text.

Frame-rate controls, before and after, light and dark

Durations follow the picked rate and stay inside the frame window. Changing the rate keeps the length you picked, not the frame count (fixed in 74671433c6: at a012d267c0, Nano at 2.0 s became 4.9 s at 10 fps, and Edge at 3.0 s became 6.1 s at 12 fps).

Duration options at 12 and 30 fps, and the snap fix

An out-of-range rate is refused with a toast instead of starting a job (the page's own request with fps rewritten to 31; the controls never send one), and restoring a clip brings its rate back.

fps 31 refused
Restoring a 12 fps and a 10 fps clip

Also checked, nothing to change: the Trained sizes list shows the five 256p sizes on Edge and Nano; the slider takes arrow keys (24 to 25 moves the duration to 3.1 s); a family without a picker keeps the "24 fps" label; at 1024 and 768 px the rail reflows without clipping. Not driven: switching models with a rate picked.

What changed

before (590119de67) after
Edge sizes 480p only (832x480, 480x832, 640x640, 736x544, 544x736) + the pipeline's 256p tier: 320x192, 192x320, 256x256, 320x256, 256x320
Nano sizes 720p + 832x480 / 480x832 + 640x640, 736x544, 544x736 and the same 256p tier
Custom-size floor 204,800 px on Edge: 448x256 and 320x192 refused with a 422 61,440 px: 448x256 (NVIDIA's Jetson T2000 size) is accepted
Edge frames 53-149 unchanged (see below)
Nano frames 5-397 unchanged
Frame rate read-only "24 fps, fixed per model"; the API took any 1-120 and passed it through Edge any integer 12-30, Nano 10 / 16 / 24 / 30, default still 24; anything else refused
  • VideoFamily gains fps_range / fps_choices (video_families.py). validate_video_request_shape refuses a rate outside them with a VideoShapeError (422 on /video/generate, 400 with param: fps on /v1/videos). A family that declares neither is never judged, so every other family behaves as before.
  • Status defaults carries fps_range, fps_choices, min_num_frames, max_num_frames.
  • The Video page shows a frame-rate slider (Edge) or dropdown (Nano) instead of the fixed label, only for families that declare one (video-fps.ts). Duration options follow the picked rate and stay inside the frame window; the request, the pipeline's fps and the mp4 all use it. Restoring a clip's settings restores its rate, and never a frame count the loaded family refuses. Changing the rate keeps the picked length (the nearest offered duration), not the frame count.

Where the numbers come from

  • 256p sizes: diffusers Cosmos3OmniPipeline._ACTION_RESOLUTION_BINS["256"], the same table as NVIDIA's cosmos-framework VIDEO_RES_SIZE_INFO["256"] and NVIDIA/cosmos docs/reference/models.md ("256p uses 320×192"). The pipeline defines no separate video-generation bins.
  • Edge: model card, "256p and 480p resolution, 12–30 fps, and 50–150 frames".
  • Nano fps: the card states no range; NVIDIA/cosmos docs/reference/models.md, Generation settings: "10, 16, 24, 30 FPS (default 24)".
  • Edge keeps its 53-frame minimum. 53 and 149 are the 4k+1 counts inside the card's 50–150; 49 is outside it. Studio: Cosmos3-Nano and Cosmos3-Edge video families #14554 picked the window for that reason (its test: "Windows: the 4k+1 counts inside") and nothing NVIDIA publishes says 49 is supported.
  • Nano keeps 397, the largest 4k+1 count at or under the card's 400. (NVIDIA's models.md says 5–300; the card says 5–400; this keeps the card's.)

Renders: Colab G4, NVIDIA RTX PRO 6000 Blackwell Server Edition 96 GB, Linux, driver 580.82.07, torch 2.11.0+cu130, diffusers 0.42.1. Unsloth Studio booted from this branch at 4095020d9f (backend identical to the head; later commits touch only the restore logic in the page and a test). Seed 0, card steps (Edge 20, Nano 35), CFG 6, bf16 (transformer_quant: none). Prompts from our own test set. Each Unsloth Studio render is compared with plain diffusers Cosmos3OmniPipeline on the same VM (cudnn.benchmark off, card scheduler, untiled VAE, frames through Unsloth Studio's own x264 encode), decoded frame by frame.

render Unsloth Studio speed off vs diffusers Unsloth Studio default load vs diffusers
Edge T2V 448x256, 53 f, 24 fps (waves) identical, 53/53, same mp4 bytes differs, PSNR 26.8 dB
Edge T2V 320x192, 53 f, 24 fps (dog) identical, 53/53 differs, 27.7 dB
Edge T2V 832x480, 121 f, 12 fps (rain) identical, 121/121 differs, 16.2 dB
Edge T2V 832x480, 121 f, 30 fps (rain) identical, 121/121 differs, 18.9 dB
Edge T2V 832x480, 121 f, 24 fps (rain, existing preset) identical, 121/121 differs, 17.4 dB
Nano T2V 320x192, 189 f, 24 fps (waves) identical, 189/189 differs, 28.4 dB
Nano T2V 448x256, 121 f, 16 fps (dog) identical, 121/121 differs, 24.0 dB
Edge I2V 832x480, 121 f (bees) identical, 121/121 differs, 21.9 dB
Edge I2V 448x256, 53 f (bees) identical, 53/53 differs, 24.6 dB
Nano I2V 320x192, 121 f (bees) identical, 121/121 differs, 20.1 dB
  • Nothing changed for the existing sizes: the 832x480 / 24 fps clip is byte-identical between base 590119de67 and this branch, at the default load (9aaba48470dc38af) and at speed off (50f69a6420eff926), both Unsloth Studio servers on the same VM.
  • The default-load column is not this PR: on this card Unsloth Studio's default speed mode picks the _native_cudnn attention backend and a channels-last VAE, and base renders the same bytes as the branch there. seam_safe_tile_strides has no 256p edge case: 192/256/320 px sides fit in one stock 256 px tile or leave an 8-latent edge tile, and 448 px gets the seam-safe 16/10 tiles (covered by the existing tile sweep); every render above decoded untiled anyway.
  • Refusals on the branch (HTTP 422): fps 31 and 11 on Edge ("Supported: 12 to 30 fps"), 176x176 ("between 61,440 and 409,600 pixels"), 49 frames ("Supported counts run from 53 to 149"). Base refused 448x256 and 320x192 with "between 204,800 and 409,600 pixels", and took fps 31 on Edge without complaint.

Each card is one setting, Unsloth Studio at speed off on the left and plain diffusers on the right (frame-identical, per the table), 2.2 s per card at the clip's own frame rate. 320x192 clips are upscaled 1.34x (lanczos) to match the cell; 832x480 clips are shown at 448x258.

256p

Edge T2V 448x256
Edge T2V 320x192
Nano T2V 320x192
Nano T2V 448x256 at 16 fps

Frame rate: same prompt and seed on Edge 832x480, 121 frames, each played at its real rate (so 12 fps covers less of the clip in the same 2.2 s)

Edge 832x480 at 12 fps
Edge 832x480 at 24 fps
Edge 832x480 at 30 fps

Image to video: both clips start from this image (generated with Qwen-Image-2.1, cropped to 832x480), prompt "The bee lifts off the flower and flies toward the camera as the petals sway gently in the breeze."

Bees start image, 832x480

Edge I2V 832x480
Edge I2V 448x256

Memory and speed

Cosmos3 peak VRAM and generate time at 256p vs 480p, Edge on a T4 and an RTX PRO 6000, Nano on an RTX PRO 6000

Measured at the head 2676a6d138 on Colab (Tesla T4 15 GB and RTX PRO 6000 96 GB), waves prompt, Auto memory mode. On the T4, where Unsloth Studio offloads and runs fp32, Edge at 448x256 peaks at 7.6 GiB against 11.0 GiB at 832x480, and 121 frames take 249 s instead of 1,217 s. On the 96 GB card Edge drops from 14.4 to 10.1 GiB at 121 frames and Nano from 38.5 to 32.8 GiB at 189 frames. Not run: Nano on a T4 (the VM's 50 GB of host RAM ran out while loading it), L4, A100, H100.

Tests: new backend tests in test_video_cosmos3.py (presets equal the pipeline's tiers, 320x192 / 448x256 accepted and smaller refused, frame snapping, fps validation per family, every other family takes any rate, status payload, generate passes and exports the picked rate) and tests/video-fps.test.ts (options, fallback, duration math identical to before for families without a window, restore, a rate change keeps the picked length: fails at a012d267c0, passes at 2676a6d138). test_video_shape_validation.py's 256x256 refusal now skips a family that lists it. Locally on macOS (M5): the video backend suites show the same 23 failures on base and branch (H3 modular loads, native quant/stream builds, prequant download plans: environment), branch +48 passing; frontend typecheck clean; full frontend suite 14,930 pass and 2 fail of 14,933: a KaTeX import check that trips on a symlinked node_modules and a timing test.

Status: head 2676a6d138. Codex: no major issues at 2676a6d138 on the fork mirror. CI at 2676a6d138: 62 passed; Core / Core zoo (6 jobs) and the parity verdict still queued on the runner pool (all green at a012d267c0; the two new commits are frontend only). connection (dsh, stable) failed because npm install -g @deepseek-ai/dsh finds no version on npm (ETARGET); the same job fails the same way on main (9d40777eb1).

Noticed, not changed

  • Refusal toasts name the family by its id ("for cosmos3-edge"), like every other shape refusal in video_families.py.
  • A saved generation preset keeps size, length and steps but not the frame rate.
  • Restoring a clip whose rate the loaded family does not offer (an Edge 12 fps clip on Nano) keeps the current rate and still says "Settings restored to inputs".
  • At 768 px the header's Family / Engine line clips behind the Create / Train toggle (pre-existing).

Not run: Hopper / Ampere (A100 80 GB and H100 were refused by Colab; this ran on Blackwell), the default speed mode against diffusers with a matching attention backend, multi-GPU and offloaded loads at 256p, video continuation, AMD / Apple silicon.

Before / after (maintainer check)

Video page settings rail, merge base vs this branch, two isolated Studio installs. No GPU on this host, so the loaded model is not a live load: each side's page is served the status its own backend returns for a Cosmos3 load with a stubbed pipeline. Edge: the read-only "24 fps" row becomes a 12 to 30 slider. Nano: it becomes a 10 / 16 / 24 / 30 dropdown, and the default canvas is no longer pushed up to the old 204,800 px floor.

Cosmos3 Edge rail before and after
Cosmos3 Nano rail before and after

…e picker

Edge and Nano gain the pipeline's 256p tier (320x192, 192x320, 256x256,
320x256, 256x320) and Nano the 480p sizes it lacked, so the custom-size
floor drops to 61,440 px and NVIDIA's 448x256 is accepted.

VideoFamily gains fps_range / fps_choices: Edge 12-30 (model card),
Nano 10, 16, 24, 30 (NVIDIA/cosmos models.md). The status defaults carry
them with the frame window, the request is refused outside them, and the
Video page shows a picker instead of the fixed label for those families
only. Durations, the pipeline fps and the mp4 follow the chosen rate.
… absent

Backend CI installs no diffusers, so the unguarded import failed the rest shard. The preset assertions don't need diffusers and now always run; the comparison against the pipeline's bins moves to its own test behind importorskip.
A frame count still offered at the new rate was kept, so Nano at 2 s (49 frames) became 4.9 s at 10 fps.
@LeoBorcherding

LeoBorcherding commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Codex is clean at this head (2676a6d) on the fork mirror: LeoBorcherding#765

Fork mirror CI at 2676a6d is complete: 67 checks pass. The two red jobs are not this PR's:

  • Repo tests (CPU, rest): 6 cases of test_fp8_loss_ignores_model_output_flags_only_on_its_head fail with "Unsloth cannot find any torch accelerator" on the fork's runner. The same job passes on this repo's runners (#16737 at 2676a6d) and fails the same way on every Cosmos3 mirror.
  • connection (dsh, stable): npm can't find @deepseek-ai/dsh (ETARGET). It fails the same way on main (run).

LeoBorcherding added a commit to LeoBorcherding/unsloth that referenced this pull request Nov 6, 2026
@danielhanchen danielhanchen self-assigned this Nov 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 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-08T16:13:12.623332Z 435a03e 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[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: a7fbf13bcc

ℹ️ 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 7, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 7, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 8, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

… reset to the family default when the preset has none
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 8, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 8, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 8, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 8, 2026
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 Nov 8, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 8, 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. Already looking forward to the next diff.

Reviewed commit: 435a03ea42

ℹ️ 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 and others added 3 commits November 8, 2026 08:17
# Conflicts:
#	studio/backend/tests/test_media_generation_preset_settings.py
# Conflicts:
#	studio/backend/tests/test_video_shape_validation.py
@danielhanchen
danielhanchen merged commit 681fd01 into unslothai:main Nov 10, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 10, 2026
…ts last or first frames) (unslothai#16741)

**Builds on unslothai#16737, so this diff includes its commits until that one
merges. Review unslothai#16737 first.**

## What
Adds a third workflow for Cosmos3-Nano on the Unsloth Studio Video page:
**Continue a clip**. You upload a short video, Nano keeps 5 frames from
its end (or its start) and generates what happens next.

## Why
Predicting the future of a clip is one of the main things Cosmos 3 is
built for, and NVIDIA's pipeline already supports it
(`Cosmos3OmniPipeline(video=...)`). Unsloth Studio only offered
text-to-video and image-to-video, so there was no way to use it. Nano
only: Cosmos3-Edge does not accept video input, and the section does not
show for it.

## Before / after

Merge base `590119d` vs the head, Cosmos3-Nano loaded, theme set in
Settings > Appearance. The AFTER frame-rate picker comes from unslothai#16737.

![before and after,
light](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/before_after_light.png)
![before and after,
dark](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/before_after_dark.png)

<details><summary>States: first/last choice, clip over 15 s, generating,
Cosmos3-Edge (light and dark)</summary>

![states,
light](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/states_light.png)
![states,
dark](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/states_dark.png)
</details>

<details><summary>Messages: a start frame and a clip replacing each
other, a 20 s clip, a 3-frame clip</summary>

![messages,
light](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/messages_light.png)
![messages,
dark](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/messages_dark.png)
</details>

<details><summary>Full page: generating, result, switching to
Cosmos3-Edge with a clip staged, 1024 px</summary>

![pages,
light](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/pages_light.png)
![pages,
dark](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/pages_dark.png)
</details>

Screenshots: headless Playwright on a Colab G4, Unsloth Studio at
`9358a68` (the head `f6a1402` only drops a toast that never reached the
screen).

## Unsloth Studio vs plain diffusers

Colab G4 (NVIDIA RTX PRO 6000 Blackwell Server Edition, 96 GB), Linux,
backend at `965e910` (the clip decoding is unchanged since; later
commits are frontend and one error message). Unsloth Studio loaded
`nvidia/Cosmos3-Nano` in auto mode (bf16, no offload) with
`UNSLOTH_COSMOS3_SAFETY_CHECKER=0`, since the guardrail repo is gated.

1. Source clip: Nano text-to-video in Unsloth Studio, 832x480, 93 frames
at 24 fps, 35 steps, guidance 6, seed 0. Prompt: "A golden retriever
bounds through deep fresh snow in a pine forest, kicking up powder with
each leap, the camera tracking alongside at dog height."
2. Continue it with the same settings, prompt: "The dog leaps over a
fallen log and keeps running as snow falls from the branches above.",
once from its last 5 frames and once from its first 5.
- Unsloth Studio: `/video/generate` with `continuation_video` and
`continuation_keep`.
- Plain diffusers: `Cosmos3OmniPipeline(video=<the source's decoded
frames>, condition_video_keep=...)` with the model card's setup
(`UniPCMultistepScheduler` with `flow_shift=10.0`,
`enable_safety_checker=False`).

| | last, Unsloth Studio | last, diffusers | first, Unsloth Studio |
first, diffusers |
|---|---|---|---|---|
| generate time | 51.2 s | 51.6 s | 51.2 s | 51.3 s |
| nvidia-smi peak | 36.0 GiB | 38.3 GiB | 36.0 GiB | 38.3 GiB |
| kept frames vs the source's kept 5 (PSNR, dB) | 34.6, 32.1, 32.8,
33.1, 34.4 | 34.6, 32.0, 32.8, 33.1, 34.5 | 34.2, 31.6, 31.2, 31.8, 32.6
| 34.1, 31.6, 31.2, 31.8, 32.6 |
| seam, kept frame 4 to generated frame 5 (PSNR, dB) | 17.4 | 17.5 |
16.8 | 16.8 |
| Unsloth Studio vs diffusers, frame 0 / frame 5 / mean from frame 30
(dB) | 39.8 / 31.6 / 15.6 | | 38.6 / 33.4 / 19.1 | |

- Both pipelines keep the source's frames (32 to 35 dB is mp4
re-encoding) and carry the motion on with no cut: the seam step sits
inside the source clip's own frame-to-frame range (15.5 to 22.3 dB, mean
17.9) for a fast tracking shot.
- Unsloth Studio and diffusers start nearly identical and drift apart
over the clip: same scene and same events, not bit-identical sampling,
as we saw comparing Cosmos3-Edge text-to-video between the two.
- The source took 57.1 s at the same 36.0 GiB peak; model load was 185.6
s including the download.

Source | plain diffusers | Unsloth Studio, from the last frames:

![continue from the last
frames](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/continuation_last_source_diffusers_studio.gif)

From the first frames:

![continue from the first
frames](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/continuation_first_source_diffusers_studio.gif)

<details><summary>Kept frames 0 and 4 and the first generated frame 5
(top row: the source's kept end)</summary>


![last](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/continuation_last_seam.jpg)

![first](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4eb82e2468c5bcf74f31cce86f1b057208067237/continuation_first_seam.jpg)
</details>

GIFs are 400 px a panel at 8 fps.

## Memory and speed

![Cosmos3-Nano continuation: peak VRAM and generate time, Unsloth Studio
vs plain
diffusers](https://raw.githubusercontent.com/LeoBorcherding/unsloth/4b424c816662c51f7432806567cd0e616658a9ae/charts/continuation_vram_time.png)

Same runs as the table above, measured at `965e910` on the Colab G4 (RTX
PRO 6000, 96 GB). Peak is the nvidia-smi card total: Unsloth Studio
holds 36.0 GiB through the source and both continuations, plain
diffusers peaks at 38.3 GiB. Not run: other GPUs, offloaded loads, 720p.

## UI pass
Driven in Unsloth Studio on Colab, light and dark, 1440, 1024 and 768
px. Fixed here:
- A clip now sizes the canvas through **Match source**, the way a start
frame does. Before, a picked clip kept whatever size was set (800x544 in
the run) and was centre-cropped onto it.
- A start frame and a clip still replace each other, and a toast now
says which one was removed.
- A clip over 15 s is flagged under its preview when picked, not only
after Generate uploads it.
- The too-short refusal reads "This clip has 3 frames at 24 fps, and
continuing it needs at least 5. Use a longer clip." instead of a message
with a decode count.
- The first/last hint uses the same words as the options.

Checked and fine: the preview (same player and size as the MiniMax-H3
reference videos), progress (the page's usual step counter and time
left), the section hidden for Cosmos3-Edge, the layout at 1024 and 768
px in both themes. Not checked: keyboard-only use and reloading the page
with a clip staged.

Noticed, not changed:
- Picking Cosmos3-Edge with a clip staged drops the clip without a
notice. A toast for it fires during the load and is replaced by the
load's own toasts, so it was taken out again rather than left in as code
that never shows.
- No in-app trim for a clip over 15 s, unlike MiniMax-H3 reference
videos.
- At 768 px the page header overlaps ("Family" label clipped), on main
too.

## Tests and status
- `studio/backend/tests/test_video_cosmos3.py`: 267 passed, 2 skipped
with diffusers 0.42.1; 260 passed, 9 skipped with diffusers blocked (as
the `rest` CI shard runs it).
`studio/frontend/tests/video-continuation.test.ts`: 9 passed; frontend
suite 14942 passed; typecheck clean. Local, macOS, at `f6a1402`.
- Head `f6a1402`. Codex at the head: [Didn't find any major
issues](LeoBorcherding#767 (comment))
on the fork mirror.
- CI at the head: queued at the time of writing. On `8eafc9b`, `Backend
CI / (Python 3.13, rest)` failed on this branch (a test imported
diffusers unconditionally; fixed by merging unslothai#16737's `a012d26`). `Chat
UI Tests (extra)` failed on a `/login` page timeout in
`playwright_multi_account.py` that is not this PR's: the same timeout
failed on main's push run
([a1e340b](https://github.com/unslothai/unsloth/actions/runs/41917001176/job/126888866411))
and on three other PR branches the same day
([1](https://github.com/unslothai/unsloth/actions/runs/41972119548/job/127062896587),
[2](https://github.com/unslothai/unsloth/actions/runs/41964729013/job/127038990526),
[3](https://github.com/unslothai/unsloth/actions/runs/41954906457/job/127007374413)).

## Not run
720p, anything other than NVIDIA on Linux, and the Unsloth Desktop app.


## Before / after (maintainer check)

Video page settings rail, merge base vs this branch, two isolated Studio
installs. No GPU on this host, so the loaded model is not a live load:
each side's page is served the status its own backend returns for a
Cosmos3 load with a stubbed pipeline. Cosmos3 Edge gets no continuation
section; Cosmos3 Nano gains "Continue a clip" (and the frame-rate
dropdown from unslothai#16737).

![Cosmos3 Edge rail before and
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/16741/pr16741_pair_00-ababb8cc6070.png)
![Cosmos3 Nano rail before and
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/16741/pr16741_pair_02-4264d7937042.png)

Also fixed here: a portrait phone clip (stored landscape with a display
rotation) is now decoded upright, matching ffmpeg's autorotate, before
its frames reach the pipeline.

---------

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants