From 5b694d3300ee96feb731a3275d9f528834c6db2b Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Fri, 17 Jul 2026 11:32:07 +0100 Subject: [PATCH] fix(lora): default dyn_dim to none when caller omits dyn_dims network_load seeded net.dyn_dim with extra_networks_default_multiplier when no dyn_dims list was passed, so a float multiplier landed where consumers expect a rank and slice with it. The prompt path always builds a per-network list of ints or None, which is why the crash never fired from the UI; any direct network_load caller hits it in both rebuild_conventional and the sdnq factor path. --- modules/lora/lora_load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lora/lora_load.py b/modules/lora/lora_load.py index 29731d810..b7c3c6aa0 100644 --- a/modules/lora/lora_load.py +++ b/modules/lora/lora_load.py @@ -307,7 +307,7 @@ def network_load(names, te_multipliers=None, unet_multipliers=None, dyn_dims=Non sd_model.embedding_db.load_diffusers_embedding(None, net.bundle_embeddings) net.te_multiplier = te_multipliers[i] if te_multipliers else shared.opts.extra_networks_default_multiplier net.unet_multiplier = unet_multipliers[i] if unet_multipliers else shared.opts.extra_networks_default_multiplier - net.dyn_dim = dyn_dims[i] if dyn_dims else shared.opts.extra_networks_default_multiplier + net.dyn_dim = dyn_dims[i] if dyn_dims else None # a multiplier is not a rank; float dyn_dim crashes every consumer that slices with it l.loaded_networks.append(net) while len(lora_cache) > shared.opts.lora_in_memory_limit: