use model's dtype for #707

This commit is contained in:
AUTOMATIC 2022-09-19 18:39:21 +03:00
parent cf28445f10
commit 01c93a8400

View file

@ -114,7 +114,7 @@ def get_learned_conditioning(prompts, steps):
def reconstruct_cond_batch(c: ScheduledPromptBatch, current_step): 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): for i, cond_schedule in enumerate(c.schedules):
target_index = 0 target_index = 0
for curret_index, (end_at, cond) in enumerate(cond_schedule): for curret_index, (end_at, cond) in enumerate(cond_schedule):