Comfy-Org / Comfy-Org/comfy-kitchen
Clarification regarding the readme example
- Dominant language
- Python
- Stars
- 220
- Forks
- 91
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 12
Description
```py
from comfy_kitchen.tensor import QuantizedTensor, TensorCoreFP8Layout, TensorCoreNVFP4Layout
# Quantize a tensor
x = torch.randn(128, 256, device="cuda", dtype=torch.bfloat16)
qt = QuantizedTensor.from_float(x, TensorCoreFP8Layout)
# Operations dispatch to optimized kernels automatically
output = torch.nn.functional.linear(qt, weight_qt)
# Dequantize back to float
dq = qt.dequantize()
```
How is `weight_qt` computed in this case?
Also, is it recommended to quantize the input (which seems to be `qt` in this case) instead of the weights?
Contributor guide
Research direction
Start by reviewing the README example and the QuantizedTensor.from_float, TensorCoreFP8Layout, and dequantize entry points mentioned in the issue. Clarify how weight_qt is obtained and document the recommended choice between quantizing inputs and weights; the README should answer both questions directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100