speedup
This commit is contained in:
parent
7d532b0285
commit
c62fc6e1bc
@ -1 +1 @@
|
||||
version = '2.1.773'
|
||||
version = '2.1.774'
|
||||
|
@ -75,9 +75,12 @@ class FooocusExpansion:
|
||||
@torch.inference_mode()
|
||||
def logits_processor(self, input_ids, scores):
|
||||
assert scores.ndim == 2 and scores.shape[0] == 1
|
||||
bias = self.logits_bias.to(scores).clone()
|
||||
self.logits_bias = self.logits_bias.to(scores)
|
||||
|
||||
bias = self.logits_bias.clone()
|
||||
bias[0, input_ids[0].to(bias.device).long()] = neg_inf
|
||||
bias[0, 11] = 0
|
||||
|
||||
return scores + bias
|
||||
|
||||
@torch.no_grad()
|
||||
|
Loading…
Reference in New Issue
Block a user