Skip to content

Studio: Wan2.1 T2V 1.3B and 14B video families - #13376

Merged
danielhanchen merged 23 commits into
mainfrom
studio-wan21-t2v
Oct 12, 2026
Merged

danielhanchen merged 23 commits into
mainfrom
studio-wan21-t2v

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Studio's video detector mapped every Wan 2.1 checkpoint to no family, so Wan-AI/Wan2.1-T2V-1.3B-Diffusers, Wan2.1-T2V-14B, the repackaged single files, city96 / QuantStack GGUFs and the I2V repos were all refused with the generic "not a supported text-to-video model". This adds the two text-to-video families and gives the rest a clear refusal.

New families (both WanPipeline + WanTransformer3DModel, Wan2.1 VAE in fp32, the same UMT5 encoder as Wan2.2):

family base repo presets defaults
wan2.1-t2v-1.3b Wan-AI/Wan2.1-T2V-1.3B-Diffusers 832x480, 480x832 30 steps, CFG 6, shift 8, 33 frames at 16 fps
wan2.1-t2v-14b Wan-AI/Wan2.1-T2V-14B-Diffusers 832x480, 1280x720, 480x832, 720x1280 same

Defaults come from the reference text_to_video_wan workflow template (wan2.1_t2v_1.3B_fp16, EmptyHunyuanLatentVideo 832x480 length 33, KSampler 30 steps / CFG 6 / uni_pc / simple, ModelSamplingSD3 8, CreateVideo 16 fps). The 14B follows the reference 14B template instead (wan2.1_t2v_14B_fp8_scaled, 832x480 length 33, KSampler 20 steps / CFG 6 / uni_pc / simple, ModelSamplingSD3 5). The diffusers repos ship flow_shift 3.0, so the template shift (8 for 1.3B, 5 for 14B) replaces it at load like the Wan2.2 entries. Offload, compile, CUDA graph policy, dense int8 / fp8 and GGUF loading are the existing Wan paths; nothing new is family-specific beyond the table rows (VAE untiled-decode coefficients reuse the A14B numbers since it is the same Wan2.1 VAE).

Detection

  • Repo / file names: the family name normalises over separators, so Wan2.1-T2V-1.3B, wan2.1_t2v_1.3B_bf16.safetensors, Wan2_1-T2V-1_3B_bf16.safetensors and wan2.1-t2v-14b-Q4_K_M.gguf all match.
  • Header: a patch_embedding of [1536, 16, ...] is the 1.3B. The 14B stack has exactly the keys of one Wan2.2 A14B expert, so the header keeps its old A14B answer and the file name picks between them (SAME_ARCH_VARIANTS, same mechanism as HunyuanVideo-1.5 480p / 720p). The local model folder listing now asks the name the same way, otherwise wan2.1_t2v_14B_fp8_scaled.safetensors was hidden as an unpaired A14B expert.
  • Refused with a named reason instead of the generic one: Wan2.1 I2V / FLF2V (image-to-video needs the image-conditioned transformer and the CLIP vision encoder; coming with the image-to-video change), Wan2.1 VACE / Fun / MAGREF / Phantom / talking-head / ControlNet variants (including QuantStack/Wan2.1_T2V_14B_FusionX_VACE-GGUF, whose name carries the T2V token), and FastVideo FastWan (its repos declare WanDMDPipeline, which diffusers does not ship). Those names resolve to no family, so listings hide them too.

No change for existing families

test_video_wan21_families.py::test_detection_table pins 22 currently supported or currently refused names (Wan2.2-TI2V-5B, Wan2.2-T2V-A14B, LTX-2 / 2.3, HunyuanVideo-1.5 480p / 720p, MiniMax-H3 and their single-file / GGUF spellings): every one detects the same family on main and here, and default_video_generation_params returns the same steps / CFG for them.

Tests

  • New studio/backend/tests/test_video_wan21_families.py (120 cases): the detection table above, refusal reasons, reference defaults, generation defaults, header classification on real Hub headers (tests/fixtures/wan21_checkpoint_headers.json: repackaged 1.3B / 14B / I2V / VACE / Fun, city96 14B T2V and I2V GGUF, samuelchristlie 1.3B Q8_0, QuantStack FusionX), name-over-header for the 14B, a renamed 1.3B GGUF resolving by header, the local model folder listing, the GGUF listing task and validate_load_request for each load kind.
  • Same file on main: 72 failures, all Wan2.1 rows or the new helper; every Wan2.2 / LTX / HunyuanVideo / MiniMax-H3 row passes on both.
  • Existing suites (video, single-file detection, flow shift, GGUF preflight / listing, catalog, prequant, routes; about 4,500 tests): two expected updates, test_supported_names (registry order now lists the two families) and test_an_unassemblable_video_arch_promises_no_page (a Wan2.1 T2V GGUF is now listed on the Video page; a Wan2.1 I2V row keeps the unassemblable case). Nothing else changed versus main. test_build_prequant_checkpoint.py::test_the_recorded_base_must_be_the_canonical_id_not_just_the_same_tail fails on main as well here (it needs a local ./temp/qwen_image_21).
  • model-catalog.check.ts passes with the two new catalog rows.

