This commit is contained in:
lllyasviel 2023-11-01 15:55:59 -07:00
parent 7d532b0285
commit c62fc6e1bc
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
version = '2.1.773'
version = '2.1.774'

View File

@ -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()