51 Commits

Author SHA1 Message Date
CalamitousFelicitousness 55c3eb1325 refactor(lora): remove the lora_apply_te setting
Text encoder networks now apply unconditionally in the native path.

- remove the option, the per-request parameter and the control threading
- collapse activate_filtered into plain activate at all call sites
- drop the toggle from the prompt embed cache key
- register the retired key so existing configs load without warnings
2026-08-28 13:09:26 +01:00
CalamitousFelicitousness 4554b9a277 fix(lora): apply te networks before encode and honor lora_apply_te
Network activation ran after prompt encoding, so text encoder lora
weights never affected embeds on the first generation and the stale
result was then served from the embed cache. The trailing unfiltered
activate in network_load also overrode the te exclude filter, so the
lora_apply_te setting was never honored.

- parse and activate networks in process_base before pipeline args are built
- activate_filtered gates text encoder components on per-request or global
  lora_apply_te; used by base, hires, detailer and faceid call sites
- network_load accepts activate=False for callers that run their own
  deactivate/activate sequence with include/exclude
- network_activate walks excluded components in restore-only mode so a
  filtered text encoder reverts to backup instead of keeping stale deltas
- loaded_loras cache is single-entry since per-filter entries go stale when
  the setting toggles
- prompt embed cache key includes the effective lora_apply_te value
2026-07-08 03:06:04 +01:00
Vladimir Mandic 5e99dee3c2 full codespell coverage
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-04 12:36:10 +02:00
awsr 2a0f55e0b5 Additional minor typing 2026-05-17 11:14:55 -07:00
awsr 6e153e1980 Cast correct type for opts.lora_force_reload 2026-05-17 10:06:43 -07:00
awsr 8fed5afe62 Fix method signature 2026-05-17 10:06:31 -07:00
awsr 3ff0c6d8be Add typing 2026-05-17 10:05:43 -07:00
awsr 4e5291b1f8 Document reason for type ignore 2026-05-17 09:55:38 -07:00
awsr 4944a296c2 Move extra_data type hint 2026-05-17 09:55:00 -07:00
Vladimir Mandic 4747ca2fc0 lora change detection improvements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 09:38:54 +02:00
awsr a0ef5fa58e Remove old commented-out code 2026-05-04 21:35:00 -07:00
awsr ac90ab7b0b Remove old/unused stepwise code 2026-05-04 21:32:39 -07:00
vladmandic 4bd6e42c62 fix lora deactivate
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-13 12:12:04 +01:00
Vladimir Mandic e5c494f999 cleanup logger 2026-02-19 11:09:13 +01:00
Vladimir Mandic a3074baf8b unified logger 2026-02-19 09:46:42 +01:00
Vladimir Mandic bfe014f5da modernize typing 2026-02-19 09:15:37 +01:00
vladmandic 363cb175aa allow different lora in hires
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-09 22:31:00 +01:00
vladmandic a4671045b6 lint and crlf
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-24 10:28:46 +01:00
awsr 418f27266e Add compatibility fallback just in case 2026-01-21 16:57:58 -08:00
awsr 3298f3db9a Rework prompt parsing/processing
- Return consistent structure
2026-01-21 16:57:05 -08:00
vladmandic 16293375dc lora native stack improvements
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-18 10:06:03 +01:00
Vladimir Mandic c6593ac180 fix detailer with lora
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-09 09:14:26 -05:00
Vladimir Mandic e8b5ea3847 major refactor: remove backend original
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-07-05 13:16:46 -04:00
Vladimir Mandic b5031a5eba lora modularize code
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-04-01 13:39:47 -04:00
Vladimir Mandic d4a67dd946 lora logging
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-03-15 19:04:03 -04:00
Vladimir Mandic 761d04dd87 add mod regional tiling
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-02-12 11:15:19 -05:00
Vladimir Mandic 910f5d0a73 lora direct on-demand apply/unapply
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-12-29 12:38:19 -05:00
Vladimir Mandic e7f0047d52 add granular vae tiling options
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-12-25 12:38:21 -05:00
Vladimir Mandic 383d7052ac lora split te apply
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-12-09 15:23:22 -05:00
Vladimir Mandic 1185950c4a yet another lora refactor
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-12-09 13:40:19 -05:00
Vladimir Mandic 507636d0a1 lora-refactor
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-12-01 10:54:51 -05:00
Vladimir Mandic 6aa7a4707e modules.lora full integration
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-11-29 09:39:38 -05:00
AI-Casanova 3932d5fd1b Move embedder object, cleanup stepwise lora 2024-10-30 23:24:50 -05:00
AI-Casanova f3442abc92 Prompt LRU Cache 2024-10-26 18:47:11 -05:00
Vladimir Mandic 89b33c584e fix send-to-control
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2024-10-24 08:48:26 -04:00
Vladimir Mandic d63f35e298 add cudaMallocAsync 2024-05-16 18:02:55 -04:00
Vladimir Mandic b137f67edc lint changes 2024-05-07 09:56:32 -04:00
Vladimir Mandic 0629e66f44 infotext parse update 2024-03-12 09:18:39 -04:00
Vladimir Mandic 30383c3fe6 add aspect-ratio selector 2024-03-06 14:19:26 -05:00
AI-Casanova 8aef6e6052 Cleanup console spam 2024-03-05 17:53:22 -06:00
AI-Casanova 2da60f8628 Composable LoRA 2024-03-02 17:52:08 -06:00
Vladimir Mandic 3604213e1c legacy cleanups 2024-02-22 09:57:09 -05:00
Vladimir Mandic 204853afea global crlf to lf 2024-01-10 09:45:26 -05:00
Vladimir Mandic df7c04ab27 add keep-interrupted option 2023-10-20 11:51:47 -04:00
Vladimir Mandic 8e22fbbdb6 add style as en provider 2023-10-07 08:07:42 -04:00
Vladimir Mandic 8000d1965d new extra networks 2023-06-30 15:29:31 -04:00
Vladimir Mandic 9334b2f21c jumbo merge part three 2023-06-14 13:54:23 -04:00
Vladimir Mandic cb307399dd jumbo merge 2023-06-13 11:59:56 -04:00
Vladimir Mandic c470f39913 merge fixes 2023-05-04 16:55:41 -04:00
Vladimir Mandic ed8819b8fc lycoris, strong linting, model keyword, circular imports 2023-04-15 10:28:31 -04:00