Commit graph

6,884 commits

Author SHA1 Message Date
Daniel Han
e8a407bf6e Load Wan VAE in fp32 via per-component dtype dict; fix A14B 720p preset 2026-07-06 15:29:34 +00:00
Daniel Han
790b41f262 Honor the resolved family default when no identifier names a video variant
default_video_generation_params fell back to a hardcoded LTX 40/4.0 when no identifier matched.
A Wan model loaded from an opaque local path under an explicit family_override (none of
gguf_filename / repo_id / base_repo carrying a wan token) then ran 40/4.0 instead of Wan's 50/5.0.
Add a fallback param and pass the resolved family's own default_steps/default_guidance from both
call sites, so the fallback tracks the actual family.
2026-07-06 14:52:11 +00:00
pre-commit-ci[bot]
cc71be93f2 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-06 12:21:32 +00:00
Daniel Han
2bc6f6879a Wan: fp32 VAE decode, correct bf16-resident DiT sizes, TI2V /32 snap
Verified against diffusers 0.39 source + the HF configs/safetensors headers:
- The Wan VAE decodes in float32 (WanPipeline loads AutoencoderKLWan at torch.float32
  while the pipe runs bf16); the loader cast every component to bf16, degrading every
  clip. Add vae_force_fp32 (both Wan families) and pin pipe.vae back to fp32 after build.
- The Wan transformers ship FP32 on disk (safetensors headers are F32; A14B index =
  57.15 GB per expert = 14.3B x 4, TI2V = 20.0 GB = 5B x 4), so bf16_components_gb held
  the fp32 on-disk sums (114.3 / 20.0) instead of the documented bf16-resident sizes.
  Halve to 57.2 (two A14B experts) and 10.0 (TI2V), so the plan no longer over-budgets
  the DiTs ~2x and forces needless offload on an 80 GB GPU.
- TI2V-5B's VAE is 16x spatial (vae/config.json), so WanPipeline floors H/W to 16*2 = 32.
  Snap TI2V to /32 (was /16) so the recorded size matches the generated clip (a 720
  request was recorded but rendered at 704). A14B keeps /16 (Wan2.1 8x VAE).
2026-07-06 12:20:56 +00:00
Daniel Han
5c249ebada video: use the quantized FBCache threshold when the transformer is quantized
apply_step_cache on the video load path omitted quant_active, so a quantized video
transformer (an engaged dense transformer_quant, or a GGUF checkpoint) that also
enabled First-Block-Cache without an explicit threshold used the dense bf16 threshold
(0.08) instead of the higher quantized threshold (0.12) the cache helper documents as
needed for quantized transformers to trigger. The advertised quant plus FBCache path
therefore cached far less than intended. Thread quant_active through exactly as the
image path (diffusion.py) does: an engaged transformer_quant or a GGUF transformer both
count as quant-active here.
2026-07-06 09:31:10 +00:00
Daniel Han
f796224bf7 Merge remote-tracking branch 'origin/video-tab' into video-wan 2026-07-05 12:11:32 +00:00
Daniel Han
35c1bc2135 Merge remote-tracking branch 'origin/video-inference' into video-tab 2026-07-05 12:11:31 +00:00
Daniel Han
609e0f48ae Merge remote-tracking branch 'origin/diffusion-more-families' into video-inference 2026-07-05 12:11:30 +00:00
Daniel Han
f307131819 Studio: reject transformer-only loads for Ideogram 4 and size local fp8 mirrors
Ideogram 4 assembles two DiTs per-component (a conditional transformer plus a
separate unconditional_transformer), so there is no transformer-only single-file
or GGUF artifact that could supply both. Add a pipeline_only family flag and
reject the gguf/single_file kinds in validate_load_request, before a load evicts
the current model, instead of assembling a pipeline missing its second DiT.

