aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models_xl.py
diff options
context:
space:
mode:
authorJanek Mann <janekm@gmail.com>2023-07-20 16:22:52 +0100
committerGitHub <noreply@github.com>2023-07-20 16:22:52 +0100
commit8218f6cd37040eb3ec5d9c68ad54249a44c39166 (patch)
treef5c0e3bc12d17a35dc38c9a07e68e2f12f6f2aab /modules/sd_models_xl.py
parent14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8 (diff)
Update sd_models_xl.py
Fix width/height not getting fed into the conditioning
Diffstat (limited to 'modules/sd_models_xl.py')
-rw-r--r--modules/sd_models_xl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/sd_models_xl.py b/modules/sd_models_xl.py
index 01320c7a..40559208 100644
--- a/modules/sd_models_xl.py
+++ b/modules/sd_models_xl.py
@@ -12,8 +12,8 @@ def get_learned_conditioning(self: sgm.models.diffusion.DiffusionEngine, batch:
for embedder in self.conditioner.embedders:
embedder.ucg_rate = 0.0
- width = getattr(self, 'target_width', 1024)
- height = getattr(self, 'target_height', 1024)
+ width = getattr(batch, 'width', 1024)
+ height = getattr(batch, 'height', 1024)
is_negative_prompt = getattr(batch, 'is_negative_prompt', False)
aesthetic_score = shared.opts.sdxl_refiner_low_aesthetic_score if is_negative_prompt else shared.opts.sdxl_refiner_high_aesthetic_score