Skip to content

Commit

Permalink
send weights to target device instead of CPU memory
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Aug 16, 2023
1 parent 8622126 commit 0815c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None):

timer.record("create model")

with sd_disable_initialization.LoadStateDictOnMeta(state_dict, devices.cpu):
with sd_disable_initialization.LoadStateDictOnMeta(state_dict, devices.device):
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
timer.record("load weights from state dict")

Expand Down

0 comments on commit 0815c45

Please sign in to comment.