FP8 and FP4 sub-byte dtype support for PyTorch MPS on Apple Silicon via Metal shaders
Project description
FP8/FP4 support for PyTorch MPS on Apple Silicon.
Installing this lets ComfyUI use FP8 and FP4 weight checkpoints on MPS automatically.
Fast paths use Metal kernels. Fallback paths round-trip through CPU Torch for exact PyTorch-compatible bytes.
pip install fp4-fp8-for-torch-mps
Decode backend
FP8 e4m3fn and FP4 decode can use lut, lut4, arithmetic,
arithmetic4, or auto. Default: lut.
import fp4_fp8_for_torch_mps as mps_fp
mps_fp.set_decode_backend("lut")
Or:
FP4_FP8_MPS_DECODE_BACKEND=lut
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fp4_fp8_for_torch_mps-1.0.1.tar.gz.
File metadata
- Download URL: fp4_fp8_for_torch_mps-1.0.1.tar.gz
- Upload date:
- Size: 45.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e032aa62ca86686b993804995b0b49a1db3165a8bd4d30f674fe28fc8415b390
|
|
| MD5 |
dd69be8969b57e67184186083ac69880
|
|
| BLAKE2b-256 |
3b1961774ade237d4c5362f5084a4a6c69e84b98bfd0427d3beafc9a7ef3c885
|
Provenance
The following attestation bundles were made for fp4_fp8_for_torch_mps-1.0.1.tar.gz:
Publisher:
publishing.yml on AppMana/mps-fp8-for-torch-and-comfyui-python-package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fp4_fp8_for_torch_mps-1.0.1.tar.gz -
Subject digest:
e032aa62ca86686b993804995b0b49a1db3165a8bd4d30f674fe28fc8415b390 - Sigstore transparency entry: 1672603587
- Sigstore integration time:
-
Permalink:
AppMana/mps-fp8-for-torch-and-comfyui-python-package@4e8fc3d1b6c90ccb4fafae8104bbda51c92d088d -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/AppMana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishing.yml@4e8fc3d1b6c90ccb4fafae8104bbda51c92d088d -
Trigger Event:
release
-
Statement type:
File details
Details for the file fp4_fp8_for_torch_mps-1.0.1-py3-none-any.whl.
File metadata
- Download URL: fp4_fp8_for_torch_mps-1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63c2a2f3ea6ae9673eb91e340f3adc435349c7793bb844ec864d490cb6fc620c
|
|
| MD5 |
ce471126b0448dd0b067a5495326c67b
|
|
| BLAKE2b-256 |
0ed05a31a20bb8da070bcf640994151954770df7e8a344078c56ef9001419379
|
Provenance
The following attestation bundles were made for fp4_fp8_for_torch_mps-1.0.1-py3-none-any.whl:
Publisher:
publishing.yml on AppMana/mps-fp8-for-torch-and-comfyui-python-package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fp4_fp8_for_torch_mps-1.0.1-py3-none-any.whl -
Subject digest:
63c2a2f3ea6ae9673eb91e340f3adc435349c7793bb844ec864d490cb6fc620c - Sigstore transparency entry: 1672603590
- Sigstore integration time:
-
Permalink:
AppMana/mps-fp8-for-torch-and-comfyui-python-package@4e8fc3d1b6c90ccb4fafae8104bbda51c92d088d -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/AppMana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishing.yml@4e8fc3d1b6c90ccb4fafae8104bbda51c92d088d -
Trigger Event:
release
-
Statement type: