mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-05 07:47:40 +00:00
[PR #23] [CLOSED] Fix FP8 tensor support on MPS backend for Apple Silicon Macs #85
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/23
Author: @AoiYamada
Created: 1/17/2026
Status: ❌ Closed
Base:
main← Head:fix/convert-float8-e4m3fn-to-the-mps-backend-is-unsupported-error📝 Commits (1)
d99790efix: convert float8 e4m3fn to the mps backend is unsupported error📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
comfy_kitchen/backends/eager/quantization.py(+9 -0)📄 Description
Problem:
Users on Apple Silicon Macs (MPS backend) encounter
TypeError: Trying to convert Float8_e4m3fn to the MPS backend but it does not have support for that dtypewhen running FP8-quantized models through the sampler. This occurs because MPS does not natively support FP8 data type conversions.Related Issues:
(all report similar FP8/MPS compatibility issues)
Previous Attempts & Limitations:
--cpuflag): Makes generation prohibitively slowThe conversion script:
Root Cause:
The
comfy_kitchenquantization library attempts direct FP8 tensor operations on MPS, which lacks FP8 support. The error occurs indequantize_per_tensor_fp8()when trying to convert FP8 tensors to other formats on MPS.Solution:
Add a device-aware fallback in
dequantize_per_tensor_fp8():This minimal fix enables FP8-quantized models to work on Apple Silicon while:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.