mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 12:25:06 +08:00
call apply_alpha_schedule_override in load_model_weights for #14979
This commit is contained in:
parent
06b9200e91
commit
1a51b166a0
@ -428,6 +428,8 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
|
|||||||
devices.dtype_unet = torch.float16
|
devices.dtype_unet = torch.float16
|
||||||
timer.record("apply half()")
|
timer.record("apply half()")
|
||||||
|
|
||||||
|
apply_alpha_schedule_override(model)
|
||||||
|
|
||||||
for module in model.modules():
|
for module in model.modules():
|
||||||
if hasattr(module, 'fp16_weight'):
|
if hasattr(module, 'fp16_weight'):
|
||||||
del module.fp16_weight
|
del module.fp16_weight
|
||||||
@ -843,7 +845,6 @@ def reload_model_weights(sd_model=None, info=None, forced_reload=False):
|
|||||||
|
|
||||||
sd_model = reuse_model_from_already_loaded(sd_model, checkpoint_info, timer)
|
sd_model = reuse_model_from_already_loaded(sd_model, checkpoint_info, timer)
|
||||||
if not forced_reload and sd_model is not None and sd_model.sd_checkpoint_info.filename == checkpoint_info.filename:
|
if not forced_reload and sd_model is not None and sd_model.sd_checkpoint_info.filename == checkpoint_info.filename:
|
||||||
apply_alpha_schedule_override(sd_model)
|
|
||||||
return sd_model
|
return sd_model
|
||||||
|
|
||||||
if sd_model is not None:
|
if sd_model is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user