keep scale_weight on gpu to avoid needless casts

This commit is contained in:
kijai
2025-09-02 01:04:16 +03:00
parent 82608009c8
commit 42d7180759
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -1305,7 +1305,7 @@ class WanVideoModelLoader:
if "fp8" in quantization:
for k, v in sd.items():
if k.endswith(".scale_weight"):
scale_weights[k] = v.to(base_dtype)
scale_weights[k] = v.to(device, base_dtype)
if "fp8_e4m3fn" in quantization:
weight_dtype = torch.float8_e4m3fn