mirror of
https://github.com/Comfy-Org/comfy-quants.git
synced 2026-11-04 23:37:27 +00:00
[GH-ISSUE #8] convrot is exactly same as or a wrapper around QuaRot Stage 1c, just ported from LLM linear layers to DiT/FLUX linear layers #1
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-quants#1
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 @bfmvshinigam on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-quants/issues/8
ConvRot is just a wrapper of QuaRot Stage 1c, ported from linear layers from LLM to DiT/FLUX. ConvRot should not be presented as a new method. It is just QuaRot Stage 1c repackaged for DiT/FLUX linear layers. Applying an existing method into a new architecture is a useful work. But presenting that application as a fundamentally new method is not acceptable. The work should be framed honestly as a DiT/FLUX wrapper or adaptation of QuaRot Stage 1c, with clear attribution.
The claimed novelty of ConvRot is entirely misleading. The authors describe grouped rotation as their first innovation, but QuaRot Stage 1C already uses the group-wise operator. In fact, the entire algorithmic flow of ConvRot is the same as QuaRot Stage 1C: both methods group the relevant channels or columns, apply rotations within each group, and rely on this group-wise transformation to redistribute outliers for quantization. The proposed “column imbalance” metric may help analyze the behavior of such rotations, but it does not change the fact that the core method is essentially inherited from QuaRot Stage 1C. Therefore, presenting grouped rotation and the associated procedure as original innovations of ConvRot is misleading unless the authors provide a precise technical distinction from QuaRot Stage 1C.
1. Both apply "group-wise" operator
Both ConvRot and QuaRot Stage 1c in essence apply the same block-wise Hadamard operator, though in different written forms.
QuaRot Stage 1c writes the rotation as one Kronecker-structured multiplication:
R = I_G \otimes H_{N_0},
which means applying the same Hadamard transform independently inside each channel group.
ConvRot write in a chunked form but in fact same operation as stage 1c in QuoRot.
Y =
\sum_{i=1}^{\lceil K/N_0\rceil}
\mathrm{RHT}(X_i)\mathrm{RHT}(W_i)^{\top}.
If concatenate the chunks as
X = [X_1,\ldots,X_G],
\qquad
W = [W_1,\ldots,W_G],
then applying RHT to every chunk is equivalent to multiplying the concatenated tensor by a block-diagonal Hadamard matrix. Assuming
K = G N_0, or after padding the last block if necessary, this block rotation isR=I_G \otimes H_{N_0}=
\begin{bmatrix}
H_{N_0} & 0 & \cdots & 0 \
0 & H_{N_0} & \cdots & 0 \
\vdots & \vdots & \ddots & \vdots \
0 & 0 & \cdots & H_{N_0}
\end{bmatrix}.
Therefore,
X\cdot R=[X_1,\ldots,X_G]
\begin{bmatrix}
H_{N_0} & 0 & \cdots & 0 \
0 & H_{N_0} & \cdots & 0 \
\vdots & \vdots & \ddots & \vdots \
0 & 0 & \cdots & H_{N_0}
\end{bmatrix}= [X_1H_{N_0},\ldots,X_GH_{N_0}]= \sum_{i=1}^{\lceil K/N_0\rceil}
\mathrm{RHT}(X_i)\mathrm{RHT}(W_i)^{\top}.
So ConvRot’s chunk-wise RHT formulation is the same as QuaRot Stage 1c’s Kronecker formulation. The difference is that QuaRot Stage 1c applies this to the attention projections, usually with group size
d_h, while ConvRot seems to apply the grouped operation to DIT , i.e.\text{QuaRot Stage 1c:}
W_{\mathrm{attn}}(I_G \otimes H_{N_0}),
\text{ConvRot: }
W_{\mathrm{linear}}(I_G \otimes H_{256}).
2. The equivalent Hadamard matrix
I’m also trying to understand whether ConvRot’s choice of a regular Hadamard matrix, rather than QuaRot Stage 1c’s Hadamard matrix, changes the operator in an essential way.
For
N_0 = 4^k, my understanding is that the two Hadamard matrices are equivalent up to input/output coordinate reorderings and sign flips:H^{\mathrm{regular}} = P H^{\mathrm{Sylv}} Q.
where
PandQare signed permutation matrices. In other words, the regular Hadamard does not seem to introduce a different kind of mixing from the Quarot stage 1c's Hadamard . It seems to use the same Hadamard mixing, but with a different ordering and sign convention for the input and output coordinates.To conclude, is there a specific layer, fusion boundary, normalization pattern, or residual path in ConvRot where the signed permutations
P,Qcannot be absorbed for free? If not, what is the main algorithmic difference between ConvRot and applying QuaRot Stage 1c’s block Hadamard rotation to DiT/FLUX linear layers?@BobJohnson24 commented on GitHub (Jul 5, 2026):
If you're having trouble with convrot being too derivative of quarot, I'd suggest taking it up with the paper authors https://arxiv.org/abs/2512.03673v1