From e1061ba7e320727a3eab90d2c73c06e8eb740ec7 Mon Sep 17 00:00:00 2001 From: PIRI <34787507+ThisIsPIRI@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:24:02 +0000 Subject: [PATCH] Make token bans work again on HF loaders (#6488) --- modules/sampler_hijack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sampler_hijack.py b/modules/sampler_hijack.py index 97951dd278..24dbcf2ee1 100644 --- a/modules/sampler_hijack.py +++ b/modules/sampler_hijack.py @@ -454,7 +454,7 @@ def get_logits_processor_patch(self, **kwargs): ) # Stuff we don't need - elif warpers[i].__class__.__name__ in ['SuppressTokensLogitsProcessor', 'RepetitionPenaltyLogitsProcessor']: + elif warpers[i].__class__.__name__ in ['RepetitionPenaltyLogitsProcessor']: del warpers[i] # Add custom warpers