Skip to content

Commit

Permalink
call apply_alpha_schedule_override in load_model_weights for #14979
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Mar 2, 2024
1 parent 06b9200 commit 1a51b16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/sd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
devices.dtype_unet = torch.float16
timer.record("apply half()")

apply_alpha_schedule_override(model)

for module in model.modules():
if hasattr(module, 'fp16_weight'):
del module.fp16_weight
Expand Down Expand Up @@ -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)
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

if sd_model is not None:
Expand Down

0 comments on commit 1a51b16

Please sign in to comment.