From 341932b58fb72e5a8424282d1a51b7c3c6f8f5f0 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Mon, 11 Aug 2025 01:34:25 +0300 Subject: [PATCH] Fix unmerged lora application on unquantized models --- nodes_model_loading.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes_model_loading.py b/nodes_model_loading.py index a2b064e..19b9679 100644 --- a/nodes_model_loading.py +++ b/nodes_model_loading.py @@ -1036,9 +1036,9 @@ class WanVideoModelLoader: for k, v in sd.items(): if k.endswith(".scale_weight"): scale_weights[k] = v - if not merge_loras: - from .fp8_optimization_v2 import _replace_linear - transformer = _replace_linear(transformer, base_dtype, sd, scale_weights=scale_weights) + if not merge_loras: + from .fp8_optimization_v2 import _replace_linear + transformer = _replace_linear(transformer, base_dtype, sd, scale_weights=scale_weights) if "fp8_e4m3fn" in quantization: dtype = torch.float8_e4m3fn