mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[GH-ISSUE #204] dequantize_int8_simple_dtype: cuda/hip drop leading dims when a one-element scale has more dims than q #60
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#60
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?
Originally created by @arcusbuilds on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/204
cuda and hip use scalar mode whenever
scale.numel() == 1. Eager doesq.float() * scale, which broadcasts, so a one-element scale with more dims thanqchanges the output shape:Values match; only the shape differs. The check is in
backends/cuda/__init__.pyandbackends/hip/__init__.py. ascend is fine. The Triton version in #197 copies the cuda check.Fix: use scalar mode only when
scale.dim() <= q.dim(), and send other shapes to the existing eager fallback. PR to follow. Real callers pass a scalar or a[rows, 1]scale, so this is low impact.