Skip to content

Commit

Permalink
Update sd_models_xl.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lllyasviel committed Jan 14, 2024
1 parent 433261d commit 8acd99c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/sd_models_xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@


def get_learned_conditioning(self: sgm.models.diffusion.DiffusionEngine, batch: prompt_parser.SdConditioning | list[str]):
model_management.load_model_gpu(self.clip_patcher)

for embedder in self.conditioner.embedders:
embedder.ucg_rate = 0.0

Expand All @@ -20,7 +22,7 @@ def get_learned_conditioning(self: sgm.models.diffusion.DiffusionEngine, batch:
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

devices_args = dict(device=devices.device, dtype=devices.dtype)
devices_args = dict(device=self.clip_patcher.current_device, dtype=model_management.text_encoder_dtype())

sdxl_conds = {
"txt": batch,
Expand Down

0 comments on commit 8acd99c

Please sign in to comment.