Render check (B200, diffusers 0.41, torch 2.13)

Same prompt (the template's fox prompt and its negative prompt), seed 42, 832x480, 17 frames, 30 steps, CFG 6, shift 8. The reference is diffusers WanPipeline with the Wan VAE in fp32 and UniPCMultistepScheduler(flow_shift=8.0), i.e. the reference workflow's settings. Shared B200, so s/step is indicative; the single-render rows include the first-render compile.

arm vs reference PSNR mean / min LPIPS mean / max s/step peak VRAM
diffusers reference, repeat bit-identical 0 0.121 22.2 GiB
Studio, speed off 54.3 / 51.3 dB 0.0003 / 0.0005 0.141 15.3 GiB
Studio, default speed (compile, fp16 VAE decode), repeat bit-identical 37.6 / 32.3 dB 0.013 / 0.021 0.074 (first render 0.447) 17.3 GiB
Studio, GGUF Q8_0 (samuelchristlie) 32.9 / 29.2 dB 0.029 / 0.067 1.23 (first render) 16.1 GiB
Studio, repackaged bf16 single file 34.9 / 29.2 dB 0.029 / 0.085 1.62 (first render) 17.3 GiB
Studio, dense int8 24.1 / 23.1 dB 0.107 / 0.151 1.37 (first render) 16.0 GiB
  • Studio with its speed path off matches the reference to 54 dB (LPIPS 0.0003); both pipelines repeat bit-exactly, so the remaining gap is the default speed path (compiled DiT, fp16 VAE decode), which is the same path Wan2.2 already ships with.
  • city96/Wan2.1-T2V-14B-gguf Q4_K_M loads as wan2.1-t2v-14b (shift 8, VAE fp32), renders 832x480x17 at 1.31 s/step on the first render, 23.7 GiB peak.
  • Wan2.2-TI2V-5B (unsloth/Wan2.2-TI2V-5B-GGUF Q4_K_M, 1280x704, 9 frames, 6 steps): main and this branch produce byte-identical frames (sha256 prefix 6d257813229c065e).

Not covered

  • A fp32-reference floor for the default speed path (diffusers' own regional compile, math attention) was not measured; the gap above is attributed to it from the speed-off arm, not proven.
  • Wan2.1-T2V-14B dense (80 GB diffusers repo) and the 720p presets were not rendered; the 14B ran only as a Q4_K_M GGUF.
  • Steady-state s/step for the GGUF / single-file / int8 arms (one render each, compile included), fp8 dense, offload on a small card, CUDA graphs, Apple Silicon, AMD and Windows.
  • Variant defaults for distilled merges (FusionX, Lightning, CausVid) are not tuned; they get the base defaults (30 steps / CFG 6 for 1.3B, 20 / 6 for 14B).
  • Wan2.1 I2V (480P / 720P) is refused, not added: it needs a family whose loaded pipeline is WanImageToVideoPipeline with the CLIP vision encoder and a required start frame. That lands with the image-to-video change.

Wan2.1-T2V-1.3B and Wan2.1-T2V-14B load through WanPipeline with the
Wan2.1 VAE (fp32, same as A14B) and the UMT5 encoder. Defaults follow
ComfyUI's text_to_video_wan template: 832x480, 33 frames at 16 fps,
30 steps, CFG 6, ModelSamplingSD3 shift 8.

Detection covers the diffusers repos, Comfy-Org / Kijai single files,
city96 / samuelchristlie / QuantStack GGUFs and the checkpoint header
(1.3B by shape; the 14B stack shares an A14B expert's keys, so the
file name picks the family). Wan2.1 I2V / FLF2V, VACE / Fun variants
and FastWan are refused with a named reason instead of the generic
one. Existing families keep every detection.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-10-12T12:12:22.985068Z 500a294 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.

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

This comment was marked as resolved.

… repo

The named refusal ran only when no family resolved, so a T2V repo id
(city96/Wan2.1-T2V-14B-gguf) with an image-to-video or VACE file picked
skipped it and failed late in the loader. Judge every pick name unless
the family is overridden.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

A FastWan or renamed Wan2.1 variant file with the plain 1.3B T2V layout
was offered from its header family, then refused at load by name. Apply
the same name refusal before the header family in the folder listing.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

Three reds on this head (48b67ce38d). All three come from the two new families this PR registers in video_families.py (wan2.1-t2v-1.3b, wan2.1-t2v-14b). The run merged onto 0b1291bfd7.

  1. seam-guard and (Python 3.13, rest): tests/test_vae_tile_fixture_coverage.py::test_every_registry_family_has_a_pinned_vae_config fails with families without a VAE config in vae_tile_configs.json: ['wan2.1-t2v-1.3b', 'wan2.1-t2v-14b'], and the seam guard then fails with KeyError: 'wan2.1-t2v-1.3b'. Each new family needs its base repo's vae/config.json, at a pinned revision, added to vae_tile_configs.json.
  2. (Python 3.13, a-k): tests/test_diffusion_memory.py::test_unified_oversize_decision_matrix_for_the_real_video_families fails with a video family was added or renamed: extend the expected refusal matrix. The two families need rows in that test's expected matrix.

Both guards exist for exactly this case, so this is the PR, not CI.

…e fixture

Add the pinned Wan2.1-T2V-1.3B / 14B vae/config.json entries (same
AutoencoderKLWan config as Wan2.2-T2V-A14B) so the seam guard probes
their tile geometry, and extend the unified-memory refusal matrix with
the planner's decisions for both families.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

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: b731783777

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

Comment on lines +500 to +501
r"^(?=.*" + _WAN21_TOKEN + r")(?=.*(?<![a-z0-9])"
r"(?:vace|fun|magref|phantom|multitalk|infinitetalk|controlnet|recammaster)(?![a-z0-9]))",

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 Scope conditioning markers to the model name

These lookaheads run against the entire normalized identifier, including the repository owner and parent directories, and fun in particular is too generic to be architecture evidence. A valid plain checkpoint such as fun/Wan2.1-T2V-14B-Diffusers, or a normal fine-tune named Wan2.1-T2V-14B-fun-style, is therefore classified as an unsupported conditioning variant and rejected by validate_load_request despite identifying the newly supported T2V family. Restrict variant markers to the model/file basename or a known variant-name structure rather than matching arbitrary path segments.

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.

Fixed in f642a0b. The conditioning-variant check now matches only inside the last path segment, and fun only counts directly after the Wan2.1 token (Wan2.1-Fun-1.3B-InP, wan2.1_fun_inp_1.3B_bf16), which is where every Fun release puts it. fun/Wan2.1-T2V-14B-Diffusers, someone/Wan2.1-T2V-14B-fun-style, /home/fun/models/Wan2.1-T2V-1.3B-Diffusers and vace-lab/Wan2.1-T2V-1.3B-Diffusers now resolve to the T2V families, while VACE, Fun, FusionX_VACE and a local .../Wan2.1-VACE-14B-diffusers/ folder are still refused. Added tests for both directions in test_video_wan21_families.py; the four new pass cases fail on the previous head.

displayName: "Wan 2.1 T2V 14B",
description: "Text-to-video 480p / 720p",
scope: "video",
artifacts: [bf16Pipeline("Wan-AI/Wan2.1-T2V-14B-Diffusers", 80, { totalParams: 14288491584 })],

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 Size the 14B catalog row by resident memory

The value passed to bf16Pipeline becomes approxSizeGb, which residentSizeGb and curatedArtifactFit interpret as resident model size for routing and the “fit on device” filter. Using the roughly 80 GB repository download footprint here marks this model as not fitting even on an 80 GB GPU (80 > 0.7 * 80), although the backend table added in this change prices its resident components at 28.6 + 11.4 + 0.5 = 40.5 GB. As a result, the new 14B model is hidden by the fit filter and receives an incorrect fit badge on hardware that can run it; use a resident estimate for routing or separate download and resident-size fields.

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.

Fixed in f642a0b. approxSizeGb is the resident estimate, so the Wan2.1 rows now use the backend bf16 component sums: 14B 41 GB (28.6 + 11.4 + 0.5) and 1.3B 15 GB (2.8 + 11.4 + 0.5); the 1.3B row had the same problem at 29. The 14B row now fits an 80 GB card and the 1.3B row a 24 GB card. Added a fit test in dense-quant-prequant-routing.test.ts that fails on the previous head.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

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: f642a0bc53

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

"Wan-AI/Wan2.1-T2V-14B-Diffusers instead.",
),
(
r"^(?=.*" + _WAN21_TOKEN + r")(?=.*(?<![a-z0-9])(?:i2v|flf2v)(?![a-z0-9]))",

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 Scope I2V markers to the model-name segment

Although the conditioning-variant pattern is now scoped to the final path segment, this separate lookahead still searches the entire normalized identifier. Consequently, a supported checkpoint stored at /home/i2v/models/Wan2.1-T2V-14B-Diffusers or published as i2v-lab/Wan2.1-T2V-14B-Diffusers is classified as image-to-video: unsupported_video_checkpoint_reason returns a refusal, detect_video_family returns None, and load validation rejects it. Require i2v/flf2v to occur in the same model or filename segment as the Wan2.1 token.

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.

Fixed in 5973596. The I2V / FLF2V rule now uses the same last-segment form as the conditioning rule, so the Wan2.1 token and the i2v / flf2v marker have to sit in the same model or file name. i2v-lab/Wan2.1-T2V-14B-Diffusers, /home/i2v/models/Wan2.1-T2V-14B-Diffusers and /data/flf2v/Wan2.1-T2V-1.3B-Diffusers/ now load as T2V, while Wan-AI/Wan2.1-I2V-14B-480P-Diffusers, wan2.1_i2v_480p_14B_fp8_scaled.safetensors, the city96 I2V GGUF and the FLF2V repo are still refused. Cases added to test_conditioning_markers_outside_the_model_name_do_not_refuse.

Comment on lines +264 to +265
{ match: "wan2.1", steps: 30, guidance: 6 },
{ match: "wan2_1", steps: 30, guidance: 6 },

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 Normalize the 14B frontend default match

For supported separator variants such as the added Kijai/.../Wan2_1-T2V-14B_fp8_e4m3fn.safetensors, none of the preceding 14B strings match, so this generic wan2_1 entry seeds 30 steps instead of the 14B default of 20. The backend normalizes separators and correctly resolves the same identifier to the 14B schedule, but the picker displays and claims the wrong recipe during loading; if the user selects a preset or otherwise claims the form before status arrives, the status synchronization deliberately preserves those incorrect 30 steps. Normalize the identifier before matching, or add the separator variants to the specific 14B rule.

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.

Fixed in 5973596. defaultsFor now folds separator runs to - the way the backend's normalize_family_name does (and appends a trailing - so wan2-1- cannot match inside another number), and the table keys are written in that form. Kijai/WanVideo_comfy/Wan2_1-T2V-14B_fp8_e4m3fn.safetensors now seeds 20 steps / guidance 6 like the backend, the 1.3B spellings keep 30 / 6, and the other families keep their recipes. New tests/video-model-defaults.test.ts runs the page's own table and matcher on real names; the Kijai 14B case fails on the previous head.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 12, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 12, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 12, 2026
@danielhanchen

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: 5973596c67

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

Comment on lines +957 to 960
("wan2.1-t2v-14b", 20, 6.0),
("wan2.1-14b", 20, 6.0),
("wan2.1", 30, 6.0),
("wan", 20, 5.0),

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 Handle compact Wan2.1 aliases in generation defaults

When a repo or filename uses the newly registered wan21-t2v-1.3b alias, separator normalization does not turn wan21 into wan2.1, so none of these Wan2.1 keys match and the later generic wan row returns 20 steps / guidance 5. Because a variant was found, generation ignores the family's 30 / 6 fallback and renders the 1.3B model with the wrong recipe; the frontend matcher has the same compact-alias gap. Add the compact aliases to the default matching or canonicalize identifiers through the detected family.

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.

Fixed in c2902b3. The backend defaults table and the Video page table now carry the compact wan21-t2v-14b / wan21-14b keys (20 steps, guidance 6) ahead of a generic wan21 key (30 / 6), so wan21-t2v-1.3b-Q8_0.gguf gets the 1.3B recipe and Wan21_T2V_14B_fp8.safetensors the 14B one instead of the generic Wan 20 / 5. Cases added to test_generation_defaults and tests/video-model-defaults.test.ts.

Comment on lines +485 to +487
(
r"(?<![a-z0-9])fastwan",
"This is a FastVideo FastWan checkpoint. FastWan is distilled for FastVideo's own few-step "

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 Scope the FastWan refusal to the checkpoint name

The later scoping fixes leave this separate FastWan pattern searching the entire identifier, and it also lacks a right boundary. Consequently, a plain supported checkpoint at /home/fastwan/models/Wan2.1-T2V-1.3B-Diffusers or under an owner such as fastwanderers/Wan2.1-T2V-14B-Diffusers is rejected as FastWan; detect_video_family returns None, and loose-checkpoint listing hides the file. Match known FastWan forms in the final model/file segment rather than arbitrary parent or owner text.

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.

Fixed in c2902b3. The FastWan rule now uses the same last-segment form as the I2V and conditioning rules and needs a non-letter after fastwan, so /home/fastwan/models/Wan2.1-T2V-1.3B-Diffusers and fastwanderers/Wan2.1-T2V-14B-Diffusers load as plain Wan2.1, while FastVideo/FastWan2.1-T2V-1.3B-Diffusers, FastVideo/FastWan-QAD-1.3B, the FastWan2.2 repo and FastWan file names are still refused. Cases added to test_conditioning_markers_outside_the_model_name_do_not_refuse.

…ithout the family token, prefer the file name for same-layout Wan 14B weights
@danielhanchen

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: d127867358

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

Comment thread studio/backend/core/inference/video.py Outdated
_refuse_non_dit_pick(repo_id, gguf_filename, "video")
fam = _detect_load_family(repo_id, gguf_filename, family_override, display_repo_id)
# Every pick name is judged, not just an unresolved one: a T2V repo id can hold an I2V / VACE file.
if not family_override:

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 Apply the variant veto even with a family override

When a caller supplies family_override, this skips all new I2V/VACE/FastWan checks. For a remote GGUF or safetensors pick, the earlier local-header preflight cannot recover, so requests such as a Wan2.1 I2V GGUF with family_override="wan2.1-t2v-14b" proceed to download and are assembled with the plain T2V pipeline despite requiring unsupported conditioning inputs. The override should choose the family for opaque names, but known-incompatible checkpoint names still need this veto.

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.

Agreed, fixed. The refusal now runs whether or not family_override is set. The override still picks the family for an opaque name, but it can no longer push an I2V, conditioning-variant, FastWan or AnyFlow pick through to the T2V pipeline. This matches the other refusals in validate_load_request (_refuse_non_dit_pick and the modular-workflow checks), which already ignored the override. Tests: test_family_override_does_not_bypass_the_refusal (Wan2.1 I2V GGUF, renamed i2v-14b-480p GGUF, FastWan and AnyFlow repos, all with family_override="wan2.1-t2v-14b").

Comment on lines +485 to +487
_UNSUPPORTED_VIDEO_CHECKPOINTS: tuple[tuple[str, str], ...] = (
(
r"(?:^|[/\\])(?=[^/\\]*(?<![a-z0-9])fastwan(?![a-z]))[^/\\]*[/\\]*$",

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 Reject AnyFlow before selecting the stock Wan pipeline

The unsupported-variant table does not cover AnyFlow names, so detect_video_family("nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers") resolves this known derivative as ordinary wan2.1-t2v-14b. A locally downloaded pipeline or single-file mirror therefore passes validation and is assembled with WanPipeline, but the publisher's model card requires its custom WanAnyFlowPipeline and flow-map inference path. Add an AnyFlow refusal (as done for FastWan) until that pipeline is supported, rather than allowing a late load failure or an invalid render.

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.

Agreed, fixed. The AnyFlow repos declare AnyFlowPipeline, AnyFlowTransformer3DModel and FlowMapEulerDiscreteScheduler in model_index.json. The transformer adds a delta-timestep embedder (delta_embedder, gated by gate_value), so WanTransformer3DModel under WanPipeline cannot run it faithfully. An AnyFlow name is now refused the same way FastWan is, with its own message, and only when the marker is in the last path segment, so an owner or folder called anyflow is not refused. Tests: test_anyflow_is_refused and test_anyflow_owner_or_folder_does_not_refuse.

if not identifier:
continue
needle = normalize_family_name(str(identifier))
needles = (needle, "wan2-1-" + re.split(r"[/\\]", needle.rstrip("/\\"))[-1]) if wan21 else (needle,)

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 Add synthetic Wan context only to the selected filename

The new wan21=True branch supplies fresh evidence of a remaining scoping bug: it prepends wan2-1- to every identifier's final segment, including the container repo_id. If a valid T2V file such as wan2.1-t2v-14b-Q4.gguf is selected from a local directory named /models/i2v or /models/vace, family detection succeeds, but this line fabricates wan2-1-i2v or wan2-1-vace from the directory and validation rejects the plain T2V checkpoint. Apply the synthetic family context only to the selected checkpoint filename that may omit the Wan token, not to repository or display-container identifiers.

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.

Agreed, fixed. The Wan2.1 prefix is now added only to the selected checkpoint: the picked filename when there is one, otherwise the repo path itself. The container repo id and display id are judged only as written, so a T2V GGUF inside a folder named i2v, vace or fun passes validation. Test: test_wan21_context_is_added_only_to_the_picked_file.

…nder a family override, and judge only the picked file without the family token
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

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: 9a61389927

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

from core.inference.video_families import unsupported_video_checkpoint_reason

# A name the loader refuses (FastWan, Wan2.1 I2V / VACE) is not offered, whatever the header says.
if unsupported_video_checkpoint_reason(path.name):

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 Pass resolved Wan2.1 context to the loose-file refusal

For a loose 1.3B checkpoint whose basename omits the family token, such as fun-inp-1.3b.safetensors, header inspection resolves info.family to wan2.1-t2v-1.3b, but this name-only call cannot recognize the conditioning variant because its pattern requires Wan2.1 context. The file is consequently offered in the model picker, while validate_load_request later supplies wan21_checkpoint and rejects the same selection. Pass the header-resolved Wan2.1 context here as well so the listing does not expose checkpoints the loader refuses.

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.

Fixed in dba1d55. _offer_loose_checkpoint now resolves the family first (header, then the same-layout name rule) and only then asks unsupported_video_checkpoint_reason, passing wan21_checkpoint when that family is Wan2.1, the same context validate_load_request uses. A 1.3B T2V-layout file named fun-inp-1.3b.safetensors, vace-1.3b.safetensors or i2v-1.3b.safetensors is no longer listed, while a plain renamed file is. Test: test_comfy_folder_hides_variant_names_without_the_family_token, which fails on 9a61389.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

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: dba1d552f9

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

Comment on lines 1077 to +1079
path = local_pick_file(repo_id, gguf_filename)
if path:
name, _ = resolve_family_with_content(fam.name if fam else None, path, "video")
file_fam = detect_video_family(os.path.basename(path))

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 Prefer the remote checkpoint basename for ambiguous Wan weights

The local-file fix leaves the remote case unresolved: with repo_id="someorg/Wan2.2-T2V-A14B-GGUF" and gguf_filename="Wan2.1-T2V-14B-Q4_K_M.gguf", local_pick_file returns None, so this basename override never runs and the earlier repository match classifies the checkpoint as the dual-expert Wan2.2 family, causing an unnecessary partner lookup and load failure. In the reverse arrangement, a named Wan2.2 expert under a Wan2.1 repository can be loaded as a single denoiser and produce invalid output. This remote branch is fresh evidence that the earlier same-layout ambiguity remains; derive the explicit filename family before the local-path guard and let it outrank the container family for these variants.

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.

Fixed in 6ce6aba. _detect_load_family now checks the picked file's own name before the local-path branch: when the repo (or folder) family and the file name family are same-layout variants in SAME_ARCH_VARIANTS, the file name wins, local or remote. someorg/Wan2.2-T2V-A14B-GGUF with Wan2.1-T2V-14B-Q4_K_M.gguf now resolves to wan2.1-t2v-14b, and a Wan2.2-T2V-A14B-HighNoise file under a Wan2.1 repo resolves to wan2.2-t2v-a14b. A file name that names no family keeps the repo's family. Test: test_remote_file_name_outranks_the_repo_for_same_layout_wan, whose two mismatch cases fail on dba1d55.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

# Conflicts:
#	studio/backend/core/inference/video.py

@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: 6ce6aba703

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

Comment on lines +1080 to +1083
if named is not None and named.name != fam.name and (
named.name in SAME_ARCH_VARIANTS.get(fam.name, ())
or fam.name in SAME_ARCH_VARIANTS.get(named.name, ())
):

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 Let explicit Wan filenames override a different model size

For a remote single-file/GGUF pick whose repository names one newly supported Wan2.1 size but whose selected filename names the other, this condition refuses to replace the repository-derived family because 1.3B and 14B are not listed as same-architecture variants. For example, repo_id="org/Wan2.1-T2V-14B-GGUF" with gguf_filename="Wan2.1-T2V-1.3B-Q8_0.gguf" remains classified as 14B; unlike a local file, there is no header pass to correct it, so the loader constructs the transformer with the 14B base config and fails on the 1.3B weights. A filename that explicitly identifies either Wan2.1 size should outrank the container name, not only when the two detected families share an architecture.

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.

Fixed in 71d001e. Confirmed: org/Wan2.1-T2V-14B-GGUF with Wan2.1-T2V-1.3B-Q8_0.gguf stayed on the 14B family because 1.3B and 14B are not same-layout variants, and a remote pick has no header pass to correct it. The picked file name now also outranks the repo when both resolve to the two Wan2.1 T2V sizes, so the file's own size picks the base config. This is kept out of SAME_ARCH_VARIANTS on purpose: the two sizes have different shapes, so for a local file the header still decides. A file naming neither size keeps the repo's family. Covered by test_remote_file_name_naming_the_other_wan21_size_outranks_the_repo (both directions plus a generic name), which fails before the change.

Comment on lines +528 to +530
if wan21_checkpoint:
needle = normalize_family_name(str(wan21_checkpoint))
needles += [needle, "wan2-1-" + re.split(r"[/\\]", needle.rstrip("/\\"))[-1]]

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 Avoid fabricating a Fun marker for generic short filenames

The synthetic prefix is fresh evidence that the earlier fun scoping issue remains when the repository and filename split the family name: a supported T2V pick such as repo_id="someone/Wan2.1-T2V-14B-GGUF" with gguf_filename="fun-style-Q4_K_M.gguf" is transformed into wan2-1-fun-style... and rejected as a Wan-Fun conditioning model. The same checkpoint spelled as one segment (Wan2.1-T2V-14B-fun-style...) is deliberately accepted because fun is too generic unless it identifies a known Fun release, so adding family context should not make every short filename beginning with fun unsupported.

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.

Fixed in 71d001e. Confirmed: fun-style-Q4_K_M.gguf under someone/Wan2.1-T2V-14B-GGUF became wan2-1-fun-style... and was refused as a Fun model, while the one-segment spelling was accepted. When the family context is added, a leading fun now counts as a Fun release only if it names one (a version, a 1.3B / 14B size, InP or Control), so fun-inp-1.3b, fun-14b-control and fun-v1.1-1.3b-inp are still refused and fun-style loads. The I2V / VACE / other markers are still checked on those names, so fun-style-i2v-14b is still refused as I2V. Tests: test_short_file_starting_with_fun_is_not_made_a_fun_release (fails before the change) and new rows in test_unsupported_file_under_a_t2v_repo_is_refused.

# Wan2.1-T2V-14B: same keys as one Wan2.2 A14B expert, run as a single denoiser.
VideoFamily(
name = "wan2.1-t2v-14b",
comfy_flow_shift = 5.0, # reference 14B workflow shift (the 1.3B uses 8); replaces the repo's flow_shift 3.0

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 Use FusionX-specific flow-shift defaults

When the newly recognized FusionX GGUF is loaded, this family-wide value still overwrites its scheduler with shift 5, because the later fusionx defaults row changes only steps and guidance. The publisher's FusionX model card instead says to start at shift 1 for 1024×576 and shift 2 for 1080×720, reserving 3–9 for more stylized results. Thus the default FusionX render uses a materially different noise schedule unless the user knows to override it; resolve the default flow shift from the checkpoint variant and output resolution rather than applying the base 14B value unconditionally.

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.

Keeping the family shift here. The FusionX card only gives T2V starting points for two resolutions, shift 1 at 1024x576 and 2 at 1080x720, then says to go lower for realism and try 3 to 9 for stylized output. Our default render is 832x480, and the card gives no value for that size. Any number we picked for it would be our own extrapolation, not the publisher's guidance. Video families also have no per-variant or per-resolution shift today, so supporting one would mean adding new resolution-dependent scheduler plumbing just for this merge. The FusionX defaults row already applies the parts the card states directly (CFG 1, 8 steps). The shift stays at the reference 14B value, which users can change per render, and the stock 14B / 1.3B defaults are unchanged.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

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: 1db7e9637b

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

Comment thread studio/backend/core/inference/video.py Outdated
Comment on lines +1107 to +1110
named.name in SAME_ARCH_VARIANTS.get(fam.name, ())
or fam.name in SAME_ARCH_VARIANTS.get(named.name, ())
# A remote pick has no header pass, so a file naming the other Wan2.1 size picks the base config.
or {named.name, fam.name} <= _WAN21_T2V_SIZES

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 Honor explicit filenames across all Wan architectures

For a remote single-file pick whose repository names a different Wan architecture, this override only covers same-layout variants or the two Wan2.1 sizes. For example, repo_id="org/Wan2.2-TI2V-5B-GGUF" with gguf_filename="Wan2.1-T2V-1.3B-Q8_0.gguf" remains classified as wan2.2-ti2v-5b; because a remote file has no header pass, the loader then constructs the 3072-wide, 48-input-channel 5B transformer for 1536-wide, 16-channel 1.3B weights and fails after downloading them. Let an explicit Wan checkpoint basename override the container across the other Wan family combinations as well.

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.

Fixed in 500a294. In _resolve_load_family a picked file whose own name names a Wan family now outranks a repo that names a different Wan family, for every Wan pair (this replaces the narrower Wan2.1 size rule). org/Wan2.2-TI2V-5B-GGUF with Wan2.1-T2V-1.3B-Q8_0.gguf now resolves to wan2.1-t2v-1.3b, and the reverse to wan2.2-ti2v-5b. A file name that names no family keeps the repo's, a Wan file inside a non-Wan repo keeps the repo's family, and a local file's header still decides. Cases added to test_remote_file_name_outranks_the_repo_for_same_layout_wan; the two cross-architecture ones fail on 1db7e96.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 500a2946c0

ℹ️ 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 592be14 into main Oct 12, 2026
@danielhanchen
danielhanchen deleted the studio-wan21-t2v branch October 12, 2026 12:29
sbabamohamad added a commit to sbabamohamad/unsloth that referenced this pull request Oct 21, 2026
Adds nvidia/Cosmos3-Nano and nvidia/Cosmos3-Edge to the Video page through diffusers'
Cosmos3OmniPipeline (diffusers >= 0.40.0): text-to-video, and image-to-video from a first
frame, following the layout of the Wan2.1 families (unslothai#13376) and the image-to-video path
of unslothai#13378.

Cosmos3 differs from the other video families in three ways the generic path did not
handle, and each gets the smallest change that fits:

- Its transformer is also its text model, so the pipeline has a tokenizer and no text
  encoder. A family whose bf16 component table prices the text encoder at 0.0 is now read
  as having none: sizing requires only transformer and vae, a cached snapshot without a
  text_encoder/ folder counts as complete, and an explicit text_encoder_quant is refused
  with the reason (relates to unslothai#14000).
- Each card samples with scheduler and call settings that its shipped configs do not hold.
  New VideoFamily fields scheduler_overrides and call_kwargs carry them; a scheduler that
  rejects an override keeps its config.
- The pipeline takes the first frame through its own image= argument and crops it itself
  (i2v_fits_first_frame = False; same pipeline class for both modes).

Fidelity, measured against the plain diffusers pipeline at the cards' settings, seed 0,
with Studio's own encoder on both sides: every frame identical for Nano (189 of 189, four
clips) and Edge (121 of 121, four clips). Three settings were needed to get there and are
set on both rows:
- cudnn.benchmark off: two server processes otherwise rendered one Edge seed 55 dB (t2v)
  and 30 dB (i2v) apart.
- The VAE encoder stays on the stock kernels: Edge image-to-video at the default speed was
  29.5 dB from the card's output through the fused encoder, 51.8 dB with the stock one.
- Cosmos3 decodes untiled when it fits, on every speed tier, with tiled decode as the
  out-of-memory fallback: the stock 16x tiles leave a 4-latent edge tile at 480 / 832 px
  and a faint seam. The seam is recorded as a strict expected failure in the tile-geometry
  test so a fix forces the entry out.

Also in this commit: the local layout check reads a diffusers-library *Tokenizer component
as a model, so Nano's sound_tokenizer/ no longer makes a complete local folder look broken;
the download planner recognises the text_tokenizer/-without-text_encoder/ listing as
Cosmos3's; the Reasoner, Policy, Sim, Transfer and FP8 builds are refused by name with the
repo to load instead; Cosmos3-Super gets no family; the Hub catalog reads Cosmos3 pipelines
as "Video gen"; a renamed local Cosmos3 folder is refused by the trainer instead of falling
to the SDXL path; and the guardrail opt-out is passed through when the cosmos_guardrail
package is absent.

Components are fetched from the nvidia repos: no unsloth-hosted copies exist, both repos
are public and ungated (OpenMDW-1.1), and the allowlist gains the same two lines Wan2.1
has (relates to unslothai#14003). Quantized Cosmos3 checkpoints are a follow-up (unslothai#12851): diffusers
has no single-file converter for Cosmos3OmniTransformer, so a quant needs a hosted source
and a key-map loader.

Tests: family registry and freeze fixtures, component sizing, flow-shift and scheduler
overrides, the i2v class invariant, refusals, local-folder detection, routes, mirrors,
and opt-in GPU checks that render both models and compare against the diffusers output.
danielhanchen added a commit that referenced this pull request Oct 26, 2026
Adds `nvidia/Cosmos3-Nano` and `nvidia/Cosmos3-Edge` as Studio video
families, following #13376 and #13378: text-to-video and image-to-video
through diffusers' `Cosmos3OmniPipeline` (diffusers >= 0.41.0: 0.40.0
resolves a group-offloaded transformer's device as the CPU).

**What's different about Cosmos3**
- Its transformer is also the text model, so the pipeline has a
tokenizer and no text encoder. A family whose bf16 component table
prices the text encoder at 0.0 is now read as having none: sizing needs
only transformer and VAE, a snapshot without `text_encoder/` counts as
complete, and an explicit `text_encoder_quant` is refused with the
reason (relates to #14000).
- Each card samples with scheduler and call settings its shipped configs
don't hold. New `VideoFamily` fields `scheduler_overrides` and
`call_kwargs` carry them.
- The pipeline takes the first frame through its own `image=` and crops
it itself.
- Components come from the nvidia repos: no unsloth-hosted copies exist,
both are public and ungated (OpenMDW-1.1), allowlist gains the same two
lines Wan2.1 has (relates to #14003).

**Fidelity**: Studio output is frame-for-frame identical to the plain
diffusers pipeline for both models (Nano 189/189 frames, Edge 121/121,
four clips each, seed 0). Three settings were needed: `cudnn.benchmark`
off, the VAE encoder on stock kernels, and untiled decode when it fits,
including at speed off and under model / group / streaming offload (the
stock 16x tiles leave a 4-latent edge tile at 480/832 px). When untiled
does not fit, and on CPU / MPS, the tiled decode uses per-canvas strides
that keep every edge tile at 8 or more latents (stock strides wherever
they already do).

**Also in this PR** (separate commits, can be split out; the root-index
prefetch fix moved to #15184)
- The latest-transformers offer in the UI covers the `cosmos3` /
`cosmos3_edge` model types (the `unsloth run` prompt for it is left to a
separate PR).
- Frontend: picker rows, Hub "Video gen" label, page defaults; bundle
budget raised by the bytes the rows add.

**Tests**: backend and frontend suites show no new failures against main
(same failing ids on both trees, all environment-related); typecheck
clean. Real-weight renders were checked against plain diffusers outside
the test suite (Edge on a B200: bit-identical, t2v and i2v; Edge on a
T4: valid fp32 output).

**Not in this PR**: training support, and quantized Cosmos3 checkpoints
(#12851); diffusers has no single-file converter for
`Cosmos3OmniTransformer`, so a quant needs a hosted source and a key-map
loader.

`cosmos_guardrail` is not required: Nano's `model_index.json` enables
the safety checker by default, so the load either passes the opt-out or
refuses with a message naming the package. Edge ships with it off.



**Download and offload**: a Nano download skips `sound_tokenizer/` (1.99
GB, passed as None), a local Nano folder without `sound_tokenizer/` or
`vision_encoder/` validates, and under `low_vram` the VAE goes back to
the CPU after the conditioning encode for both t2v and i2v (real Edge:
VAE on `cuda:0` at every transformer step before, `cpu` after).

## Screenshots

Video page model picker on the merge base (left) and this branch
(right): the branch lists Cosmos3 Edge after the HunyuanVideo rows.

![Video picker before and after: Cosmos3 Edge row
appears](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/14554/pr14554_pair_00-cbaced2e803a.png)

The Hub pair below is harness state, not this PR: the two sides read the
live Hub listing at different times, so the trending rows differ (the
masked shot is otherwise identical). macOS and Windows legs: 41 of 41
steps identical.

<!-- studio-regress:start -->
### Studio UI regression check
Base `c9e5d4ab0` vs head `4aa1f7b91`. Functional: **NO_REGRESSION**, UI
coverage 89%, 1 visual change(s), 0 text-only change(s). Only steps
whose screenshots differ are shown.

**crawl/r_hub**: masks cover 37% of the shot | reproduced on confirm
(VISUAL_DIFF)
Facts: `missing`: {'before': ['button:DeepSeek-V#.#-Flash-#-GGUF',
'button:Model hub', 'button:NVIDIA-Nemotron-#.#-Super-VL-#B-A#B-GGUF',
'button:Qwen#.#-#B-A#B-GGUF', 'button:Search', 'button:Show workflows',
'button:gemma-#-#B-A#B-it-GGUF'], 'after': ['button:Filters',
'button:MiniMax-H#-GGUF',
'button:NVIDIA-Nemotron-#.#-Super-VL-#B-A#B-GGUF', 'button:Show
workflows']}

![crawl/r_hub](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/14554/crawl_r_hub-aa425f260167.png)
<!-- studio-regress:end -->

---------

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.

1 participant