Comfy-Org / Comfy-Org/comfy-kitchen

INT8 support

Open
#9 7 comments 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
220
Forks
91
Avg merge
1d 7h
Merged PRs (30d)
12

Description

For nvidia gpus with 8.0 <= compute capability < 8.9 which don't have fp8 support, torch._int_mm can be used for torch.int8 matmul. from my own testing, this results in a ~30% performance increase over bf16/fp16 matmul when torch.compiled. this could be used with fp8 by dequantizing before re-quantizing to int8, or it could be used with int8 weights or bit-packed lower precision (u)int weights. in my own [extension](https://github.com/kanttouchthis/ComfyUI-SDNQ) i use this technique with svd for fast and reasonably accurate 4 bit quantization, but it would be great to see first party support. it should also be fairly easy to implement an int8 matmul kernel in cuda/triton for other gpus.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.