Extend the fp8 bf16-resident size override to a LOCAL directory mirror of the
ideogram-4-fp8 base: such a path never string-matches base_repo, so detect the
fp8 layout from the transformer shard headers (a *.weight_scale marker) and
reserve the bf16 footprint, matching the remote-base behaviour. A local nf4
mirror has no fp8 scales and correctly stays planned against its compressed bytes.
2026-07-05 12:08:45 +00:00
Daniel Han
1d193f58bb Drop the now-redundant second-expert group offload on the A14B load
After the upstream cascade generalised _apply_group_offload to stream every
DiT it finds on the pipe (transformer AND transformer_2), apply_memory_plan's
group tier already block-streams both A14B experts, and model/sequential
offload hook every top-level module. The explicit per-expert pass this branch
added is therefore redundant: on a real group-tier load it re-registers the
group-offload hooks transformer_2 already carries, which diffusers rejects with
a duplicate-hook ValueError. That was swallowed by the helper's try/except and
surfaced as a misleading "second expert stays resident" warning even though the
expert was in fact streamed. Remove the pass and document why MoE needs none.
2026-07-05 12:07:31 +00:00
Daniel Han
c68c9fab9e Merge remote-tracking branch 'origin/video-tab' into video-wan 2026-07-05 11:52:49 +00:00
Daniel Han
3d19b0f137 Merge remote-tracking branch 'origin/video-inference' into video-tab 2026-07-05 11:52:47 +00:00
Daniel Han
9862ccc85a Merge remote-tracking branch 'origin/diffusion-more-families' into video-inference 2026-07-05 11:52:46 +00:00
Daniel Han
e741935626 Merge remote-tracking branch 'origin/diffusion-auto-badges' into diffusion-more-families 2026-07-05 11:52:45 +00:00
Daniel Han
cc23062077 Merge remote-tracking branch 'origin/diffusion-auto-install' into diffusion-auto-badges 2026-07-05 11:52:43 +00:00
Daniel Han
4373ebc13b Merge remote-tracking branch 'origin/diffusion-fp16-accum' into diffusion-auto-install 2026-07-05 11:52:34 +00:00
Daniel Han
6154ecb618 Merge remote-tracking branch 'origin/diffusion-auto-policy' into diffusion-fp16-accum 2026-07-05 11:52:33 +00:00
Daniel Han
23ade68c51 Merge remote-tracking branch 'origin/diffusion-train-perf2' into diffusion-auto-policy 2026-07-05 11:52:32 +00:00
Daniel Han
d6ce610324 Merge remote-tracking branch 'origin/diffusion-krea2' into diffusion-train-perf2 2026-07-05 11:52:30 +00:00
Daniel Han
099357cf40 Merge remote-tracking branch 'origin/diffusion-train-tab-2' into diffusion-krea2 2026-07-05 11:52:29 +00:00
Daniel Han
303d38cf98 Merge remote-tracking branch 'origin/diffusion-train-precision' into diffusion-train-tab-2 2026-07-05 11:52:28 +00:00
Daniel Han
78a6ad3fff Merge remote-tracking branch 'origin/diffusion-train-perf' into diffusion-train-precision 2026-07-05 11:52:27 +00:00
Daniel Han
59bf54e975 Merge remote-tracking branch 'origin/image-generation' into diffusion-train-perf 2026-07-05 11:52:25 +00:00
Daniel Han
e2e10c4ee9 Merge branch 'diffusion-auto-install' of https://github.com/unslothai/unsloth into diffusion-auto-install 2026-07-05 11:48:48 +00:00
Daniel Han
9d3a1d3ff7 Invalidate import caches after a wheel install so the new kernel is importable
A successful on-demand wheel install writes into site-packages after the
import system already cached that directory's listing, so the very next
find_spec / import in the same process can miss the freshly installed
package when the install lands within the directory mtime's resolution.
That silently falls set_attention_backend back to native on first use.
Call importlib.invalidate_caches() after a successful install so the
kernel is picked up immediately, and cover both the success and failure
paths in the attention installer tests.
2026-07-05 11:48:34 +00:00
pre-commit-ci[bot]
e998f73e93 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:48:31 +00:00
pre-commit-ci[bot]
715a18824b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:47:57 +00:00
pre-commit-ci[bot]
225b899587 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:47:22 +00:00
pre-commit-ci[bot]
31f04c026e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:46:48 +00:00
pre-commit-ci[bot]
995ce8ac5f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:46:16 +00:00
pre-commit-ci[bot]
d398978349 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:45:40 +00:00
pre-commit-ci[bot]
1d4cf1d6aa [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:45:05 +00:00
pre-commit-ci[bot]
a45b4b2ec3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:44:30 +00:00
pre-commit-ci[bot]
83bc33d04a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:43:58 +00:00
pre-commit-ci[bot]
293b770c78 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:43:23 +00:00
pre-commit-ci[bot]
9caab52bfd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:42:50 +00:00
pre-commit-ci[bot]
1a72a06b1d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:42:17 +00:00
pre-commit-ci[bot]
d6703962d3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:41:43 +00:00
pre-commit-ci[bot]
e800675128 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-07-05 11:40:35 +00:00
Daniel Han
1e2ee60dd4 Merge branch 'video-tab' into video-wan 2026-07-05 11:39:49 +00:00
Daniel Han
cbfb1388f7 Merge branch 'video-inference' into video-tab 2026-07-05 11:39:47 +00:00
Daniel Han
84bbc9d5a5 Merge branch 'diffusion-more-families' into video-inference 2026-07-05 11:39:46 +00:00
Daniel Han
2e3bd9b393 Merge branch 'diffusion-auto-badges' into diffusion-more-families 2026-07-05 11:39:35 +00:00
Daniel Han
af76745353 Merge branch 'diffusion-auto-install' into diffusion-auto-badges 2026-07-05 11:39:34 +00:00
Daniel Han
3c4dd8d118 Merge branch 'diffusion-fp16-accum' into diffusion-auto-install 2026-07-05 11:39:32 +00:00
Daniel Han
ac90e6cdab Merge branch 'diffusion-auto-policy' into diffusion-fp16-accum 2026-07-05 11:39:31 +00:00
Daniel Han
a20049bfc0 Merge branch 'diffusion-train-perf2' into diffusion-auto-policy 2026-07-05 11:39:30 +00:00
Daniel Han
66387c1533 Merge branch 'diffusion-krea2' into diffusion-train-perf2 2026-07-05 11:39:16 +00:00
Daniel Han
f543af6d27 Merge branch 'diffusion-train-tab-2' into diffusion-krea2 2026-07-05 11:39:15 +00:00
Daniel Han
5979d68a03 Merge branch 'diffusion-train-precision' into diffusion-train-tab-2 2026-07-05 11:39:14 +00:00