aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-15 15:29:48 +0300
committerGitHub <noreply@github.com>2023-08-15 15:29:48 +0300
commit63f881a5f0b6acf54091f4e9a76d6cdf8908d661 (patch)
tree33a9c0183616ef5cb1724b3e476585b311c893f4
parentdc0e63a48aace069bb032532eca4fee85ee6f76f (diff)
parent54209c1639d0eb6519baa5c07872b85de0062a87 (diff)
Merge pull request #12577 from brkirch/fix-vae-near-checkpoint-exception
Fix `sd_vae_as_default` being accessed instead of `sd_vae_overrides_per_model_preferences`
-rw-r--r--modules/sd_vae.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sd_vae.py b/modules/sd_vae.py
index fd9a1c2a..4b98b3c2 100644
--- a/modules/sd_vae.py
+++ b/modules/sd_vae.py
@@ -160,7 +160,7 @@ def resolve_vae_from_user_metadata(checkpoint_file) -> VaeResolution:
def resolve_vae_near_checkpoint(checkpoint_file) -> VaeResolution:
vae_near_checkpoint = find_vae_near_checkpoint(checkpoint_file)
- if vae_near_checkpoint is not None and (shared.opts.sd_vae_as_default or is_automatic):
+ if vae_near_checkpoint is not None and (not shared.opts.sd_vae_overrides_per_model_preferences or is_automatic):
return VaeResolution(vae_near_checkpoint, 'found near the checkpoint')
return VaeResolution(resolved=False)