Skip to content

Commit

Permalink
Merge pull request #15191 from AUTOMATIC1111/fix-default-in-get_learn…
Browse files Browse the repository at this point in the history
…ed_conditioning

Avoid error from None in get_learned_conditioning
  • Loading branch information
AUTOMATIC1111 authored Mar 9, 2024
2 parents 4c9a7b8 + 0dc179e commit 110e3d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/sd_models_xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def get_learned_conditioning(self: sgm.models.diffusion.DiffusionEngine, batch:
for embedder in self.conditioner.embedders:
embedder.ucg_rate = 0.0

width = getattr(batch, 'width', 1024)
height = getattr(batch, 'height', 1024)
width = getattr(batch, 'width', 1024) or 1024
height = getattr(batch, 'height', 1024) or 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

Expand Down

0 comments on commit 110e3d7

Please sign in to comment.