diff --git a/studio/backend/core/inference/diffusion_families.py b/studio/backend/core/inference/diffusion_families.py index 41125e638b..b3f5da0042 100644 --- a/studio/backend/core/inference/diffusion_families.py +++ b/studio/backend/core/inference/diffusion_families.py @@ -363,6 +363,13 @@ _FAMILIES: tuple[DiffusionFamily, ...] = ( # need the same TE4 assembly for tiny demand, so no GGUF artifact is wired yet. DiffusionFamily( name = "hidream-i1", + # Hosted checkpoints: 28/28 per-case gate pairs per scheme (LPIPS suite means 0.291 + # int8 / 0.278 fp8, the 50-step trajectory band); int8 verified bit-identical to + # on-the-fly quantize across all 1615 state dict tensors. + prequant_repos = ( + ("int8", "unsloth/HiDream-I1-Full-FP8"), + ("fp8", "unsloth/HiDream-I1-Full-FP8"), + ), pipeline_class = "HiDreamImagePipeline", transformer_class = "HiDreamImageTransformer2DModel", base_repo = "HiDream-ai/HiDream-I1-Full", diff --git a/studio/backend/tests/test_diffusion_more_families.py b/studio/backend/tests/test_diffusion_more_families.py index 724cd660d2..67f769fa9c 100644 --- a/studio/backend/tests/test_diffusion_more_families.py +++ b/studio/backend/tests/test_diffusion_more_families.py @@ -296,6 +296,16 @@ def test_ideogram4_memory_table_counts_both_dits(): assert text_encoders_gb > 5.0 +def test_hidream_prequant_wiring(): + # Hosted int8/fp8 checkpoints (28/28 per-case gate pairs per scheme; int8 verified + # bit-identical to on-the-fly quantize) serve the family default base. + from core.inference.diffusion_families import family_prequant_repo + + fam = detect_family("HiDream-ai/HiDream-I1-Full") + for scheme in ("int8", "fp8"): + assert family_prequant_repo(fam, scheme) == "unsloth/HiDream-I1-Full-FP8" + + def test_hidream_quant_schemes_not_denied_and_no_extra_excludes(): # Measured on a B200 (outputs/hidream_smoke): int8 and fp8 both engage and render # cleanly, including a 2-3 token prompt on int8 -- the routed MoE expert Linears