diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-16 07:44:17 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-16 07:44:17 +0000 |
commit | 0815c45bcdec0a2e5c60bdd5b33d95813d799c01 (patch) | |
tree | 533f60e8e1eb5027b79408980aa9f702af78e32e | |
parent | 86221269f98ef9b21a6e6c9d04b86e2fb5cb33d3 (diff) | |
download | stable-diffusion-webui-gfx803-0815c45bcdec0a2e5c60bdd5b33d95813d799c01.tar.gz stable-diffusion-webui-gfx803-0815c45bcdec0a2e5c60bdd5b33d95813d799c01.tar.bz2 stable-diffusion-webui-gfx803-0815c45bcdec0a2e5c60bdd5b33d95813d799c01.zip |
send weights to target device instead of CPU memory
-rw-r--r-- | modules/sd_models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index f6fbdcd6..b01d44c5 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -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")
|