diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-19 15:39:21 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-19 15:39:21 +0000 |
commit | 01c93a8400e8698cb8b1fed3052665cefd8e706c (patch) | |
tree | 37197983b34d98e1048070fd1b9157d6f16a6a00 /modules | |
parent | cf28445f10e4a6b6fbc9456d45128f163f66f764 (diff) | |
download | stable-diffusion-webui-gfx803-01c93a8400e8698cb8b1fed3052665cefd8e706c.tar.gz stable-diffusion-webui-gfx803-01c93a8400e8698cb8b1fed3052665cefd8e706c.tar.bz2 stable-diffusion-webui-gfx803-01c93a8400e8698cb8b1fed3052665cefd8e706c.zip |
use model's dtype for #707
Diffstat (limited to 'modules')
-rw-r--r-- | modules/prompt_parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
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):
|