diff options
author | C43H66N12O12S2 <36072735+C43H66N12O12S2@users.noreply.github.com> | 2022-09-19 15:18:33 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-19 15:36:32 +0000 |
commit | cf28445f10e4a6b6fbc9456d45128f163f66f764 (patch) | |
tree | 2cccf5004d209ae71e94c31a3e87e3e9f70fcb92 /modules | |
parent | 422d17487fd05e2aa3748cc27ac7e3ec9f5a56cf (diff) | |
download | stable-diffusion-webui-gfx803-cf28445f10e4a6b6fbc9456d45128f163f66f764.tar.gz stable-diffusion-webui-gfx803-cf28445f10e4a6b6fbc9456d45128f163f66f764.tar.bz2 stable-diffusion-webui-gfx803-cf28445f10e4a6b6fbc9456d45128f163f66f764.zip |
fix cpu usage
Diffstat (limited to 'modules')
-rw-r--r-- | modules/prompt_parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 0835f692..67a4683a 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)
+ res = torch.zeros(c.shape, device=shared.device, dtype=torch.half)
for i, cond_schedule in enumerate(c.schedules):
target_index = 0
for curret_index, (end_at, cond) in enumerate(cond_schedule):
@@ -123,7 +123,7 @@ def reconstruct_cond_batch(c: ScheduledPromptBatch, current_step): break
res[i] = cond_schedule[target_index].cond
- return res.to(shared.device)
+ return res
|