Skip to content

Commit

Permalink
Avoid error from None
Browse files Browse the repository at this point in the history
  • Loading branch information
KohakuBlueleaf committed Mar 9, 2024
1 parent 4c9a7b8 commit 0dc179e
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 0dc179e

Please sign in to comment.