Skip to content

Commit 8218f6c

Browse files
authored
Update sd_models_xl.py
Fix width/height not getting fed into the conditioning
1 parent 14cf434 commit 8218f6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/sd_models_xl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def get_learned_conditioning(self: sgm.models.diffusion.DiffusionEngine, batch:
1212
for embedder in self.conditioner.embedders:
1313
embedder.ucg_rate = 0.0
1414

15-
width = getattr(self, 'target_width', 1024)
16-
height = getattr(self, 'target_height', 1024)
15+
width = getattr(batch, 'width', 1024)
16+
height = getattr(batch, 'height', 1024)
1717
is_negative_prompt = getattr(batch, 'is_negative_prompt', False)
1818
aesthetic_score = shared.opts.sdxl_refiner_low_aesthetic_score if is_negative_prompt else shared.opts.sdxl_refiner_high_aesthetic_score
1919

0 commit comments

Comments
 (0)