mirror of
https://github.com/vladmandic/automatic
synced 2026-09-08 22:08:42 +02:00
e8659c87ac
The mode shown in the load and unload lines was derived at print time from the live fuse setting, so a set applied under one setting was reported under whatever the setting said later, and the unload line described the pass that was about to replace it rather than the one being removed. The pass records the mode it actually used. last_backup_size was created on lora_common by assignment from networks.py and read back through a getattr default; both fields are declared where they live now.
24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
import os
|
|
from modules.lora import lora_timers
|
|
from modules.lora import network_lora, network_hada, network_ia3, network_oft, network_boft, network_lokr, network_full, network_norm, network_glora
|
|
|
|
|
|
timer = lora_timers.Timer()
|
|
debug = os.environ.get('SD_LORA_DEBUG', None) is not None
|
|
module_types = [
|
|
network_lora.ModuleTypeLora(),
|
|
network_hada.ModuleTypeHada(),
|
|
network_ia3.ModuleTypeIa3(),
|
|
network_boft.ModuleTypeBOFT(), # ahead of oft, which claims any oft_blocks key without checking its rank
|
|
network_oft.ModuleTypeOFT(),
|
|
network_lokr.ModuleTypeLokr(),
|
|
network_full.ModuleTypeFull(),
|
|
network_norm.ModuleTypeNorm(),
|
|
network_glora.ModuleTypeGLora(),
|
|
]
|
|
loaded_networks: list = [] # no type due to circular import
|
|
previously_loaded_networks: list = [] # no type due to circular import
|
|
extra_network_lora = None # initialized in extra_networks.py
|
|
last_backup_size: int = 0 # bytes of weight backups the last activate pass held
|
|
last_mode: str = '' # how that pass left the weights: backup, fuse or factor
|