fix: remove unneeded map

This commit is contained in:
_nderscore 2022-08-30 15:25:01 -04:00 committed by hlky
parent fcfe7ba9e1
commit af7f64028c

View File

@ -1349,7 +1349,7 @@ def split_weighted_subprompts(input_string, normalize=True):
return parsed_prompts
# this probably still doesn't handle negative weights very well
weight_sum = sum(map(lambda x: x[1], parsed_prompts))
return [x for x in map(lambda x: (x[0], x[1] / weight_sum), parsed_prompts)]
return [(x[0], x[1] / weight_sum) for x in parsed_prompts]
def slerp(device, t, v0:torch.Tensor, v1:torch.Tensor, DOT_THRESHOLD=0.9995):
v0 = v0.detach().cpu().numpy()