Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: per-family diffusion tables move into the family registries (#13536)

Daniel Hane227a5321b5f
diff --git a/studio/backend/core/inference/diffusion.py b/studio/backend/core/inference/diffusion.py
index be9fedbae43..ede7912097b 100644
--- a/studio/backend/core/inference/diffusion.py
+++ b/studio/backend/core/inference/diffusion.py
@@ -809,60 +809,12 @@ def _layered_canvas(family: Any, size: tuple[int, int]) -> tuple[int, int]:
return max(32, int(round(width / 32)) * 32), max(32, int(round(height / 32)) * 32)
-# Official non-unsloth pipeline bases: safetensors-only, no remote code, exact lowercased match
-_TRUSTED_NON_GGUF_REPOS = frozenset(
- {
- "stabilityai/stable-diffusion-xl-base-1.0",
- "stabilityai/sdxl-turbo",
- # Vendor safetensors-only bases: LoRA training bases + the BF16 artifact per group. FLUX.1 is Hub-gated;
- # Qwen/Z-Image open.
- "black-forest-labs/flux.1-dev",
- "black-forest-labs/flux.1-schnell",
- "black-forest-labs/flux.1-kontext-dev",
- # Krea: guidance-distilled FLUX.1-dev finetune, same arch and gating; detected via "flux.1"
- "black-forest-labs/flux.1-krea-dev",
- # FLUX.2 LoRA training bases (dev gated, klein-4B open); reloaded as a pipeline by "Deploy to Create".
- "black-forest-labs/flux.2-dev",
- "black-forest-labs/flux.2-klein-4b",
- # The other klein sizes and variants. One family covers both sizes and defaults to 4B, on the understanding
- # that the real base comes from the base_model card tag. Leaving these out made that tag untrusted, so a
- # klein-9B GGUF silently resolved to the 4B config and died in the GGUF quantizer with a bare shape mismatch.
- "black-forest-labs/flux.2-klein-9b",
- "black-forest-labs/flux.2-klein-base-4b",
- "black-forest-labs/flux.2-klein-base-9b",
- "tongyi-mai/z-image-turbo",
- # The undistilled Z-Image: the base the upstream DreamBooth recipe trains on, and the base_model tag of
- # unsloth/Z-Image-GGUF. Leaving it out made that tag untrusted, so the GGUF fell back to the Turbo companions
- # and denoised on its shift 3.0 scheduler.
- "tongyi-mai/z-image",
- "qwen/qwen-image",
- "qwen/qwen-image-2512",
- "qwen/qwen-image-edit-2511",
- "qwen/qwen-image-layered",
- # Qwen-Image-2.1: the family's own base_repo, and a family whose base is not listed here is
- # not a family at all. Detection resolves it, the version gate passes once the pinned main
- # build is in, and then validate_load_request refuses it as a non-unsloth repo before the
- # pipeline is ever built.
- "qwen/qwen-image-2.1",
- "qwen/qwen-image-2.1-turbo",
- # Krea 2: assembled per-component. Turbo = inference; Raw = the LoRA training base.
- "krea/krea-2-turbo",
- "krea/krea-2-raw",
- # Lumina Image 2.0: standard diffusers layout, generic from_pretrained path.
- "alpha-vllm/lumina-image-2.0",
- # HunyuanImage 2.1: open community diffusers mirror, safetensors-only.
- "hunyuanvideo-community/hunyuanimage-2.1-diffusers",
- # HiDream-I1: open MIT weights, all three variants one family; Llama TE from the unsloth mirror.
- "hidream-ai/hidream-i1-full",
- "hidream-ai/hidream-i1-dev",
- "hidream-ai/hidream-i1-fast",
- # Ideogram 4: no bf16 ships. -fp8 stores both DiTs as raw float8 (the family base); both nf4 repos are
- # identical.
- "ideogram-ai/ideogram-4-fp8",
- "ideogram-ai/ideogram-4-nf4",
- "ideogram-ai/ideogram-4-nf4-diffusers",
- }
-)
+# Official non-unsloth bases allowed to load as full (non-GGUF) artifacts: safetensors-only, no remote code, exact
+# lowercased match. Derived from the registry rows (base_repo, variant / training bases, FamilyProfile.trusted_repos).
+from .diffusion_families import _FAMILIES as _IMAGE_REGISTRY # noqa: E402
+from .family_profile import trusted_repo_ids as _trusted_repo_ids # noqa: E402
+
+_TRUSTED_NON_GGUF_REPOS = _trusted_repo_ids(_IMAGE_REGISTRY)
def _is_trusted_diffusion_repo(repo_id: str) -> bool:
diff --git a/studio/backend/core/inference/diffusion_autoopt/apply.py b/studio/backend/core/inference/diffusion_autoopt/apply.py
index 23c64d06b4e..b5e9535833e 100644
--- a/studio/backend/core/inference/diffusion_autoopt/apply.py
+++ b/studio/backend/core/inference/diffusion_autoopt/apply.py
@@ -121,12 +121,17 @@ class FamilyHook:
backends: tuple[str, ...] = ("video",)
-def _is_ltx(family: Any) -> bool:
- try:
- from ..video_families import LTX_FAMILIES # noqa: PLC0415
- except Exception: # noqa: BLE001
- return False
- return getattr(family, "name", None) in LTX_FAMILIES
+def _profile_flag(attr: str) -> Callable[[Any], bool]:
+ """Gate a hook on a ``FamilyProfile`` flag (registry data), so a new family opts in by data."""
+
+ def applies(family: Any) -> bool:
+ try:
+ from ..family_profile import profile_for # noqa: PLC0415
+ except Exception: # noqa: BLE001
+ return False
+ return bool(getattr(profile_for(family), attr, False))
+
+ return applies
def _ltx_static_pre(view: Any, family: Any) -> None:
@@ -157,8 +162,8 @@ def _cudnn_off_post(view: Any, family: Any, applied: dict, logger: Any) -> Optio
FAMILY_HOOKS: list[FamilyHook] = [
- FamilyHook("ltx_static_compile", _is_ltx, pre = _ltx_static_pre),
- FamilyHook("ltx_stg_compile_adapter", _is_ltx, post = _ltx_stg_post),
+ FamilyHook("ltx_static_compile", _profile_flag("compile_static"), pre = _ltx_static_pre),
+ FamilyHook("ltx_stg_compile_adapter", _profile_flag("stg_compile_adapter"), post = _ltx_stg_post),
FamilyHook(
"cudnn_benchmark_off",
lambda fam: not getattr(fam, "cudnn_benchmark", True),
diff --git a/studio/backend/core/inference/diffusion_cache.py b/studio/backend/core/inference/diffusion_cache.py
index e7797fa59ed..e1e83d58350 100644
--- a/studio/backend/core/inference/diffusion_cache.py
+++ b/studio/backend/core/inference/diffusion_cache.py
@@ -50,18 +50,18 @@ _TIER_MAX = "max"
# Per-model interval on each tier ("default" also covers max), measured vs the no-skip render (PR #12652): default
# needs mean LPIPS <= 0.05, max <= 0.10. "steps" = the step count it was measured at: fewer steps compute every step.
# Keyed by the UPSTREAM repo id so distilled / unmeasured siblings never match.
-AUTO_STATIC_SKIP: dict = {
- "qwen/qwen-image-2.1": {"default": 3, "max": 3, "steps": 25},
- "qwen/qwen-image": {"default": 2, "max": 3, "steps": 20},
- "black-forest-labs/flux.1-krea-dev": {"default": 2, "max": 3, "steps": 28},
- "black-forest-labs/flux.2-klein-base-4b": {"default": 2, "max": 3, "steps": 50},
- "wan-ai/wan2.2-ti2v-5b-diffusers": {"default": 2, "max": 3, "steps": 50},
- # every 2 is 0.29 LPIPS on a dense-texture prompt, so max only.
- "black-forest-labs/flux.1-dev": {"max": 3, "steps": 28},
- "hunyuanvideo-community/hunyuanimage-2.1-diffusers": {"max": 2, "steps": 50},
- "hunyuanvideo-community/hunyuanvideo-1.5-diffusers-480p_t2v": {"max": 2, "steps": 50},
- "minimaxai/minimax-h3": {"max": 2, "steps": 30},
-}
+# The rows are ``FamilyProfile.auto_static_skip`` on the registry; the registries are torch-free, so this stays light.
+def _auto_static_skip_table() -> dict:
+ from .family_profile import profile_table
+
+ return {
+ repo.strip().lower(): dict(entry)
+ for rows in profile_table("auto_static_skip").values()
+ for repo, entry in rows
+ }
+
+
+AUTO_STATIC_SKIP: dict = _auto_static_skip_table()
# Load gate on the model's default steps (keeps distilled siblings out); explicit "static" keeps STATIC_MIN_STEPS (12).
AUTO_STATIC_MIN_STEPS = 20
diff --git a/studio/backend/core/inference/diffusion_content.py b/studio/backend/core/inference/diffusion_content.py
index 761355b9c1e..892c848cb49 100644
--- a/studio/backend/core/inference/diffusion_content.py
+++ b/studio/backend/core/inference/diffusion_content.py
@@ -43,19 +43,14 @@ SAME_ARCH_VARIANTS: dict[str, frozenset[str]] = {
"wan2.2-t2v-a14b": frozenset({"wan2.2-t2v-a14b", "wan2.1-t2v-14b"}),
}
-_VIDEO_FAMILIES = frozenset(
- {
- "ltx-2",
- "ltx-2.5",
- "wan2.2-ti2v-5b",
- "wan2.2-t2v-a14b",
- "wan2.1-t2v-1.3b",
- "wan2.1-t2v-14b",
- "hunyuanvideo-1.5",
- "hunyuanvideo-1.5-720p",
- "minimax-h3",
- }
-)
+def _video_family_names() -> frozenset[str]:
+ from .video_families import _FAMILIES
+
+ return frozenset(fam.name for fam in _FAMILIES)
+
+
+# Every video registry name; the registries are torch-free.
+_VIDEO_FAMILIES = _video_family_names()
_MAX_SAFETENSORS_HEADER = 128 * 1024 * 1024
_MAX_GGUF_TENSORS = 1 << 20
diff --git a/studio/backend/core/inference/diffusion_families.py b/studio/backend/core/inference/diffusion_families.py
index 92b8c5afd81..9caa2817351 100644
--- a/studio/backend/core/inference/diffusion_families.py
+++ b/studio/backend/core/inference/diffusion_families.py
@@ -29,6 +29,7 @@ from .family_name_match import (
token_length,
)
from .diffusion_nvfp4_flag import nvfp4_blocked
+from .family_profile import AutoPrefer, ConvRotSpec, FamilyProfile
# Runtime->route contract: the /images/generate route matches these messages EXACTLY for a 409 (vs a 500), so both
@@ -151,7 +152,9 @@ class DiffusionFamily:
supports_torch_compile: bool = True
# False keeps cudnn.benchmark off (as VideoFamily.cudnn_benchmark): its per-process conv pick changes pixels.
cudnn_benchmark: bool = True
- # (major, minor) archs on which the compile pins inductor's reduction-config filter; empty = inductor's pick.
+ # Pin inductor's reduction-config filter on every arch (``filter_reduction_configs``) or only on the listed (major,
+ # minor) archs (``filter_reduction_configs_archs``); both unset = inductor's pick. Same two fields on VideoFamily.
+ filter_reduction_configs: bool = False
filter_reduction_configs_archs: tuple[tuple[int, int], ...] = field(default_factory = tuple)
# Optional pre-quantized transformer checkpoints as (scheme, repo_id): fetched instead of the dense bf16 (lower
# load VRAM + download).
@@ -221,6 +224,11 @@ class DiffusionFamily:
# the adapter on the matching 4-step checkpoint, so its 4B and 9B variants cannot share the single family-wide
# deploy_base_repo above.
deploy_base_repos: tuple[tuple[str, str], ...] = field(default_factory = tuple)
+ # Display label (Train UI); None = the family name.
+ label: Optional[str] = None
+ # Per-family policy data (quant excludes / ConvRot / denies, TE int8 schedule, preview, step skip, trusted
+ # repos); see family_profile.FamilyProfile.
+ profile: FamilyProfile = field(default_factory = FamilyProfile)
def deploy_base_for(self, trained_base: str) -> str:
"""The inference checkpoint paired with ``trained_base``, or the input unchanged."""
@@ -235,11 +243,64 @@ class DiffusionFamily:
# near-tied norm-reduction configs, benchmarked per process, sum in different orders. B200 measured deterministic.
_REDUCTION_RACE_ARCHS: tuple[tuple[int, int], ...] = ((8, 0), (8, 9), (12, 0))
+# --- Shared FamilyProfile data (see family_profile.FamilyProfile) ---
+
+# int8 PER-FAMILY exclusions, on top of diffusion_transformer_quant._INT8_EXCLUDE_NAME_TOKENS. Qwen-Image MMDiT runs
+# every TEXT-stream Linear at M = actual prompt tokens (unpadded, unlike FLUX's 512-token T5), so a short prompt falls
+# under _int_mm's M floor of 16 and the denoise crashes. bf16 there costs ~nothing. Baked into the published int8
+# artifacts of qwen-image / qwen-image-edit, so it moves only with a rebuild and republish.
+_QWENIMAGE_INT8_EXCLUDES = (
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp",
+)
+# Families whose activation ranges break specific schemes at the MODEL level (the smoke probe only proves the GEMM
+# runs). Measured with the 28-pair prequant accuracy gate on B200: qwen-image + mxfp8 does semantic damage at 1024px,
+# + nvfp4 is unusable (LPIPS 0.51). Neither has a known fix, so both stay denied and auto falls through to int8
+# (excellent on Qwen). The deny also applies to an EXPLICIT request.
+# fp8 was denied here too, for black frames. That cause is gone: it was torchao's fp8 scale chooser having no eps
+# clamp, so qwen's all-zero text rows gave scale 0 and NaN, and ``_make_quant_config`` now floors it with
+# ``activation_value_lb``. Re-measured on B200 with the floor, and BOTH paths the deny governs clear the 0.10 LPIPS
+# bar: prequant checkpoint, full 28-pair gate -> 28/28 PASS (SSIM 0.87-0.99, LPIPS 0.027-0.228, CLIP delta <= 0.019);
+# on-the-fly quantize_, gate's simple_object prompt at its own seeds -> LPIPS 0.048 / 0.033 / 0.027 / 0.063, against
+# pre-floor plain fp8 at LPIPS 0.712 with SSIM 0.016 and mean luma 0. Keeping the deny cost real speed: it pinned qwen
+# to int8 at 1.10x bf16 when compiled fp8 measures 1.21x.
+_QWENIMAGE_SCHEME_DENY = frozenset({"mxfp8", "nvfp4"})
+# Schemes denied for TRAINING on top of the inference deny. Training holds a stricter bar because the evidence above is
+# rendering evidence: it says a frozen fp8 forward reconstructs the bf16 image, not that a LoRA converges when its
+# frozen linears are fp8. Nobody has run that, so qwen fp8 stays out of the Train UI until someone does. Delete the
+# entry once a training run is measured.
+_QWENIMAGE_TRAIN_SCHEME_DENY = frozenset({"fp8"})
+# Text-encoder int8 keep-bf16 schedule (skip_first, skip_last) from measured hidden-state fidelity: qwen-image
+# (Qwen2.5-VL-7B) first+last 6 gives ~0.997 cosine; flux.2-dev (Mistral-Small-24B) first 3 gives ~0.98 (early-layer
+# seeding). A family without one has no schedule clearing the bar, so int8 falls back to fp8.
+_QWENIMAGE_TE_INT8_SKIP = (6, 6)
+# Gated NVFP4 auto head (int8 first; nvfp4 only with a passing gate record for this base and device).
+_GATED_AUTO_PREFER = AutoPrefer(floor = (10, 0), schemes = ("int8", "fp8", "nvfp4", "mxfp8"), gated = True)
+# AUTO keeps bf16 while it fits for these (measured with both sides compiled: INT8 was at most ~5% faster and failed
+# the default-on LPIPS bar); when bf16 would offload, INT8 is still picked.
+_LUMINA2_BF16_WHEN_RESIDENT = "INT8 is no faster than compiled bf16 on a card that holds bf16 and changes image detail"
+_HIDREAM_BF16_WHEN_RESIDENT = "INT8 is barely faster than compiled bf16 on a card that holds bf16 and changes image detail"
+
# Keyed by architecture, not per variant: the base repo is read from the HF base_model tag at load time, so one entry
# covers Turbo/full, schnell/dev.
_FAMILIES: tuple[DiffusionFamily, ...] = (
DiffusionFamily(
name = "flux.1",
+ label = "FLUX.1-dev",
+ profile = FamilyProfile(
+ auto_prefer = _GATED_AUTO_PREFER,
+ preview_factors = "flux1",
+ # Auto static step skip, measured vs the no-skip render (PR #12652); dev: every 2 is 0.29 LPIPS on a
+ # dense-texture prompt, so max only.
+ auto_static_skip = (
+ ("black-forest-labs/flux.1-krea-dev", (("default", 2), ("max", 3), ("steps", 28))),
+ ("black-forest-labs/flux.1-dev", (("max", 3), ("steps", 28))),
+ ),
+ ),
checkpoint_variants = ("flux1-schnell", "flux1-krea-dev", "flux1-dev"),
filter_reduction_configs_archs = _REDUCTION_RACE_ARCHS,
cudnn_benchmark = False,
@@ -293,6 +354,13 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# flux match.
DiffusionFamily(
name = "flux.2-klein",
+ label = "FLUX.2 Klein",
+ profile = FamilyProfile(
+ preview_factors = "flux2",
+ auto_static_skip = (
+ ("black-forest-labs/flux.2-klein-base-4b", (("default", 2), ("max", 3), ("steps", 50))),
+ ),
+ ),
pipeline_class = "Flux2KleinPipeline",
uses_negative_prompt = False,
transformer_class = "Flux2Transformer2DModel",
@@ -346,6 +414,8 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# unsloth/FLUX.2-VAE.
DiffusionFamily(
name = "flux.2-dev",
+ label = "FLUX.2-dev",
+ profile = FamilyProfile(te_int8_skip = (3, 0), preview_factors = "flux2"),
pipeline_class = "Flux2Pipeline",
uses_negative_prompt = False,
transformer_class = "Flux2Transformer2DModel",
@@ -373,6 +443,7 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# FLUX instruction editing: FluxKontextPipeline takes an image + instruction. Specific aliases first so
# detect_family prefers this over "flux.1".
name = "flux.1-kontext",
+ profile = FamilyProfile(preview_factors = "flux1"),
filter_reduction_configs_archs = _REDUCTION_RACE_ARCHS,
comfy_flow_shift = flux_mu_shift(
1.15
@@ -394,6 +465,14 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# Qwen instruction editing: the 2511 checkpoint ships as QwenImageEditPlusPipeline. Specific aliases first so
# detect_family prefers this over "qwen-image".
name = "qwen-image-edit",
+ # Same DiT class + unpadded text stream as qwen-image.
+ profile = FamilyProfile(
+ int8_exclude_tokens = _QWENIMAGE_INT8_EXCLUDES,
+ scheme_deny = _QWENIMAGE_SCHEME_DENY,
+ train_scheme_deny = _QWENIMAGE_TRAIN_SCHEME_DENY,
+ te_int8_skip = _QWENIMAGE_TE_INT8_SKIP,
+ preview_factors = "qwen_image",
+ ),
filter_reduction_configs_archs = _REDUCTION_RACE_ARCHS,
comfy_flow_shift = 3.1, # ComfyUI ModelSamplingAuraFlow 3.1 (Qwen-Image-Edit 2511 template)
comfy_flow_shift_variants = (
@@ -439,6 +518,12 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# qwen-image's DiT plus use_additional_t_cond / use_layer3d_rope (read from the base config for a GGUF) and an
# RGBA VAE. Listed before qwen-image so the name outranks it.
name = "qwen-image-layered",
+ # Same DiT class + unpadded text stream as qwen-image.
+ profile = FamilyProfile(
+ int8_exclude_tokens = _QWENIMAGE_INT8_EXCLUDES,
+ scheme_deny = _QWENIMAGE_SCHEME_DENY,
+ te_int8_skip = _QWENIMAGE_TE_INT8_SKIP,
+ ),
filter_reduction_configs_archs = _REDUCTION_RACE_ARCHS,
# ComfyUI's Image to Layers template: ModelSamplingAuraFlow 1, 2 layers, the input scaled to 640.
comfy_flow_shift = 1.0,
@@ -471,6 +556,16 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
),
DiffusionFamily(
name = "qwen-image",
+ label = "Qwen-Image",
+ profile = FamilyProfile(
+ int8_exclude_tokens = _QWENIMAGE_INT8_EXCLUDES,
+ scheme_deny = _QWENIMAGE_SCHEME_DENY,
+ train_scheme_deny = _QWENIMAGE_TRAIN_SCHEME_DENY,
+ auto_prefer = _GATED_AUTO_PREFER,
+ te_int8_skip = _QWENIMAGE_TE_INT8_SKIP,
+ preview_factors = "qwen_image",
+ auto_static_skip = (("qwen/qwen-image", (("default", 2), ("max", 3), ("steps", 20))),),
+ ),
filter_reduction_configs_archs = _REDUCTION_RACE_ARCHS,
comfy_flow_shift = 3.1, # ComfyUI ModelSamplingAuraFlow 3.1 (Qwen-Image templates)
pipeline_class = "QwenImagePipeline",
@@ -525,6 +620,34 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# qwen-image entry would hand it that family's pipeline, transformer, VAE and exclusion
# rules, none of which fit.
name = "qwen-image-2.1",
+ profile = FamilyProfile(
+ # 2.1 is a 32-block SINGLE-stream DiT: no add_* projections, no txt_mlp, so the 20B MMDiT's exclusion list
+ # does not apply and this one was measured rather than inherited. ``txt_in`` is here as a QUALITY lever,
+ # not the small-M crash guard it is on qwen-image: all four policy arms rendered a deliberately 2-token
+ # prompt without tripping ``_int_mm``'s M floor, so nothing crashes either way. Excluding it scored LPIPS
+ # 0.0642 against 0.1032 with the generic tokens alone, paired over 16 calibration prompts, -0.0390 CI95
+ # [-0.0708, -0.0072], better on 14/16.
+ int8_exclude_tokens = ("txt_in",),
+ int8_convrot = ConvRotSpec(
+ group = 256,
+ suffixes = (
+ "attn.to_q",
+ "attn.to_k",
+ "attn.to_v",
+ "attn.to_out.0",
+ "img_mlp.gate_layer",
+ "img_mlp.proj",
+ "img_mlp.out",
+ ),
+ filename = "Qwen-Image-2.1-INT8-ConvRot.safetensors",
+ repo = "unsloth/Qwen-Image-2.1-FP8",
+ variant_repos = ("unsloth/Qwen-Image-2.1-Turbo-FP8",),
+ default_on = True,
+ ),
+ auto_prefer = _GATED_AUTO_PREFER,
+ preview_factors = "qwen_image_21",
+ auto_static_skip = (("qwen/qwen-image-2.1", (("default", 3), ("max", 3), ("steps", 25))),),
+ ),
# ComfyUI QwenImage21: ModelSamplingFlux fixed mu 0.69, no terminal stretch.
comfy_flow_shift = flux_mu_shift(0.69),
pipeline_class = "QwenImage21Pipeline",
@@ -631,6 +754,28 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
),
DiffusionFamily(
name = "z-image",
+ label = "Z-Image",
+ profile = FamilyProfile(
+ # exactly the Linears the hosted INT8 checkpoint quantizes (all input axes 256-divisible)
+ int8_convrot = ConvRotSpec(
+ group = 256,
+ suffixes = (
+ "attention.to_q",
+ "attention.to_k",
+ "attention.to_v",
+ "attention.to_out.0",
+ "feed_forward.w1",
+ "feed_forward.w2",
+ "feed_forward.w3",
+ "cap_embedder.1",
+ ),
+ filename = "Z-Image-Turbo-INT8-ConvRot.safetensors",
+ repo = "unsloth/Z-Image-Turbo-FP8",
+ default_on = True,
+ ),
+ auto_prefer = _GATED_AUTO_PREFER,
+ preview_factors = "zimage",
+ ),
filter_reduction_configs_archs = _REDUCTION_RACE_ARCHS,
cudnn_benchmark = False,
comfy_flow_shift = 3.0, # ComfyUI shift 3 for Turbo and base (Turbo already ships 3.0)
@@ -677,6 +822,7 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
),
DiffusionFamily(
name = "krea-2",
+ label = "Krea 2",
pipeline_class = "Krea2Pipeline",
transformer_class = "Krea2Transformer2DModel",
base_repo = "krea/Krea-2-Turbo",
@@ -701,6 +847,7 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# from_pretrained path loads it. NOT aliased to bare "lumina": Lumina-Next checkpoints are a different arch.
DiffusionFamily(
name = "lumina-2",
+ profile = FamilyProfile(auto_bf16_when_resident = _LUMINA2_BF16_WHEN_RESIDENT),
pipeline_class = "Lumina2Pipeline",
transformer_class = "Lumina2Transformer2DModel",
base_repo = "Alpha-VLLM/Lumina-Image-2.0",
@@ -721,6 +868,11 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# covers Full/Dev/Fast.
DiffusionFamily(
name = "hunyuanimage-2.1",
+ profile = FamilyProfile(
+ auto_static_skip = (
+ ("hunyuanvideo-community/hunyuanimage-2.1-diffusers", (("max", 2), ("steps", 50))),
+ ),
+ ),
# hosted checkpoints, verified bit-identical to on-the-fly quantize (the guider pipeline is not run-to-run
# deterministic, so same-seed LPIPS mixes trajectory divergence with harness noise)
prequant_repos = (
@@ -744,6 +896,10 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
),
DiffusionFamily(
name = "hidream-i1",
+ profile = FamilyProfile(
+ auto_bf16_when_resident = _HIDREAM_BF16_WHEN_RESIDENT,
+ trusted_repos = ("hidream-ai/hidream-i1-dev", "hidream-ai/hidream-i1-fast"),
+ ),
# Hosted checkpoints: 28/28 per-case gate pairs per scheme (LPIPS 0.291 int8 / 0.278 fp8); int8 bit-identical
# to on-the-fly quantize.
prequant_repos = (
@@ -767,6 +923,9 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# encoder
DiffusionFamily(
name = "ideogram-4",
+ profile = FamilyProfile(
+ trusted_repos = ("ideogram-ai/ideogram-4-nf4", "ideogram-ai/ideogram-4-nf4-diffusers"),
+ ),
pipeline_class = "Ideogram4Pipeline",
uses_negative_prompt = False,
transformer_class = "Ideogram4Transformer2DModel",
@@ -779,6 +938,8 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
# pipeline. img2img / inpaint / ControlNet are the standard SDXL pipelines. No GGUF path.
DiffusionFamily(
name = "sdxl",
+ label = "SDXL",
+ profile = FamilyProfile(preview_factors = "sdxl"),
# ~1.8% slower warm, but compiled-UNet renders then match across servers (ComfyUI's default)
cudnn_benchmark = False,
pipeline_class = "StableDiffusionXLPipeline",
diff --git a/studio/backend/core/inference/diffusion_precision.py b/studio/backend/core/inference/diffusion_precision.py
index 157616e40bf..7bf92b2333e 100644
--- a/studio/backend/core/inference/diffusion_precision.py
+++ b/studio/backend/core/inference/diffusion_precision.py
@@ -40,6 +40,7 @@ from functools import lru_cache
from core._torchao_stub import is_stubbed, torch_is_rocm
from .diffusion_nvfp4_flag import nvfp4_blocked, nvfp4_disabled_message
+from .family_profile import profile_table as _profile_table
TE_QUANT_FP8 = "fp8"
TE_QUANT_NVFP4 = "nvfp4"
@@ -53,15 +54,9 @@ _TE_TORCHAO_MODES = frozenset({TE_QUANT_INT8, TE_QUANT_FP8_DYNAMIC, TE_QUANT_NVF
_TEXT_ENCODER_ATTRS = ("text_encoder", "text_encoder_2", "text_encoder_3")
# int8 degrades on large text encoders unless the quant-sensitive decoder blocks stay bf16. Per-family (skip_first,
-# skip_last) blocks to keep dense, from measured hidden-state fidelity; absent families have no schedule clearing the
-# bar, so int8 falls back to fp8. qwen-image (Qwen2.5-VL-7B): first+last 6 gives ~0.997 cosine; flux.2-dev
-# (Mistral-Small-24B): first 3 gives ~0.98 (early-layer seeding).
-_TE_INT8_SKIP: dict[str, tuple[int, int]] = {
- "qwen-image": (6, 6),
- "qwen-image-edit": (6, 6),
- "qwen-image-layered": (6, 6),
- "flux.2-dev": (3, 0),
-}
+# skip_last) blocks to keep dense (``FamilyProfile.te_int8_skip``, measured hidden-state fidelity); absent families
+# have no schedule clearing the bar, so int8 falls back to fp8.
+_TE_INT8_SKIP: dict[str, tuple[int, int]] = _profile_table("te_int8_skip")
def normalize_te_quant(value: Optional[str]) -> Optional[str]:
diff --git a/studio/backend/core/inference/diffusion_preview_factors.py b/studio/backend/core/inference/diffusion_preview_factors.py
index 9f79a0ef454..72ddc502e03 100644
--- a/studio/backend/core/inference/diffusion_preview_factors.py
+++ b/studio/backend/core/inference/diffusion_preview_factors.py
@@ -6,24 +6,10 @@
Each map was fitted by least squares from the final denoised latent of real renders to the same renders' VAE
decode, box-averaged onto the latent grid. Families without an entry get no preview."""
-# family name or alias (lower case) -> map key
-FAMILY_FACTORS = {
- "flux.1": "flux1",
- "flux.1-kontext": "flux1",
- "flux.2-klein": "flux2",
- "flux.2-dev": "flux2",
- "qwen-image": "qwen_image",
- "qwen-image-edit": "qwen_image",
- "qwen-image-2.1": "qwen_image_21",
- "z-image": "zimage",
- "sdxl": "sdxl",
- "wan2.2-ti2v-5b": "wan22_5b",
- "hunyuanvideo-1.5": "hv15",
- "hunyuanvideo-1.5-720p": "hv15",
- "ltx-2": "ltx2",
- # 2.5 keeps the 2.3 conv VAE encoder (byte-identical weights), so the same latent space.
- "ltx-2.5": "ltx2",
-}
+# family name (lower case) -> map key: ``FamilyProfile.preview_factors`` on the registry rows (not generated).
+from .family_profile import profile_table as _profile_table # noqa: E402
+
+FAMILY_FACTORS = _profile_table("preview_factors")
FACTORS: dict = {
"flux1": {
diff --git a/studio/backend/core/inference/diffusion_transformer_quant.py b/studio/backend/core/inference/diffusion_transformer_quant.py
index b6791430dca..65771830a39 100644
--- a/studio/backend/core/inference/diffusion_transformer_quant.py
+++ b/studio/backend/core/inference/diffusion_transformer_quant.py
@@ -26,7 +26,6 @@ import os as _os
import re as _re
import sys as _sys
import threading as _threading
-from dataclasses import dataclass
from typing import Any, Callable, Optional
# stdlib-only module (no torch), so this stays inside the "imported lazily" promise above.
@@ -39,6 +38,8 @@ from .diffusion_nvfp4_flag import (
without_nvfp4,
)
from .diffusion_torchao_patches import install_torchao_int_mm_patch
+from .family_profile import AutoPrefer as _AutoPrefer
+from .family_profile import profile_table as _profile_table
# Also runs in the spawned smoke-probe child, which imports this module and nothing else of the backend.
install_torchao_int_mm_patch()
@@ -81,92 +82,24 @@ _INT8_EXCLUDE_NAME_TOKENS = (
)
-# int8 PER-FAMILY exclusions, on top of _INT8_EXCLUDE_NAME_TOKENS. Qwen-Image MMDiT runs every TEXT-stream Linear at M
-# = actual prompt tokens (unpadded, unlike FLUX's 512-token T5), so a short prompt falls under _int_mm's M floor of 16
-# and the denoise crashes. bf16 there costs ~nothing.
-_QWENIMAGE_INT8_EXCLUDES = (
- "txt_in",
- "add_q_proj",
- "add_k_proj",
- "add_v_proj",
- "to_add_out",
- "txt_mlp",
+# int8 PER-FAMILY exclusions, on top of _INT8_EXCLUDE_NAME_TOKENS: ``FamilyProfile.int8_exclude_tokens`` on the
+# registry rows (small-M text / audio streams, measured quality levers; the reasons sit next to the data). Baked into
+# published int8 artifacts and validated at load, so tests/test_diffusion_family_data_freeze.py pins every value.
+_INT8_FAMILY_EXCLUDE_NAME_TOKENS: dict[str, tuple[str, ...]] = _profile_table(
+ "int8_exclude_tokens", quant = True
)
-# HunyuanVideo-1.5's attention trim shrinks the text / image streams from their padded lengths to the VALID token
-# counts, so every text-stream Linear runs at a tiny M the int8 dynamic path cannot handle. Both failures measured on
-# B200. M = 0 (t2v byt5 / image streams trim to zero tokens): torchao returns the input UNPROJECTED (a quantized 1472
-# -> 2048 Linear maps [1, 0, 1472] to [1, 0, 1472]), so the 2048-wide cond-type add crashes -- context_embedder_2 /
-# image_embedder. M <= 16 (a short prompt, or the empty negative prompt's ~6 tokens): torch._int_mm requires M > 16
-# and raises -- the TokenRefiner and every block's context-stream projections. These run at M = text tokens (tens)
-# against the video stream's M ~ 32k+, so bf16 here costs nothing measurable and the video-stream linears keep full
-# int8 coverage. "context_embedder" also matches "context_embedder_2" (substring check).
-_HUNYUAN15_INT8_EXCLUDES = (
- "context_embedder",
- "image_embedder",
- "add_q_proj",
- "add_k_proj",
- "add_v_proj",
- "to_add_out",
- "ff_context",
-)
-# MiniMax-H3 is the same small-M story with one extra trap. Its adaLN projection is named ``adaln_proj``, which no
-# token in _INT8_EXCLUDE_NAME_TOKENS matches: "norm" is the closest and it does not appear in the name. On the DENSE
-# checkpoint that projection is Linear(2688 -> 96768), so it clears min_features = 512 and gets quantized, then runs
-# at M = 1 and raises ``self.size(0) needs to be greater than 16, but got 1`` at the first denoise. Measured: the
-# offline builder happily bakes it, and torch.compile then dies on that module. The pruned-modulation form hides the
-# bug rather than fixing it: there adaln_proj is Linear(8 -> 96768), which falls under min_features and is skipped for
-# free (verified on the fl2va_pruned build: the filter rejects all 51 of them for min_features, in_features = 8). So
-# the exclusion is what makes the DENSE path correct, and is a no-op on the pruned one. H3's OTHER small-M linears --
-# context_embedder and the two token_refiner blocks, 13 in total -- used to be excluded here for the same reason; they
-# are padded instead now, see _INT8_FAMILY_PAD_NAME_TOKENS below.
-_MINIMAX_H3_INT8_EXCLUDES = ("adaln_proj",)
-# LTX-2 is audiovisual: every block carries an audio-side stream (audio_attn1 / audio_attn2 / audio_ff, fed by
-# audio_proj_in) plus the a2v / v2a cross attentions. A video-only run feeds a MINIMAL audio stream -- one token for a
-# still -- so those linears run at M = 1, under the same _int_mm floor of 16 as the cases above. The audio stream is
-# inert on a video-only run (isolated modalities, out of the loss, out of the LoRA targets), so leaving it in bf16
-# costs nothing while the video-stream linears keep full int8 coverage. One token covers every audio-side name,
-# including video_to_audio_attn, whose keys/values are that same one-token stream.
-# The audio token alone is not enough. LTX-2 also carries LTX2AdaLayerNormSingle projections whose names say nothing
-# about audio -- av_cross_attn_video_scale_shift / av_cross_attn_video_a2v_gate (the cross-modality modulation,
-# computed unconditionally in forward, isolate_modalities or not) and prompt_adaln / audio_prompt_adaln. Each is a
-# Linear over a BATCH-sized input, so M = batch = 1 for a default training run: the same _int_mm floor, reached
-# whatever the audio stream does.
-_LTX2_INT8_EXCLUDES = ("audio", "av_cross_attn", "adaln")
-_INT8_FAMILY_EXCLUDE_NAME_TOKENS: dict[str, tuple[str, ...]] = {
- "qwen-image": _QWENIMAGE_INT8_EXCLUDES,
- "qwen-image-edit": _QWENIMAGE_INT8_EXCLUDES, # same DiT class + unpadded text stream
- "qwen-image-layered": _QWENIMAGE_INT8_EXCLUDES, # same DiT class + unpadded text stream
- # 2.1 is a 32-block SINGLE-stream DiT: no add_* projections, no txt_mlp, so the 20B MMDiT's
- # exclusion list does not apply and this one was measured rather than inherited. ``txt_in`` is
- # here as a QUALITY lever, not the small-M crash guard it is on qwen-image: all four policy arms
- # rendered a deliberately 2-token prompt without tripping ``_int_mm``'s M floor, so nothing
- # crashes either way. Excluding it scored LPIPS 0.0642 against 0.1032 with the generic tokens
- # alone, paired over 16 calibration prompts, -0.0390 CI95 [-0.0708, -0.0072], better on 14/16.
- "qwen-image-2.1": ("txt_in",),
- "hunyuanvideo-1.5": _HUNYUAN15_INT8_EXCLUDES,
- "hunyuanvideo-1.5-720p": _HUNYUAN15_INT8_EXCLUDES,
- "minimax-h3": _MINIMAX_H3_INT8_EXCLUDES,
- "ltx-2": _LTX2_INT8_EXCLUDES,
- "ltx-2.3": _LTX2_INT8_EXCLUDES, # same audiovisual DiT
- "ltx-2.5": _LTX2_INT8_EXCLUDES, # the 2.3 DiT less the video FFN bias
-}
+_QWENIMAGE_INT8_EXCLUDES = _INT8_FAMILY_EXCLUDE_NAME_TOKENS["qwen-image"]
-# Int8 PER-FAMILY row PADDING, the alternative to excluding a small-M Linear. ``_int_mm``'s floor is a GEMM shape
-# constraint, not a numerical one: padding the activation up to 32 rows, running the matmul and slicing the result
-# back returns the caller's rows BITWISE unchanged (torchao's int8 dynamic path scales activations per row, so the pad
-# rows cannot reach them -- see diffusion_quant_pad for why that is asserted rather than assumed). So a Linear that
-# would have been left dense can be quantized after all, and its weights halve. On MiniMax-H3 that is context_embedder
-# plus the two token_refiner blocks: 13 Linears, 798 M parameters, 0.80 GB of bf16 weights, 3.9% of the whole int8
-# checkpoint. Measured on B200, 640x384 x 124 frames (see h3_quant/README_int8.md for the paired numbers). Scoped to
-# minimax-h3: qwen-image, qwen-image-edit and hunyuanvideo-1.5 have the same small-M shape and could adopt this, but
-# each has a PUBLISHED int8 prequant checkpoint whose metadata bakes the current exclusion set, and
-# _validate_checkpoint compares that set against exclude_tokens_for_scheme, so changing it invalidates those artifacts
-# and they move only together with a rebuild and republish of each.
-_MINIMAX_H3_INT8_PAD_TOKENS = ("context_embedder", "token_refiner")
-_INT8_FAMILY_PAD_NAME_TOKENS: dict[str, tuple[str, ...]] = {
- "minimax-h3": _MINIMAX_H3_INT8_PAD_TOKENS,
-}
+# Int8 PER-FAMILY row PADDING (``FamilyProfile.int8_pad_tokens``), the alternative to excluding a small-M Linear.
+# ``_int_mm``'s floor is a GEMM shape constraint, not a numerical one: padding the activation up to 32 rows, running
+# the matmul and slicing the result back returns the caller's rows BITWISE unchanged (torchao's int8 dynamic path
+# scales activations per row, so the pad rows cannot reach them -- see diffusion_quant_pad for why that is asserted
+# rather than assumed). A family with a PUBLISHED int8 checkpoint moves from exclude to pad only with a rebuild and
+# republish, since _validate_checkpoint compares the baked exclusion set against exclude_tokens_for_scheme.
+_INT8_FAMILY_PAD_NAME_TOKENS: dict[str, tuple[str, ...]] = _profile_table(
+ "int8_pad_tokens", quant = True
+)
def pad_tokens_for_scheme(scheme: str, family: Optional[str] = None) -> tuple[str, ...]:
@@ -209,59 +142,31 @@ def apply_small_m_padding(
return wrapped
-# Per-family int8 ConvRot (group, rotated fqn suffixes); not an exclusion, so plain artifacts still validate.
+# Per-family int8 ConvRot (``FamilyProfile.int8_convrot``): (group, rotated fqn suffixes); not an exclusion, so plain
+# artifacts still validate.
+_INT8_FAMILY_CONVROT_SPECS = _profile_table("int8_convrot", quant = True)
+# A spec with group 0 (ltx-2.5) only names a HOSTED rotated build: no runtime rotation, so no entry here.
_INT8_FAMILY_CONVROT: dict[str, tuple[int, tuple[str, ...]]] = {
- "qwen-image-2.1": (
- 256,
- (
- "attn.to_q",
- "attn.to_k",
- "attn.to_v",
- "attn.to_out.0",
- "img_mlp.gate_layer",
- "img_mlp.proj",
- "img_mlp.out",
- ),
- ),
- # exactly the Linears the hosted INT8 checkpoint quantizes (all input axes 256-divisible)
- "z-image": (
- 256,
- (
- "attention.to_q",
- "attention.to_k",
- "attention.to_v",
- "attention.to_out.0",
- "feed_forward.w1",
- "feed_forward.w2",
- "feed_forward.w3",
- "cap_embedder.1",
- ),
- ),
+ name: (spec.group, spec.suffixes)
+ for name, spec in _INT8_FAMILY_CONVROT_SPECS.items()
+ if spec.group
}
-
-
_INT8_FAMILY_CONVROT_FILENAME: dict[str, str] = {
- "qwen-image-2.1": "Qwen-Image-2.1-INT8-ConvRot.safetensors",
- "z-image": "Z-Image-Turbo-INT8-ConvRot.safetensors",
+ name: spec.filename for name, spec in _INT8_FAMILY_CONVROT_SPECS.items() if spec.filename
}
# Only this repo gets the rotated name prepended: a same-named file elsewhere is not this build.
_INT8_FAMILY_CONVROT_REPO: dict[str, str] = {
- "qwen-image-2.1": "unsloth/Qwen-Image-2.1-FP8",
- "z-image": "unsloth/Z-Image-Turbo-FP8",
+ name: spec.repo for name, spec in _INT8_FAMILY_CONVROT_SPECS.items() if spec.repo
}
-
# Variant repos that also host a rotated build (``<Model>-INT8-ConvRot.safetensors``), listed for the same reason.
_INT8_FAMILY_CONVROT_VARIANT_REPOS: dict[str, tuple[str, ...]] = {
- "qwen-image-2.1": ("unsloth/Qwen-Image-2.1-Turbo-FP8",),
- # Rotation baked into the file (every quantized Linear, group 256) and read back from its metadata. LTX-2.5 has no
- # runtime ConvRot spec above, so quantizing at load stays plain int8.
- "ltx-2.5": ("unsloth/LTX-2.5-FP8",),
+ name: spec.variant_repos
+ for name, spec in _INT8_FAMILY_CONVROT_SPECS.items()
+ if spec.variant_repos
}
-
-# Families whose int8 runs ConvRot unless the env turns it off; the rest stay opt-in (``=1``). For ltx-2.5 this only
-# picks the hosted rotated file (the env's ``0`` picks the plain one).
+# Families whose int8 runs ConvRot unless the env turns it off; the rest stay opt-in (``=1``).
_INT8_FAMILY_CONVROT_DEFAULT_ON: frozenset[str] = frozenset(
- {"qwen-image-2.1", "z-image", "ltx-2.5"}
+ name for name, spec in _INT8_FAMILY_CONVROT_SPECS.items() if spec.default_on
)
INT8_CONVROT_ENV = "UNSLOTH_DIFFUSION_INT8_CONVROT"
@@ -372,12 +277,11 @@ def apply_runtime_convrot(
return rotated
-# nvfp4 raises on an empty activation; HunyuanVideo-1.5's attention trim hits it every t2v render.
-_HUNYUAN15_NVFP4_ZERO_ROW_TOKENS = ("image_embedder", "context_embedder_2")
-_NVFP4_FAMILY_ZERO_ROW_NAME_TOKENS: dict[str, tuple[str, ...]] = {
- "hunyuanvideo-1.5": _HUNYUAN15_NVFP4_ZERO_ROW_TOKENS,
- "hunyuanvideo-1.5-720p": _HUNYUAN15_NVFP4_ZERO_ROW_TOKENS,
-}
+# nvfp4 raises on an empty activation (``FamilyProfile.nvfp4_zero_row_tokens``); HunyuanVideo-1.5's attention trim
+# hits it every t2v render.
+_NVFP4_FAMILY_ZERO_ROW_NAME_TOKENS: dict[str, tuple[str, ...]] = _profile_table(
+ "nvfp4_zero_row_tokens", quant = True
+)
def zero_row_tokens_for_scheme(scheme: str, family: Optional[str] = None) -> tuple[str, ...]:
@@ -445,79 +349,32 @@ _AUTO_LADDER: tuple[tuple[tuple[int, int], tuple[str, ...]], ...] = (
((8, 0), (TQ_INT8,)), # Ampere sm_80 / sm_86
)
-# Families whose activation ranges break specific schemes at the MODEL level (the smoke probe only proves the GEMM
-# runs). Measured with the 28-pair prequant accuracy gate on B200: qwen-image + mxfp8 does semantic damage at 1024px,
-# + nvfp4 is unusable (LPIPS 0.51). Neither has a known fix, so both stay denied and auto falls through to int8
-# (excellent on Qwen). The deny also applies to an EXPLICIT request.
-# fp8 was denied here too, for black frames. That cause is gone: it was torchao's fp8 scale chooser having no eps
-# clamp, so qwen's all-zero text rows gave scale 0 and NaN, and ``_make_quant_config`` now floors it with
-# ``activation_value_lb``. Re-measured on B200 with the floor, and BOTH paths the deny governs clear the 0.10 LPIPS
-# bar: prequant checkpoint, full 28-pair gate -> 28/28 PASS (SSIM 0.87-0.99, LPIPS 0.027-0.228, CLIP delta <= 0.019);
-# on-the-fly quantize_, gate's simple_object prompt at its own seeds -> LPIPS 0.048 / 0.033 / 0.027 / 0.063, against
-# pre-floor plain fp8 at LPIPS 0.712 with SSIM 0.016 and mean luma 0. Keeping the deny cost real speed: it pinned qwen
-# to int8 at 1.10x bf16 when compiled fp8 measures 1.21x.
-_FAMILY_SCHEME_DENY: dict[str, frozenset[str]] = {
- "qwen-image": frozenset({TQ_MXFP8, TQ_NVFP4}),
- "qwen-image-edit": frozenset({TQ_MXFP8, TQ_NVFP4}), # same DiT
- "qwen-image-layered": frozenset({TQ_MXFP8, TQ_NVFP4}), # same DiT
-}
+# Families whose activation ranges break specific schemes at the MODEL level (``FamilyProfile.scheme_deny``; the smoke
+# probe only proves the GEMM runs). The deny also applies to an EXPLICIT request; a passing NVFP4 gate record lifts an
+# nvfp4 deny per base. Measurements next to the data (qwen-image).
+_FAMILY_SCHEME_DENY: dict[str, frozenset[str]] = _profile_table("scheme_deny", quant = True)
-@dataclass(frozen = True)
-class _AutoPrefer:
- """A family's head of the ``auto`` order, ahead of ``_AUTO_LADDER``; off below ``floor`` or on consumer GPUs
- (unless ``consumer_ok``), and ``gated`` / ``backend`` need a passing record / backend for THIS device."""
-
- floor: tuple[int, int]
- schemes: tuple[str, ...]
- consumer_ok: bool = False
- gated: bool = False
- backend: Optional[str] = None
-
-
-_FAMILY_AUTO_PREFER: dict[str, _AutoPrefer] = {
- "z-image": _AutoPrefer(
- floor = (10, 0), schemes = (TQ_INT8, TQ_FP8, TQ_NVFP4, TQ_MXFP8), gated = True
- ),
- "flux.1": _AutoPrefer(floor = (10, 0), schemes = (TQ_INT8, TQ_FP8, TQ_NVFP4, TQ_MXFP8), gated = True),
- "qwen-image": _AutoPrefer(
- floor = (10, 0), schemes = (TQ_INT8, TQ_FP8, TQ_NVFP4, TQ_MXFP8), gated = True
- ),
- "qwen-image-2.1": _AutoPrefer(
- floor = (10, 0), schemes = (TQ_INT8, TQ_FP8, TQ_NVFP4, TQ_MXFP8), gated = True
- ),
- "wan2.2-t2v-a14b": _AutoPrefer(
- floor = (10, 0),
- schemes = (TQ_NVFP4, TQ_INT8, TQ_FP8, TQ_MXFP8),
- backend = "flashinfer",
- ),
-}
+# ``FamilyProfile.auto_prefer``: a family's head of the ``auto`` order, ahead of ``_AUTO_LADDER``.
+_FAMILY_AUTO_PREFER: dict[str, _AutoPrefer] = _profile_table("auto_prefer", quant = True)
-# AUTO keeps bf16 while it fits for these (measured with both sides compiled: INT8 was at most ~5% faster and failed the
-# default-on LPIPS bar); when bf16 would offload, INT8 is still picked.
-_FAMILY_AUTO_BF16_WHEN_RESIDENT: dict[str, str] = {
- "lumina-2": "INT8 is no faster than compiled bf16 on a card that holds bf16 and changes image detail",
- "hidream-i1": "INT8 is barely faster than compiled bf16 on a card that holds bf16 and changes image detail",
-}
+# AUTO keeps bf16 while it fits for these (``FamilyProfile.auto_bf16_when_resident``: measured with both sides compiled,
+# INT8 was at most ~5% faster and failed the default-on LPIPS bar); when bf16 would offload, INT8 is still picked.
+_FAMILY_AUTO_BF16_WHEN_RESIDENT: dict[str, str] = _profile_table(
+ "auto_bf16_when_resident", quant = True
+)
def auto_bf16_when_resident_reason(family: Optional[str]) -> Optional[str]:
return _FAMILY_AUTO_BF16_WHEN_RESIDENT.get(str(family or "").strip().lower())
-# Schemes denied for TRAINING on top of the inference table. Training holds a stricter bar because the evidence above
-# is rendering evidence: it says a frozen fp8 forward reconstructs the bf16 image, not that a LoRA converges when its
-# frozen linears are fp8. Nobody has run that, so qwen fp8 stays out of the Train UI until someone does. Delete the
-# entry once a training run is measured.
-_FAMILY_TRAIN_SCHEME_DENY: dict[str, frozenset[str]] = {
- "qwen-image": frozenset({TQ_FP8}),
- "qwen-image-edit": frozenset({TQ_FP8}),
- # MiniMax-H3's packed sequence runs three modalities through one set of linears, so its activation range is not
- # the per-family range the fp8 filter was measured against. The trainer refuses both outright; declaring it here
- # is what keeps /diffusion/info from advertising a start that is guaranteed to 400.
- "minimax-h3": frozenset({TQ_FP8, TQ_MXFP8}),
-}
+# Schemes denied for TRAINING on top of the inference table (``FamilyProfile.train_scheme_deny``): the inference
+# evidence is rendering evidence, not evidence that a LoRA converges on those frozen linears.
+_FAMILY_TRAIN_SCHEME_DENY: dict[str, frozenset[str]] = _profile_table(
+ "train_scheme_deny", quant = True
+)
def _nvfp4_gate_passed(family, base_repo) -> bool:
diff --git a/studio/backend/core/inference/family_profile.py b/studio/backend/core/inference/family_profile.py
new file mode 100644
index 00000000000..3cf1aacbcc7
--- /dev/null
+++ b/studio/backend/core/inference/family_profile.py
@@ -0,0 +1,160 @@
+# SPDX-License-Identifier: AGPL-3.0-only
+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+"""Per-family policy data carried on ``DiffusionFamily.profile`` / ``VideoFamily.profile``.
+
+Stdlib only (the transformer-quant smoke-probe child imports its consumers). Everything a new family needs beyond its
+registry row lives here as data; the consumer modules (transformer quant, text-encoder quant, untiled VAE decode,
+preview, step skip, trusted repos) derive their lookup tables from the registries through ``profile_table`` and keep
+their historical names and lookup semantics.
+
+The quant fields are baked into PUBLISHED prequant artifacts and validated at load (``diffusion_prequant.
+_validate_checkpoint`` requires an artifact's exclude tokens to be a superset of ``exclude_tokens_for_scheme``), so a
+change to ``int8_exclude_tokens`` / ``int8_convrot`` / ``nvfp4_zero_row_tokens`` on a family with a hosted checkpoint
+needs a rebuild and republish; tests/test_diffusion_family_data_freeze.py pins every resolved value.
+
+Scheme names are spelled as plain strings ("int8", "fp8", "mxfp8", "nvfp4") to keep this module import-free; they
+equal ``diffusion_transformer_quant.TQ_*``.
+"""
+
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from typing import Any, Optional
+
+
+@dataclass(frozen = True)
+class AutoPrefer:
+ """A family's head of the transformer-quant ``auto`` order, ahead of the arch ladder; off below ``floor`` or on
+ consumer GPUs (unless ``consumer_ok``), and ``gated`` / ``backend`` need a passing NVFP4 gate record / backend for
+ THIS device."""
+
+ floor: tuple[int, int]
+ schemes: tuple[str, ...]
+ consumer_ok: bool = False
+ gated: bool = False
+ backend: Optional[str] = None
+
+
+@dataclass(frozen = True)
+class ConvRotSpec:
+ """int8 ConvRot: ``group`` Hadamard size and the rotated Linear fqn ``suffixes``. Not an exclusion, so plain int8
+ artifacts still validate. ``filename`` / ``repo`` name the hosted rotated build (only ``repo`` gets the rotated
+ name prepended), ``variant_repos`` the variant repos that host one under their own name, ``default_on`` whether
+ int8 rotates unless ``UNSLOTH_DIFFUSION_INT8_CONVROT`` turns it off (the rest are opt-in with ``=1``). ``group`` 0
+ means no runtime rotation: the entry only names a hosted build whose rotation is baked into the file."""
+
+ group: int
+ suffixes: tuple[str, ...]
+ filename: Optional[str] = None
+ repo: Optional[str] = None
+ variant_repos: tuple[str, ...] = ()
+ default_on: bool = False
+
+
+@dataclass(frozen = True)
+class UntiledVae:
+ """Untiled video VAE decode peak model (video_vae_untiled). Either per latent pixel with an RGB output term
+ (``bytes_per_latent_pixel`` + ``output_scale`` = (spatial, temporal)), for a causal decoder that decodes one latent
+ frame at a time, or per output frame x latent pixel (``bytes_per_frame_latent_pixel`` + ``temporal_scale``) for a
+ decoder holding every frame. Bytes are fp16-decoder bytes; the caller scales by element size."""
+
+ bytes_per_latent_pixel: Optional[float] = None
+ output_scale: Optional[tuple[int, int]] = None
+ bytes_per_frame_latent_pixel: Optional[float] = None
+ temporal_scale: Optional[int] = None
+
+
+@dataclass(frozen = True)
+class FamilyProfile:
+ # int8 name tokens left dense on top of the generic M = 1 tokens (``_int_mm`` needs M > 16, or a measured quality
+ # lever). Baked into published int8 artifacts.
+ int8_exclude_tokens: tuple[str, ...] = ()
+ # int8 name tokens whose small-M Linears get activation rows PADDED to the ``_int_mm`` floor instead of excluded.
+ int8_pad_tokens: tuple[str, ...] = ()
+ int8_convrot: Optional[ConvRotSpec] = None
+ # nvfp4 Linears reachable with an EMPTY activation (zero-row guard after quantization).
+ nvfp4_zero_row_tokens: tuple[str, ...] = ()
+ # Transformer-quant schemes ruled out at the model level (explicit requests too); a passing NVFP4 gate record
+ # lifts an nvfp4 deny per base.
+ scheme_deny: frozenset[str] = frozenset()
+ # Extra schemes denied for TRAINING on top of ``scheme_deny`` (nvfp4 is denied for training everywhere).
+ train_scheme_deny: frozenset[str] = frozenset()
+ auto_prefer: Optional[AutoPrefer] = None
+ # Reason auto keeps bf16 while bf16 fits (INT8 still picked once bf16 would offload); None = not this family.
+ auto_bf16_when_resident: Optional[str] = None
+ # Text-encoder int8 keep-bf16 schedule (skip_first, skip_last) decoder blocks; None = int8 falls back to fp8.
+ te_int8_skip: Optional[tuple[int, int]] = None
+ untiled_vae: Optional[UntiledVae] = None
+ # diffusion_preview_factors.FACTORS key for the live latent preview; None = no preview.
+ preview_factors: Optional[str] = None
+ # Measured auto static step skip, keyed by the lowercased UPSTREAM repo id so unmeasured siblings never match:
+ # (repo, ((tier or "steps", value), ...)). See diffusion_cache.AUTO_STATIC_SKIP.
+ auto_static_skip: tuple[tuple[str, tuple[tuple[str, int], ...]], ...] = ()
+ # Lowercased vendor repos trusted for a full (non-GGUF) load on top of the ones the registry row already names
+ # (base_repo, named_variant_bases, train_base_repos, prequant_variant_repos bases). Exact match, safetensors-only,
+ # no remote code.
+ trusted_repos: tuple[str, ...] = ()
+ # Extra exact family strings the transformer-quant tables (exclude / pad / ConvRot / zero-row / denies / auto
+ # preferences) answer to, besides ``name``: a builder spelling a family by a version name ("ltx-2.3"). Not general
+ # alias resolution, which would hand a family's artifact policy to every alias substring.
+ quant_names: tuple[str, ...] = ()
+ # Compile the denoiser with static shapes (token counts depend only on (w, h, frames): one recompile per shape,
+ # ~1.3x faster); read by the diffusion_autoopt ``ltx_static_compile`` family hook.
+ compile_static: bool = False
+ # Install the LTX-2 STG compile adapter after a successful compile (``ltx_stg_compile_adapter`` family hook).
+ stg_compile_adapter: bool = False
+
+
+DEFAULT_PROFILE = FamilyProfile()
+
+
+def _families() -> tuple[Any, ...]:
+ from .diffusion_families import _FAMILIES as image
+ from .video_families import _FAMILIES as video
+
+ return (*image, *video)
+
+
+def profile_table(attr: str, *, quant: bool = False) -> dict[str, Any]:
+ """``{family name: profile.<attr>}`` over both registries, for families that set it (not None / empty).
+ ``quant`` also keys each value under the profile's ``quant_names``."""
+ table: dict[str, Any] = {}
+ for fam in _families():
+ profile = getattr(fam, "profile", DEFAULT_PROFILE)
+ value = getattr(profile, attr)
+ if value is None or value == () or value == frozenset():
+ continue
+ table[fam.name] = value
+ if quant:
+ for name in profile.quant_names:
+ table.setdefault(name, value)
+ return table
+
+
+def profile_for(family: Any) -> FamilyProfile:
+ """``family.profile``, else the registry row's profile for its exact ``name`` (a stand-in family object), else the
+ empty profile."""
+ profile = getattr(family, "profile", None)
+ if isinstance(profile, FamilyProfile):
+ return profile
+ name = getattr(family, "name", None)
+ if name:
+ for fam in _families():
+ if fam.name == name:
+ return fam.profile
+ return DEFAULT_PROFILE
+
+
+def trusted_repo_ids(families: Any) -> frozenset[str]:
+ """Lowercased non-``unsloth/`` repo ids ``families`` name as their own bases, plus each profile's
+ ``trusted_repos``. ``unsloth/`` ids are trusted by prefix elsewhere, so they are left out here."""
+ ids: set[str] = set()
+ for fam in families:
+ named = [fam.base_repo]
+ named += list(getattr(fam, "named_variant_bases", ()) or ())
+ named += list(getattr(fam, "train_base_repos", ()) or ())
+ named += [row[0] for row in getattr(fam, "prequant_variant_repos", ()) or ()]
+ named += list(getattr(fam, "profile", DEFAULT_PROFILE).trusted_repos)
+ ids.update(r.strip().lower() for r in named if r)
+ return frozenset(r for r in ids if not r.startswith("unsloth/"))
diff --git a/studio/backend/core/inference/video.py b/studio/backend/core/inference/video.py
index 9133221b3e8..01bb603b871 100644
--- a/studio/backend/core/inference/video.py
+++ b/studio/backend/core/inference/video.py
@@ -270,27 +270,12 @@ install_torchao_int_mm_patch()
# pipeline (full diffusers repo)
_MODEL_KINDS = frozenset({"gguf", "single_file", "pipeline"})
-# Vendor base repos allowed to load as full (non-GGUF) artifacts. Exact-match, lowercased, safetensors-only, no remote
-# code.
-_TRUSTED_NON_GGUF_VIDEO_REPOS = frozenset(
- {
- "lightricks/ltx-2",
- "lightricks/ltx-2.3",
- "lightricks/ltx-2.3-fp8",
- # LTX-2.5: the Diffusers pack (safetensors + configs, no remote code) and the split single-file repo.
- "lightricks/ltx-2.5-diffusers",
- "lightricks/ltx-2.5",
- # Wan2.2 official diffusers base repos: safetensors-only, no remote code.
- "wan-ai/wan2.2-ti2v-5b-diffusers",
- "wan-ai/wan2.2-t2v-a14b-diffusers",
- "wan-ai/wan2.1-t2v-1.3b-diffusers",
- "wan-ai/wan2.1-t2v-14b-diffusers",
- # HunyuanVideo-1.5 community Diffusers repacks (tencent's own repo has no model_index.json)
- "hunyuanvideo-community/hunyuanvideo-1.5-diffusers-480p_t2v",
- "hunyuanvideo-community/hunyuanvideo-1.5-diffusers-720p_t2v",
- "minimaxai/minimax-h3",
- }
-)
+# Official non-unsloth bases allowed to load as full (non-GGUF) artifacts: safetensors-only, no remote code, exact
+# lowercased match. Derived from the registry rows (base_repo, variant / training bases, FamilyProfile.trusted_repos).
+from .video_families import _FAMILIES as _VIDEO_REGISTRY # noqa: E402
+from .family_profile import trusted_repo_ids as _trusted_repo_ids # noqa: E402
+
+_TRUSTED_NON_GGUF_VIDEO_REPOS = _trusted_repo_ids(_VIDEO_REGISTRY)
def resolve_video_model_kind(gguf_filename: Optional[str], model_kind: Optional[str]) -> str:
diff --git a/studio/backend/core/inference/video_families.py b/studio/backend/core/inference/video_families.py
index 3b7c42e76cb..b9e9f9cad77 100644
--- a/studio/backend/core/inference/video_families.py
+++ b/studio/backend/core/inference/video_families.py
@@ -24,6 +24,7 @@ from typing import Optional
from .diffusion_nvfp4_flag import nvfp4_blocked, without_nvfp4
from .family_name_match import normalize_family_name, token_in_name, token_length
+from .family_profile import AutoPrefer, ConvRotSpec, FamilyProfile, UntiledVae
# The request model's ceiling on num_frames, declared HERE so the shape gate and the bound cannot drift: the gate's
# refusal names the lattice point above the request, and suggesting one the request model would itself reject is a
@@ -283,6 +284,8 @@ class VideoFamily:
# One config per reduction instead of a per-process benchmark that can change the render (diffusion_speed.
# pin_reduction_configs). Off by default: it can keep a slower config (HunyuanVideo-1.5 ~2% per step).
filter_reduction_configs: bool = False
+ # Same spelling as DiffusionFamily: pin the filter only on these (major, minor) archs.
+ filter_reduction_configs_archs: tuple[tuple[int, int], ...] = field(default_factory = tuple)
# Curated GGUF repo for the picker (the DiT as single-file GGUF quants).
gguf_repo: Optional[str] = None
# Hosted PRE-CAST text-encoder checkpoints as (scheme, component, repo_id); same semantics as
@@ -343,6 +346,12 @@ class VideoFamily:
supports_references: bool = False
# Guidance-distilled families expose neither CFG nor a negative prompt.
supports_cfg: bool = True
+ # True when Unsloth can TRAIN a LoRA on this family (every such name must resolve through get_trainer).
+ trainable: bool = False
+ # Display label (Train UI); None = the family name.
+ label: Optional[str] = None
+ # Per-family policy data; see family_profile.FamilyProfile.
+ profile: FamilyProfile = field(default_factory = FamilyProfile)
# MiniMax-H3 at ComfyUI's template default (ResolutionSelector 16:9, 0.4 MP, multiple 32 -> 864x480). Both sides are
@@ -375,9 +384,77 @@ _HV15_I2V_REFUSAL = (
)
+# --- Shared FamilyProfile data (see family_profile.FamilyProfile) ---
+
+# int8 small-M exclusions (on top of diffusion_transformer_quant._INT8_EXCLUDE_NAME_TOKENS); baked into the published
+# int8 artifacts, so each moves only with a rebuild and republish.
+# HunyuanVideo-1.5's attention trim shrinks the text / image streams from their padded lengths to the VALID token
+# counts, so every text-stream Linear runs at a tiny M the int8 dynamic path cannot handle. Both failures measured on
+# B200. M = 0 (t2v byt5 / image streams trim to zero tokens): torchao returns the input UNPROJECTED (a quantized 1472
+# -> 2048 Linear maps [1, 0, 1472] to [1, 0, 1472]), so the 2048-wide cond-type add crashes -- context_embedder_2 /
+# image_embedder. M <= 16 (a short prompt, or the empty negative prompt's ~6 tokens): torch._int_mm requires M > 16
+# and raises -- the TokenRefiner and every block's context-stream projections. These run at M = text tokens (tens)
+# against the video stream's M ~ 32k+, so bf16 here costs nothing measurable and the video-stream linears keep full
+# int8 coverage. "context_embedder" also matches "context_embedder_2" (substring check).
+_HUNYUAN15_INT8_EXCLUDES = (
+ "context_embedder",
+ "image_embedder",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "ff_context",
+)
+# nvfp4 raises on an empty activation; HunyuanVideo-1.5's attention trim hits it every t2v render.
+_HUNYUAN15_NVFP4_ZERO_ROW_TOKENS = ("image_embedder", "context_embedder_2")
+# LTX-2 is audiovisual: every block carries an audio-side stream (audio_attn1 / audio_attn2 / audio_ff, fed by
+# audio_proj_in) plus the a2v / v2a cross attentions. A video-only run feeds a MINIMAL audio stream -- one token for a
+# still -- so those linears run at M = 1, under the same _int_mm floor of 16. The audio stream is inert on a
+# video-only run (isolated modalities, out of the loss, out of the LoRA targets), so leaving it in bf16 costs nothing
+# while the video-stream linears keep full int8 coverage. One token covers every audio-side name, including
+# video_to_audio_attn, whose keys/values are that same one-token stream.
+# The audio token alone is not enough. LTX-2 also carries LTX2AdaLayerNormSingle projections whose names say nothing
+# about audio -- av_cross_attn_video_scale_shift / av_cross_attn_video_a2v_gate (the cross-modality modulation,
+# computed unconditionally in forward, isolate_modalities or not) and prompt_adaln / audio_prompt_adaln. Each is a
+# Linear over a BATCH-sized input, so M = batch = 1 for a default training run: the same _int_mm floor, reached
+# whatever the audio stream does.
+_LTX2_INT8_EXCLUDES = ("audio", "av_cross_attn", "adaln")
+# Untiled decode peaks (video_vae_untiled), measured fp16 on a B200. Wan: per latent pixel (h x w), frame count does not
+# enter (the causal cache decodes one latent frame at a time), plus the (spatial, temporal) RGB output Wan's decode
+# holds about twice (per-frame torch.cat, then clamp); 1021 frames at 1280x704 is 5.2 GiB per fp16 copy. A14B and
+# Wan2.1 share the Wan2.1 VAE (8x spatial), measured <= 0.58 MiB per latent pixel at 480p / 720p.
+_WAN21_VAE_UNTILED = UntiledVae(bytes_per_latent_pixel = 0.6 * 2**20, output_scale = (8, 4))
+# LTX-2 / 2.3 holds every frame: peak per output frame x latent pixel, 0.102-0.105 MiB measured bf16 (B200). LTX-2.5
+# has the same conv decoder layout (vae/ of the Diffusers pack); unmeasured, priced as 2.3.
+_LTX2_VAE_UNTILED = UntiledVae(bytes_per_frame_latent_pixel = 0.11 * 2**20, temporal_scale = 8)
+
_FAMILIES: tuple[VideoFamily, ...] = (
VideoFamily(
name = "minimax-h3",
+ trainable = True,
+ label = "MiniMax-H3",
+ profile = FamilyProfile(
+ # Same small-M story as HunyuanVideo-1.5 with one extra trap: the adaLN projection is ``adaln_proj``,
+ # which no generic token matches ("norm" does not appear in the name). On the DENSE checkpoint it is
+ # Linear(2688 -> 96768), clears min_features = 512, gets quantized, then runs at M = 1 and raises
+ # ``self.size(0) needs to be greater than 16, but got 1`` at the first denoise (the offline builder
+ # happily bakes it, and torch.compile then dies on that module). On the pruned-modulation form it is
+ # Linear(8 -> 96768), under min_features and skipped for free (verified on the fl2va_pruned build: all 51
+ # rejected), so the exclusion makes the DENSE path correct and is a no-op on the pruned one.
+ int8_exclude_tokens = ("adaln_proj",),
+ # H3's OTHER small-M linears (context_embedder + the two token_refiner blocks: 13 Linears, 798 M params,
+ # 0.80 GB bf16, 3.9% of the int8 checkpoint) are row-PADDED to the _int_mm floor instead of excluded:
+ # padding returns the caller's rows bitwise unchanged (per-row activation scales, asserted in
+ # diffusion_quant_pad). Measured on B200, 640x384 x 124 frames (h3_quant/README_int8.md). qwen-image,
+ # qwen-image-edit and hunyuanvideo-1.5 have the same small-M shape but each has a PUBLISHED int8
+ # checkpoint whose metadata bakes its exclusion set, so they move only with a rebuild and republish.
+ int8_pad_tokens = ("context_embedder", "token_refiner"),
+ # The packed sequence runs three modalities through one set of linears, so its activation range is not the
+ # per-family range the fp8 filter was measured against. The trainer refuses both outright; declaring it
+ # here keeps /diffusion/info from advertising a start that is guaranteed to 400.
+ train_scheme_deny = frozenset({"fp8", "mxfp8"}),
+ auto_static_skip = (("minimaxai/minimax-h3", (("max", 2), ("steps", 30))),),
+ ),
pipeline_class = "ModularPipeline",
transformer_class = "MiniMaxH3Transformer3DModel",
base_repo = "MiniMaxAI/MiniMax-H3",
@@ -474,6 +551,26 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# reference 1280x720 resolves to the 1280x704 latent canvas it actually renders.
VideoFamily(
name = "ltx-2.5",
+ profile = FamilyProfile(
+ # the 2.3 DiT less the video FFN bias
+ int8_exclude_tokens = _LTX2_INT8_EXCLUDES,
+ # Hosted rotated int8 build only: rotation baked into the file (every quantized Linear, group 256) and read
+ # back from its metadata. No runtime ConvRot spec (group 0), so quantizing at load stays plain int8;
+ # default_on only picks the hosted rotated file (the env's ``0`` picks the plain one).
+ int8_convrot = ConvRotSpec(
+ group = 0,
+ suffixes = (),
+ variant_repos = ("unsloth/LTX-2.5-FP8",),
+ default_on = True,
+ ),
+ untiled_vae = _LTX2_VAE_UNTILED,
+ # 2.5 keeps the 2.3 conv VAE encoder (byte-identical weights), so the same latent space.
+ compile_static = True,
+ stg_compile_adapter = True,
+ preview_factors = "ltx2",
+ # The split single-file repo next to the Diffusers pack (safetensors, no remote code).
+ trusted_repos = ("lightricks/ltx-2.5",),
+ ),
pipeline_class = "LTX2Pipeline",
transformer_class = "LTX2VideoTransformer3DModel",
base_repo = "Lightricks/LTX-2.5-Diffusers",
@@ -510,6 +607,18 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# dev config (40 steps, CFG 4).
VideoFamily(
name = "ltx-2",
+ trainable = True,
+ label = "LTX-2",
+ profile = FamilyProfile(
+ int8_exclude_tokens = _LTX2_INT8_EXCLUDES,
+ # 2.3 is the same audiovisual DiT, and builders spell it by its version.
+ quant_names = ("ltx-2.3",),
+ untiled_vae = _LTX2_VAE_UNTILED,
+ compile_static = True,
+ stg_compile_adapter = True,
+ preview_factors = "ltx2",
+ trusted_repos = ("lightricks/ltx-2.3-fp8",),
+ ),
pipeline_class = "LTX2Pipeline",
transformer_class = "LTX2VideoTransformer3DModel",
base_repo = "Lightricks/LTX-2",
@@ -544,6 +653,13 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# temporal compression 4 gives valid frame counts 4k+1. Defaults 20 steps / CFG 5 (ComfyUI's template).
VideoFamily(
name = "wan2.2-ti2v-5b",
+ profile = FamilyProfile(
+ untiled_vae = UntiledVae(bytes_per_latent_pixel = 2.5 * 2**20, output_scale = (16, 4)),
+ preview_factors = "wan22_5b",
+ auto_static_skip = (
+ ("wan-ai/wan2.2-ti2v-5b-diffusers", (("default", 2), ("max", 3), ("steps", 50))),
+ ),
+ ),
comfy_flow_shift = 8.0, # ComfyUI ModelSamplingSD3 8 (TI2V-5B template)
pipeline_class = "WanPipeline",
transformer_class = "WanTransformer3DModel",
@@ -587,6 +703,14 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# transformer_2, so cfg2_kwarg is threaded only here.
VideoFamily(
name = "wan2.2-t2v-a14b",
+ profile = FamilyProfile(
+ auto_prefer = AutoPrefer(
+ floor = (10, 0),
+ schemes = ("nvfp4", "int8", "fp8", "mxfp8"),
+ backend = "flashinfer",
+ ),
+ untiled_vae = _WAN21_VAE_UNTILED,
+ ),
comfy_flow_shift = 5.0, # ComfyUI ModelSamplingSD3 5 (T2V-A14B template)
pipeline_class = "WanPipeline",
transformer_class = "WanTransformer3DModel",
@@ -634,6 +758,7 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# Wan2.1-T2V-1.3B: 480P only (upstream calls 720P unstable for 1.3B).
VideoFamily(
name = "wan2.1-t2v-1.3b",
+ profile = FamilyProfile(untiled_vae = _WAN21_VAE_UNTILED),
comfy_flow_shift = 8.0, # reference workflow shift; replaces the repo's flow_shift 3.0
pipeline_class = "WanPipeline",
transformer_class = "WanTransformer3DModel",
@@ -654,6 +779,7 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# Wan2.1-T2V-14B: same keys as one Wan2.2 A14B expert, run as a single denoiser.
VideoFamily(
name = "wan2.1-t2v-14b",
+ profile = FamilyProfile(untiled_vae = _WAN21_VAE_UNTILED),
comfy_flow_shift = 5.0, # reference 14B workflow shift (the 1.3B uses 8); replaces the repo's flow_shift 3.0
pipeline_class = "WanPipeline",
transformer_class = "WanTransformer3DModel",
@@ -676,6 +802,14 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# so only the community repacks load.
VideoFamily(
name = "hunyuanvideo-1.5",
+ profile = FamilyProfile(
+ int8_exclude_tokens = _HUNYUAN15_INT8_EXCLUDES,
+ nvfp4_zero_row_tokens = _HUNYUAN15_NVFP4_ZERO_ROW_TOKENS,
+ preview_factors = "hv15",
+ auto_static_skip = (
+ ("hunyuanvideo-community/hunyuanvideo-1.5-diffusers-480p_t2v", (("max", 2), ("steps", 50))),
+ ),
+ ),
comfy_flow_shift = 7.0, # ComfyUI model default and template shift 7
pipeline_class = "HunyuanVideo15Pipeline",
transformer_class = "HunyuanVideo15Transformer3DModel",
@@ -710,6 +844,11 @@ _FAMILIES: tuple[VideoFamily, ...] = (
# own family so a 720p load defaults to 720p sizes; the full-path alias outranks the generic token.
VideoFamily(
name = "hunyuanvideo-1.5-720p",
+ profile = FamilyProfile(
+ int8_exclude_tokens = _HUNYUAN15_INT8_EXCLUDES,
+ nvfp4_zero_row_tokens = _HUNYUAN15_NVFP4_ZERO_ROW_TOKENS,
+ preview_factors = "hv15",
+ ),
comfy_flow_shift = 7.0, # ComfyUI model default and template shift 7
pipeline_class = "HunyuanVideo15Pipeline",
transformer_class = "HunyuanVideo15Transformer3DModel",
diff --git a/studio/backend/core/inference/video_vae_untiled.py b/studio/backend/core/inference/video_vae_untiled.py
index 1628aae0c0e..39856a6e615 100644
--- a/studio/backend/core/inference/video_vae_untiled.py
+++ b/studio/backend/core/inference/video_vae_untiled.py
@@ -8,34 +8,27 @@ from __future__ import annotations
import os
from typing import Any, Optional
+from .family_profile import profile_table as _profile_table
+
UNTILED_ENV = "UNSLOTH_VIDEO_VAE_UNTILED"
-# Untiled fp16 decode peak per latent pixel (h x w), measured on a B200; frame count does not enter (Wan's causal cache
-# decodes one latent frame at a time). Scaled by the decoder's element size: fp32 peaked at 21.1 GiB vs fp16 9.6 GiB.
-# A14B: Wan2.1 VAE (8x spatial), measured <= 0.58 MiB per latent pixel at 480p / 720p.
+# Untiled decode peak models per family (``FamilyProfile.untiled_vae`` on the video registry, measured on a B200; the
+# reasoning sits next to the data). Per latent pixel (h x w) + the (spatial, temporal) RGB output for a causal decoder
+# (Wan), or per output frame x latent pixel + the temporal scale for a decoder holding every frame (LTX-2 / 2.3 / 2.5).
+_UNTILED = _profile_table("untiled_vae")
_BYTES_PER_LATENT_PIXEL = {
- "wan2.2-ti2v-5b": 2.5 * 2**20,
- "wan2.2-t2v-a14b": 0.6 * 2**20,
- "wan2.1-t2v-1.3b": 0.6 * 2**20,
- "wan2.1-t2v-14b": 0.6 * 2**20,
-}
-# (spatial, temporal) upsampling to the RGB output, which Wan's decode holds about twice (per-frame torch.cat, then
-# clamp) and which grows with frames: 1021 frames at 1280x704 is 5.2 GiB per fp16 copy.
-_OUTPUT_SCALE = {
- "wan2.2-ti2v-5b": (16, 4),
- "wan2.2-t2v-a14b": (8, 4),
- "wan2.1-t2v-1.3b": (8, 4),
- "wan2.1-t2v-14b": (8, 4),
+ name: m.bytes_per_latent_pixel
+ for name, m in _UNTILED.items()
+ if m.bytes_per_latent_pixel is not None
}
-# LTX-2 / 2.3 holds every frame: peak per output frame x latent pixel, 0.102-0.105 MiB measured bf16 (B200).
+_OUTPUT_SCALE = {name: m.output_scale for name, m in _UNTILED.items() if m.output_scale is not None}
_BYTES_PER_FRAME_LATENT_PIXEL = {
- "ltx-2": 0.11 * 2**20,
- # Same conv decoder layout as 2.3 (vae/ of the Diffusers pack); unmeasured, priced as 2.3.
- "ltx-2.5": 0.11 * 2**20,
+ name: m.bytes_per_frame_latent_pixel
+ for name, m in _UNTILED.items()
+ if m.bytes_per_frame_latent_pixel is not None
}
_TEMPORAL_SCALE = {
- "ltx-2": 8,
- "ltx-2.5": 8,
+ name: m.temporal_scale for name, m in _UNTILED.items() if m.temporal_scale is not None
}
_MARGIN = 1.25
_MARGIN_BYTES = 2 * 2**30
diff --git a/studio/backend/core/training/diffusion_train_common.py b/studio/backend/core/training/diffusion_train_common.py
index 6ebba8c4849..38b25e0d94d 100644
--- a/studio/backend/core/training/diffusion_train_common.py
+++ b/studio/backend/core/training/diffusion_train_common.py
@@ -28,6 +28,7 @@ from core._torchao_stub import (
is_stubbed,
torch_is_rocm,
)
+from core.inference.diffusion_families import _FAMILIES as _IMAGE_REGISTRY
from core.inference.diffusion_families import (
detect_family,
detect_family_for_pick,
@@ -35,6 +36,7 @@ from core.inference.diffusion_families import (
trainable_family_names,
)
from core.inference.diffusion_torchao_patches import install_torchao_int_mm_patch
+from core.inference.video_families import _FAMILIES as _VIDEO_REGISTRY
from core.inference.video_families import detect_video_family, supported_video_family_names
from utils.paths.path_utils import drop_appledouble_metadata
@@ -72,9 +74,9 @@ _FORCE_BF16_FAMILIES: frozenset[str] = frozenset(
{"qwen-image", "z-image", "krea-2", "flux.2-klein", "flux.2-dev", "ltx-2", "minimax-h3"}
)
-# The video registry has no trainable flag, so the trainable set lives here and every name in it MUST resolve through
-# get_trainer; a video base outside it is refused by name.
-TRAINABLE_VIDEO_FAMILIES: frozenset[str] = frozenset({"ltx-2", "minimax-h3"})
+# ``VideoFamily.trainable``; every name in it MUST resolve through get_trainer, and a video base outside it is refused
+# by name.
+TRAINABLE_VIDEO_FAMILIES: frozenset[str] = frozenset(f.name for f in _VIDEO_REGISTRY if f.trainable)
# Families whose flow_shift default is "auto" (reproduce the family's INFERENCE sigma distribution) rather than the
# identity 1.0. Both schedulers set use_dynamic_shifting, so scheduler.sigmas is the unshifted uniform table and
@@ -538,18 +540,10 @@ def train_defaults(family: str) -> dict[str, Any]:
return dict(FAMILY_TRAIN_DEFAULTS.get((family or "").strip().lower(), {}))
-# Display labels + a short VRAM/access note per trainable family, surfaced by the Train UI so users pick a base with
-# realistic expectations.
+# Display labels (the registries' ``label``) + a short VRAM/access note per trainable family, surfaced by the Train UI
+# so users pick a base with realistic expectations.
_FAMILY_LABELS = {
- "sdxl": "SDXL",
- "flux.1": "FLUX.1-dev",
- "qwen-image": "Qwen-Image",
- "z-image": "Z-Image",
- "krea-2": "Krea 2",
- "flux.2-klein": "FLUX.2 Klein",
- "flux.2-dev": "FLUX.2-dev",
- "ltx-2": "LTX-2",
- "minimax-h3": "MiniMax-H3",
+ fam.name: fam.label for fam in (*_IMAGE_REGISTRY, *_VIDEO_REGISTRY) if fam.label
}
# params is the transformer size (SDXL is not quoted that way); note is the rest.
_FAMILY_TRAIN_SPECS: dict[str, dict[str, Any]] = {
diff --git a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
new file mode 100644
index 00000000000..3831ec8cf19
--- /dev/null
+++ b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
@@ -0,0 +1,3605 @@
+{
+ "auto_static_skip_by_base": {
+ "flux.1": {
+ "black-forest-labs/FLUX.1-schnell": null
+ },
+ "flux.1-kontext": {
+ "black-forest-labs/FLUX.1-Kontext-dev": null
+ },
+ "flux.2-dev": {
+ "black-forest-labs/FLUX.2-dev": null
+ },
+ "flux.2-klein": {
+ "black-forest-labs/FLUX.2-klein-4B": null,
+ "black-forest-labs/FLUX.2-klein-9B": null,
+ "black-forest-labs/FLUX.2-klein-base-4B": {
+ "default": 2,
+ "max": 3,
+ "steps": 50
+ },
+ "black-forest-labs/FLUX.2-klein-base-9B": null
+ },
+ "hidream-i1": {
+ "HiDream-ai/HiDream-I1-Full": null
+ },
+ "hunyuanimage-2.1": {
+ "hunyuanvideo-community/HunyuanImage-2.1-Diffusers": {
+ "max": 2,
+ "steps": 50
+ }
+ },
+ "hunyuanvideo-1.5": {
+ "hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v": {
+ "max": 2,
+ "steps": 50
+ }
+ },
+ "hunyuanvideo-1.5-720p": {
+ "hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-720p_t2v": null
+ },
+ "ideogram-4": {
+ "ideogram-ai/ideogram-4-fp8": null
+ },
+ "krea-2": {
+ "krea/Krea-2-Turbo": null
+ },
+ "ltx-2": {
+ "Lightricks/LTX-2": null
+ },
+ "ltx-2.5": {
+ "Lightricks/LTX-2.5-Diffusers": null
+ },
+ "lumina-2": {
+ "Alpha-VLLM/Lumina-Image-2.0": null
+ },
+ "minimax-h3": {
+ "MiniMaxAI/MiniMax-H3": {
+ "max": 2,
+ "steps": 30
+ }
+ },
+ "qwen-image": {
+ "Qwen/Qwen-Image": {
+ "default": 2,
+ "max": 3,
+ "steps": 20
+ }
+ },
+ "qwen-image-2.1": {
+ "Qwen/Qwen-Image-2.1": {
+ "default": 3,
+ "max": 3,
+ "steps": 25
+ },
+ "Qwen/Qwen-Image-2.1-Turbo": null
+ },
+ "qwen-image-edit": {
+ "Qwen/Qwen-Image-Edit-2511": null
+ },
+ "qwen-image-layered": {
+ "Qwen/Qwen-Image-Layered": null
+ },
+ "sdxl": {
+ "stabilityai/stable-diffusion-xl-base-1.0": null
+ },
+ "wan2.1-t2v-1.3b": {
+ "Wan-AI/Wan2.1-T2V-1.3B-Diffusers": null
+ },
+ "wan2.1-t2v-14b": {
+ "Wan-AI/Wan2.1-T2V-14B-Diffusers": null
+ },
+ "wan2.2-t2v-a14b": {
+ "Wan-AI/Wan2.2-T2V-A14B-Diffusers": null
+ },
+ "wan2.2-ti2v-5b": {
+ "Wan-AI/Wan2.2-TI2V-5B-Diffusers": {
+ "default": 2,
+ "max": 3,
+ "steps": 50
+ }
+ },
+ "z-image": {
+ "Tongyi-MAI/Z-Image-Turbo": null
+ }
+ },
+ "defaults": {
+ "flux.1": [
+ 4,
+ 0.0
+ ],
+ "flux.1-kontext": [
+ 20,
+ 2.5
+ ],
+ "flux.2-dev": [
+ 20,
+ 4.0
+ ],
+ "flux.2-klein": [
+ 4,
+ 1.0
+ ],
+ "hidream-i1": [
+ 50,
+ 5.0
+ ],
+ "hunyuanimage-2.1": [
+ 50,
+ 3.25
+ ],
+ "hunyuanvideo-1.5": {
+ "fields": [
+ 20,
+ 6.0
+ ],
+ "resolved": [
+ 20,
+ 6.0
+ ]
+ },
+ "hunyuanvideo-1.5-720p": {
+ "fields": [
+ 20,
+ 6.0
+ ],
+ "resolved": [
+ 20,
+ 6.0
+ ]
+ },
+ "ideogram-4": [
+ 20,
+ 7.0
+ ],
+ "krea-2": [
+ 8,
+ 0.0
+ ],
+ "ltx-2": {
+ "fields": [
+ 40,
+ 4.0
+ ],
+ "resolved": [
+ 40,
+ 4.0
+ ]
+ },
+ "ltx-2.5": {
+ "fields": [
+ 8,
+ 1.0
+ ],
+ "resolved": [
+ 8,
+ 1.0
+ ]
+ },
+ "lumina-2": [
+ 50,
+ 4.0
+ ],
+ "minimax-h3": {
+ "fields": [
+ 30,
+ 1.0
+ ],
+ "resolved": [
+ 30,
+ 1.0
+ ]
+ },
+ "qwen-image": [
+ 20,
+ 4.0
+ ],
+ "qwen-image-2.1": [
+ 25,
+ 1.0
+ ],
+ "qwen-image-edit": [
+ 40,
+ 4.0
+ ],
+ "qwen-image-layered": [
+ 20,
+ 2.5
+ ],
+ "sdxl": [
+ 25,
+ 7.0
+ ],
+ "wan2.1-t2v-1.3b": {
+ "fields": [
+ 30,
+ 6.0
+ ],
+ "resolved": [
+ 30,
+ 6.0
+ ]
+ },
+ "wan2.1-t2v-14b": {
+ "fields": [
+ 20,
+ 6.0
+ ],
+ "resolved": [
+ 20,
+ 6.0
+ ]
+ },
+ "wan2.2-t2v-a14b": {
+ "fields": [
+ 20,
+ 3.5
+ ],
+ "resolved": [
+ 20,
+ 3.5
+ ]
+ },
+ "wan2.2-ti2v-5b": {
+ "fields": [
+ 20,
+ 5.0
+ ],
+ "resolved": [
+ 20,
+ 5.0
+ ]
+ },
+ "z-image": [
+ 8,
+ 0.0
+ ]
+ },
+ "flags": {
+ "flux.1": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": [
+ [
+ 8,
+ 0
+ ],
+ [
+ 8,
+ 9
+ ],
+ [
+ 12,
+ 0
+ ]
+ ]
+ },
+ "flux.1-kontext": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": [
+ [
+ 8,
+ 0
+ ],
+ [
+ 8,
+ 9
+ ],
+ [
+ 12,
+ 0
+ ]
+ ]
+ },
+ "flux.2-dev": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "flux.2-klein": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "hidream-i1": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "hunyuanimage-2.1": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "hunyuanvideo-1.5": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "hunyuanvideo-1.5-720p": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "ideogram-4": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "krea-2": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "ltx-2": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": true,
+ "filter_reduction_configs_archs": []
+ },
+ "ltx-2.5": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": true,
+ "filter_reduction_configs_archs": []
+ },
+ "lumina-2": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "minimax-h3": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "qwen-image": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": [
+ [
+ 8,
+ 0
+ ],
+ [
+ 8,
+ 9
+ ],
+ [
+ 12,
+ 0
+ ]
+ ]
+ },
+ "qwen-image-2.1": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "qwen-image-edit": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": [
+ [
+ 8,
+ 0
+ ],
+ [
+ 8,
+ 9
+ ],
+ [
+ 12,
+ 0
+ ]
+ ]
+ },
+ "qwen-image-layered": {
+ "cudnn_benchmark": true,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": [
+ [
+ 8,
+ 0
+ ],
+ [
+ 8,
+ 9
+ ],
+ [
+ 12,
+ 0
+ ]
+ ]
+ },
+ "sdxl": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "wan2.1-t2v-1.3b": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "wan2.1-t2v-14b": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "wan2.2-t2v-a14b": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "wan2.2-ti2v-5b": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": []
+ },
+ "z-image": {
+ "cudnn_benchmark": false,
+ "filter_reduction_configs": false,
+ "filter_reduction_configs_archs": [
+ [
+ 8,
+ 0
+ ],
+ [
+ 8,
+ 9
+ ],
+ [
+ 12,
+ 0
+ ]
+ ]
+ }
+ },
+ "per_family": {
+ "": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": null,
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ " qwen-image ": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "qwen_image",
+ "te_int8_effective": "fp8"
+ },
+ "<None>": {
+ "auto": {
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "bf16": {
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "fp8": {
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ }
+ },
+ "QWEN-IMAGE": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "qwen_image",
+ "te_int8_effective": "int8"
+ },
+ "flux.1": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "flux1",
+ "te_int8_effective": "fp8"
+ },
+ "flux.1-kontext": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "flux1",
+ "te_int8_effective": "fp8"
+ },
+ "flux.2-dev": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "flux2",
+ "te_int8_effective": "int8"
+ },
+ "flux.2-klein": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "flux2",
+ "te_int8_effective": "fp8"
+ },
+ "hidream-i1": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": "INT8 is barely faster than compiled bf16 on a card that holds bf16 and changes image detail",
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "hunyuanimage-2.1": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "hunyuanvideo-1.5": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "context_embedder",
+ "image_embedder",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "ff_context"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": [
+ "image_embedder",
+ "context_embedder_2"
+ ]
+ },
+ "page": "video",
+ "preview_key": "hv15",
+ "te_int8_effective": "fp8"
+ },
+ "hunyuanvideo-1.5-720p": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "context_embedder",
+ "image_embedder",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "ff_context"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": [
+ "image_embedder",
+ "context_embedder_2"
+ ]
+ },
+ "page": "video",
+ "preview_key": "hv15",
+ "te_int8_effective": "fp8"
+ },
+ "ideogram-4": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "krea-2": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "ltx-2": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "audio",
+ "av_cross_attn",
+ "adaln"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": "ltx2",
+ "te_int8_effective": "fp8"
+ },
+ "ltx-2.5": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": true,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [
+ "unsloth/LTX-2.5-FP8"
+ ],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "audio",
+ "av_cross_attn",
+ "adaln"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": "ltx2",
+ "te_int8_effective": "fp8"
+ },
+ "lumina-2": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": "INT8 is no faster than compiled bf16 on a card that holds bf16 and changes image detail",
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "minimax-h3": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "adaln_proj"
+ ],
+ "pad": [
+ "context_embedder",
+ "token_refiner"
+ ],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "qwen-image": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "qwen_image",
+ "te_int8_effective": "int8"
+ },
+ "qwen-image-2.1": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": true,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": "Qwen-Image-2.1-INT8-ConvRot.safetensors",
+ "convrot_repo": "unsloth/Qwen-Image-2.1-FP8",
+ "convrot_spec": [
+ 256,
+ [
+ "attn.to_q",
+ "attn.to_k",
+ "attn.to_v",
+ "attn.to_out.0",
+ "img_mlp.gate_layer",
+ "img_mlp.proj",
+ "img_mlp.out"
+ ]
+ ],
+ "convrot_variant_repos": [
+ "unsloth/Qwen-Image-2.1-Turbo-FP8",
+ "unsloth/qwen-image-2.1-turbo-fp8"
+ ],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "txt_in"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "qwen_image_21",
+ "te_int8_effective": "fp8"
+ },
+ "qwen-image-edit": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "qwen_image",
+ "te_int8_effective": "int8"
+ },
+ "qwen-image-layered": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed",
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "int8"
+ },
+ "sdxl": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "sdxl",
+ "te_int8_effective": "fp8"
+ },
+ "unknown-family": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "wan2.1-t2v-1.3b": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "wan2.1-t2v-14b": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "wan2.2-t2v-a14b": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": null,
+ "te_int8_effective": "fp8"
+ },
+ "wan2.2-ti2v-5b": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": false,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "video",
+ "preview_key": "wan22_5b",
+ "te_int8_effective": "fp8"
+ },
+ "z-image": {
+ "auto": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "auto_bf16_when_resident": null,
+ "bf16": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "convrot_default_on": true,
+ "fp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "int8": {
+ "convrot_filename": "Z-Image-Turbo-INT8-ConvRot.safetensors",
+ "convrot_repo": "unsloth/Z-Image-Turbo-FP8",
+ "convrot_spec": [
+ 256,
+ [
+ "attention.to_q",
+ "attention.to_k",
+ "attention.to_v",
+ "attention.to_out.0",
+ "feed_forward.w1",
+ "feed_forward.w2",
+ "feed_forward.w3",
+ "cap_embedder.1"
+ ]
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "pad": [],
+ "zero_row": []
+ },
+ "mxfp8": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "nvfp4": {
+ "convrot_filename": null,
+ "convrot_repo": null,
+ "convrot_spec": [
+ 0,
+ []
+ ],
+ "convrot_variant_repos": [],
+ "exclude": [],
+ "pad": [],
+ "zero_row": []
+ },
+ "page": "image",
+ "preview_key": "zimage",
+ "te_int8_effective": "fp8"
+ }
+ },
+ "tables": {
+ "auto_static_skip": {
+ "black-forest-labs/flux.1-dev": {
+ "max": 3,
+ "steps": 28
+ },
+ "black-forest-labs/flux.1-krea-dev": {
+ "default": 2,
+ "max": 3,
+ "steps": 28
+ },
+ "black-forest-labs/flux.2-klein-base-4b": {
+ "default": 2,
+ "max": 3,
+ "steps": 50
+ },
+ "hunyuanvideo-community/hunyuanimage-2.1-diffusers": {
+ "max": 2,
+ "steps": 50
+ },
+ "hunyuanvideo-community/hunyuanvideo-1.5-diffusers-480p_t2v": {
+ "max": 2,
+ "steps": 50
+ },
+ "minimaxai/minimax-h3": {
+ "max": 2,
+ "steps": 30
+ },
+ "qwen/qwen-image": {
+ "default": 2,
+ "max": 3,
+ "steps": 20
+ },
+ "qwen/qwen-image-2.1": {
+ "default": 3,
+ "max": 3,
+ "steps": 25
+ },
+ "wan-ai/wan2.2-ti2v-5b-diffusers": {
+ "default": 2,
+ "max": 3,
+ "steps": 50
+ }
+ },
+ "content_video_families": [
+ "hunyuanvideo-1.5",
+ "hunyuanvideo-1.5-720p",
+ "ltx-2",
+ "ltx-2.5",
+ "minimax-h3",
+ "wan2.1-t2v-1.3b",
+ "wan2.1-t2v-14b",
+ "wan2.2-t2v-a14b",
+ "wan2.2-ti2v-5b"
+ ],
+ "family_auto_bf16_when_resident": {
+ "hidream-i1": "INT8 is barely faster than compiled bf16 on a card that holds bf16 and changes image detail",
+ "lumina-2": "INT8 is no faster than compiled bf16 on a card that holds bf16 and changes image detail"
+ },
+ "family_auto_prefer": {
+ "flux.1": {
+ "backend": null,
+ "consumer_ok": false,
+ "floor": [
+ 10,
+ 0
+ ],
+ "gated": true,
+ "schemes": [
+ "int8",
+ "fp8",
+ "nvfp4",
+ "mxfp8"
+ ]
+ },
+ "qwen-image": {
+ "backend": null,
+ "consumer_ok": false,
+ "floor": [
+ 10,
+ 0
+ ],
+ "gated": true,
+ "schemes": [
+ "int8",
+ "fp8",
+ "nvfp4",
+ "mxfp8"
+ ]
+ },
+ "qwen-image-2.1": {
+ "backend": null,
+ "consumer_ok": false,
+ "floor": [
+ 10,
+ 0
+ ],
+ "gated": true,
+ "schemes": [
+ "int8",
+ "fp8",
+ "nvfp4",
+ "mxfp8"
+ ]
+ },
+ "wan2.2-t2v-a14b": {
+ "backend": "flashinfer",
+ "consumer_ok": false,
+ "floor": [
+ 10,
+ 0
+ ],
+ "gated": false,
+ "schemes": [
+ "nvfp4",
+ "int8",
+ "fp8",
+ "mxfp8"
+ ]
+ },
+ "z-image": {
+ "backend": null,
+ "consumer_ok": false,
+ "floor": [
+ 10,
+ 0
+ ],
+ "gated": true,
+ "schemes": [
+ "int8",
+ "fp8",
+ "nvfp4",
+ "mxfp8"
+ ]
+ }
+ },
+ "family_scheme_deny": {
+ "qwen-image": [
+ "mxfp8",
+ "nvfp4"
+ ],
+ "qwen-image-edit": [
+ "mxfp8",
+ "nvfp4"
+ ],
+ "qwen-image-layered": [
+ "mxfp8",
+ "nvfp4"
+ ]
+ },
+ "family_train_scheme_deny": {
+ "minimax-h3": [
+ "fp8",
+ "mxfp8"
+ ],
+ "qwen-image": [
+ "fp8"
+ ],
+ "qwen-image-edit": [
+ "fp8"
+ ]
+ },
+ "int8_exclude_base": [
+ "norm",
+ "_mod",
+ "modulation",
+ "timestep_embed",
+ "guidance_embed",
+ "time_text_embed",
+ "pooled",
+ "time_embed"
+ ],
+ "int8_family_convrot": {
+ "qwen-image-2.1": [
+ 256,
+ [
+ "attn.to_q",
+ "attn.to_k",
+ "attn.to_v",
+ "attn.to_out.0",
+ "img_mlp.gate_layer",
+ "img_mlp.proj",
+ "img_mlp.out"
+ ]
+ ],
+ "z-image": [
+ 256,
+ [
+ "attention.to_q",
+ "attention.to_k",
+ "attention.to_v",
+ "attention.to_out.0",
+ "feed_forward.w1",
+ "feed_forward.w2",
+ "feed_forward.w3",
+ "cap_embedder.1"
+ ]
+ ]
+ },
+ "int8_family_convrot_default_on": [
+ "ltx-2.5",
+ "qwen-image-2.1",
+ "z-image"
+ ],
+ "int8_family_convrot_filename": {
+ "qwen-image-2.1": "Qwen-Image-2.1-INT8-ConvRot.safetensors",
+ "z-image": "Z-Image-Turbo-INT8-ConvRot.safetensors"
+ },
+ "int8_family_convrot_repo": {
+ "qwen-image-2.1": "unsloth/Qwen-Image-2.1-FP8",
+ "z-image": "unsloth/Z-Image-Turbo-FP8"
+ },
+ "int8_family_convrot_variant_repos": {
+ "ltx-2.5": [
+ "unsloth/LTX-2.5-FP8"
+ ],
+ "qwen-image-2.1": [
+ "unsloth/Qwen-Image-2.1-Turbo-FP8"
+ ]
+ },
+ "int8_family_exclude": {
+ "hunyuanvideo-1.5": [
+ "context_embedder",
+ "image_embedder",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "ff_context"
+ ],
+ "hunyuanvideo-1.5-720p": [
+ "context_embedder",
+ "image_embedder",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "ff_context"
+ ],
+ "ltx-2": [
+ "audio",
+ "av_cross_attn",
+ "adaln"
+ ],
+ "ltx-2.3": [
+ "audio",
+ "av_cross_attn",
+ "adaln"
+ ],
+ "ltx-2.5": [
+ "audio",
+ "av_cross_attn",
+ "adaln"
+ ],
+ "minimax-h3": [
+ "adaln_proj"
+ ],
+ "qwen-image": [
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "qwen-image-2.1": [
+ "txt_in"
+ ],
+ "qwen-image-edit": [
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ],
+ "qwen-image-layered": [
+ "txt_in",
+ "add_q_proj",
+ "add_k_proj",
+ "add_v_proj",
+ "to_add_out",
+ "txt_mlp"
+ ]
+ },
+ "int8_family_pad": {
+ "minimax-h3": [
+ "context_embedder",
+ "token_refiner"
+ ]
+ },
+ "nvfp4_family_zero_row": {
+ "hunyuanvideo-1.5": [
+ "image_embedder",
+ "context_embedder_2"
+ ],
+ "hunyuanvideo-1.5-720p": [
+ "image_embedder",
+ "context_embedder_2"
+ ]
+ },
+ "preview_family_factors": {
+ "flux.1": "flux1",
+ "flux.1-kontext": "flux1",
+ "flux.2-dev": "flux2",
+ "flux.2-klein": "flux2",
+ "hunyuanvideo-1.5": "hv15",
+ "hunyuanvideo-1.5-720p": "hv15",
+ "ltx-2": "ltx2",
+ "ltx-2.5": "ltx2",
+ "qwen-image": "qwen_image",
+ "qwen-image-2.1": "qwen_image_21",
+ "qwen-image-edit": "qwen_image",
+ "sdxl": "sdxl",
+ "wan2.2-ti2v-5b": "wan22_5b",
+ "z-image": "zimage"
+ },
+ "te_int8_skip": {
+ "flux.2-dev": [
+ 3,
+ 0
+ ],
+ "qwen-image": [
+ 6,
+ 6
+ ],
+ "qwen-image-edit": [
+ 6,
+ 6
+ ],
+ "qwen-image-layered": [
+ 6,
+ 6
+ ]
+ },
+ "train_family_labels": {
+ "flux.1": "FLUX.1-dev",
+ "flux.2-dev": "FLUX.2-dev",
+ "flux.2-klein": "FLUX.2 Klein",
+ "krea-2": "Krea 2",
+ "ltx-2": "LTX-2",
+ "minimax-h3": "MiniMax-H3",
+ "qwen-image": "Qwen-Image",
+ "sdxl": "SDXL",
+ "z-image": "Z-Image"
+ },
+ "trainable_video_families": [
+ "ltx-2",
+ "minimax-h3"
+ ],
+ "trusted_image_repos": [
+ "alpha-vllm/lumina-image-2.0",
+ "black-forest-labs/flux.1-dev",
+ "black-forest-labs/flux.1-kontext-dev",
+ "black-forest-labs/flux.1-krea-dev",
+ "black-forest-labs/flux.1-schnell",
+ "black-forest-labs/flux.2-dev",
+ "black-forest-labs/flux.2-klein-4b",
+ "black-forest-labs/flux.2-klein-9b",
+ "black-forest-labs/flux.2-klein-base-4b",
+ "black-forest-labs/flux.2-klein-base-9b",
+ "hidream-ai/hidream-i1-dev",
+ "hidream-ai/hidream-i1-fast",
+ "hidream-ai/hidream-i1-full",
+ "hunyuanvideo-community/hunyuanimage-2.1-diffusers",
+ "ideogram-ai/ideogram-4-fp8",
+ "ideogram-ai/ideogram-4-nf4",
+ "ideogram-ai/ideogram-4-nf4-diffusers",
+ "krea/krea-2-raw",
+ "krea/krea-2-turbo",
+ "qwen/qwen-image",
+ "qwen/qwen-image-2.1",
+ "qwen/qwen-image-2.1-turbo",
+ "qwen/qwen-image-2512",
+ "qwen/qwen-image-edit-2511",
+ "qwen/qwen-image-layered",
+ "stabilityai/sdxl-turbo",
+ "stabilityai/stable-diffusion-xl-base-1.0",
+ "tongyi-mai/z-image",
+ "tongyi-mai/z-image-turbo"
+ ],
+ "trusted_video_repos": [
+ "hunyuanvideo-community/hunyuanvideo-1.5-diffusers-480p_t2v",
+ "hunyuanvideo-community/hunyuanvideo-1.5-diffusers-720p_t2v",
+ "lightricks/ltx-2",
+ "lightricks/ltx-2.3",
+ "lightricks/ltx-2.3-fp8",
+ "lightricks/ltx-2.5",
+ "lightricks/ltx-2.5-diffusers",
+ "minimaxai/minimax-h3",
+ "wan-ai/wan2.1-t2v-1.3b-diffusers",
+ "wan-ai/wan2.1-t2v-14b-diffusers",
+ "wan-ai/wan2.2-t2v-a14b-diffusers",
+ "wan-ai/wan2.2-ti2v-5b-diffusers"
+ ],
+ "untiled_bytes_per_frame_latent_pixel": {
+ "ltx-2": 115343.36,
+ "ltx-2.5": 115343.36
+ },
+ "untiled_bytes_per_latent_pixel": {
+ "wan2.1-t2v-1.3b": 629145.6,
+ "wan2.1-t2v-14b": 629145.6,
+ "wan2.2-t2v-a14b": 629145.6,
+ "wan2.2-ti2v-5b": 2621440.0
+ },
+ "untiled_output_scale": {
+ "wan2.1-t2v-1.3b": [
+ 8,
+ 4
+ ],
+ "wan2.1-t2v-14b": [
+ 8,
+ 4
+ ],
+ "wan2.2-t2v-a14b": [
+ 8,
+ 4
+ ],
+ "wan2.2-ti2v-5b": [
+ 16,
+ 4
+ ]
+ },
+ "untiled_temporal_scale": {
+ "ltx-2": 8,
+ "ltx-2.5": 8
+ }
+ },
+ "untiled_decode_bytes": {
+ "": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ " qwen-image ": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "QWEN-IMAGE": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "hunyuanvideo-1.5": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "hunyuanvideo-1.5-720p": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "ltx-2": [
+ 23751504691,
+ 47503009382,
+ 195696158310,
+ 391392316620,
+ 12281760972,
+ 24563521945
+ ],
+ "ltx-2.5": [
+ 23751504691,
+ 47503009382,
+ 195696158310,
+ 391392316620,
+ 12281760972,
+ 24563521945
+ ],
+ "minimax-h3": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "unknown-family": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ],
+ "wan2.1-t2v-1.3b": [
+ 4007337984,
+ 8014675968,
+ 5083398144,
+ 10166796288,
+ 594874368,
+ 1189748736
+ ],
+ "wan2.1-t2v-14b": [
+ 4007337984,
+ 8014675968,
+ 5083398144,
+ 10166796288,
+ 594874368,
+ 1189748736
+ ],
+ "wan2.2-t2v-a14b": [
+ 4007337984,
+ 8014675968,
+ 5083398144,
+ 10166796288,
+ 594874368,
+ 1189748736
+ ],
+ "wan2.2-ti2v-5b": [
+ 16683663360,
+ 33367326720,
+ 21071790080,
+ 42143580160,
+ 2471772160,
+ 4943544320
+ ]
+ }
+}
diff --git a/studio/backend/tests/test_diffusion_family_data_freeze.py b/studio/backend/tests/test_diffusion_family_data_freeze.py
new file mode 100644
index 00000000000..1ffd0e243a5
--- /dev/null
+++ b/studio/backend/tests/test_diffusion_family_data_freeze.py
@@ -0,0 +1,194 @@
+# SPDX-License-Identifier: AGPL-3.0-only
+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+"""Freeze every resolved per-family table value, so moving the tables into family data cannot change them.
+
+The int8 exclude / ConvRot / NVFP4 policy sets are baked into published prequant artifacts and checked at load
+(``diffusion_prequant._validate_checkpoint`` requires the artifact's exclude tokens to be a superset of
+``exclude_tokens_for_scheme``), so a silent change here invalidates hosted checkpoints. The rest (preview factor keys,
+untiled VAE coefficients, labels, defaults, trusted repos, ...) is frozen with them so a data move stays a pure move.
+
+A deliberate change regenerates the fixture: ``UNSLOTH_FREEZE_UPDATE=1 pytest tests/test_diffusion_family_data_freeze.py``
+and the diff of ``tests/fixtures/diffusion_family_data_freeze.json`` is the review artifact.
+"""
+
+from __future__ import annotations
+
+import dataclasses
+import json
+import os
+from pathlib import Path
+
+import pytest
+
+FIXTURE = Path(__file__).parent / "fixtures" / "diffusion_family_data_freeze.json"
+
+_EXTRA_NAMES = ("", "unknown-family", "QWEN-IMAGE", " qwen-image ")
+
+
+def _jsonable(value):
+ if dataclasses.is_dataclass(value) and not isinstance(value, type):
+ return {f.name: _jsonable(getattr(value, f.name)) for f in dataclasses.fields(value)}
+ if isinstance(value, dict):
+ return {str(k): _jsonable(v) for k, v in sorted(value.items(), key = lambda kv: str(kv[0]))}
+ if isinstance(value, (frozenset, set)):
+ return sorted(_jsonable(v) for v in value)
+ if isinstance(value, (tuple, list)):
+ return [_jsonable(v) for v in value]
+ return value
+
+
+def _snapshot() -> dict:
+ from core.inference import diffusion_transformer_quant as tq
+ from core.inference import diffusion_precision as prec
+ from core.inference import video_vae_untiled as vu
+ from core.inference import diffusion_cache as dcache
+ from core.inference import diffusion_content as dcontent
+ from core.inference.diffusion_families import _FAMILIES as IMAGE, default_generation_params
+ from core.inference.video_families import _FAMILIES as VIDEO, default_video_generation_params
+ from core.inference.diffusion_preview_factors import FAMILY_FACTORS
+ from core.inference import diffusion as dimg
+ from core.inference import video as dvid
+ from core.training import diffusion_train_common as dtc
+
+ image_names = [f.name for f in IMAGE]
+ video_names = [f.name for f in VIDEO]
+ names = image_names + video_names + list(_EXTRA_NAMES)
+ schemes = list(tq.TQ_SCHEMES) + ["auto", "bf16"]
+
+ # Every repo id the registry names, as candidates for the per-repo ConvRot variant check.
+ repos = set()
+ for fam in (*IMAGE, *VIDEO):
+ repos.add(fam.base_repo)
+ for row in getattr(fam, "prequant_repos", ()):
+ repos.add(row[-1])
+ for row in getattr(fam, "prequant_variant_repos", ()):
+ repos.update((row[0], row[-1]))
+ repos.update(("unsloth/Qwen-Image-2.1-Turbo-FP8", "unsloth/qwen-image-2.1-turbo-fp8", "", "x/y"))
+ repos = sorted(repos)
+
+ per_family = {}
+ for name in names:
+ row = {}
+ for scheme in schemes:
+ variant_repos = [r for r in repos if tq.convrot_prequant_variant_repo(scheme, name, r)]
+ row[scheme] = {
+ "exclude": list(tq.exclude_tokens_for_scheme(scheme, name)),
+ "pad": list(tq.pad_tokens_for_scheme(scheme, name)),
+ "zero_row": list(tq.zero_row_tokens_for_scheme(scheme, name)),
+ "convrot_spec": _jsonable(tq.convrot_spec_for_scheme(scheme, name)),
+ "convrot_filename": tq.convrot_prequant_filename(scheme, name),
+ "convrot_repo": tq.convrot_prequant_repo(scheme, name),
+ "convrot_variant_repos": variant_repos,
+ }
+ row["convrot_default_on"] = tq.int8_convrot_enabled(name)
+ row["auto_bf16_when_resident"] = tq.auto_bf16_when_resident_reason(name)
+ row["te_int8_effective"] = prec.effective_te_quant("int8", name)
+ row["preview_key"] = FAMILY_FACTORS.get(str(name).strip().lower())
+ row["page"] = dcontent.family_page(name)
+ per_family[name] = row
+ # None as a family (the historical default) on every accessor.
+ per_family["<None>"] = {
+ scheme: {
+ "exclude": list(tq.exclude_tokens_for_scheme(scheme)),
+ "pad": list(tq.pad_tokens_for_scheme(scheme)),
+ "zero_row": list(tq.zero_row_tokens_for_scheme(scheme)),
+ "convrot_spec": _jsonable(tq.convrot_spec_for_scheme(scheme)),
+ }
+ for scheme in schemes
+ }
+
+ untiled = {}
+ for name in video_names + list(_EXTRA_NAMES):
+ untiled[name] = [
+ vu.untiled_decode_bytes(name, shape, itemsize)
+ for shape in ((1, 16, 5, 60, 104), (2, 48, 31, 44, 80), (1, 128, 16, 22, 40))
+ for itemsize in (2, 4)
+ ]
+
+ static_skip = {}
+ for fam in (*IMAGE, *VIDEO):
+ bases = [fam.base_repo, *getattr(fam, "named_variant_bases", ())]
+ static_skip[fam.name] = {b: dcache.auto_static_skip_entry(b) for b in bases}
+
+ flags = {}
+ for fam in (*IMAGE, *VIDEO):
+ flags[fam.name] = {
+ "cudnn_benchmark": getattr(fam, "cudnn_benchmark", True),
+ "filter_reduction_configs": bool(getattr(fam, "filter_reduction_configs", False)),
+ "filter_reduction_configs_archs": _jsonable(
+ tuple(getattr(fam, "filter_reduction_configs_archs", None) or ())
+ ),
+ }
+
+ defaults = {}
+ for fam in IMAGE:
+ defaults[fam.name] = list(default_generation_params(fam.base_repo))
+ for fam in VIDEO:
+ defaults[fam.name] = {
+ "fields": [fam.default_steps, fam.default_guidance],
+ "resolved": list(
+ default_video_generation_params(
+ fam.base_repo,
+ fallback = (fam.default_steps, fam.default_guidance),
+ family = fam.name,
+ )
+ ),
+ }
+
+ return _jsonable(
+ {
+ "per_family": per_family,
+ "tables": {
+ "int8_exclude_base": tq._INT8_EXCLUDE_NAME_TOKENS,
+ "int8_family_exclude": tq._INT8_FAMILY_EXCLUDE_NAME_TOKENS,
+ "int8_family_pad": tq._INT8_FAMILY_PAD_NAME_TOKENS,
+ "int8_family_convrot": tq._INT8_FAMILY_CONVROT,
+ "int8_family_convrot_filename": tq._INT8_FAMILY_CONVROT_FILENAME,
+ "int8_family_convrot_repo": tq._INT8_FAMILY_CONVROT_REPO,
+ "int8_family_convrot_variant_repos": tq._INT8_FAMILY_CONVROT_VARIANT_REPOS,
+ "int8_family_convrot_default_on": tq._INT8_FAMILY_CONVROT_DEFAULT_ON,
+ "nvfp4_family_zero_row": tq._NVFP4_FAMILY_ZERO_ROW_NAME_TOKENS,
+ "family_scheme_deny": tq._FAMILY_SCHEME_DENY,
+ "family_auto_prefer": tq._FAMILY_AUTO_PREFER,
+ "family_auto_bf16_when_resident": tq._FAMILY_AUTO_BF16_WHEN_RESIDENT,
+ "family_train_scheme_deny": tq._FAMILY_TRAIN_SCHEME_DENY,
+ "te_int8_skip": prec._TE_INT8_SKIP,
+ "untiled_bytes_per_latent_pixel": vu._BYTES_PER_LATENT_PIXEL,
+ "untiled_output_scale": vu._OUTPUT_SCALE,
+ "untiled_bytes_per_frame_latent_pixel": vu._BYTES_PER_FRAME_LATENT_PIXEL,
+ "untiled_temporal_scale": vu._TEMPORAL_SCALE,
+ "preview_family_factors": FAMILY_FACTORS,
+ "auto_static_skip": dcache.AUTO_STATIC_SKIP,
+ "train_family_labels": dtc._FAMILY_LABELS,
+ "trainable_video_families": dtc.TRAINABLE_VIDEO_FAMILIES,
+ "content_video_families": dcontent._VIDEO_FAMILIES,
+ "trusted_image_repos": dimg._TRUSTED_NON_GGUF_REPOS,
+ "trusted_video_repos": dvid._TRUSTED_NON_GGUF_VIDEO_REPOS,
+ },
+ "untiled_decode_bytes": untiled,
+ "auto_static_skip_by_base": static_skip,
+ "flags": flags,
+ "defaults": defaults,
+ }
+ )
+
+
+def _clean_env(monkeypatch):
+ for var in (
+ "UNSLOTH_DIFFUSION_INT8_CONVROT",
+ "UNSLOTH_DIFFUSION_NVFP4",
+ "UNSLOTH_DIFFUSION_AUTO_STEP_SKIP",
+ "UNSLOTH_VIDEO_VAE_UNTILED",
+ ):
+ monkeypatch.delenv(var, raising = False)
+
+
+def test_family_data_resolves_identically(_clean_env):
+ snapshot = json.loads(json.dumps(_snapshot()))
+ if os.environ.get("UNSLOTH_FREEZE_UPDATE") == "1":
+ FIXTURE.write_text(json.dumps(snapshot, indent = 1, sort_keys = True) + "\n")
+ frozen = json.loads(FIXTURE.read_text())
+ for section in sorted(set(frozen) | set(snapshot)):
+ assert snapshot.get(section) == frozen.get(section), section