aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-16 07:44:17 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-08-16 07:44:17 +0000
commit0815c45bcdec0a2e5c60bdd5b33d95813d799c01 (patch)
tree533f60e8e1eb5027b79408980aa9f702af78e32e /modules/sd_models.py
parent86221269f98ef9b21a6e6c9d04b86e2fb5cb33d3 (diff)
downloadstable-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
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py2
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")