Wire the hosted HunyuanImage 2.1 int8/fp8 checkpoints
Verified bit-identical to on-the-fly quantize: all 1264 state dict tensors (456 quantized) dequantize equal between the loaded checkpoint and a fresh quantize_ pass, so quality matches the runtime Dtype path exactly. Same-seed LPIPS suite means (0.35 int8 / 0.28 fp8) blend trajectory divergence with this family's own run-to-run nondeterminism (identical weights and seed reproduce a 17/255 mean pixel delta through the 50-step guider pipeline); per-case hard checks pass and the drift is compositional, reviewed visually. Uploaded to unsloth/HunyuanImage-2.1-FP8.
This commit is contained in:
parent
1b68c2c0a0
commit
dc3e079318
2 changed files with 17 additions and 0 deletions
|
|
@ -339,6 +339,14 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
|
|||
# HunyuanImage-3.0, which stays excluded above: 2.1 has a real diffusers pipeline.
|
||||
DiffusionFamily(
|
||||
name = "hunyuanimage-2.1",
|
||||
# Hosted checkpoints, verified bit-identical to on-the-fly quantize (the family's
|
||||
# guider pipeline is not run-to-run deterministic, so same-seed LPIPS vs bf16 blends
|
||||
# trajectory divergence with harness noise; per-case hard checks pass and the drift is
|
||||
# compositional, reviewed visually).
|
||||
prequant_repos = (
|
||||
("int8", "unsloth/HunyuanImage-2.1-FP8"),
|
||||
("fp8", "unsloth/HunyuanImage-2.1-FP8"),
|
||||
),
|
||||
pipeline_class = "HunyuanImagePipeline",
|
||||
transformer_class = "HunyuanImageTransformer2DModel",
|
||||
base_repo = "hunyuanvideo-community/HunyuanImage-2.1-Diffusers",
|
||||
|
|
|
|||
|
|
@ -191,6 +191,15 @@ def test_hunyuanimage21_generation_defaults():
|
|||
) == (50, 3.25)
|
||||
|
||||
|
||||
def test_hunyuanimage21_prequant_wiring():
|
||||
# Hosted int8/fp8 checkpoints, verified bit-identical to on-the-fly quantize.
|
||||
from core.inference.diffusion_families import family_prequant_repo
|
||||
|
||||
fam = detect_family("hunyuanvideo-community/HunyuanImage-2.1-Diffusers")
|
||||
for scheme in ("int8", "fp8"):
|
||||
assert family_prequant_repo(fam, scheme) == "unsloth/HunyuanImage-2.1-FP8"
|
||||
|
||||
|
||||
def test_hunyuanimage21_bf16_component_table_present():
|
||||
fam = detect_family("hunyuanvideo-community/HunyuanImage-2.1-Diffusers")
|
||||
sizes = family_bf16_components_gb(fam)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue