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