{"record":{"id":"0b6788e4df9f729d","repo":"unslothai/unsloth","slug":"base-precision-base-precision-r-is-not-supported","errorCode":null,"errorMessage":"base_precision={base_precision!r} is not supported for minimax-h3: its packed sequence mixes video, audio and text through one set of linears, so the activation range fp8 was measured against does not apply. Use 'nf4', 'int8', 'bf16', or 'auto'.","messagePattern":"base_precision=(.+?) is not supported for minimax-h3: its packed sequence mixes video, audio and text through one set of linears, so the activation range fp8 was measured against does not apply\\. Use 'nf4', 'int8', 'bf16', or 'auto'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/training/diffusion_train_common.py","lineNumber":1125,"sourceCode":"            if repo_is_prequantized(self.base_model):\n                raise ValueError(\n                    f\"base_precision={base_precision!r} needs a dense base repo, but \"\n                    f\"'{self.base_model}' is already bitsandbytes-quantized. Pick the \"\n                    f\"family's dense (bf16) base repo for this mode, or use nf4/auto.\"\n                )\n            if self.mixed_precision != \"bf16\":\n                raise ValueError(\n                    f\"base_precision={base_precision!r} trains in bf16 compute; set \"\n                    f\"mixed_precision to bf16.\"\n                )\n            # Refuse a scheme this family's DiT is known to corrupt, and also one the training bar holds back while\n            # inference allows it: qwen-image fp8 now renders inside the accuracy gate, but no one has measured whether a\n            # LoRA converges against fp8-frozen linears, so it fails fast here rather than silently training on faith.\n            # MiniMax-H3 runs all three modalities through one set of linears, so the\n            # per-family activation range the fp8 module filter was measured against does not\n            # describe it. Refuse the float8 modes rather than train against a clipped forward.\n            if resolved_family == \"minimax-h3\" and base_precision in (\"fp8\", \"mxfp8\"):\n                raise ValueError(\n                    f\"base_precision={base_precision!r} is not supported for minimax-h3: its \"\n                    f\"packed sequence mixes video, audio and text through one set of linears, \"\n                    f\"so the activation range fp8 was measured against does not apply. Use \"\n                    f\"'nf4', 'int8', 'bf16', or 'auto'.\"\n                )\n            # _family_train_denied, not _family_denied: it is the strict superset (every inference\n            # deny plus the training-only ones), so importing the narrower helper here would let a\n            # scheme cleared only for rendering reach a trainer.\n            from core.inference.diffusion_transformer_quant import _family_train_denied\n\n            if _family_train_denied(resolved_family, base_precision):\n                raise ValueError(\n                    f\"base_precision={base_precision!r} is not validated for training \"\n                    f\"{resolved_family}. Use 'nf4', 'int8', 'bf16', or 'auto'.\"\n                )\n        # flow_shift: None resolves to the family default (\"auto\" only for qwen-image, whose scheduler skips its static shift under use_dynamic_shifting); an explicit value is validated and kept.\n        flow_shift = self.flow_shift\n        if flow_shift is None:","sourceCodeStart":1107,"sourceCodeEnd":1143,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/training/diffusion_train_common.py#L1107-L1143","documentation":"MiniMax-H3 packs video, audio and text tokens through one shared set of transformer linears, so the per-family activation range the fp8 module filter was calibrated against does not describe it. Training with fp8 or mxfp8 quantization on that family could silently clip the forward pass, so the trainer fails fast instead.","triggerScenarios":"Starting a training run with resolved_family == 'minimax-h3' and base_precision in ('fp8', 'mxfp8'), with mixed_precision='bf16' and a dense base repo (both earlier gates passed).","commonSituations":"Reusing a qwen-image or flux fp8 recipe against a MiniMax-H3 base; assuming fp8 support is uniform across DiT families after inference-side fp8 shipped.","solutions":["Use base_precision='nf4', 'int8', 'bf16', or 'auto' for MiniMax-H3 training.","If fp8 memory savings are required, train a different family (e.g. qwen-image) that validates fp8, or wait until MiniMax-H3 fp8 is measured."],"exampleFix":"# before\ncfg = DiffusionLoraConfig(base_model='MiniMax/MiniMax-H3', base_precision='fp8', mixed_precision='bf16')\n# after\ncfg = DiffusionLoraConfig(base_model='MiniMax/MiniMax-H3', base_precision='nf4')","handlingStrategy":"validation","validationCode":"FP8_OK = {'qwen-image', 'flux', 'sdxl'}  # illustrative; keep in sync with the deny tables\ndef assert_family_precision(family, base_precision):\n    if family == 'minimax-h3' and str(base_precision).lower() in ('fp8', 'mxfp8'):\n        return 'nf4'  # or raise\n    return base_precision","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Maintain a per-family matrix of validated training precisions in your config layer and filter UI options by family.","Never assume an inference-supported quantization is training-supported; check _family_train_denied."],"tags":["training","config","precision","fp8","minimax-h3","diffusion"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}