Float, Half and BFloat16 mismatch: trace the failing operation
A dtype failure differs from a shape or device failure. Start with the traceback and incompatible operand types; a KSampler error alone does not identify the component that caused them.
Symptoms and scope
A dtype failure differs from a shape or device failure. Start with the traceback and incompatible operand types; a KSampler error alone does not identify the component that caused them.
Error fragments for search; IDs, values and filenames may vary:
mat1 and mat2 must have the same dtype
Float and Half
BFloat16
Source-supported context
Issue #6907 records a Float/Half failure after a Mac Desktop update. Its traceback reaches an attention torch.baddbmm call through several third-party extension frames; the report does not prove which component introduced the mismatch. BFloat16 is a general search term here, not an error reported in that case. PyTorch AMP guidance treats a type mismatch as a reason to inspect the operation, not to insert blanket casts. Source 1 Source 2 Source 3
Cases to distinguish
1. A loader or custom node casts only part of the computation path.
2. Quantization, attention or device fallback changes the compute dtype.
3. Partially updated core/extensions retain incompatible precision assumptions or startup options.
Diagnostic sequence
The sequence below is an editorial procedure based on the cited context, not a diagnosis already confirmed for your environment.
Step 1. Keep the exact dtype message, backend and full traceback. Find the failing operation and any third-party frames; do not assign blame from the KSampler node label alone. Separate stored weight precision from runtime tensor dtype.
Step 2. In a copy, compare the model or workflow author's documented backend and precision settings when available. Temporarily remove only optional quantization or acceleration, one change at a time, and monitor memory.
Step 3. Compare a same-family minimal native workflow, then reintroduce LoRA, controls and extensions one at a time.
Step 4. Report a stable minimal reproduction with versions. Source-level forced casting belongs to someone who understands the implementation, not a generic one-click patch.
Completion check
The operation completes with compatible types and valid output without a new memory or numerical failure. A resulting OOM is a separate problem.
Limitations and cautions
Converting everything to float32 can substantially increase memory; converting everything to half can introduce unsupported operations or numerical instability.
Original sources
- Float and Half mismatch on Mac Desktop — checked 2026-09-26.
- PyTorch AMP recipe — original record checked 2026-09-26.
- ComfyUI custom node troubleshooting — original record checked 2026-09-26.
English source review: 2026-09-26. No site-run workflow, GPU test, minimum-memory measurement or repair outcome is claimed.
Related troubleshooting and guides
Was this page helpful?
Anonymous. Only a yes/no counter is stored; no account, IP address or device details.
Sources & references
Reviewed ComfyUI issue #6907, PyTorch AMP guidance and ComfyUI custom-node troubleshooting on 2026-09-26. The issue shows an attention baddbmm failure and third-party frames, not a proven root cause. No site-run workflow, GPU test or confirmed repair is claimed.
01Float and Half mismatch on Mac DesktopSource checked: 2026-09-2602PyTorch AMP recipeSource checked: 2026-09-2603ComfyUI custom node troubleshootingSource checked: 2026-09-26