aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorMrCheeze <fishycheeze@yahoo.ca>2022-11-26 18:28:44 +0000
committerMrCheeze <fishycheeze@yahoo.ca>2022-11-26 18:28:44 +0000
commit1e506657e1cb732a5f0e567ba2585fba2bbb1327 (patch)
tree802ee795b6ea6f11565891b251058bc70015b009 /modules/sd_models.py
parentb5050ad2071644f7b4c99660dc66a8a95136102f (diff)
downloadstable-diffusion-webui-gfx803-1e506657e1cb732a5f0e567ba2585fba2bbb1327.tar.gz
stable-diffusion-webui-gfx803-1e506657e1cb732a5f0e567ba2585fba2bbb1327.tar.bz2
stable-diffusion-webui-gfx803-1e506657e1cb732a5f0e567ba2585fba2bbb1327.zip
no-half support for SD 2.0
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index c59151e0..0e0bd79e 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -244,6 +244,9 @@ def load_model(checkpoint_info=None):
do_inpainting_hijack()
+ if shared.cmd_opts.no_half:
+ sd_config.model.params.unet_config.params.use_fp16 = False
+
sd_model = instantiate_from_config(sd_config.model)
load_model_weights(sd_model, checkpoint_info)