[PR #43] [docs] Fix QuantizedTensor.from_float examples to use layout name strings #100

Open
opened 2026-10-26 22:20:23 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/43
Author: @BhagyeshKothalkar
Created: 5/24/2026
Status: 🔄 Open

Base: main ← Head: fix-readme-keyerror


📝 Commits (1)

  • 9fd8981 Fix quantized tensor examples to use layout name strings

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 README.md (+2 -2)
📝 comfy_kitchen/tensor/fp8.py (+1 -1)

📄 Description

Summary

This PR updates the QuantizedTensor.from_float(...) examples to match the current API.

What changed

  • Fixed the README example to pass the registered layout name string
  • Fixed the TensorCoreFP8Layout docstring example to do the same

Why

QuantizedTensor.from_float(...) currently expects layout_cls to be the registered layout name string, not the layout class object itself. Internally, the implementation resolves that string through the LAYOUTS registry in comfy_kitchen.tensor.base. While the codebase and test suite correctly pass this string, the README examples and docstrings pass the layout class object.

As a result, passing TensorCoreFP8Layout directly raises a lookup error, while passing "TensorCoreFP8Layout" works as intended. This PR updates the examples to reflect the behavior implemented by the current API.

Scope

Documentation only; no implementation changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-kitchen/pull/43 **Author:** [@BhagyeshKothalkar](https://github.com/BhagyeshKothalkar) **Created:** 5/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-readme-keyerror` --- ### 📝 Commits (1) - [`9fd8981`](https://github.com/Comfy-Org/comfy-kitchen/commit/9fd89816bcc674efa809afc461163dc7735acbc8) Fix quantized tensor examples to use layout name strings ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -2) 📝 `comfy_kitchen/tensor/fp8.py` (+1 -1) </details> ### 📄 Description ## Summary This PR updates the `QuantizedTensor.from_float(...)` examples to match the current API. ## What changed - Fixed the README example to pass the registered layout name string - Fixed the `TensorCoreFP8Layout` docstring example to do the same ## Why `QuantizedTensor.from_float(...)` currently expects `layout_cls` to be the registered layout name string, not the layout class object itself. Internally, the implementation resolves that string through the `LAYOUTS` registry in `comfy_kitchen.tensor.base`. While the codebase and test suite correctly pass this string, the README examples and docstrings pass the layout class object. As a result, passing `TensorCoreFP8Layout` directly raises a lookup error, while passing `"TensorCoreFP8Layout"` works as intended. This PR updates the examples to reflect the behavior implemented by the current API. ## Scope Documentation only; no implementation changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-kitchen#100
No description provided.