瀏覽代碼

Merge branch 'release_candidate' into dev

AUTOMATIC1111 2 年之前
父節點
當前提交
2f98f7c924
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/sd_models_xl.py

+ 2 - 2
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:
     for embedder in self.conditioner.embedders:
         embedder.ucg_rate = 0.0
         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)
     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
     aesthetic_score = shared.opts.sdxl_refiner_low_aesthetic_score if is_negative_prompt else shared.opts.sdxl_refiner_high_aesthetic_score