mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Merge branch 'dev' into feature/chroma-support
This commit is contained in:
@@ -663,7 +663,7 @@ def load_diffuser(checkpoint_info=None, already_loaded_state_dict=None, timer=No
|
||||
from modules import modelstats
|
||||
modelstats.analyze()
|
||||
|
||||
shared.log.info(f"Load {op}: time={timer.summary()} native={get_native(sd_model)} memory={memory_stats()}")
|
||||
shared.log.info(f"Load {op}: family={shared.sd_model_type} time={timer.dct()} native={get_native(sd_model)} memory={memory_stats()}")
|
||||
|
||||
|
||||
class DiffusersTaskType(Enum):
|
||||
@@ -923,7 +923,7 @@ def set_diffusers_attention(pipe, quiet:bool=False):
|
||||
# if hasattr(pipe, 'pipe'):
|
||||
# set_diffusers_attention(pipe.pipe)
|
||||
|
||||
if 'ControlNet' in pipe.__class__.__name__ or not (pipe.__class__.__name__.startswith("StableDiffusion") and hasattr(pipe, "unet")):
|
||||
if 'Control' in pipe.__class__.__name__ or 'Adapter' in pipe.__class__.__name__ or not (pipe.__class__.__name__.startswith("StableDiffusion") and hasattr(pipe, "unet")):
|
||||
if shared.opts.cross_attention_optimization not in {"Scaled-Dot-Product", "Disabled"}:
|
||||
shared.log.warning(f"Attention: {shared.opts.cross_attention_optimization} is not compatible with {pipe.__class__.__name__}")
|
||||
else:
|
||||
@@ -1089,7 +1089,8 @@ def clear_caches():
|
||||
lora_common.loaded_networks.clear()
|
||||
lora_common.previously_loaded_networks.clear()
|
||||
lora_load.lora_cache.clear()
|
||||
from modules import prompt_parser_diffusers, memstats
|
||||
from modules import prompt_parser_diffusers, memstats, sd_offload
|
||||
sd_offload.offload_hook_instance = None
|
||||
prompt_parser_diffusers.cache.clear()
|
||||
memstats.reset_stats()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user