diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-02 00:38:09 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-02 00:38:09 +0300 |
commit | 311354c0bb8930ea939d6aa6b3edd50c69301320 (patch) | |
tree | 2ab21b1228b45e3feae54cf2fe51a01930f17c8a /modules/sd_models.py | |
parent | e672cfb07418a1a3130d3bf21c14a0d3819f81fb (diff) |
fix the issue with training on SD2.0
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index ebd4dff7..bff8d6c9 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -228,6 +228,8 @@ def load_model_weights(model, checkpoint_info, vae_file="auto"): model.sd_model_checkpoint = checkpoint_file
model.sd_checkpoint_info = checkpoint_info
+ model.logvar = model.logvar.to(devices.device) # fix for training
+
sd_vae.delete_base_vae()
sd_vae.clear_loaded_vae()
vae_file = sd_vae.resolve_vae(checkpoint_file, vae_file=vae_file)
|