Skip to content

Commit cf28445

Browse files
C43H66N12O12S2AUTOMATIC1111
authored andcommitted
fix cpu usage
1 parent 422d174 commit cf28445

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎modules/prompt_parser.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_learned_conditioning(prompts, steps):
114114

115115

116116
def reconstruct_cond_batch(c: ScheduledPromptBatch, current_step):
117-
res = torch.zeros(c.shape)
117+
res = torch.zeros(c.shape, device=shared.device, dtype=torch.half)
118118
for i, cond_schedule in enumerate(c.schedules):
119119
target_index = 0
120120
for curret_index, (end_at, cond) in enumerate(cond_schedule):
@@ -123,7 +123,7 @@ def reconstruct_cond_batch(c: ScheduledPromptBatch, current_step):
123123
break
124124
res[i] = cond_schedule[target_index].cond
125125

126-
return res.to(shared.device)
126+
return res
127127

128128

129129

0 commit comments

Comments
 (0)