From 01c93a8400e8698cb8b1fed3052665cefd8e706c Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 19 Sep 2022 18:39:21 +0300 Subject: [PATCH] use model's dtype for #707 --- modules/prompt_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 67a4683a..a6a25b28 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -114,7 +114,7 @@ def get_learned_conditioning(prompts, steps): def reconstruct_cond_batch(c: ScheduledPromptBatch, current_step): - res = torch.zeros(c.shape, device=shared.device, dtype=torch.half) + res = torch.zeros(c.shape, device=shared.device, dtype=next(shared.sd_model.parameters()).dtype) for i, cond_schedule in enumerate(c.schedules): target_index = 0 for curret_index, (end_at, cond) in enumerate(cond_schedule):