From ad6d6b54e6c190800c4a9e0250a2deae8734d6e4 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sat, 17 Oct 2026 03:20:57 +0300 Subject: [PATCH] fix: plainer loader warning for fp32 compute over bf16 weights Co-Authored-By: Claude Sonnet 5.5 --- modules/loaders/common.py | 4 ++-- modules/loaders/diffusion_model/nodes.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/loaders/common.py b/modules/loaders/common.py index 033741b1..c9bd4073 100644 --- a/modules/loaders/common.py +++ b/modules/loaders/common.py @@ -51,9 +51,9 @@ def unsupported_dtypes(model, weight_dtype, compute_dtype): def fp32_over_bf16(weight_dtype, compute_dtype, stored=None): """Why fp32 compute over bf16 weights is noisy, or None. It runs, but the activations go fp32 while the norm layers keep - their bf16 weights, so torch warns "Mismatch dtype between input and weight" and skips its fused layer norm. Allowed, but said.""" + their bf16 weights, so torch warns "Mismatch dtype between input and weight". Allowed, but said.""" if compute_dtype == "fp32" and (weight_dtype == "bf16" or (weight_dtype == "default" and stored == "bf16")): - return "compute dtype fp32 over bf16 weights runs, but torch will warn about a dtype mismatch in the norm layers (no fused kernel, a little slower)" + return "bf16 weights dtype with fp32 precision is a bad combo for H3. Don't expect miracles." _SHORT = {"bfloat16": "bf16", "float16": "fp16", "float32": "fp32"} diff --git a/modules/loaders/diffusion_model/nodes.py b/modules/loaders/diffusion_model/nodes.py index 30c8bec5..c0136203 100644 --- a/modules/loaders/diffusion_model/nodes.py +++ b/modules/loaders/diffusion_model/nodes.py @@ -251,7 +251,7 @@ class FunPackDiffusionModelLoader(io.ComfyNode): notes.append(line) mixed = fp32_over_bf16(weight_dtype, compute_dtype, stored) if mixed: - log.alert("FunPack Diffusion Model Loader", f"{mixed}. Set compute to default or bf16 to avoid it.") + log.alert("FunPack Diffusion Model Loader", mixed) notes.append(mixed) dtype = dtype_of(compute_dtype) if dtype is not None and hasattr(model, "set_model_compute_dtype"):