SDNQ clamp weight_std and add CosmosTransformer3DModel keys

This commit is contained in:
Disty0
2026-02-04 00:31:00 +03:00
parent 40df9ce689
commit df30ba28ac
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -314,6 +314,10 @@ module_skip_keys_dict = {
["layers.0.adaLN_modulation.0.weight", "t_embedder", "cap_embedder", "siglip_embedder", "all_x_embedder", "all_final_layer"],
{}
],
"CosmosTransformer3DModel": [
["patch_embed", "time_embed", "norm_out", "proj_out", "crossattn_proj"],
{}
],
"GlmImageTransformer2DModel": [
["transformer_blocks.0.norm1.linear.weight", "image_projector", "glyph_projector", "prior_projector", "time_condition_embed", "norm_out", "proj_out"],
{}
+1 -1
View File
@@ -421,7 +421,7 @@ def sdnq_quantize_layer_weight_dynamic(weight, layer_class_name=None, weights_dt
torch_dtype = weight.dtype
weights_dtype_order_to_use = weights_dtype_order_fp32 if torch_dtype in {torch.float32, torch.float64} else weights_dtype_order
weight = weight.to(dtype=torch.float32)
weight_std = weight.std().square()
weight_std = weight.std().square_().clamp_(min=1e-8)
if use_svd:
try: